Fetch AWB Number for manifested order

In case you want to fetch the AWB for a shipment that you generated in past via Clickpost, you can do so using this API.

You can either pass reference_number or awb + cp_id

Overview

In case you want to fetch the AWB for a shipment that you generated in past via Clickpost, you can do so using this API.

Important Links

Run in Postman API Reference

Usecase

This is a standard API which applies to all MPS (Multi-Piece Shipment) and SPS (Single Piece Shipment) orders

Geography

This API is supported globally

URL

To fetch data using awb and cp_id:

GET https://www.clickpost.in/api/v3/create-order/?key=*&awb=*&cp_id=*

or

To fetch data using reference_number:

GET https://www.clickpost.in/api/v3/create-order/?key=*&reference_number=*

Query Parameters

Query Parameters to be passed directly in the URL.

Field NameData TypeFieldDescriptionMax LengthExample
reference_numberStringOptionalReference_number passed in the POST payload during manifestation20"REF#001"
keyStringMandatoryUnique license key provided by Clickpost for the enterprise, used for authentication100"00000000-0000-0000-0000-000000000000"
awbStringOptionalAWB of the order to receive details for100"TESTAWB0001"
cp_idIntegerOptionalPartner ID of the courier responsible for delivering the shipment25

🚧

You need to Pass either awb and cp_id or key and reference_number

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 NameData TypeDescription
metaObjectMetadata for the request, e.g. status code, error messages.
resultObjectActual result of the request
order_idIntegerOrder ID of the shipment
tracking_idIntegerA special ID of the request used for tracking

Response Meta

Field NameData TypeDescription
statusIntegerStatus code for the request (including but not limited to HTTP Status codes)
messageStringError/Success messages for the request
successBooleanWhether the order was successfully created or not

Response Result

Field NameData TypeDescription
reference_numberStringReference number of the order, sent in the payload.
waybillStringWaybill 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
labelString/NullURL to the generated label of the order. If labels are not needed, this stays null.
courier_partnerIntegerID of the courier partner
courier_nameStringName of the courier
sort_codeString/NullCourier 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_keyStringUUID security key of the order that needs to be stored at the enterprise's end.
account_codeStringThe account configured under the courier partner

Sample Response

We can either get a 200 (OK) or a 400 (Bad Request) error as follows

{
    "meta": {
        "message": "Success",
        "status": 200,
        "success": true
    },
    "result": {
        "reference_number": "CR19221974",
        "waybill": "151894390095779",
        "label": "https://pyck-res-bucket.s3.amazonaws.com:443/XPRESSBEES/2022-10-29/151894390095779-1667009450.pdf",
        "courier_partner": 6,
        "security_key": "08a7c8dd-1839-4abd-9952-2063a2fb9680",
        "sort_code": "N/S-08/4C/003",
        "account_code": "Xpressbees_Surface",
        "courier_name": "XpressBees"
    }
}
{
    "meta": {
        "message": "Pass either awb and cp_id, key or reference_number, key",
        "status": 400,
        "success": false
    }
}