e-Courier Package Shipping and Tracking API

  1. Overview
  2. Technology
  3. Security
  4. Examples
  5. Order Schema
  6. e-Courier API Methods
  7. Testing

OVERVIEW

e-Courier provides on-line access to package delivery services, including local, same day, and after hours delivery. The e-Courier API allows a single point of access to this network of service providers. This document describes the API and provides tools that will assist in automating local and same-day package shipping. With the e-Courier API, you can integrate the functions associated with shipping and tracking into your own computer systems.

The e-Courier product offering consists of a Courier Management System (CMS) and a Package Transaction Router (PTR). With these components, e-Courier is able to link consumers and providers of courier services nationwide. The CMS is targeted for use by the providers of courier services and is modeled on a traditional desktop application. It is designed to support clients running Internet Explorer 5.0 or better. The application uses MS-VB script, HTML 4.0, DHTML, XML, SOAP, WAPI, and MS-RDS (Remote Data Services). The CMS consists of web-based modules for Order Entry, Accounts Receivable, Customer Maintenance, Driver Maintenance, Rates, Routes, Reports, & various utility database support programs. The PTR consists of "black box" processes designed to manage message routing through the e-Courier network. Through the PTR and CMS, e-Courier has unique visibility into the movement of packages through local couriers nationwide.

There are several points of access to the e-Courier network. The most public points are the e-Courier web sites that are either branded with the e-Courier marks or the marks of the individual service providers and CMS users. The e-Courier API allows our partners to interact with the network in a more automated fashion.

The e-Courier API allows in-house developers, consultants and independent software vendors (ISVs) to connect their company's or their client's applications directly to the e-Courier network via the Internet. The e-Courier API also allows developers to add shipping and tracking functionality to their applications.

Top of Page

TECHNOLOGY

e-Courier uses XML as the preferred mechanism to transfer data between systems. We are currently using the Simple Object Access Protocol (SOAP) to access business objects across the Web. SOAP defines a structure for an XML document. See http://www.w3.org/TR/soap12/ for current SOAP specifications. You normally Post an XML SOAP document to the e-Courier server and receive an XML SOAP response document. In order to increase performance, the e-Courier API uses XML attributes instead of tags where possible.

Top of Page

SECURITY

Security requires you to go through the login process to obtain a UserGUID token. All subsequent methods require that UserGUID.

All credit card information is encrypted and uses secure web pages. e-Courier uses 128-bit encryption technology for the secure Internet transactions.

Top of Page

EXAMPLES

The following is an example of a SOAP request:


<SOAP:Envelope xmlns:SOAP='http:schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<m:Login xmlns:m='http://www.e-courier.com/schemas/' UserName='test' Password='test'>
</m:Login>
</SOAP:Body>
</SOAP:Envelope>

Every SOAP request will return a SOAP response. The SOAP response is another SOAP envelope with the same method name appended with "Response".


The following is a sample valid SOAP response.


<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<m:LoginResponse xmlns:m='http://www.e-courier.com/schemas/' UserGUID='00000000-0000-0000-0000-00000000' />
</SOAP:Body>
</SOAP:Envelope>

The SOAP response may also contain a Fault tag. The Fault tag contains a Faultcode, Faultstring, FaultActor, and Detail tags.

The following is a sample invalid SOAP response.


<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<faultcode>10001</faultcode>
<faultstring>Invalid Login</faultstring>
<faultactor>$Id$:Login: execXMLService Ln:0</faultactor>
<detail>the xml soap command</detail>
</SOAP:Body>
</SOAP:Envelope>

Top of Page

ORDER SCHEMA

Follow this link to the XML schema definition (XSD) file of the full order schema. www.e-courier.com/ecourier/software/schema/order.xsd This xsd defines all the attributes for the entire order schema including the links to the other xsd definitions for the sub-schemas for Stops,Jobs,OrderFees,OrderNotifiers,OrderEvents, and Customer

Top of Page

E-COURIER API METHODS

Each method has a Send and Response XML schema definition (XSD) file. The xsd file has been converted to a html file for readability. Within the xsd html file there is a link to the corresponding xsd file. Within the html file we have removed the SOAP envelope and body definitions so it is easier to see the method definitions.

The following are the primary functions used in the e-Courier API:


TESTING

See http://demoa.e-courier.com/ecourier/software/xml/xmltest.asp for samples of the API methods and to test the XML interface.


Contact e-courier for the specific URLs to use. The following is a sample javascript demonstrating how to access the e-courier XML interface:

var oXMLDom = new ActiveXObject("Microsoft.XMLDOM");
var oXMLHttp = new ActiveXObject("Microsoft.XMLHTTP");
var sURL = "http://demoa.e-courier.com/ecourier/software/xml/XML.asp" ;
var oRoot = oXMLDom.createNode("element","SOAP:Envelope","http://schemas.xmlsoap.org/soap/envelope/") ;
var oBody = oXMLDom.createNode("element","SOAP:Body","http://schemas.xmlsoap.org/soap/envelope/");
var oMethod = oXMLDom.createNode("element","m:Login","http://www.e-courier.com/software/schema/public/") ;
oBody.appendChild(oMethod) ;
oRoot.appendChild(oBody) ;
oXMLDom.appendChild(oRoot) ;
oMethod.setAttribute( "UserName","test") ;
oMethod.setAttribute( "Password","test") ;
oXMLHttp.open ("POST",sURL,false) ;
oXMLHttp.send (oXMLDom) ;
oResponse = oXMLHttp.responseXML.documentElement.selectSingleNode(".//m:LoginResponse") ;
oXMLDom = null ;
oXMLHttp = null;

The following is a sample visual basic script demonstrating how to access the e-courier XML interface:

set oXMLDOM = createobject("Microsoft.XMLDOM")
set oRoot = oXMLOM.createNode("element","SOAP:Envelope","http://schemas.xmlsoap.org/soap/envelope/")
set oBody = oXMLOM.createNode("element","SOAP:Body","http://schemas.xmlsoap.org/soap/envelope/")
set oMethod = oXMLOM.createNode("element","m:Login","http://www.e-courier.com/software/schema/public/")
oBody.appendChild oMethod
oRoot.appendChild oBody
oXMLDOM.appendChild oRoot
oMethod.setAttribute "UserName","test"
oMethod.setAttribute "Password","test"
set xmlhttp = createobject("Microsoft.XMLHTTP")
sURl = "http://demoa.e-courier.com/ecourier/software/xml/xml.asp"
xmlhttp.open "POST",sURL,false
xmlhttp.send oXMLDom
set oResponse = xmlhttp.responseXML.documentElement.selectSingleNode(".//m:LoginResponse")
UserGUID = oResponse.getAttribute("UserGUID")
set oXMLDom = nothing
set xmlhttp = nothing

Top of Page