API Reference

Providing return label

Return labels requested will make a request to the same endpoint as generating a label, using the same payload with two changes:

  1. The origin and destination addresses will be switched (from the customer to the destination warehouse)
  2. The options object key is_return will evaluate to true

Request payload example

{
  "account_id": "123456789",
  "service_code": "S1",
  "origin": {
    "name": "Tony Douglas",
    "street1": "157 W 57th St",
    "street2": "Suite 1200",
    "city": "New York",
    "zip": "10019",
    "country": "US",
    "state": "NY",
    "email": "[email protected]",
    "phone": "+18979671111",
    "company": null,
    "validation_status": null,
    "address_type": null,
    "tax_identification": null
  },
  "destination": {
    "name": "Joe Santiego",
    "street1": "444 Castro St",
    "street2": "Suite 1200",
    "city": "Mountain view",
    "zip": "94041",
    "country": "US",
    "state": "CA",
    "email": "[email protected]",
    "phone": "+18978678653",
    "company": "Fulfil.IO Inc.",
    "validation_status": null,
    "address_type": null,
    "tax_identification": null
  },
  "packages": [
    {
      "length": 4,
      "width": 4,
      "height": 5,
      "dimension_unit": "in",
      "weight": 7,
      "weight_unit": "lb",
      "carrier_code": null,
      "machinable": false,
      "dhl_ecommerce_dangerous_goods_category": null,
      "easyship_category": null,
      "description": "Merchandise",
      "quantity": null,
      "amount": null,
      "reference": null
    }
  ],
# The 'customs' property will only be populated if the shipment is an international shipment
# otherwise, for domestic shipments the 'customs' value will be `null`
  "customs": {
    "customs_certify": true,
    "contents_type": "other",
    "customs_signer": null,
    "contents_explanation": "Electronic Items",
    "non_delivery_option": "return",
    "items": [
      {
        "description": "iPhone 7",
        "quantity": 1,
        "value": 99,
        "currency": "USD",
        "weight": 1,
        "weight_unit": "lb",
        "hs_code": null,
        "sku": null,
        "country_of_origin": "US",
        "_options": {}
      },
      {
        "description": "MacBook Pro",
        "quantity": 2,
        "value": 40,
        "currency": "USD",
        "weight": 6,
        "weight_unit": "lb",
        "hs_code": null,
        "sku": null,
        "country_of_origin": "US",
        "_options": {}
      }
    ],
    "incoterm": null,
    "invoice_number": null,
    "eel": null,
    "pfc": null,
    "exporter_tax_id_type": null,
    "exporter_tax_id": null,
    "exporter_eori_number": null,
    "importer": null
  },
  "options": {
    "reference1": "SO123 #123",
    "reference2": "CS145",
    "is_return": true,
    "request_confirmation": "signature",
    "insurance_amount": "123.99"
  }
}
}