Create MPS Order: Rest of the World and Cross-Border
This API takes the shipment details, drop information, pickup information and creates an order with specified carrier partner. This applies for shipments created and transported within North America, Europe, Middle East and South-East Asia and cross-border Multi-Piece shipments.
Overview
To create orders with international couriers, Clickpost has provided the V4 Order Creation API that caters specifically to international customers or cross-border shipments. Enterprises can place both Single Piece and Multi-Piece Shipments with this API, to be delivered by their preferred courier partner.
This page specifically deals with Multi-Piece Shipments (MPS).
Important Links
Usecase
This is a standard API which applies to all MPS (Multi-Piece Shipment) and SPS (Single Piece Shipment) orders
Geography
- Shipments created and transported in
- North America
- Europe
- Middle East
- South East Asia
- Cross-Border shipments: Shipments that are to be transported from India to any other country in the aforementioned regions, or vice versa
Placing Reverse Shipment (RVP) Requests
The customer can also use this API to place Reverse Shipment (RVP) orders, orders that typically are picked up from the end-user's address and sent to the enterprise warehouse. The payload used for the request for placing an order is mostly the same as forward shipments, but 3 points need to considered in order to place a successful RVP order (All of these are mandatory, and Clickpost will throw errors if one of these is not fulfilled):
- The carrier partner to be used to place the RVP order must support RVP shipments. Ensure that the value passed in the
courier_partner
field is the partner ID for a carrier that supports RVP shipments. - Ensure that the
delivery_type
field in theshipment_details
object has the value"RVP"
. - Ensure that the
rvp_reason
field is added in theadditional
object.
If the enterprise is interested in conducting a quality-control check (QC check) at the end-user's end by the carrier, they can also add an optional qc_type
field in the additional
object and set it's value to "doorstep"
. The enterprise can also configure which parameters of the item to check for during the QC check (e.g: brand, color or whether all buttons are working) from Clickpost's dashboard, and the check will be done only on those parameters.
URL
POST <https://www.clickpost.in/api/v4/create-order/?username=test-enterprise&key=34be9be5-3de8-4223-ad14-d7391159b80e
>
URL Parameters
Query Parameters to be passed directly in the URL.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
username | String | Mandatory | Username of the enterprise | 100 | "test-enterprise" |
key | String | Mandatory | Unique license key provided by Clickpost for the enterprise | 100 | "34be9be5-3de8-4223-ad14-d7391159b80e" |
Payload
The payload will consist of the following fields:
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
pickup_info | Object | Mandatory | Information for where the shipment will be picked up by the courier | ||
drop_info | Object | Mandatory | Information for where the shipment will be delivered by the courier | ||
additional | Object | Optional | Additional optional information about the shipment | ||
shipment_details | Object | Mandatory | Information about the shipment itself | ||
tax_info | Object | Optional | Information for taxes levied on the shipment. Note: Required only for cross-border having tax/customs requirements |
Pickup Info (pickup_info
)
pickup_info
)This mandatory object takes in the data for the warehouse/pickup location for the shipment.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
lat | Float | Optional | Latitude of the pickup location | 45.12211 | |
long | Float | Optional | Longitude of the pickup location | 88.12342 | |
name | String | Mandatory | Contact name of the consignor of the shipment | 100 | "John Smith" |
organisation | String | Optional | Name of the Shipper Organisation | 100 | "Walmart" |
address | String | Mandatory | Address of the pickup location | 500 | "123, ABC Street" |
district | String | Optional | District of the pickup location | 100 | "Nadia" |
city | String | Mandatory | City of the pickup location | 100 | "Frankfort" |
state | String | Mandatory | State/province of the pickup location | 100 | "Ohio" |
landmark | String | Optional | Landmarks to help find the pickup location | 500 | "Near XYZ Towers" |
email | String | Mandatory | Email of the pickup contact | 50 | "[email protected]" |
phone | String | Mandatory | Contact number of the pickup contact | 11 | "9876543210" |
time | String | Mandatory | Time of pickup for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only) | 2022-01-10T10:02:33 | |
postal_code | String | Mandatory | Postal code of the pickup location. If postal code system is not applicable for the location, use blank string. | 10 | "L4YG6C" |
country_code | String | Mandatory | Alpha ISO-2 country code of the pickup location | 2 | "CA" |
address_type | String | Optional | Address type of the pickup location. Must be either OFFICE or RESIDENTIAL | 50 | "OFFICE" |
Drop Info (drop_info
)
drop_info
)This mandatory object takes in the data for the delivery/consignee location for the shipment.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
lat | Float | Optional | Latitude of the drop location | 45.12211 | |
long | Float | Optional | Longitude of the drop location | 88.12342 | |
name | String | Mandatory | Contact name of the consignee of the shipment | 100 | "John Smith" |
organisation | String | Optional | Name of the Recipient Organisation | 100 | "Walmart" |
address | String | Mandatory | Address of the drop location | 500 | "123, ABC Street" |
district | String | Optional | District of the drop location | 100 | "Nadia" |
city | String | Mandatory | City of the drop location | 100 | "Frankfort" |
state | String | Mandatory | State/province of the drop location | 100 | "Ohio" |
landmark | String | Optional | Landmarks to help find the drop location | 500 | "Near XYZ Towers" |
email | String | Optional | Email of the drop contact | 50 | "[email protected]" |
phone | String | Mandatory | Contact number of the drop contact | 11 | "9876543210" |
time | String | Optional | Estimated time of drop for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only) | 2022-01-10T10:02:33 | |
postal_code | String | Mandatory | Postal code of the drop location. If postal code system is not applicable for the location, use blank string. | 10 | "L4YG6C" |
country_code | String | Mandatory | Alpha ISO-2 country code of the drop location | 2 | "CA" |
address_type | String | Optional | Address type of the drop location. Must be either OFFICE or RESIDENTIAL | 50 | "OFFICE" |
Additional Fields (additional
)
additional
)In the "additional" object optional fields can be passed which may be used by the courier partner, or give additional details for the order, e.g. Async/Sync order creation or whether label generation is needed.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
label | Boolean | Optional | Whether label is required for the order or not. Defaults to true . | ||
priority | String | Optional | Priority of the order to be delivered. Can only take values as "NORMAL" or "URGENT" . Defaults to "NORMAL" | 10 | "URGENT"/"NORMAL" |
estimated_delivery_date | Date | Optional | The date of estimated delivery has been shared with the customer. This field can be used to measure carrier performance by comparing it with the actual date of delivery in the Clickpost reports To be given in YYYY-MM-DD format | 10 | 2023-02-23 |
Return Info (return_info
)
return_info
)In the "return_info" object, the details for the return address is to be provided. The details are particularly useful in case of a failed delivery or product return due to other reasons.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
lat | Float | Optional | Latitude of the return location | 45.12211 | |
long | Float | Optional | Longitude of the return location | 88.12342 | |
name | String | Mandatory | Contact name of the return contact of the shipment | 100 | "John Smith" |
organisation | String | Optional | Name of the organisation the shipment is being returned to | 100 | "Walmart" |
address | String | Mandatory | Address of the return location | 500 | "123, ABC Street" |
district | String | Optional | District of the return location | 100 | "Nadia" |
city | String | Mandatory | City of the return location | 100 | "Frankfort" |
state | String | Mandatory | State/province of the return location | 100 | "Ohio" |
landmark | String | Optional | Landmarks to help find the return location | 500 | "Near XYZ Towers" |
email | String | Optional | Email of the return contact | 50 | "[email protected]" |
phone | String | Mandatory | Contact number of the return contact | 11 | "9876543210" |
postal_code | String | Mandatory | Postal code of the return location. If postal code system is not applicable for the location, use blank string. | 10 | "L4YG6C" |
country_code | String | Mandatory | Alpha ISO-2 country code of the return location | 2 | "CA" |
Shipment Details (shipment_details
)
shipment_details
)In the 'shipment_details' field, the details regarding all items, and important order details like payment type, order type, courier partner, etc. are added.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
items | List[Object] | Mandatory | Json list with multiple item objects in it. Each item object represents a carton. | ||
vendor_code | String | Conditional | Vendor code of pickup location. only if required by courier partner | 100 | "test_warehouse" |
account_code | String | Mandatory | Courier partner account name configured on the Clickpost dashboard. Will return a 400 Bad Request response if the given account is inactive or does not exist. | 100 | 'test_courier' |
height | Integer | Mandatory | Height of the overall package (in cms) | 25 | |
breadth | Integer | Mandatory | Width of the overall package (in cms) | 45 | |
length | Integer | Mandatory | Length of the overall package (in cms) | 75 | |
weight | Integer | Mandatory | Weight of the package (in gms) | 500 | |
courier_partner | Integer | Mandatory | Partner ID of the desired carrier. Refer to List of carriers supported by Clickpost to get the partner ID. | 123 | |
reference_number | String | Mandatory | Reference number of the order. Must be unique for every shipment, i.e. every call of this API. | 100 | "TestOrder00001" |
cod_value | Float | Mandatory | Cash to be given to the courier (currency to be determined by currency_code ). Must be non-zero for COD orders, and zero for PREPAID orders. | 25.25 | |
order_id | String | Optional | Identification string for the order | 100 | "TestOrderID00001" |
order_type | String | Mandatory | Type of payment of the shipment. Can only take values "COD" or "PREPAID". cod_value must be non-zero for COD shipments and zero for PREPAID shipments. | 10 | "COD"/"PREPAID" |
delivery_type | String | Mandatory | Type of delivery to be done. Can only take values "FORWARD" or "RVP". | 10 | "FORWARD"/"RVP" |
rvp_reason | String | Conditional | Reason for returning the product/failed delivery. Mandatory if delivery_type is RVP. | 500 | "Defect in product" |
invoice_value | Float | Mandatory | Value of the shipment as mentioned in the invoice. | 256.29 | |
invoice_date | String | Mandatory | Date of issuance of the invoice of the shipment. (YYYY-MM-DD format only) | 100 | 2022-01-10 |
awb_number | String | Optional | The airwaybill number of the shipment. | 100 | "TESTAWB00001" |
items_in_shipment | List[Object] | Optional | Contains a list of items. Only needed when multiple items of different SKUs are to be shipped in a single box |
Item Level details (items
)
items
)Note: Each item object represents a carton box and should have the following:
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
description | String | Mandatory | Brief description of the items | 500 | "Brown Cotton Socks - 1 pair" |
quantity | Integer | Mandatory | Number of units of the item in the box | 5 | |
weight | Integer | Mandatory | Weight of the box | 500 | |
price | Float | Mandatory | Non-negative price of each unit of the box (currency to be decided by 'currency_code' field) | 64.99 | |
gst_info | Object | Conditional | Required for multi-seller shipments Information regarding the GST levied on the item. GST Info to be passed will have the same fields as the gst_info field mentioned below. | ||
additional | Object | Conditional | Additional details regarding the box | ||
height | Integer | Mandatory | Height of the box (in cms) | 25 | |
breadth | Integer | Mandatory | Width of the box (in cms) | 45 | |
length | Integer | Mandatory | Length of the box (in cms) | 75 |
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
cat | String | Optional | Category of the item in question | 50 | Footwear |
description | String | Mandatory | Brief description of the item | 500 | "Brown Cotton Socks - 1 pair" |
quantity | Integer | Mandatory | Number of units of the item | 5 | |
weight | Integer | Mandatory | Weight of each unit of the item | 500 | |
price | Float | Mandatory | Price of each unit of the item (currency to be decided by 'currency_code' field) | 64.99 | |
manufacture_country_code | String | Optional | Alpha-2 ISO Country code of manufacture of the item | 2 | "CA" |
manufacture_country | String | Optional | Full country name of manufacture of the item | 100 | "Canada" |
sku | String | Optional | Stock-keeping unit of the item | 100 | "SKU0001" |
return_days | Integer | Optional | Number of days within which the item can be returned | 5 | |
exchange_days | Integer | Optional | Number of days within which the item can be exchanged | 5 | |
product_url | String | Optional | URL for the product. If there are multiple URLs, they can be sent as a single string with comma-separated values. | 1000 | "http://link1.to.product, http://link2.to.product" |
images | String | Optional | URL for the image(s) of the product. If there are multiple URLs, they can be sent as a single string with comma-separated values. | 1000 | "http://link.to.product.image1, http://link.to.product.image2" |
carta_porte | Object | Conditional | Applicable for Mexican couriers only Mexican couriers often require a bill of lading in their invoices, known as Carta Porte. This object encapsulates all necessary details for the bill of lading. | ||
color | String | Conditional Optional | Colour of the item Applicable for quality checking for RVP shipments | 100 | "dark blue" |
sub_category | String | Conditional Optional | Category the item's type is classified in Applicable for quality checking for RVP shipments | 100 | "T-Shirts" |
size | String | Conditional Optional | Size of the item Applicable for quality checking for RVP shipments | 100 | "XL" |
brand | String | Conditional Optional | Brand of the item Applicable for quality checking for RVP shipments | 100 | "Puma" |
return_reason | String | Conditional Optional | Reason for returning the item Applicable for quality checking for RVP shipments | 100 | "Defective product" |
special_instructions | String | Conditional Optional | Special Instructions for returning the item Applicable for quality checking for RVP shipments | 100 | "Handle with care" |
imei | String | Conditional Optional | IMEI number of the item (if it is a mobile device) Applicable for quality checking for RVP shipments | 100 | "12345678910111" |
ean | String | Conditional Optional | EAN Number of the item Applicable for quality checking for RVP shipments | 100 | "EAN00001" |
height | Integer | Mandatory | Height of one unit of the item (in cms) | 25 | |
breadth | Integer | Mandatory | Width of one unit of the item (in cms) | 45 | |
length | Integer | Mandatory | Length of one unit of the item (in cms) | 75 |
Carta Porte Details (carta_porte
field) - For Mexico Only
carta_porte
field) - For Mexico OnlyMexican couriers often require a bill of lading per item in their invoices, known as Carta Porte. The carta_porte
object encapsulates all necessary details for the bill of lading of the item. For more information, you can visit What you should know about the 'Carta Porte'
The following fields can be included in the carta_porte
field.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
bienesTransp | String | Conditional Mandatory | A number representing the categorization of the SKU of the item by the government. | 100 | "10257" |
descripcion | String | Conditional Mandatory | Item description | 100 | "HP Pavillion Laptop" |
materialPeligroso | Boolean | Conditional Mandatory | Whether the item is dangerous/inflammable/reactive. | ||
cveMaterialPeligroso | String | Conditional Mandatory | An ID for the item, denoting what type of danger it might pose if it is dangerous. Leave blank if materialPeligroso is set to false . | 10 | |
embalaje | String | Conditional Mandatory | Type of packing of the item | 10 | |
claveUnidad | String | Conditional Mandatory | Stock-keeping unit of the item | 100 |
The sample request payload may look like this:
Tax Info (tax_info
)
tax_info
)This field will contain several information for the taxes levied on the shipment.
Field Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
shipper_tax_id | String | Optional | Tax Identification Number of the shipper | 100 | "09AAFCK6022N1Z8" |
consignee_tax_id | String | Optional | Tax Identification Number of the consignee | 100 | "123456" |
consignee_tax_type | String | Optional | Type of tax levied, on the consignee e.g: VAT, GST, etc. | 100 | "VAT" |
consignee_tax_type_country_code | String | Optional | Alpha-2 ISO Country code, denoting the country where the tax is levied on the consignee | 2 | "US" |
exporter_tax_id | String | Optional | Tax Identification Number of the exporter/shipper | 100 | "123456" |
exporter_tax_type | String | Optional | Type of tax levied, on the exporter/shipper e.g: VAT, GST, etc. | 100 | "VAT" |
exporter_tax_type_country_code | String | Optional | Alpha-2 ISO Country code, denoting the country where the tax is levied on the exporter/shipper | 2 | "IN" |
shipping_charges | String | Optional | This refers to the shipping charges. In cases where duty is paid by the consignee (DDU) this value is pushed to denote the freight charges. | "10.234" | |
import_duty_vat_charges | String | Optional | Some countries have additional duties on imported goods. This field refers to the additional duty/vat that is going to be charged on the shipment when it's imported into the destination country. | "100" |
Response
The response typically consists of the following fields. Keep in mind that additional fields can be present according to the requirement of the enterprise/courier.
Field Name | Data Type | Description |
---|---|---|
meta | Object | Metadata for the request, e.g. status code, error messages. |
result | Object | Actual result of the request |
order_id | Integer | Order ID of the request |
tracking_id | Integer | A special ID of the request used for tracking |
Response Meta
Field Name | Data Type | Description |
---|---|---|
status | Integer | Status code for the request (including but not limited to HTTP Status codes) |
message | String | Error/Success messages for the request |
success | Boolean | Whether the order was successfully created or not |
Response Result
Field Name | Data Type | Description |
---|---|---|
waybill | String | Waybill of the newly created order, or the one passed in the awb_number field (if any). This waybill is automatically registered for tracking in our database |
reference_number | String | Reference number of the order, sent in the payload. |
label | String/Null | URL to the generated label of the order. If labels are not needed, this stays null. |
commercial_invoice_url | String | (Appears for certain couriers) URL to the generated commercial invoice of the order |
courier_partner_id | Integer | ID of the courier partner |
courier_name | String | Name of the courier |
sort_code | String/Null | Courier Partner Sort code. Certain couriers use something called a sort code that can be passed to the shipping label for custom-built labels. Will return null if sort codes are not supported. |
security_key | String | UUID security key of the order that needs to be stored at the enterprise's end. |
children | Object | (Only for MPS responses) A list of item objects, with details of each item |
Sample Payload
{
"additional":{
"channel":"",
"async":false,
"duty_fee_paid_by":"R",
"invoice_base_64":"PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPEVycm9yPjxDb2RlPkFjY2Vzc0RlbmllZDwvQ29kZT48TWVzc2FnZT5BY2Nlc3MgRGVuaWVkPC9NZXNzYWdlPjxSZXF1ZXN0SWQ+WThIR1pGN0FYS1hBRkQxQzwvUmVxdWVzdElkPjxIb3N0SWQ+YWhxenVzMG5Ycnc2aDM3dzVSWnhxUXBsblpQdFhPZzY2SnJBaGdScjd4cW5xVFVYOGNBUk50Yjl4bi9RNnYrdms2NGZGK3BqUjg4PTwvSG9zdElkPjwvRXJyb3I+",
"is_fragile":false,
"estimated_delivery_date":"2023-12-05",
"label":true,
"max_edd":"10",
"order_date":"2023-08-21",
"return_info":{
"address":"Naman Midtown - A Wing - 18th floor Senapati Bapat Marg, Prabhadevi",
"city":"Mumbai",
"country_code":"IN",
"district":"",
"email":"[email protected]",
"landmark":"",
"lat":null,
"long":null,
"name":"Lokesh",
"phone":"6285657600",
"phone_code":"+91",
"postal_code":"400013",
"state":"Maharashtra"
}
},
"courier_custom_fields":{
},
"drop_info":{
"address":"usa",
"city":"New York",
"country_code":"US",
"district":"",
"email":"[email protected]",
"landmark":"",
"lat":null,
"long":null,
"name":"Sehdev",
"phone":"8446313562",
"phone_code":"+1",
"postal_code":"10001",
"state":"NY"
},
"pickup_info":{
"address":"Naman Midtown - A Wing - 18th floor Senapati Bhawan, Mahesmati",
"city":"Mumbai",
"country_code":"IN",
"district":"",
"email":"[email protected]",
"landmark":"",
"lat":null,
"long":null,
"name":"Clickpost HQ",
"phone":"02262808699",
"phone_code":"+91",
"postal_code":"400013",
"state":"MH",
"time":"2023-08-22T17:00:00"
},
"shipment_details":{
"account_code":"Fedex Bundle Duty paid by Receiver",
"breadth":8,
"cod_value":0,
"courier_partner":330,
"currency_code":"INR",
"delivery_type":"FORWARD",
"height":13,
"invoice_date":"2023-08-21",
"invoice_number":"12324",
"invoice_url":"http://link.to.inv1.com",
"invoice_value":9000,
"items":[
{
"breadth":8,
"cat":"Customized Fashion Garments",
"description":"Floral Print Anarkali With Dupatta",
"fob_value":9000,
"images":"https://fb.com/products/22/8/192005329771_BTM_RAW_1.JPG",
"product_url":"https://fb.com/products/22/8/192005329771_BTM_RAW_1.JPG",
"gst_info":{
"igst_amount":0,
"igst_tax_rate":0,
"taxable_value":9000
},
"height":13,
"hs_code":"44209090",
"length":13,
"manufacture_country":"INDIA",
"manufacture_country_code":"IN",
"price":9000,
"product_category":"Customized Fashion Garments",
"quantity":1,
"sku":"615168",
"sub_category":"Customized Fashion Garments",
"weight":120,
"width":0
}
],
"items_in_shipment":[
{
"box_number":1,
"breadth":8,
"cat":"Customized Fashion Garments",
"description":"Floral Print Anarkali With Dupatta",
"fob_value":9000,
"exchange_days":2,
"gst_info":{
"igst_amount":0,
"igst_tax_rate":0,
"taxable_value":9000
},
"height":13,
"hs_code":"44209090",
"length":13,
"manufacture_country":"INDIA",
"manufacture_country_code":"IN",
"price":9000,
"product_category":"Customized Fashion Garments",
"quantity":1,
"sku":"615168",
"sub_category":"Customized Fashion Garments",
"weight":120,
"width":0,
"images":"http://link1.image.com,http://link2.image.com",
"product_url":"http://link1.product.com,http://link2.procuct.com",
"return_days":2
}
],
"length":13,
"order_id":"304491",
"order_type":"PREPAID",
"reference_number":"304491-12324-14",
"weight":120
},
"tax_info":{
"consignee_tax_country_code":"US",
"consignee_tax_id":"NA",
"consignee_tax_type":"VAT",
"consignee_tax_type_country_code":"US",
"exporter_tax_country_code":"IN",
"exporter_tax_id":"27AAACO7149M1ZZ",
"exporter_tax_type":"VAT",
"exporter_tax_type_country_code":"IN",
"exporter_type":"",
"import_duty_vat_charges":0,
"shipper_tax_id":"27AAACO7149M1ZZ",
"shipping_charges":0,
"tax_amount":0,
"tax_paid":true
}
}
{
"tax_info": {},
"drop_info": {
"lat": 0,
"city": "Dubai",
"long": 0,
"name": "dsadsad sadsad",
"email": "[email protected]",
"phone": "9876543210",
"state": "Dubai",
"address": "123 ABC St",
"district": "Dubai",
"landmark": "Near III Towers",
"phone_code": "+965",
"postal_code": "12345",
"country_code": "KW"
},
"pickup_info": {
"lat": 25.1414664,
"city": "Dubai",
"long": 55.255369,
"name": "TEST DO NOT PICKUP",
"time": "2022-07-01T11:52:36+04:00",
"email": "[email protected]",
"phone": "1234567890",
"state": "Dubai",
"address": "123, ABC St",
"district": "Dubai",
"landmark": "Near HHH Towers",
"phone_code": "+971",
"postal_code": "502626",
"country_code": "AE"
},
"shipment_details": {
"items": [
{
"sku": "53813",
"price": 249.29,
"weight": 500,
"hs_code": "6405.10.00",
"quantity": 1,
"description": "Tod's Blue Patent Cutout Ankle Strap Ballet Flats Size 39.5",
"manufacture_country": "Italy",
"manufacture_country_code": "IT",
"cat": "Footwear",
"images": "http://link1.image.com,http://link2.image.com",
"product_url": "http://link1.product.com,http://link2.procuct.com",
"return_days": 2,
"exchange_days": 2,
"color": "dark blue",
"brand": "Tod's",
"size": "39.5",
"sub_category": "Flats",
"return_reason": "Defective",
"special_instructions": "Handle with care",
"imei": "12345678910111",
"ean": "EAN123456"
},
{
"sku": "53814",
"price": 111.00,
"weight": 78,
"hs_code": "1234.56.78",
"quantity": 1,
"description": "Tod's Blue Shoes - Size 8",
"manufacture_country": "Italy",
"manufacture_country_code": "IT",
"cat": "Footwear",
"images": "http://link1.image.com,http://link2.image.com",
"product_url": "http://link1.product.com,http://link2.procuct.com",
"return_days": 2,
"exchange_days": 2,
"color": "dark blue",
"brand": "Tod's",
"size": "39.5",
"sub_category": "Flats",
"return_reason": "Defective",
"special_instructions": "Handle with care",
"imei": "12345678910111",
"ean": "EAN123456"
}
],
"height": 13,
"length": 23,
"weight": "1000",
"breadth": 31,
"order_id": "Test.UPS.Order0002",
"cod_value": 50,
"order_type": "COD",
"invoice_date": "2022-06-21",
"account_code": "test",
"currency_code": "USD",
"delivery_type": "RVP",
"rvp_reason": "Defective product",
"invoice_value": 468.58,
"invoice_number": "TLC-2022-06-WS-00038",
"courier_partner": "107",
"reference_number": "Test.UPS.Order0002"
},
"additional": {
"return_info": {
"lat": 25.1414664,
"city": "Dubai",
"long": 55.255369,
"name": "TEST DO NOT RETURN",
"email": "[email protected]",
"phone": "1234567890",
"state": "Dubai",
"address": "123, ABC St",
"district": "Dubai",
"landmark": "Near RRR Towers",
"phone_code": "+965",
"postal_code": "502626",
"country_code": "KW"
},
"label": true,
"invoice_base_64": "JVBERklsfhs16561sfsfsvsvsv"
},
"courier_custom_fields": {}
}
{
"drop_info": {
"city": "HERMOSILLO",
"name": "Hernan Cortez",
"time": "2022-09-07T19:16:24",
"email": "[email protected]",
"phone": "1234567890",
"state": "SO",
"district":"HERMOSILLO",
"address": "52, ABC Calle",
"phone_code": "+52",
"postal_code": "12345",
"country_code": "MX",
"alternate_phone": "",
"lat": 12.34,
"long": 56.78,
"instructions": "Leave at the door",
"landmark": "lampost"
},
"additional": {
"from_wh": "",
"asn_code": "Test-GLS-MX-1",
"order_id": "521512117539Test5",
"sort_code": "",
"account_code": "paq-testing",
"channel_name": "",
"user_defined_field_array": [
{
"name": "ship_via_method",
"type": "String",
"value": "75120003"
},
{
"name": "max_edd",
"type": "String",
"value": "2022-09-19"
},
{
"name": "ship_via_po",
"type": "String",
"value": "521512117539-2-Test4"
}
]
},
"pickup_info": {
"city": "MEGAPARK",
"name": "WALMART.COM",
"time": "2022-09-07T19:16:24",
"email": "[email protected]",
"phone": "9876543210",
"state": "CP",
"address": "113, Tlaloc Calle",
"district":"MEXICO",
"phone_code": "+52",
"postal_code": "54321",
"country_code": "MX",
"lat": "",
"long": "",
"landmark": "Society Park"
},
"shipment_details": {
"items": [
{
"sku": "6000202721854",
"price": 0,
"height": 17,
"length": 25,
"weight": 1000,
"breadth": 1,
"quantity": 1,
"additional": {
"asn_code": "Test-GLS-MX-1"
},
"carta_porte": {
"embalaje": "",
"claveUnidad": "H87",
"descripcion": "LapTop",
"bienesTransp": "10282",
"materialPeligroso": "",
"cveMaterialPeligroso": ""
},
"description": "Baby powder"
}
],
"height": 17,
"length": 25,
"weight": 1000,
"breadth": 1,
"cod_value": 0,
"order_type": "PREPAID",
"invoice_date": "2022-09-19",
"currency_code": "MXN",
"delivery_type": "FORWARD",
"invoice_value": 1,
"invoice_number": "IOL-000024",
"courier_partner": 234,
"reference_number": "TEST30092022003"
},
"additional": {
"return_info": {
"lat": 25.1414664,
"city": "San Francisco de Campeche",
"long": 55.255369,
"name": "TEST DO NOT RETURN",
"email": "[email protected]",
"phone": "1234567890",
"state": "Campeche",
"address": "123, ABC St",
"district": "Campeche City",
"landmark": "Near RRR Towers",
"phone_code": "+52",
"postal_code": "502626",
"country_code": "MX"
},
"label": true
},
"courier_custom_fields": {}
}
Sample Response
{
"meta": {
"status": 400,
"message": "Error Message",
"success": false
}
}
{
"meta":{
"status":200,
"message":"Order Placed Successfully",
"success":true
},
"result":{
"label":"https://pyck-res-bucket.s3.amazonaws.com:443/DHL_MPS/2022-11-09/6852865692.pdf",
"waybill":"6852865692",
"order_id":151445760,
"sort_code":null,
"tracking_id":506175035,
"courier_name":"DHL",
"security_key":"efa57dfe-8456-4744-b83d-cd9f36577632",
"courier_partner_id":164,
"commercial_invoice_url":"https://pyck-res-bucket.s3.amazonaws.com:443/DHL_MPS/INVOICE_DATA/2022-11-09/6852865692.pdf"
}
}
Possible Error Codes
These are the list of possible error/status codes that can appear in the response metadata, and the actionables corresponding to each.
Meta Status Code | HTTP Status Code | Description | Actionable | Order Successful? | Status Message |
---|---|---|---|---|---|
102 | 200 | For async orders: The order has been recorded in Clickpost's database and is under processing. | Need to re-attempt Clickpost's order creation API to check if the order has been processed. | No | " |
200 | 200 | The order is successfully created | None | Yes | "Success" |
301 | 200 | The customer is sending an invalid/non-existent/inactive license key in the URL parameters | Need to re-attempt the order with a valid/registered/active license key. | No | "Authentication Failed: Invalid Token or API Key" |
302 | 200 | Either of the three things: - The customer is sending the courier_partner value as a string- The customer is sending a null value in the courier_partner field.- The partner ID being sent in courier_partner field does not exist. | Need to re-attempt the order with a valid integer value in the courier_partner field, and the value should exist in Clickpost's database. | No | "Invalid Courier Partner Id with Field courier_partner" |
303 | 200 | For async orders: The awb_number provided already exists and is registered by Clickpost | Need to re-attempt the order with a different awb_number value. | Yes | "Waybill already registered" |
307 | 200 | Theorder_type value is anything other than PREPAID , COD or EXCHANGE , or is null . | Need to re-attempt the order with the order_type as either PREPAID , COD or EXCHANGE . | No | "You have entered invalid Order Type" |
308 | 200 | Thepriority value is anything other than NORMAL or URGENT . | Need to re-attempt the order with the priority as either NORMAL or URGENT . | No | "You have entered invalid Order priority" |
309 | 200 | Thedelivery_type value is anything other than FORWARD or RVP . | Need to re-attempt the order with the delivery_type as either FORWARD or RVP . | No | "Invalid Delivery Type" |
310 | 200 | In case of RVP orders: This is due to either of the following - The rvp_reason field is missing- The rvp_reason length is more than 500 characters. | Need to re-attempt the RVP order with a non-null rvp_reason value within 500 characters. | No | "RVP reason is missing" or "RVP reason can't be more than 500 chars" |
311 | 200 | For RVP orders: The courier partner defined by the courier_partner field does not support RVP shipments, or is not an RVP courier. | Need to re-attempt the RVP order with a courier_partner value that supports RVP shipments. | No | "Invalid Courier Partner For RVP" |
312 | 200 | There is no item data in the payload (in the item field). | Need to retry the order with a non-empty items array. | No | "Items Data is missing from order details" |
313 | 200 | Either of the following: - The item data being sent in the items field is either a string or any other invalid format.- The items value is an array, but of anything other than objects.- The items value is an array of objects, but one or more mandatory fields are missing for one or more items. | Need to retry the order with proper items data, as an array of JSON objects. | No | "Invalid Format of items for Order data" |
314 | 200 | There is an issue with the order data being passed. | The error is captured in the status message. Retry the order after addressing the status message. | No | "Invalid Format of items for Order data: " |
315 | 200 | Either of the following: - For a PREPAID order, the cod_value is non-zero.- For a COD order, the cod_value is zero. | Need to retry the orders after: - (For PREPAID orders) setting the cod_value to zero.- (For COD orders) setting the cod_value to a non-zero number | No | "Invalid Cod Value" |
316 | 200 | There are no credentials for the courier partner of the account given in account_code , or the credentials are blank. | Need to re-attempt the order with a different account_code , or fill the credential fields in the dashboard and retry. | No | "You do not have credentials for the Courier Partner" |
319 | 200 | There is an issue in placing orders with the courier partner. | The actual error generally pops up alongside the error message. In cases where the error message is vague, contact the support team. | No | "Error In Order Placing To Courier Partner: " |
320 | 200 | The enterprise has not subscribed for Clickpost's Order Creation Service. | Need to subscribe to the order creation service, then retry with all valid details and credentials. | No | "This service is not subscribed by you" |
321 | 200 | The awb provided in the awb_number field does not exist in Clickpost's database. | Need to provide a registered AWB, or remove the AWB field and try again. | No | "Awb Number Does not exist in system for courier partner" |
322 | 200 | There is an issue in the courier partner servers. | Need to retry after waiting for a while, or get in touch with Clickpost support or the courier partner support. | No | "Internal Server Error In Courier Partners Server" |
323 | 200 | An order is already present in Clickpost's database with the same reference number as the one provided. | Need to re-attempt the order with a different reference number | Yes | "You have already placed this order" |
328 | 200 | Some mandatory field in the POST data might be missing. | Check for missing fields that are supposed to be there in the data and retry | No | "Invalid POST data" |
329 | 200 | The connection to the courier partner's API timed out. | Need to retry after waiting for a while, or get in touch with Clickpost support or the courier partner support. | No | "Courier Partner API timeout" |
351 | 200 | The account name of the courier partner account given in the account_code field does not exist for the enterprise user. | The user needs to check either/all of the things below if they are correct - Enterprise license key in the URL params - Courier Partner ID in the courier_partner field.- Account name in the account_code field, and whether this account exists for this courier partner.Re-attempt the order after correcting any of the incorrect details mentioned above. | No | "Clickpost Account: Does not exist" |
352 | 200 | There are multiple accounts of the same enterprise with the same courier partner with the same name as the one in account_code field. | No | "Multiple account exists" | |
353 | 200 | The account mentioned in the account_code field is inactive. | Need to either enable the account on the dashboard from the enterprise's end, or use an active account. | No | "Clickpost Account: Inactive" |
354 | 200 | There is an unhandled error from the courier partner's end. | The error is typically visible in the status message and can be fixed accordingly. In case of vague error messages, get in touch with the support team | No | "Unhandled error! Contact [email protected]" or the actual error |
355 | 200 | In certain couriers the vendor_code field is required. This error pops up whenever vendor_code is not passed in the payload | Need to pass the vendor_code field alongwith a registered vendor code. | No | "Vendor code not found" |
400 | 200 | There is an issue with the payload, or some invalid data is being sent in the request. | Need to fix the issues in the payload as mentioned in the status message. If "Bad Request" pops up, get in touch with the support team. | No | "Bad Request" or the actual error |
500 | 200 | There is an error in Clickpost's servers. | Need to wait a while and try again. If this error pops up even after multiple tries, get in touch with the support team. | No | "Oops! Internal server error in Clickpost" |
Updated 2 months ago