Skip to main content

Create Draft Order (book the shipment with the carrier)

This is the step that actually creates the shipment — it calls the chosen carrier's API, gets back an AWB / LR number and shipping label, and updates the order accordingly.

POST /api/external/v1/order/createDraftOrder

Request body (CreateDraftOrderRequest)

FieldTypeRequiredDescription
order_idUUIDYesorder_id returned by Save Order
selected_carrier_optionsobjectYesSee below
pickup_datedatetimeNoDefaults to now
order_typestringNoe.g. COD, PREPAID
order_modestringNoe.g. SURFACE
order_methodstringNo
load_typestringNoDefaults to PTL

selected_carrier_options object

FieldTypeRequiredDescription
carrier_idUUIDYesFrom Get Registered Carriers
carrierstringYesCarrier code, e.g. delhivery — see Supported Carriers
carrier_namestringNoDisplay name
carrier_nicknamestringNo
sub_carrier_idstringNo
sub_carrier_namestringNo
is_localbooleanNotrue for a locally-configured (non-integrated) transporter
shipping_chargesnumberNoPre-fetched from Get Rates; server re-validates/re-fetches if omitted
shipping_charges_breakdownobjectNo{ base_price, fuel_surcharge, gst, total }
expected_delivery_datedatetimeNoPre-fetched from Get Rates; server re-fetches if omitted
Request Example
{
"order_id": "8b1e2c3d-.....",
"selected_carrier_options": {
"carrier_id": "b6b2a3e1-0c61-4fd2-9a07-3bf2035888f1",
"carrier": "delhivery",
"carrier_name": "Delhivery",
"is_local": false
},
"order_type": "PREPAID",
"order_mode": "SURFACE",
"load_type": "PTL"
}

Response 200 OK

{
"success": true,
"status_code": 200,
"message": "Successfully created draft order",
"data": {
"order_id": "8b1e2c3d-....."
}
}

After this call succeeds, fetch the full shipment (including AWB, label URL, current status) via Get Order / Shipment.

Failure modes (all 4xx/5xx with message/error explaining the cause): order already cancelled, order already booked ("Order already created"), carrier not serviceable for the route, invalid/missing carrier credentials, unknown carrier code, or an upstream carrier API error.