Shipments
This API is used to return information about the supplied shipments.
Example
// Shipments Example
{
"shipments": {
"orders": [
"TST123456",
"TST098765"
],
"paperwork": {
"labels": 1,
"customs": 1
},
"tracking" : 1
}
}
// Shipments Example
<shipments>
<orders>
<ordernumber>TST123456</ordernumber>
<ordernumber>TST098765</ordernumber>
</orders>
<paperwork>
<labels>1</labels>
<customs>1</customs>
</paperwork>
<tracking>1</tracking>
</shipments>
| Element | Required | Description |
|---|---|---|
| shipments | Yes | Root element |
| Shipments | ||
| test | No | Test mode. Set to 1 to return a mock shipment. |
| tracking | No | Return shipment tracking |
| orders | Yes | List of order numbers |
| Orders | ||
| ordernumber | Yes | Order number |
| paperwork | No | List of paperwork types |
| Paperwork | ||
| labels | No | Return a base64 encoded copy of the label if it exists |
| customs | No | Return a base64 encoded copy of the customs paperwork if it exists |
Example Response
// Shipments Response Example
{
"header": {
"status": "success"
},
"shipments": [
{
"ordernumber": "TST123456",
"net": "58.00",
"vat": "0.00",
"collection": {
"line1": "1 Test Street",
"location": "CM71GZ",
"country": "GB"
},
"delivery": {
"line1": "1234 Star Street",
"location": "90210",
"country": "US"
},
"pickup": "dropoff",
"paperwork": {
"labels": {
"format": "pdf",
"data": "base64:string"
},
"customs": {
"format": "pdf",
"content": "base64:string"
}
},
"tracking" : {}
},
{
"ordernumber": "TST098765",
"net": "8.99",
"vat": "1.80",
"collection": {
"line1": "1 Test Street",
"location": "CM71GZ",
"country": "GB"
},
"delivery": {
"line1": "2 Old Street",
"location": "NW12TE",
"country": "GB"
},
"pickup": "2022-05-09",
"paperwork": {
"labels": {
"format": "html",
"content": "base64:string"
}
},
"tracking" : {
"trackingref" : 12341234,
"track" : [
{
"datetime" : "2021-05-09 12:00:00",
"description" : "Event Description",
"status" : {
"status" : "status description"
}
}
],
"url" : "https://carrier-tracking.url"
}
}
]
}
// Shipments Response Example
<response>
<header>
<status>Success</status>
</header>
<shipments>
<shipment>
<ordernumber>TST123456</ordernumber>
<net>58.00</net>
<vat>0.00</vat>
<status>ACCEPTED</status>
<collection>
<line1>1 Test Street</line1>
<location>CM71GZ</location>
<country>GB</country>
</collection>
<delivery>
<line1>1234 Star Street</line1>
<location>90210</location>
<country>US</country>
</delivery>
<pickup>dropoff</pickup>
<paperwork>
<labels format="pdf">base64:string</labels>
<customs format="pdf">base64:string</customs>
</paperwork>
<tracking />
</shipment>
<shipment>
<ordernumber>TST098765</ordernumber>
<net>8.99</net>
<vat>1.80</vat>
<status>ACCEPTED</status>
<collection>
<line1>1 Test Street</line1>
<location>CM71GZ</location>
<country>GB</country>
</collection>
<delivery>
<line1>2 Old Street</line1>
<location>NW12TE</location>
<country>GB</country>
</delivery>
<pickup>2022-05-09</pickup>
<paperwork>
<labels format="html">base64:string</labels>
</paperwork>
<tracking>
<trackingref>12341234</trackingref>
<url>https://carrier-tracking.url</url>
<track datetime="2021-05-09 12:00:00">
<description>Event Description</description>
<status>Status Description</status>
</track>
</tracking>
</shipment>
</shipments>
</response>
| Element | Description | |
|---|---|---|
| response | Root element | |
| header | Header element | |
| status | Response status. Can be success or error | |
| shipments | Array of shipment data | |
| Shipments | ||
| shipmentreference | Shipment reference | |
| yourreference | Your reference | |
| net | Net price of the shipment | |
| vat | VAT price of the shipment | |
| status | Shipment status on our system | |
| collection | Collection address | |
| Collection | ||
| line1 | Collection address line 1 | |
| location | Collection postcode or town/city | |
| country | Colleciton country code | |
| delivery | Delivery address | |
| Delivery | ||
| line1 | Delivery address line 1 | |
| location | Delivery postcode or town/city | |
| country | Delivery country code | |
| pickup | Collection date or dropoff | |
| paperwork | Array of paperwork data | |
| Paperwork | ||
| labels | Base64 encoded data of the paperwork | |
| customs | Base64 encoded data of the paperwork | |
| attribute:format |
Format of the paperwork (html or pdf) Some carriers labels are returned as HTML |
|
| labels | Labels data | |
| customs | Customs paperwork data | |
| fomat |
Format of the paperwork (html or pdf) Some carriers labels are returned as HTML |
|
| content | Base64 encoded data of the paperwork | |
| Tracking | ||
| trackingref | Tracking reference if available | |
| url | Carrier tracking url if available | |
| track | Array of tracking events if available | |
| attribute:datetime | Event date and time | |
| Track | ||
| datetime | Event date and time | |
| description | Event description | |
| status | Event status | |
| attribute:code | Event status code (if available) | |
| status | Event status | |
| Status | ||
| code | Event status code (if available) | |
| status | Event status description | |