Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
{
  "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

...

Code Block
{
  "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

pickupAddress

Object

Address from where the shipment is picked up (eg. the warehouse address)

yes

pickupAddress.city

String

City of warehouse address

yes

pickupAddress.country

String

Country of warehouse address

yes

pickupAddress.email

String

Email

no

pickupAddress.firstName

String

First Name

yes

pickupAddress.lastName

String

Last Name

no

pickupAddress.middleName

String

Middle Name

no

pickupAddress.phone

String

Phone Number

no

pickupAddress.state

String

State

yes

pickupAddress.addressLine1

String

1st line of warehouse address

yes

pickupAddress.addressLine2

StringĀ 

2nd line of warehouse address

no

pickupAddress.addressLine3

String

3rd line of warehouse address

no

pickupAddress.zip

String

Zip/Pin code of warehouse address

yes

dropAddress

Object

Shipping Address of customer

yes

dropAddress.city

String

City of customer

yes

dropAddress.country

String

Country of customer

yes

dropAddress.email

String

Email of customer

no

dropAddress.firstName

String

First Name of customer

yes

dropAddress.lastName

String

Last Name of customer

no

dropAddress.middleName

String

Middle name of customer

no

dropAddress.phone

String

Phone Number of customer

no

dropAddress.state

String

State of customer

yes

dropAddress.addressLine1

StringĀ 

1st line of customer address

yes

dropAddress.addressLine2

String

2nd line of customer address

no

dropAddress.addressLine3

String

3rd line of customer address

no

dropAddress.zip

String

Zip/Pin code of customer

yes

orderDetails

Object

Order Details

yes

orderDetails.paymentType

String

PREPAID / COD

yes

orderDetails.orderDate

Date

Order Date

yes

orderDetails.orderNumber

String

The order id for which the shipping label is being generated

Yes

orderDetails.orderAmount

Double

The total order amount

Yes

orderDetails.shipmentType

String

Can be FORWARD or RETURN, based on the order type

yes

orderDetails.shipmentCode

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

orderDetails.orderLineItemList

Object[]

Order Line Items

yes

orderDetails.orderLineItemList.sku

String

SKU of the product

yes

orderDetails.orderLineItemList.sellingPricePerUnit

Double

Selling price of the product

yes

orderDetails.orderLineItemList.name

String

Name of the product

yes

orderDetails.orderLineItemList.quantity

Integer

Quantity of the product

yes

shipmentDimension

Object

Package Dimensions

yes

shipmentDimension.breadth

Integer

Breadth of package in cm

yes

shipmentDimension.height

Integer

Height of package in cm

yes

shipmentDimension.length

Integer

Length of package in cm

yes

shipmentDimension.weight

Integer

Weight of package in grams

yes

warehouseCode

String

Warehouse Code

no

courierId

Integer

Courier Id for which the shipping label is being generated

no

returnReason

String

End customer return reason

no

Response

Code Block
{
  "orderId": "11012",
  "orderNumber": "asdf1234",
  "awb": "71902671",
  "carrierName": "Delhivery",
  "shippingLabelUrl": "https://shipping-label-pdf.com/asdf1234"
}

Parameter Name

Data Type

Description

Mandatory

orderId

String

This is the unique order id with which the logistic aggregator identifies each order.

yes

orderNumber

String

This is the order number passed in the request body.

yes

awb

String

The tracking number assigned for the order

yes

carrierName

String

The carrier of this order

yes

shippingLabelUrl

String

The shipping label pdf url, this will not be passed for returns.

no