The Transglobal Express API is a RESTful web API that allows you to quote and book orders. While this documentation will go into as much detail as possible to aid integration, some technical knowledge around website development, http requests and APIs will be necessary. If you have any questions or require any assistance during integration you can contact email@example.com
The Transglobal Express API uses web api technology to communicate with clients. Requests are sent via HTTP(S), in JSON or XML format. The request/response properties and format are described on the individual method pages linked below. To aid development we have created a request generation tool where you can populate a form using example information you'd expect to be sending and then generate a JSON or XML requet for that method based on the form information.
A note regarding XML: The framework used by the Transglobal Express API utilizes the DataContract and related classes to serialize/deserialize requests and responses. One side effect of this is that the order of the elements in the request matters. While it is valid in XML terms to have node elements on a given tree level in any order, if the nodes are not in the expected order the framework will not parse the request correctly and the resquest will fail with an "Invalid Request" response.
Another important thing is to define the request xml namespace correctly via the xmlns attribute. The namespace required is defined within the documentation page of each method.
Given the extra constraints of the XML formatted requests, we highly recommend that you develop your request building logic by copying the example requests from the relevant documentation page and replace the values, or use our request generation form to generate a valid XML request.
The JSON format does not have the above constraints which is one of the reasons we recommend that as the format for structuring your requests.
To integrate with the Transglobal Express API you will need to follow these steps:
Your method of being billed when placing orders via the Transglobal Express API will depend on what type of account you have with us. If you have a credit account with us where you are invoiced monthly, you will be able to place orders via the API without any additional actions being taken; as long as you have not reached your credit limit you will be able to successfully place orders.
If the account you have with us is not a credit account, or you have yet to register a live account with us, then you will be using a "card" account (meaning if you were to place an order via our website you would be paying by card). The Transglobal Express API can be used by card accounts, but in order to do so the account must have pre-paid credit loaded on it. This can be done by logging into your account on the website and navigating to "account settings" where you will be able to pre pay credit onto your account. The cost of any order you place on the Transglobal Express API will be deducted from your account pre-paid credit at the time of booking.
When developing against the staging API you can manage the simulated credit by logging in with your staging account credentials and navigating to the dashboard by clicking on the logged in user's name. From here you will be able to update the credit available on your staging account. This will allow you to add more credit if required should your staging orders have used your available credit, or reduce your available credit to a level where you can simulate a situation of having insufficient funds when attempting to place an order.
The quote section of the Transglobal Express API is used to retrieve a quote for a shipment. It will return a list of available services with relevant information and price breakdown, along with information to facilitate booking.
If you are an existing API customer you will probably notice that the request requires significantly more information to get a quote than is required to get a basic quote on the Transglobal Epress website. This is because in order to provide a full and accurate price breakdown we require the full shipment details to check for remote areas etc, whereas on the website these can be discovered and displayed at the point of information submission. Because of this there is a greater amount of data submitted at the point quoting as opposed to at the point of booking (if booking by submitting the quote id as part of the request).
The method(s) available to the quote section of the Transglobal Express API are:
The book section of the Transglobal Express API is used to book a job. This can be done based on a quote that was obtained via the quote section, or by submittig all the shipment details allowing you to skip the quote step if you already know the service you wish to use. Upon successful booking the book method will return order references, label and documentation content along with download links should the client prefer to download thei labels/documentation at a later time.
The method(s) available to the book section of the Transglobal Express API are:
The country section of the Transglobal Express API is a utility to get country information that can be used as part of quote/book requests.