ShiftDocs

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.

POST{host}/api/v1/open/forward/order

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

FieldTypeRequiredDescription
orderNumberStringRequiredYour order number. It must be unique in your account: an order number that already exists is rejected.
pickupLocationObjectRequiredSender/pickup address details
dropLocationObjectRequiredReceiver/delivery address details
shipmentsObjectRequiredPackage and product details

Location Object Structure

Each location (pickup/drop) can be specified in two ways:

Option 1: Using Address UID (Existing Address)

FieldTypeDescription
addressUidIntegerReference to existing address ID

Option 2: Full Address Details (New Address)

FieldTypeRequiredDescription
nameStringRequiredContact person name
phoneStringRequiredContact phone number
emailStringRequiredContact email address
addressObjectRequiredAddress details object

Address Object Structure

FieldTypeRequiredDescription
addressLine1StringRequiredPrimary address line
addressLine2StringOptionalSecondary address line
cityStringRequiredCity name
stateStringRequiredState name
pincodeIntegerRequiredPostal code (6-digit Indian pincode)

Shipments Object Structure

FieldTypeRequiredDescription
weightInGramsIntegerRequiredTotal package weight in grams
product_detailsArrayOptionalArray of product detail objects
payment_detailsObjectOptionalPayment information
dimensionsObjectOptionalPackage 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.

Talk to us