Skip to main content

Courier Developer Portal - Dev - API Request and Response Examples

Example JSON structures for Create Shipment and Cancel Shipment API calls with the Courier Developer Portal

Tom Higgs avatar
Written by Tom Higgs
Updated this week

Overview

This help guide is intended for developers of the Courier Developer Portal. It provides some example JSON structures of calls.


Create Shipment Request Example

{
"AccountNo": "an",
"Password": "pw",
"ShipmentId": "260692",
"ServiceName": "Service 01",
"ServiceCode": "SC01",
"Client": "Mintsoft",
"Warehouse": "Main Warehouse",
"OrderNumber": "ON123456",
"ExternalOrderReference": "EXT123456",
"Channel": "Manual Input",
"CashOnDelivery": {
"Amount": 20.0,
"Currency": "GBP"
},
"ShipFrom": {
"Email": "[email protected]",
"Phone": "0203 6089 802",
"Name": "Mark Mintsoft",
"CompanyName": "Mintsoft",
"AddressLine1": "Mintsoft Ltd",
"AddressLine2": "Office 9, The Aquarium",
"AddressLine3": "101 Lower Anchor Street, Chelmsford",
"Town": "Essex",
"County": "Essex",
"PostCode": "G74 5PA",
"CountryCode": "GB",
"VATNumber": "VATNo1234",
"EORINumber": "EORINo123",
"IOSSNumber": "IOSSNo"
},
"ShipTo": {
"Email": "[email protected]",
"Phone": "07912345678",
"Name": "firstname lastname",
"CompanyName": "CompanyTo",
"AddressLine1": "27 The Rook",
"AddressLine2": null,
"AddressLine3": null,
"Town": "Whissendine",
"County": "Rutland",
"PostCode": "75012",
"CountryCode": "FR",
"VATNumber": "VATNo5678",
"EORINumber": "EORINo567"
},
"Parcels": [
{
"ParcelNo": 1,
"UnitOfLength": "CM",
"Length": 10,
"Width": 10,
"Height": 10,
"UnitOfWeight": "kg",
"Weight": 2.5,
"Cost": {
"Currency": "GBP",
"Amount": 27.5
},
"ParcelItems": [
{
"Title": "SKU02-name",
"SKU": "SKU02",
"Quantity": 1,
"UnitWeight": 0.45,
"UnitPrice": {
"Currency": "GBP",
"Amount": 5
},
"CommodityCode": "CC-SKU02",
"CustomsDescription": "Customs-SKU02",
"CountryOfManufacture": "UK"
},
{
"Title": "SKU01-name",
"SKU": "SKU01",
"Quantity": 1,
"UnitWeight": 0.45,
"UnitPrice": {
"Currency": "GBP",
"Amount": 5
},
"CommodityCode": "SKU01-name",
"CustomsDescription": "Customs-SKU01",
"CountryOfManufacture": "UK"
}
]
},
{
"ParcelNo": 2,
"UnitOfLength": "CM",
"Length": 10,
"Width": 10,
"Height": 10,
"UnitOfWeight": "kg",
"Weight": 2.5,
"Cost": {
"Currency": "GBP",
"Amount": 27.5
},
"ParcelItems": [
{
"Title": "SKU08-name",
"Quantity": 1,
"UnitWeight": 0.45,
"UnitPrice": {
"Currency": "GBP",
"Amount": 5
},
"CommodityCode": "SKU08-name",
"CustomsDescription": "Customs-SKU08",
"CountryOfManufacture": "UK"
}
]
}
]
}

Create Shipment Response Example

{
"Success": true,
"ErrorMessages": null,
"Shipment": {
"MainTrackingNumber": "TrackingNumber01",
"LabelFormat": "PNG",
"CustomsDocumentFormat": "PDF",
"Packages": [
{
"TrackingNumber": "TrackingNumber01",
"TrackingUrl": null,
"ParcelNo": 1,
"LabelAsBase64": "",
"CustomsDocumentName": "",
"CustomsPDFDocumentAsBase64": ""
},
{
"TrackingNumber": "TrackingNumber02",
"TrackingUrl": null,
"ParcelNo": 3,
"LabelAsBase64": "LabelAsBase64.....",
"CustomsDocumentName": "CN22",
"CustomsPDFDocumentAsBase64": "CustomsPDFDocumentAsBase64...."
}
]
}
}

Cancel Shipment Request Example

{
"AccountNo": "an",
"Password": "pw",
"TrackingNumber": "TrackingNumber02",
"Comment": null
}

Cancel Shipment Response Example

{
"Success": true,
"ErrorMessages": [
"Already Shipped",
"Another message"
]
}
Did this answer your question?