Authentication
Overview
Border Express uses OAuth 2.0 authorisation. Before you can start utilising the API you will need to contact Border Express by emailing integrations@border.360southstaging.com. Please provide an email address to link to your API account. After your account is set up, Border Express will send you a link to generate your client credentials, these will be used to retrieve an API bearer token.
Retrieving Your Token
Make a POST request to https://api.border.360southstaging.com/token with a header of: “Content-Type: application/x-www-form-urlencoded”.
The entered request body should contain your URL encoded credentials in the format of:
grant_type=client_credentials&client_id={clientId}&client_secret={clientSecret}
If successful a result will be returned in JSON:
{
“access_token”:”****”,
“token_type”:”bearer”,
“expires_in”:3599,
“scope”:”bex.webapi.basic”,
“userName”:”username@border.360southstaging.com”,
“.issued”:”Tue, 29 Aug 2017 05:45:16 GMT”,
“.expires”:”Tue, 29 Aug 2017 06:45:16 GMT”
}
Using Your Token
To use your token, you must add the access token ID into the request header.
When a token is first retrieved, it is valid for an hour.
In the request header, add the below values:
Content-Type: application/json
Authorization: bearer {access_token_value}
Renewing Your Token
Tokens must be renewed once expired. If a token has been revoked by Border Express you will receive a 401 status code and will be required to re-authenticate.
POD/Tracking Data
Retrieve PODs:
For Actual Images, send a GET request to:
/api/v1/consignments/{consignmentNumber}/pods/{fileFormat}
For a base64 string, send a GET request to:
/api/v1/consignments/{consignmentNumber}/pods/{fileFormat}?base64=true
The most recent images will be returned.
Sending a GET to “/api/connotes/{connoteNumber}/pods/Metadata
” will return a list of POD details attached to a consignment.
If there’s multiple PODs attached to a consignment and a specific one is required, use the Id of the preferred image and download it via /api/v1/consignments/{consignmentNumber}/pods/{PODId}/{fileFormat}
Consignment Status Updates:
To return the history of status updates for a consignment (Despatched, In Transit, On Board and Delivered) set a GET request to:
/api/v1/consignments/{consignmentNumber}/Statuses
To return the current status for a consignment send a GET request to:
/api/v1/consignments/{consignmentNumber}
Item Scanning:
To return item scans for a particular consignment send a GET request to:
/api/v1/consignments/{consignmentNumber}/barcodes/scans
To return item scans for a particular barcode send a GET request to:
/api/barcodes/{barcode}/scans
To return a list of available scan types send a GET request to:
/api/barcodes/scanTypes
API Documentation
Full Border Express API documentation is available at https://api.border.360southstaging.com/swagger/index.html