Field Name | Required | Format | Notes |
order_id | No | String | Automatically generated if empty. |
alt_id | No | String | |
shipping_name_company | No | String | |
shipping_name | Yes | String | |
shipping_address_line_one | Yes | String | |
shipping_address_line_two | No | String | |
shipping_address_city | Yes | String | |
shipping_address_county | Conditional | String | This is required for certain countries, such as US or CA who have ISO 3166-2 codes for States (eg. Florida = FL, California = CA). |
shipping_address_postcode | Conditional | String | Required in all cases, apart from countries such as IE where post/zip codes aren't mandatory, however, this may be courier specific. |
shipping_address_iso | Yes | String | ISO 3166-2 code (eg. United Kingdom = GB, Germany = DE, France = FR, Japan = JP). |
Conditional | String | If the courier service offers an email update service, they may insist this information is sent. | |
phone_one | Conditional | String | If the courier service offers an SMS update service, they may insist this information is sent. Alternatively, this may be used to contact the recipient in the event of an issue with delivery. |
total_paid | Yes | Float/Integer | Value of the contents of the shipment. |
payment_currency | Yes | String | ISO 4217 code for the currency of the value of the shipment (eg. £ = GBP, € = EUR, $ = USD/CAD). |
shipping_service_id | Yes | Integer | Shipping Rule ID of the shipping service you wish to use to ship the order. |
weight | Yes | Float/Integer | Weight in kilograms. Can be submitted as a whole number or as a float to 3 decimal places (eg. 2kg // 1.998 kg). |
value | Yes | Float/Integer | Value of the individual parcel. Can be submitted as a whole number or as a float to 2 decimal places (eg. £2 // £1.99). |
width | Yes | Float/Integer | Width in centimetres of the parcel. Can be submitted as a whole integer or as a float to 2 decimal places (eg. 30cm // 29.98cm). |
length | Yes | Float/Integer | Length in centimetres of the parcel. Can be submitted as a whole integer or as a float to 2 decimal places (eg. 30cm // 29.98cm). |
height | Yes | Float/Integer | Height in centimetres of the parcel. Can be submitted as a whole integer or as a float to 2 decimal places (eg. 30cm // 29.98cm). |
Example Request (POST):
Copy{ "order_id": "1234567890", "alt_id": "0987654321", "shipping_address": { "shipping_name_company": "Despatch Cloud Ltd", "shipping_name": "John Doe", "shipping_address_line_one": "Fake Street", "shipping_address_line_two": "Fake Area", "shipping_address_city": "Fakeville", "shipping_address_county": "Fakeshire", "shipping_address_country": "United Kingdom", "shipping_address_postcode": "FA11 1KE", "shipping_address_iso": "GB" }, "contact": { "email": "[email protected]", "phone_one": "01234567890" }, "payment": { "total_paid": "0.01", "payment_currency": "GBP" }, "shipping_service_id": 119, "parcels": [ { "weight": 3, "value": 25, "width": 30, "length": 20, "height": 10 }, { "weight": 3, "value": 25, "width": 30, "length": 20, "height": 10 } ] }
Example Response:
Copy{ "status": "SUCCESS", "order_id": "1234567890", "despatch_cloud_ref": "DC-1570625609-435", "shipping_service": 219, "label_type": "pdf", "label": "QSBiYXNlLTY0IGVuY29kZWQgbGFiZWwgd2lsbCBhcHBlYXIgaGVyZSE=", "tracking_code": "12345678900987654321A", "service_code": null, "courier_name": "DPD" }