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.
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.
The following parameter is required to activate Ship From:
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.
Include multiple warehouse objects in the warehouses array. This table shows the required warehouse parameters.
|
Parameter |
Type |
Required |
Description |
|---|---|---|---|
|
|
string |
Yes |
Warehouse identifier code |
|
|
string |
Yes |
Warehouse country code |
|
|
string |
Yes |
Warehouse postal code |
|
|
string |
No |
Warehouse address line 1 |
|
|
string |
No |
Warehouse address line 2 |
|
|
string |
No |
Warehouse city |
|
|
string |
No |
Warehouse street name |
|
|
string |
No |
Warehouse house number |
In addition to the standard delivery option fields, the response also returns these SSR-specific fields.
Each delivery option includes these additional fields.
|
Field |
Type |
Description |
|---|---|---|
|
|
string |
Warehouse code identifying the source of this option |
|
|
boolean |
|
|
|
boolean |
|
|
|
object |
For HOME: warehouse to customer distance For PUDO/OWNSTORE: customer to pickup point distance * See Distance Fields Explained |
|
|
object |
Distance from warehouse to pickup point (PUDO/OWNSTORE only) |
For HOME:
-
distancecontains the distance from the warehouse to the customer's delivery address -
No
warehouse_distancefield (not applicable)
For PUDO/OWNSTORE:
-
distancecontains the distance from the customer to the pickup point -
warehouse_distancecontains the distance from the warehouse to the pickup point
Distance values are in meters:
```json
{
"value": 1500,
"unit": "m"
}
```
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
}
]
}
```
---
Rankings are calculated independently for each delivery type (HOME, PUDO, OWNSTORE).
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.