An API (Application Programming Interface) allows external systems to integrate directly with the ParcelBroker services.Developers can use the various API's to obtain parcel quotes, book collections, check shipping statuses and track deliveries.
The ParcelBroker API's are all based on sending (POST) and receiving XML via HTTPS and allows developers to access your accountdirectly without disclosing your username and password. In order to use the API's you will need to be given access to the variousAPI methods by applying for a key.
You can obtain a key by visiting your account area or by visiting this link directly: https://parcelbroker.co.uk/myaccount/api
Here you will find an "APIKey" and a "Shared Secret". It is these details that allow you secure access to the API's.
In order to use our API you will require technical knowledge of your systems and know how to handle XML. Since the interface to our systems is all basedaround XML any programming language that can construct, send and receive XML can be used.
There are various subjects that you will need to understand in order to successfully integrate.
The endpoint is the URL that you will send all your API requests to. The XML should be send over HTTPS via a POST. Any data sent via HTTP or GET will be rejected.
In order to gain access to your account and access the system via API, each request needs to be authenticated. This is done through a combination of an APIKey, Shared Secret, Public Code and Token.
Each request that is submitted needs to contain a
<header> element. This element is made up of the following:
<apikey>- This is the API key given to you by ParcelBroker.
<key>- This is your public key which you can define as any valid character string. (e.g 'publickey')
<token>- This is a SHA1 hash of your shared secret and your
<uniqueid>- This is a unique ID that you construct for every request.
The system can return a number of responses based on the request made. Any errors take on the following format:
<error>Token authentication failed.</error>
The status will always be "Error" and the list of status codes can be found here. More description error message should be displayed to help you fix any issue.
We have created a test harness for you to submit your XML request to our API's. You can use this to validate the XML or check if you are having problems integrating.
We have a full test harness so that you can test your XML.