Shipments
Create a forward order
The Create Forward Order API allows you to create new forward orders with comprehensive sender, receiver, product, and package details. This API supports various order types including prepaid (PPD) and Cash on Delivery (COD) orders.
Request Example
curl --location '<HOST>/api/v1/open/forward/order' \
--header 'Content-Type: application/json' \
--header 'x-api-key: YOUR_API_KEY' \
--data '{
"orderNumber": "TEST00001",
"pickupLocation": {
"addressUid": 12345
},
"dropLocation": {
"name": "Customer Name",
"phone": "9988998899",
"email": "customeremail@gmail.com",
"address": {
"addressLine1": "Customer Address Line 1",
"addressLine2": "Customer Address Line 2",
"city": "Customer City",
"state": "Customer State",
"pincode": 200033
}
},
"shipments": {
"weightInGrams": 500,
"product_details": [
{
"quantity": "1",
"description": "Test Product Name",
"hsn_code/sku_code": "ABCD",
"category_of_goods": "Category",
"commodity_value": "1000.00",
"weight_grams": 500,
"height_cm": 10,
"length_cm": 10,
"breadth_cm": 10
}
],
"payment_details": {
"amount": 1000,
"payment_mode": "PPD"
},
"dimensions": {
"length_cm": 10,
"breadth_cm": 10,
"height_cm": 10
}
}
}'The package dimensions (length_cm, breadth_cm, height_cm) and weight must match the ones you send when you fetch cost estimates and book the forward shipment for this order.
Main Request Fields
| Field | Type | Required | Description |
|---|---|---|---|
orderNumber | String | Required | Your order number. It must be unique in your account: an order number that already exists is rejected. |
pickupLocation | Object | Required | Sender/pickup address details |
dropLocation | Object | Required | Receiver/delivery address details |
shipments | Object | Required | Package and product details |
Location Object Structure
Each location (pickup/drop) can be specified in two ways:
Option 1: Using Address UID (Existing Address)
| Field | Type | Description |
|---|---|---|
addressUid | Integer | Reference to existing address ID |
Option 2: Full Address Details (New Address)
| Field | Type | Required | Description |
|---|---|---|---|
name | String | Required | Contact person name |
phone | String | Required | Contact phone number |
email | String | Required | Contact email address |
address | Object | Required | Address details object |
Address Object Structure
| Field | Type | Required | Description |
|---|---|---|---|
addressLine1 | String | Required | Primary address line |
addressLine2 | String | Optional | Secondary address line |
city | String | Required | City name |
state | String | Required | State name |
pincode | Integer | Required | Postal code (6-digit Indian pincode) |
Shipments Object Structure
| Field | Type | Required | Description |
|---|---|---|---|
weightInGrams | Integer | Required | Total package weight in grams |
product_details | Array | Optional | Array of product detail objects |
payment_details | Object | Optional | Payment information |
dimensions | Object | Optional | Package dimensions (length_cm, breadth_cm, height_cm) |
Response Example
Success Response (HTTP 200)
{
"data": 12345,
"errorMessage": null
}The data field contains the unique order ID generated for the created forward order.
Error Response (HTTP 400)
{
"data": null,
"errorMessage": "Invalid order data provided"
}Stuck on an integration?
Your account manager can put you in touch with our tech team.