Register shipment for tracking: V3 (Recommended)

Register an AWB for tracking updates with Clickpost, given the AWB number, carrier partner ID, shipment information, pick-up and drop information, and additional details as input.

Sample Request

{
    "waybill": "ABCDEFGHIJKL0001",
    "courier_partner": 246,
    "account_code": "test.skip.mps.rvp",
    "shipment_info": {
        "order_type": "COD",
        "invoice_value": "12345",
        "cod_amount": "1000",
        "currency_code": "SAR",
        "reference_number": "123XYZ",
        "order_id": "order_id of the shipment",
        "length": 10,
        "height": 10,
        "weight": 10,
        "breadth": 10,
        "items": [
            {
                "sku": "XYZ1",
                "description": "item1",
                "quantity": 1,
                "price": 200,
                "images": "<Image URL>",
                "return_days": 2,
                "length": 10,
                "height": 10,
                "breadth": 10,
                "weight": 100
            }
        ]
    },
    "pickup_info": {
        "name": "DEFG",
        "email": "[email protected]",
        "phone_code": "966",
        "phone": "1234567890",
        "address": "Some Address",
        "postal_code": "JK0701",
        "city": "Riyadh",
        "district": "XYZ",
        "state": "Al-Riyadh",
        "country_code": "SA",
        "lat": 10.01,
        "long": 10.2
    },
    "drop_info": {
        "name": "ABCD",
        "email": "[email protected]",
        "phone_code": "966",
        "phone": "9876443210",
        "address": "ABCD TOWERS",
        "postal_code": "JK0703",
        "city": "JK0703",
        "district": "XYZ",
        "state": "Al-Riyadh",
        "country_code": "AE",
        "lat": 10.01,
        "long": 10.01
    },
    "additional": {
        "enable_whatsapp": false,
        "order_date": "2017-02-14",
        "ship_date": "2017-02-14",
        "min_edd": 2,
        "max_edd": 4,
      	"language_code": "eng"
    }
}

Sample Response

{
    "meta": {
        "status": 200,
        "message": "Success",
        "success": true
    },
    "result": {
        "tracking_id": 491179766,
        "security_key": "067238b4-7e55-4d4d-92d1-1a72028e5b64"
    }
}
{
    "meta": {
        "status": 303,
        "message": "Waybill already registered",
        "success": false
    },
    "result": {
        "tracking_id": 267984163,
        "security_key": "37317af1-f3c3-4c41-b563-99b5c601e59d"
    }
}
{
    "meta": {
        "status": 353,
        "message": "Clickpost Account: Inactive",
        "success": false
    }
}

Important Links

Run in Postman API Reference

Body Payload

Payload encapsulates details regarding the AWB to be registered, and its details

Field NameData TypeFieldDescription
waybillStringMandatoryAWB to be registered
courier_partnerIntegerMandatoryCarrier partner which should be tracking the AWB
account_codeStringMandatoryCourier partner account name configured on the Clickpost dashboard.
shipment_infoObjectOptionalDetails of the shipment to be registered
pickup_infoObjectOptionalDetails for pickup of the shipment
drop_infoObjectOptionalDetails for delivery of the shipment
additionalObjectOptionalAdditional optional fields

Pickup Info (pickup_info)

This object takes in the data for the warehouse/pickup location for the shipment.

Field NameData TypeFieldDescription
latFloatOptionalLatitude of the pickup location
longFloatOptionalLongitude of the pickup location
nameStringOptionalContact name of the consignor of the shipment
addressStringOptionalAddress of the pickup location
districtStringOptionalDistrict of the pickup location
cityStringOptionalCity of the pickup location
stateStringOptionalState/province of the pickup location
landmarkStringOptionalLandmarks to help find the pickup location
emailStringOptionalEmail of the pickup contact
phoneStringOptionalContact number of the pickup contact
timeStringOptionalTime of pickup for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only)
postal_codeStringOptionalPostal code of the pickup location
country_codeStringOptionalAlpha ISO-2 country code of the pickup location

Drop Info (drop_info)

This object takes in the data for the delivery/consignee location for the shipment.

Field NameData TypeFieldDescription
latFloatOptionalLatitude of the drop location
longFloatOptionalLongitude of the drop location
nameStringOptionalContact name of the consignee of the shipment
addressStringOptionalAddress of the drop location
districtStringOptionalDistrict of the drop location
cityStringOptionalCity of the drop location
stateStringOptionalState/province of the drop location
landmarkStringOptionalLandmarks to help find the drop location
emailStringOptionalEmail of the drop contact
phoneStringOptionalContact number of the drop contact
timeStringOptionalEstimated time of drop for the order (to be provided in YYYY-MM-DDTHH:MM:SS format only)
postal_codeStringOptionalPostal code of the drop location
country_codeStringOptionalAlpha ISO-2 country code of the drop location

Additional Fields (additional)

In the "additional" object optional fields can be passed which may be used by the carrier partner, or give additional details for the order.

Field NameData TypeFieldDescription
enable_whatsappBooleanOptionalIf enterprise has WhatsApp for business account, they can pass opt-in information here so Clickpost starts sending out communications to customers.
order_dateStringOptionalDate of placing the order (in YYYY-MM-DD format)
ship_dateStringOptionalDate of shipping the order (in YYYY-MM-DD format)
language_codeStringOptional639-3 Language code for the shipment
min_eddIntegerOptionalMinimum committed estimated delivery duration (in days) of the shipment
max_eddIntegerOptionalMaximum committed estimated delivery duration (in days) of the shipment

Shipment Details (shipment_details)

In the 'shipment_details' field, the details regarding all items, and important order details like payment type, order type, carrier partner, etc. are added.

Field NameData TypeFieldDescription
itemsList[Object]OptionalList of items to be delivered in the shipment. Details of the items explained below.
heightFloatOptionalHeight of the overall package (in cms)
widthFloatOptionalWidth of the overall package (in cms)
lengthFloatOptionalLength of the overall package (in cms)
weightFloatOptionalWeight of the package (in gms)
reference_numberStringOptionalReference number of the order. Must be unique for every shipment, i.e. every call of this API.
cod_valueFloatOptionalCash to be given to the carrier (currency to be determined by currency_code). Must be non-zero for COD orders, and zero for PREPAID orders.
order_idStringOptionalIdentification string for the order
order_typeStringOptionalType 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.
invoice_valueFloatOptionalValue of the shipment as mentioned in the invoice.
invoice_dateStringOptionalDate of issuance of the invoice of the shipment. (YYYY-MM-DD format only)

Item Level details (items)

The details for each item to be delivered is passed in the "items" field, in "shipment_details".

Field NameData TypeFieldDescription
catStringOptionalCategory of the item in question
descriptionStringOptionalBrief description of the item
quantityIntegerOptionalNumber of units of the item
weightFloatOptionalWeight of each unit of the item
priceFloatOptionalPrice of each unit of the item (currency to be decided by 'currency_code' field)
manufacture_country_codeStringOptionalAlpha-2 ISO Country code of manufacture of the item
manufacture_countryStringOptionalFull country name of manufacture of the item
skuStringOptionalStock-keeping unit of the item
return_daysIntegerOptionalNumber of days within which the item can be returned
exchange_daysIntegerOptionalNumber of days within which the item can be exchanged
product_urlStringOptionalURL for the product. If there are multiple URLs, they can be sent as a single string with comma-separated values.
imagesStringOptionalURL for the image(s) of the product. If there are multiple URLs, they can be sent as a single string with comma-separated values.
extraDictOptionalAny custom data, in the key-value pair format, that you wish to send along with the shipment item info. Eg: Brand data, HSN Code etc1000{"brand":"Tesla"}

Response

Field NameData TypeDescription
metaObjectMetadata for the result, e.g. status code, error messages.
resultObjectActual result of the request

Response Meta

Field NameData TypeDescription
statusIntegerStatus code of the response (including, but not limited to HTTP Status codes)
messageStringError message (if any errors) for the request.
successBooleanWhether the request is successful or not.

Response Result

Field NameData TypeDescription
tracking_idIntegerTracking ID of the newly registered waybill stored in our database.
security_keyStringUUID string for the security key of the order
Language
Click Try It! to start a request and see the response here!