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
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 Name | Data Type | Field | Description | Max Length | Example |
---|---|---|---|---|---|
reference_number | String | Optional | Reference_number passed in the POST payload during manifestation | 20 | "REF#001" |
key | String | Mandatory | Unique license key provided by Clickpost for the enterprise, used for authentication | 100 | "00000000-0000-0000-0000-000000000000" |
awb | String | Optional | AWB of the order to receive details for | 100 | "TESTAWB0001" |
cp_id | Integer | Optional | Partner ID of the courier responsible for delivering the shipment | 25 |
You need to Pass either
awb
andcp_id
orkey
andreference_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 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 shipment |
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 |
---|---|---|
reference_number | String | Reference number of the order, sent in the payload. |
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 |
label | String/Null | URL to the generated label of the order. If labels are not needed, this stays null. |
courier_partner | 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. |
account_code | String | The 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
}
}
Updated about 1 year ago