Ship From Delivery Options - Multiple Shipping Locations

Ship From enables you to query multiple shipping locations in a single API call and receive ranked delivery options. This eliminates the need for multiple API calls and a manual comparison of options from different fulfillment centers.

When to Use Ship From

Use Ship From when you need to:

  • Compare delivery options from multiple shipping locations in one request

  • Find the most cost-effective shipping option across all fulfillment centers

  • Identify the fastest delivery option regardless of shipping location.

Ship From - Request Format

Request Parameters: Ship From Activation

The following parameter is required to activate Ship From:

Parameter

Type

Required

Description

r_t

string

Yes

Must be set to ssr to activate Ship From.

Request Method

  • Use POST with JSON body for requests with multiple warehouses

  • The key parameter should be in the query string.

  • The r_t parameter should be in the JSON body.

POST Request with JSON Body

Endpoint: POST /find?key=YOUR_API_KEY

JSON Body

```json
{
  "r_t": "ssr",
  "warehouses": [
    {
      "wh_code": "WAREHOUSE_1",
      "wh_cc": "GBR",
      "wh_pc": "EC1R 4PF",
      "wh_l1": "123 Main Street",
      "wh_city": "London"
    },
    {
      "wh_code": "WAREHOUSE_2", 
      "wh_cc": "GBR",
      "wh_pc": "M1 1AA",
      "wh_l1": "456 High Street",
      "wh_city": "Manchester"
    }
  ],
  "c_pc": "SW1A 1AA",
  "c_cc": "GBR",
  "c_l1": "10 Downing Street",
  "c_city": "London",
  "e_w": "2.5",
  "e_v": "150.00",
  "e_v_currency": "GBP"
}
```

Request Limit: 10 Warehouses

You can specify up to 10 warehouses per request.

Warehouse Parameters (Array)

Include multiple warehouse objects in the warehouses array. This table shows the required warehouse parameters.

Parameter

Type

Required

Description

wh_code

string

Yes

Warehouse identifier code

wh_cc

string

Yes

Warehouse country code

wh_pc

string

Yes

Warehouse postal code

wh_l1

string

No

Warehouse address line 1

wh_l2

string

No

Warehouse address line 2

wh_city

string

No

Warehouse city

wh_street

string

No

Warehouse street name

wh_house_nr

string

No

Warehouse house number

Ship From - Response Format

In addition to the standard delivery option fields, the response also returns these SSR-specific fields.

Additional Fields

Each delivery option includes these additional fields.

Field

Type

Description

wh_code

string

Warehouse code identifying the source of this option

cheapest

boolean

true if this is the lowest cost option within its delivery type

quickest

boolean

true if this has the earliest delivery time within its delivery type

distance

object

For HOME: warehouse to customer distance

For PUDO/OWNSTORE: customer to pickup point distance

* See Distance Fields Explained

warehouse_distance

object

Distance from warehouse to pickup point (PUDO/OWNSTORE only)

Distance Fields Explained

For HOME:

  • distance contains the distance from the warehouse to the customer's delivery address

  • No warehouse_distance field (not applicable)

For PUDO/OWNSTORE:

  • distance contains the distance from the customer to the pickup point

  • warehouse_distance contains the distance from the warehouse to the pickup point

Distance values are in meters:

```json
{
  "value": 1500,
  "unit": "m"
}
```

Ship From - Response Example

Below is a typical API response structure, provided in JSON format, for a successful request:

```json
{
  "header": {
    "requestId": "abc-123-def",
    "requestDate": "2024-01-15T10:00:00.000Z",
    "responseDate": "2024-01-15T10:00:01.234Z"
  },
  "results": [
    {
      "bookingCode": "OPT_001",
      "wh_code": "WAREHOUSE_1",
      "optionType": "HOME",
      "carrierCode": "DPD",
      "carrierServiceCode": "DPD_CLASSIC",
      "shippingCharge": 5.99,
      "shippingCost": 4.50,
      "distance": {
        "value": 15000,
        "unit": "m"
      },
      "delivery": {
        "from": "2024-01-17T09:00:00.000Z",
        "to": "2024-01-17T18:00:00.000Z"
      },
      "cheapest": true,
      "quickest": false
    },
    {
      "bookingCode": "OPT_002",
      "wh_code": "WAREHOUSE_2",
      "optionType": "HOME",
      "carrierCode": "ROYAL_MAIL",
      "carrierServiceCode": "RM_24",
      "shippingCharge": 7.99,
      "shippingCost": 5.50,
      "distance": {
        "value": 25000,
        "unit": "m"
      },
      "delivery": {
        "from": "2024-01-16T09:00:00.000Z",
        "to": "2024-01-16T18:00:00.000Z"
      },
      "cheapest": false,
      "quickest": true
    },
    {
      "bookingCode": "OPT_003",
      "wh_code": "WAREHOUSE_1",
      "optionType": "PUDO",
      "carrierCode": "DPD",
      "carrierServiceCode": "DPD_PICKUP",
      "storeId": "DPD_STORE_123",
      "storeName": "Local Post Office",
      "lat": 51.5074,
      "long": -0.1278,
      "shippingCharge": 3.99,
      "shippingCost": 2.50,
      "distance": {
        "value": 500,
        "unit": "m"
      },
      "warehouse_distance": {
        "value": 15000,
        "unit": "m"
      },
      "delivery": {
        "from": "2024-01-17T09:00:00.000Z",
        "to": "2024-01-17T18:00:00.000Z"
      },
      "cheapest": true,
      "quickest": false
    }
  ]
}
```

---

Understanding the Rankings

Rankings are calculated independently for each delivery type (HOME, PUDO, OWNSTORE).

Cheapest

The option with the lowest total cost (`shippingCharge + shippingCost`) within its delivery type.

Example: If you have 3 HOME options and 2 PUDO options, one HOME and one PUDO will be marked as the cheapest.

Quickest

The option with the earliest delivery date within its delivery type.

Example: The HOME option with the earliest delivery and the PUDO option with the earliest delivery will both be marked as quickest.

Limitations with Ship From

Maximum warehouses: You can specify up to 10 warehouses per request.