Edit Order
Edit Order API allows the enterprise to edit specific details for a shipment that has already been manifested.
Overview
This API enables enterprises to edit specific details for a shipment that has already been manifested. This API only works for the following mentioned fields, for the respective mentioned carrier partners.
Enterprise can use this API to edit the re-allocation order (for HLD).
Use-cases Supported
- Conversion of order from QC to NON-QC
- You can use this API to convert a shipment from QC to Non QC flow in case the shipment pickup has to be done and QC check if failing within carrier systems. Once this API is called, Carrier partner will pick the shipment next day without doing QC.
- Conversion of Order from COD to Prepaid.
- Conversion of Order from Prepaid to COD.
- Update Eway Bill Number
- Update Box details
Process Flow for COD to Prepaid Conversion:
The COD to Prepaid conversion API allows you to convert a shipment from COD to Prepaid till a particular state of the shipment [in general: Out For Delivery].
- Once the COD order is placed by the customer, show them an option to convert the order from COD to Prepaid on My orders section, via SMS/Whatsapp communications.
- When the customer makes the payment for the order, if the label is generated for the shipment, you can call the COD to Prepaid conversion API for the corresponding courier partner to convert the order to Prepaid.
- Once the courier sends a confirmation, you can make the transaction successful. In case you receive any failure from the courier partner, revert the transaction and disable conversion on the product.
Eway Bill Update Process
What is an Eway Bill Number?
An Eway Bill Number is a unique identifier mandated by the government for the transportation of goods valued at more than ₹50,000.
Flow
- During the order creation process, enterprises may not have the Eway Bill Number readily available. As a result, they often input empty or placeholder values in the API.
- Subsequently, enterprises generate the Eway Bill Number from the designated portal. This number then needs to be updated at the carrier partner's end.
- ClickPost's edit order API facilitates enterprises in updating the Eway Bill Number post-order creation, ensuring compliance and smooth logistics operations.
Important Notes:
- Enable webhooks enabled from the courier partners on Clickpost and you are consuming the same for getting the status updates. You would want to disable the payment link as soon as the order is marked as Out for Delivery.
- Before you start using the APIs, have a discussion with your courier partner POCs to keep them aligned that you are planning to use “edit order API” (couriers call the COD to Prepaid conversion API as Edit order) to convert orders from COD to Prepaid.
Box details Update Process
Flow
- Enterprises may not have the accurate box details like dimensions, dry weight that are required at the time of shipment creation. So they pass placeholder data in the box object.
- After the shipment creation is done, enterprises print the waybill copy and box stickers.
- Then, after the accurate box dimensions and weight is measured, enterprises can use ClickPost's edit order API to update the Box Details.
Important Notes
- You can update box details using this API only if the shipment was manifested via New B2B MPS Order Creation API or the AWB was registered for tracking.
- The count of boxes in edit order API should match exactly with the count during order creation.
- User should either pass child awb/box reference number for all boxes OR not pass for any box. Invalid case- sending child AWB/box reference for some boxes and not sending it for others.
- If child AWB or box reference is not present in all box objects then we will completely overwrite all the box details available against that shipment earlier and create entirely new ones according to the details present in edit order API.
- In case the AWB was created through ClickPost and the users passes a child AWB or box reference number in Edit Order API which is not present in our system then the user will get an error.
- User can pass both valid child waybill and its linked box reference number in a box object.
- Depending on carrier API, if the carrier accepts changes at child AWB level then we will pass it at Child AWB level otherwise just overwrite the entire box array in carrier system.
Geography
This API supports conversions for carriers in India.
Supported Carrier Partners for COD to Prepaid
Carrier Partners who support conversion of COD orders to PREPAID and are active on this API:
- Shadowfax
- XpressBees
- EcomExpress
- Delhivery
- Loadshare
- Delhivery B2B MPS
- Ithink Logistics
- Shadowfax Now Slot HLD
- Zomato HLD
- Blitz HLD
- Skye Air
- Elastic Run HLD
Carrier Partner who supports conversion of orders from QC to Non-QC:
- Shadowfax Reverse
Carrier Partner who supports update of E-way Bill Number
- Ekart
- Bluedart
- Delhivery (SPS, MPS)
- Xpressbee
- Shadowfax
- Shadowfax Heavy B2B
Carrier Partner who supports updating address info
- Delhivery
- Ekart Large SPS
- Ekart Large MPS
- Shadowfax
Carrier Partners who support the update of Box details
- Delhivery B2B MPS
- Delhivery B2C MPS
URL
POST <https://www.clickpost.in/api/v1/edit-order/>
Query Parameters
| Field Name | Data Type | Field | Description | Max Length | Example |
|---|---|---|---|---|---|
username | String | Mandatory | Username of the registered enterprise | 100 | Provided by Clickpost team |
key | String | Mandatory | Unique license key | 100 | Provided by Clickpost team |
Request Payload (For AWB Edit)
| Field Name | Data Type | Field | Description | Max Length | Example |
|---|---|---|---|---|---|
awb_number | String | Mandatory | The Air Waybill of the shipment that needs to be edited | "TESTAWB1" | |
courier_partner | Integer | Mandatory | Partner ID of the carrier partner. List of partner id | 123 | |
account_code | String | Conditional Mandatory | Pass this if more than one account created under same courier_partner. 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. | "SFX-ACC-1" | |
order_type | String | Mandatory | Order type of the shipment
| 100 | "PREPAID" |
cod_value | Float | Optional | Amount to be collected at the doorstep for cash on delivery mode. (Only required when prepaid to cod conversion is being done) | 123.50 | |
invoice_value | Float | Optional | Invoice amount of the shipment (in INR) | 123.50 | |
qc_type | Enum | Optional | The values it takes
| "doorstep" | |
sku | String | Optional | SKU of the item. If the customer wishes QC on the entire shipment they should ignore this field. If they wish QC on a specific shipment they should pass the SKU value of the shipment. | ||
ewaybill_serial_number | String | Optional | Eway Bill Number which needs to be updated against a shipment | 12 | 234567799999 |
invoice_number | String | Optional | Invoice Number of the shipment | "INV12123" | |
invoice date | Date | Optional | Date of the invoice | 2024-01-20 | |
box_info | String | Mandatory if box details to be updated | Updated details of all the boxes | ||
reference_number | String | Conditional Mandatory | Reference number of the shipment. Mandatory to pass when you want to edit the order using reference number and when awb_number is not provided. | "TEST-REF-01" |
Request Payload (For Re-allocation Edit)
| Field Name | Data Type | Field | Description | Max Length | Example |
|---|---|---|---|---|---|
reference_number | String | Mandatory | reference number of the reallocation order i.e. original_reference_number | "TESTREF1" | |
order_type | String | Mandatory | Existing or to be updated value of the order type. Accepted Values:
| 100 | "PREPAID" |
cod_value | Float | Conditional Mandatory | Amount to be collected at the doorstep for cash on delivery mode. (Only required when PREPAID to COD conversion is being done or actual order_type is COD) | 123.50 | |
invoice_value | Float | Conditional Mandatory | Total invoice amount of the order in INR. Mandatory when it needs to be edited. | 123.50 |
Box Info
In the 'box_info' object, provide the updated details related to a box like length, breadth, height, weight.
| Field Name | Data Type | Field Type | Description |
|---|---|---|---|
reference_number_prefix | String | Conditional Optional | Unique Id of the box that was passed at the time of shipment creation. |
child_awb | String | Conditional Optional | child_awb of the box was received in response from the ClickPost Order Creation API when the shipment was originally manifested. |
height | Integer | Mandatory | Height of the box in cm |
length | Integer | Mandatory | Length of the box in cm |
breadth | Integer | Mandatory | Breadth of the box in cm |
weight | Integer | Mandatory | Dry weight of the box in gm |
Response
The sample response can have the following fields
| Field Name | Data Type | Description |
|---|---|---|
meta | Object | Metadata for the result, e.g. status code, error messages. |
Response Meta
| Field Name | Data Type | Description |
|---|---|---|
status | Integer | Status code of the response (including, but not limited to HTTP Status codes) |
message | String | Error message (if any errors) for the request. |
success | Boolean | Whether the request is successful or not. |
Sample Payload
{
"awb_number": "20719799",
"order_type": "PREPAID",
"courier_partner": 220
}{
"awb_number": "999999999",
"qc_type": "doorstep",
"courier_partner": 11
}{
"awb_number": "76973977426",
"ewaybill_serial_number":"234567799999",
"invoice_number":"new123",
"invoice_date":"2024-01-20",
"courier_partner": 5
}{
"awb_number": "02082025TEST-001",
"courier_partner": 129,
"account_code":"1",
"reference_number":"TEST28072025-002",
"box_info": [
{
"child_waybill": "",
"box_reference_number": "TEST28072025-002.002",
"height": 10,
"length": 10,
"weight": 10,
"breadth": 10
}
]
}{
"awb_number": "GS2913038487",
"courier_partner": 632,
"order_type": "COD",
"cod_value": 120,
"invoice_value": 220 //blitz only
}{
"reference_number": "ORDER123",
"invoice_value": 110,
"cod_value": 10,
"order_type": "COD"
}//For ekart
{
"awb_number": "YOUR_AWB",
"courier_partner": 55,
"account_code": "YOUR_ACCOUNT_CODE",
"drop_address": "123, New Colony, Near Metro",
"drop_city": "New Delhi",
"drop_state": "Delhi",
"drop_pincode": "110001",
"drop_phone": "9876543210",
"drop_alternate_phone": "9123456780"
}
// Delhivery
{
"awb_number": "YOUR_AWB",
"courier_partner": 4,
"account_code": "YOUR_ACCOUNT_CODE",
"drop_address": "123, New Colony, Near Metro Station",
"drop_phone": "9876543210",
"drop_name": "John Doe"
}
//Shadowfax
{
"awb_number": "YOUR_AWB",
"courier_partner": 9,
"account_code": "YOUR_ACCOUNT_CODE",
"drop_address": "253, 2nd cross Hebbal",
"drop_pincode": "560008",
"drop_phone": "9999999999",
"drop_lat": "12.9226",
"drop_long": "77.6174"
}{
"awb_number": "Test4E3DDC8B6CRF",
"order_type": "PREPAID",
"length": 50,
"breadth": 10,
"height": 23,
"weight": 12,
"courier_partner": 631,
}{
"awb_number": "<awb>",
"courier_partner": 1,
"account_code": "<account_code>",
"letterhead_base_64": "<base64 png or gif>",
"signature_base_64": "<base64 png or gif>",
"pdf_invoice": "<base64 pdf>"
}Sample Response
{
"meta": {
"message": "ACCEPTED",
"success": true,
"status": 200
}
}{
"meta": {
"message": "Order edit not allowed: latest reallocated shipment has already been picked up",
"success": false,
"status": 614
}
}Meta Codes
| HTTP Status Code | status | message | Description |
|---|---|---|---|
| 200 | 200 | < Dynamic success message indicating order edited successfully > | Order Edited Successfully. |
| 500 | 500 | Oops! Internal server error in Clickpost | Any internal clickpost server error occurred. |
| 400 | 590 | Oops! Internal service error in Clickpost | Any internal clickpost service error occurred. |
| 400 | 400 | < Dynamic Error message explaining the error > | This error can occurred when request body is invalid or courier throws any error while editing order. |
| 400 | 616 | Multiple shipments found for reference_number; pass courier_partner and account_code to disambiguate | When more than one shipment found with same reference_number. Please provide specific courier partner and account code optionally. |
Error Codes for Updating box details
| HTTP Status Code | status | message | Description |
|---|---|---|---|
| 400 | 200 | Box count mismatch with existing shipment. | The count of box objects in the edit order API should match exactly with the count during order creation if the original shipment was manifested via ClickPost. |
| 400 | 200 | Either provide child AWB/box reference for ALL boxes or for NONE | User should either pass child AWB/box reference number for all boxes OR not pass for any box. Invalid case: sending child AWB/ box reference for some boxes and not sending it for others. |
| 400 | 200 | Child AWB not found, use valid child AWB. | User passes a child AWB for some box and it is not present in our system. |
| 400 | 200 | Box reference not found, use valid box reference number. | User passes a box reference number for some box and it is not present in our system. |
Error Codes for Updating Re-allocation Order
| HTTP Status Code | status | message | Description |
|---|---|---|---|
| 400 | 612 | Shipment belongs to a reallocation flow; pass the reallocation original reference_number | Shipment part of the reallocation flow is not allowed to edit. |
| 400 | 613 | Order edit not allowed: reallocation terminated with no active AWB | |
| 400 | 614 | Order edit not allowed: latest reallocated shipment has already been picked up | |
| 400 | 615 | Carrier edit successful; reallocation edit failed | Carrier edit was successful, but updating the corresponding details for the reallocation order in ClickPost failed. |
Error Codes for Updating Re-allocation Order
| HTTP Status Code | message |
|---|---|
| 400 | courier_partner is mandatory |
| 400 | account_code is mandatory |
| 400 | awb_number is mandatory |
| 400 | GET API is only supported for Async Courier Ex:Delhivery B2B |
| 400 | AWB number not found in the system |
Updated 2 days ago
