Outbound | POST
Sample Forward Order Request
{ "pickupAddress": { "firstName": "Ram", "lastName": "Patel", "middleName": "", "addressLine1": "1205, 15th Main Road", "addressLine2": "HSR layout", "addressLine3": "", "city": "Bangalore", "state": "Karnataka", "zip": "560102", "country": "India", "email": "abc@gmail.com", "phone": "9999999999" }, "dropAddress": { "firstName": "Shyam", "lastName": "Sharma", "middleName": "", "addressLine1": "A-101, Balaji Residency", "addressLine2": "Stadium road", "addressLine3": "Motera", "city": "Ahmedabad", "state": "Gujarat", "zip": "395007", "country": "India", "email": "abc@gmail.com", "phone": "9999999999" }, "orderDetails": { "orderNumber": "asdf1234", "paymentType": "PREPAID", "orderAmount": 230, "orderDate": "2022-03-16T12:31:02+05:30", "shipmentType": "FORWARD", "shipmentCode": "101" "orderLineItems": [ { "name": "jeans", "sku": "sku-1", "sellingPricePerUnit": 100, "quantity": 1 }, { "name": "t-shirt", "sku": "sku-2", "sellingPricePerUnit": 130, "quantity": 1 } ] }, "shipmentDimension": { "length": 50, "breadth": 50, "height": 50, "weight": 200 }, "courierId": 1, "warehouseCode": "wh-1", }
Sample Return Order Request
This is almost the same as the generate shipping label request body.
One additional field is there - returnReason. This is a mandatory field.
The orderNumber passed would be a unique string that is used to uniquely identify each return order.
The shipment type passed would be ‘RETURN’ in this case.
{ "pickupAddress": { "firstName": "firstName", "lastName": "lastName", "middleName": "middleName", "addressLine1": "1205, 15th Main Road", "addressLine2": "HSR layout", "addressLine3": "Address line 3", "city": "Bangalore", "state": "Karnataka", "zip": "560102", "country": "India", "email": "abc@gmail.com", "phone": "9999999999" }, "dropAddress": { "firstName": "Shyam", "lastName": "Sharma", "middleName": "A", "addressLine1": "A-101, Balaji Residency", "addressLine2": "Stadium road", "addressLine3": "Motera", "city": "Ahmedabad", "state": "Gujarat", "zip": "395007", "country": "India", "email": "abc@gmail.com", "phone": "9999999999" }, "orderDetails": { "orderNumber": "returnOrderNumber", "paymentType": "PREPAID", "orderAmount": 230, "orderDate": "2022-03-16T12:31:02+05:30", "shipmentType": "RETURN", "orderLineItems": [ { "name": "jeans", "sku": "sku-1", "sellingPricePerUnit": 100, "quantity": 1 }, { "name": "t-shirt", "sku": "sku-2", "sellingPricePerUnit": 130, "quantity": 1 } ] }, "shipmentDimension": { "length": 50, "breadth": 50, "height": 50, "weight": 200 }, "courierId": 1, "warehouseCode": "wh-1", "returnReason": "Wrong product" }
Parameter Name | Data Type | Description | Mandatory |
| Object | Address from where the shipment is picked up (eg. the warehouse address) | yes |
| String | City of warehouse address | yes |
| String | Country of warehouse address | yes |
| String | no | |
| String | First Name | yes |
| String | Last Name | no |
| String | Middle Name | no |
| String | Phone Number | no |
| String | State | yes |
| String | 1st line of warehouse address | yes |
| String | 2nd line of warehouse address | no |
| String | 3rd line of warehouse address | no |
| String | Zip/Pin code of warehouse address | yes |
| Object | Shipping Address of customer | yes |
| String | City of customer | yes |
| String | Country of customer | yes |
| String | Email of customer | no |
| String | First Name of customer | yes |
| String | Last Name of customer | no |
| String | Middle name of customer | no |
| String | Phone Number of customer | no |
| String | State of customer | yes |
| String | 1st line of customer address | yes |
| String | 2nd line of customer address | no |
| String | 3rd line of customer address | no |
| String | Zip/Pin code of customer | yes |
| Object | Order Details | yes |
| String | PREPAID / COD | yes |
| Date | Order Date | yes |
| String | The order id for which the shipping label is being generated | Yes |
| Double | The total order amount | Yes |
| String | Can be FORWARD or RETURN, based on the order type | yes |
| String | A shipment identifier to be passed, since an order can have multiple shipments. So, for the pair (orderCode,shipmentNumber) would be unique and will be used to identify a shipment for the particular client. | yes |
| Object[] | Order Line Items | yes |
| String | SKU of the product | yes |
| Double | Selling price of the product | yes |
| String | Name of the product | yes |
| Integer | Quantity of the product | yes |
| Object | Package Dimensions | yes |
| Integer | Breadth of package in cm | yes |
| Integer | Height of package in cm | yes |
| Integer | Length of package in cm | yes |
| Integer | Weight of package in grams | yes |
| String | Warehouse Code | no |
| Integer | Courier Id for which the shipping label is being generated | no |
| String | End customer return reason | no |
Response
{ "orderId": "11012", "orderNumber": "asdf1234", "awb": "71902671", "carrierName": "Delhivery", "shippingLabelUrl": "https://shipping-label-pdf.com/asdf1234" }
Parameter Name | Data Type | Description | Mandatory |
| String | This is the unique order id with which the logistic aggregator identifies each order. | yes |
| String | This is the order number passed in the request body. | yes |
| String | The tracking number assigned for the order | yes |
| String | The carrier of this order | yes |
| String | The shipping label pdf url, this will not be passed for returns. | no |