Welcome to the CheapCargo API documentation. This comprehensive guide will help you integrate our shipping services into your application for seamless logistics management.
The API supports both XML and JSON. Set the Content-Type header to application/xml or application/json accordingly. The JSON format is a direct translation of the XML structure, where the XML root element becomes the top-level key in the JSON object.
XML attributes are represented as @attributeName fields in JSON. For example:
<shipment pay="false" id="E-1887">
<reference>ORDER-001</reference>
</shipment>
{
"shipment": {
"@pay": false,
"@id": "E-1887",
"reference": "ORDER-001"
}
}
Array elements such as shipment and colli are always represented as JSON arrays, even when there is only one item.
To access our API, each request must include an authentication token and user credentials. The authentication process ensures that only authorized users can interact with the API. Ensure that the hashes in authentication and password are correctly generated and match the expected format to successfully authenticate with the API.
The authentication information will typically look as follows in the request body:
<authentication>317ad2da332f65569b172c77b9565bda</authentication>
<user>
<email>user@example.com</email>
<password>51f740668efd21ab9ec1d0d382d9746e</password>
</user>
Or in JSON:
{
"authentication": "317ad2da332f65569b172c77b9565bda",
"user": {
"email": "user@example.com",
"password": "51f740668efd21ab9ec1d0d382d9746e"
}
}
Authentication token (authentication):
YYYYMMDDHH.HH is based on a 24-hour format with a 2-hour margin. For example, if the request is made between 13:00 and 17:59 on 15 December 2023, the time portion would be 15, resulting in a date and time format of 2023121515. So if the user's API key is Vlp3RxUvRF9xDzoX, then Vlp3RxUvRF9xDzoX2023121515 would hash to 317ad2da332f65569b172c77b9565bda.User email address (email):
Password hash (password):
CheapCargo would hash to 51f740668efd21ab9ec1d0d382d9746e.User account number (accountNumber):
The API also supports performing requests on behalf of another user. This allows authorized partners or administrators to execute operations for other accounts without requiring their direct credentials. To do this, include an onBehalfOf element in the request body after the user element, specifying either the user's email address or account number. For example:
<onBehalfOf>
<email>different_user@example.com</email>
</onBehalfOf>
or
<onBehalfOf>
<accountNumber>260001337</accountNumber>
</onBehalfOf>
In JSON:
{
"onBehalfOf": {
"email": "different_user@example.com"
}
}
or
{
"onBehalfOf": {
"accountNumber": "260001337"
}
}
This functionality only works if the target user has explicitly authorized you to act on their behalf. Without this authorization, the API will reject the request with an authentication error.
It is recommended to use the account number instead of the email address whenever possible, because account numbers are permanent identifiers, while users can change their email addresses at any time.
To ensure optimal compatibility with our API, each request should include the version number your system is using. This versioning helps prevent issues when we make changes to the message structure or functionality of the API. By specifying the version number, your system can continue to function correctly even if updates are made on our end.
The version number is applied on a per-method basis, meaning different methods in your system may use different version numbers.
If no version number is provided, the API will assume you are using the latest version. However, if CheapCargo introduces changes and a new version becomes available that differs from the previous one, this could lead to errors. Therefore, we strongly recommend always including the version number in your requests to ensure consistent operation.
| Endpoint | Current Version | Status |
|---|---|---|
| createShipment | 2.1 |
✅ Stable |
| rateRequest | 2.0 |
✅ Stable |
| getStatus | 1.9 |
✅ Stable |
| getLabel | 1.6 |
✅ Stable |
| cancelShipment | 2.1 |
✅ Stable |
| createAccount | 2.1 |
✅ Stable |
Need help? Our support team is here to assist you:
Get competitive shipping rates from multiple carriers for your shipments.
Features:
Perfect for:
required | object Shipments for which rates are requested | ||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||
required | object Rates information for the shipments | ||||||||
| |||||||||
| environment | string Example: "test" Environment in which the request was processed, omitted in production | ||||||||
Basic rate request to compare shipping options and prices
<?xml version="1.0" encoding="UTF-8"?> <shipments> <authentication>317ad2da332f65569b172c77b9565bda</authentication> <version>2.0</version> <user> <email>user@example.com</email> <password>51f740668efd21ab9ec1d0d382d9746e</password> </user> <shipment orderBy="price"> <sender> <zipcode>1511AN</zipcode> <city>Nijmegen</city> <country>NL</country> <type>business</type> </sender> <receiver> <zipcode>12345</zipcode> <city>Amsterdam</city> <country>NL</country> <type>business</type> </receiver> <content> <colli> <description>Test package</description> <weight>5</weight> <length>120</length> <width>100</width> <height>50</height> <value>100.00</value> <package>PACKAGE</package> <quantity>1</quantity> </colli> </content> <incoterm>DAP</incoterm> </shipment> </shipments>
Example response showing available shipping rates from different carriers
<?xml version="1.0" encoding="UTF-8"?> <rates> <status>ok</status> <shipment> <rate> <id>2b6d503497d9df6ff3c1a355f855e7b2</id> <carrierCode>UPF</carrierCode> <carrierName>UPS Freight</carrierName> <serviceLevel>Express FREIGHT</serviceLevel> <serviceCode>96</serviceCode> <serviceTime>00:00</serviceTime> <price>984.77</price> <weight>120</weight> <modality>express</modality> <info>UPS Freight - Express FREIGHT</info> <shop>false</shop> <dailyPickup>false</dailyPickup> <pickup>2026-01-15</pickup> <delivery>2026-01-18</delivery> <surcharges> <surcharge> <name>Ophaalkosten</name> <percentage>33.5</percentage> <price>137.59</price> </surcharge> </surcharges> </rate> </shipment> <environment>test</environment> </rates>
Creates one or more new shipments with the given pickup and delivery addresses and the given parcels.
Key Features:
Use Cases:
required | object Shipments to be created | ||||||||||||||||||||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||||||||||||||||||||
required | object Information about the created shipment | ||||||||||||||
| |||||||||||||||
| environment | string Example: "test" Environment in which the request was processed, omitted in production | ||||||||||||||
A basic example to get you started with a simple domestic shipment within the Netherlands
<?xml version="1.0" encoding="UTF-8"?> <shipments> <authentication>317ad2da332f65569b172c77b9565bda</authentication> <version>2.1</version> <user> <email>user@example.com</email> <password>51f740668efd21ab9ec1d0d382d9746e</password> </user> <shipment pay="false" waitForLabel="false" id="E-1887" orderBy="price"> <sender> <companyName>My Company</companyName> <contactPerson>John Sender</contactPerson> <street>Hoofdstraat</street> <number>123</number> <zipcode>1000AA</zipcode> <city>Amsterdam</city> <country>NL</country> <phone>+31612345678</phone> <email>sender@example.com</email> <type>business</type> </sender> <receiver> <companyName>Customer Corp</companyName> <contactPerson>Jane Receiver</contactPerson> <street>Kerkstraat</street> <number>456</number> <zipcode>2000BB</zipcode> <city>Rotterdam</city> <country>NL</country> <phone>+31687654321</phone> <email>receiver@example.com</email> <type>business</type> </receiver> <content> <colli> <description>Electronics package</description> <weight>2.5</weight> <length>30</length> <width>20</width> <height>15</height> <value>150.00</value> <package>PACKAGE</package> <quantity>1</quantity> </colli> </content> <reference>ORDER-2026-001</reference> </shipment> </shipments>
Example response when a shipment is successfully created and booked
<?xml version="1.0" encoding="UTF-8"?> <shipment> <status>ok</status> <order id="E-1887"> <number>260004885</number> <paid>true</paid> <details> <datePickup>2025-12-15</datePickup> <dateDelivery>2025-12-20</dateDelivery> <carrierCode>DPS</carrierCode> <carrierName>DPD Parcelshop</carrierName> <status>booked</status> <awb>5112060086107</awb> <trackAndTrace>https://www.cheapcargo.com/Data/TrackAndTrace?id=c3412900-ac53-423f-86dd-10eb8de25542&ajax=true</trackAndTrace> <commercialInvoiceUrl>https://www.cheapcargo.com/Order/CommercialInvoice?orderId=c3412900-ac53-423f-86dd-10eb8de25542</commercialInvoiceUrl> <problems> <problem> <code>Unprocessable Entity</code> <message>The reference should not be empty.</message> </problem> </problems> </details> </order> <environment>test</environment> </shipment>
Retrieve comprehensive status information and tracking details for your shipments.
Information Provided:
Status Types:
new - Added to cart, not paidpaid - Paid but not bookedbooked - Paid, booked, and labeledcancel - Canceled shipmentrequired | object Shipments for which status is requested | ||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||
required | object Status information for the shipment | ||||||||||||
| |||||||||||||
| environment | string Example: "test" Environment in which the request was processed, omitted in production | ||||||||||||
Check the status of a specific shipment using its order number
<?xml version="1.0" encoding="UTF-8"?> <shipments> <authentication>317ad2da332f65569b172c77b9565bda</authentication> <version>1.9</version> <user> <email>user@example.com</email> <password>51f740668efd21ab9ec1d0d382d9746e</password> </user> <status> <orderNumber>260004885</orderNumber> </status> </shipments>
Comprehensive status response including tracking history and shipment details
<?xml version="1.0" encoding="UTF-8"?> <status> <status>ok</status> <label> <orderNumber>260004885</orderNumber> <paid>true</paid> <details> <datePickup>2026-01-15</datePickup> <dateDelivery>2026-01-17</dateDelivery> <carrierCode>DPS</carrierCode> <carrierName>DPD Parcelshop</carrierName> <totalNet>9.8</totalNet> <insurance>0.01</insurance> <weight>2</weight> <status>booked</status> <awb>5112060086107</awb> <pickup> <plannedDate>2026-01-15</plannedDate> <code>CFX-97</code> </pickup> <trackAndTrace> <url>https://www.cheapcargo.com/Data/TrackAndTrace?id=45cf567a-d29c-c362-4d29-90c3ca3f6a82&ajax=true</url> <statuses> <status> <status>inTransit</status> <message>Departed from Facility</message> <occurred>2025-12-15 13:37:00</occurred> </status> </statuses> </trackAndTrace> <problems> <problem> <code>Unprocessable Entity</code> <message>The reference should not be empty.</message> </problem> </problems> </details> </label> <environment>test</environment> </status>
Download shipping labels for your booked shipments.
Label Options:
pdf - Standard label formatpdfa4 - A4 format for easy printingzpl - ZPL file for label printersFeatures:
Requirements:
booked statusrequired | object Labels for which the URL is requested | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
required | object Status information for the labels | ||||||||||||||
| |||||||||||||||
| environment | string Example: "test" Environment in which the request was processed, omitted in production | ||||||||||||||
Download a shipping label for a booked shipment
<?xml version="1.0" encoding="UTF-8"?> <labels> <authentication>317ad2da332f65569b172c77b9565bda</authentication> <version>1.6</version> <user> <email>user@example.com</email> <password>51f740668efd21ab9ec1d0d382d9746e</password> </user> <label> <orderNumber>260004885</orderNumber> <type>pdf</type> </label> </labels>
Response containing the download URL for the requested shipping label
<?xml version="1.0" encoding="UTF-8"?> <labels> <status>ok</status> <label> <number>260004885</number> <type>pdf</type> <status>available</status> <url>https://labels.cheapcargo.com/2026/01/14/45cf567a-d29c-c362-4d29-90c3ca3f6a82/label10x21.pdf</url> </label> <environment>test</environment> </labels>
Cancel one or more shipments using their order numbers.
Cancellation Rules:
paid and booked can be canceledWhat Happens:
cancelBest Practices:
required | object Shipments to be canceled | ||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||
required | object Information about the canceled shipment | ||||||||||
| |||||||||||
| environment | string Example: "test" Environment in which the request was processed, omitted in production | ||||||||||
Cancel a specific shipment using its order number
<?xml version="1.0" encoding="UTF-8"?> <shipments> <authentication>317ad2da332f65569b172c77b9565bda</authentication> <version>2.1</version> <user> <email>user@example.com</email> <password>51f740668efd21ab9ec1d0d382d9746e</password> </user> <order id="E-1887"> <orderNumber>260004885</orderNumber> </order> </shipments>
Confirmation response when a shipment is successfully canceled
<?xml version="1.0" encoding="UTF-8"?> <shipment> <status>ok</status> <order id="E-1887"> <number>260004885</number> </order> <environment>test</environment> </shipment>
Create and manage user accounts (restricted access)
⚠️ RESTRICTED ENDPOINTS ⚠️
onBehalfOf element is not allowed and will result in an errorThis endpoint allows you to create new user accounts in the CheapCargo system.
Account Creation Process:
Required Information:
Use Cases:
required | object Account to be created | ||||||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||||||
required | object Information about the created account | ||||||||||
| |||||||||||
Example request to create a new user account. Note: This endpoint requires special permission from CheapCargo.
<?xml version="1.0" encoding="UTF-8"?> <accounts> <authentication>317ad2da332f65569b172c77b9565bda</authentication> <version>2.1</version> <user> <email>user@example.com</email> <password>51f740668efd21ab9ec1d0d382d9746e</password> </user> <account> <email>newuser@example.com</email> <invoiceEmail>invoices@example.com</invoiceEmail> <euid>NLNHR.12345678</euid> <cocNumber>12345678</cocNumber> <contactPerson>John Doe</contactPerson> <phone>+31612345678</phone> <vatNumber>NL123456789B01</vatNumber> </account> </accounts>
Example response when an account is successfully created
<?xml version="1.0" encoding="UTF-8"?> <accounts> <status>ok</status> <account> <accountNumber>260004886</accountNumber> </account> <environment>test</environment> </accounts>