Create Your First Order via the e-Courier API

Follow this tutorial to learn how to connect to and post an order through the e-Courier API.

  • Before creating an order with the e-Courier API you must ensure the e-Courier customer has their API endpoints enabled, and you must have either a username and password or an authentication token commonly called a UserGUID (User Global Unique Identified)
  • You must also have the e-Courier customer’s base URL, for example: https://post.example.e-courier.com
  • You must know what Customer Code the e-Courier customer has designated for orders you create via API.
 
 If you have a specific platform in which you are developing your integration then you may use that platform to create documents like the following in either JSON or SOAP formats. If you would like to test posting to the e-Courier endpoint interactively, then you can download the Postman application to test and work with the e-Courier API endpoints.

 

The following documents should be posted as an HTTP Post message to the following endpoints:

For SOAP Documents:

http://post.example.e-courier.com/example/software/xml/xml.asp

For JSON Documents:

http://post.example.e-courier.com/example/software/xml/ecJsonPost.asmx/SaveOrder

In both cases substitute your actual base URL for the example base URL (http://post.example.e-courier.com/example).

The e-Courier endpoint uses a custom HTTP Header called UserGUID to specify an access token. This can be specified in Postman under the “Headers” tab as shown below:

With the UserGUID specified on the “Headers” tab, you’re ready to go the Body tab and enter the content of the post.

When the UserGUID HTTP header is set and the Body of the post is set with a properly formatted JSON or SOAP XML document, then the order is ready to be submitted. When you click the ‘Send’ button you should receive a response stating the request was received. If you receive an error message, check the API Reference page for information regarding error statuses.