Save Order (create a draft shipment)
POST /api/external/v1/order/saveOrder
Creates an order record in DRAFTORDER status against one or more Purchase Orders. This does
not talk to any carrier yet — it just persists the shipment's shipping/customer/SKU/carton
details so Create Draft Order can book it.
Request body (SaveOrderRequest)
| Field | Type | Required | Description |
|---|---|---|---|
purchase_order_id | string[] (UUID) | Yes | PO ID(s) this shipment fulfils |
po_number | string[] | No | Human-readable PO number(s) |
warehouse_id | UUID | No | Dispatching (pickup) warehouse |
customer_warehouse_id | UUID | No | Destination customer warehouse |
customer_name | string | No | Consignee name |
customer_address | string | No | Consignee address |
customer_phone | string | No | Consignee phone |
customer_pincode | string | No | Consignee pincode |
customer_city | string | No | Consignee city |
customer_state | string | No | Consignee state |
customer_email | string | No | Consignee email |
customer_gstin | string | No | Consignee GSTIN |
customer_pan | string | No | Consignee PAN |
customer_billing_* | string | No | Billing counterparts of the customer_* fields above |
truck_load_type | string | No | e.g. PTL, FTL |
order_type | string | No | e.g. COD, PREPAID |
order_mode | string | No | e.g. SURFACE, AIR |
order_method | string | No | Client-defined dispatch method |
carton_details | array of Carton objects | No | See Carton object |
sku_details | array of SKU objects | No | See SKU object (order) |
total_invoice_value | number | No | |
total_cartons | integer | No | |
total_dead_weight | number | No | |
total_volumetric_weight | number | No | |
invoice_number | string | No | |
invoice_date | string | No | |
ewaybill_number | string | No | |
shipping_charges | number | No | Pre-computed shipping charge, if known |
channel | string | No | Sales channel |
batch_number | string | No | |
order_note | string | No | |
is_local_transporter | boolean | No |
Request Example
{
"purchase_order_id": ["b6b2a3e1-0c61-4fd2-9a07-3bf2035888f1"],
"customer_warehouse_id": "d2f5a1a2-....",
"customer_name": "Acme Retail Pvt Ltd",
"customer_address": "Plot 12, Industrial Area",
"customer_phone": "9999999999",
"customer_pincode": "400001",
"customer_city": "Mumbai",
"customer_state": "Maharashtra",
"order_type": "PREPAID",
"order_mode": "SURFACE",
"order_method": "B2B",
"total_cartons": 5,
"total_dead_weight": 120.5,
"total_volumetric_weight": 95.0,
"total_invoice_value": 45000,
"carton_details": [
{ "type": "BOX", "length": 40, "breadth": 30, "height": 25, "weight": 24.1, "quantity": 5, "volumetric_weight": 19 }
],
"sku_details": [
{ "code": "SKU-001", "name": "Widget", "channel_code": "SKU-001", "quantity": 100, "cost_price": 90, "price": 120, "mrp": 150 }
]
}
Response 200 OK
{
"success": true,
"status_code": 200,
"message": "Successfully saved order",
"data": { "order_id": "8b1e2c3d-....." }
}
Keep order_id — it is required for every subsequent call in the flow (rates, create draft order,
get/update/cancel order).