Stock Locations API Overview

This API is for use with ZFS only.

Use Stock Locations API to get list of all Fulfillment, Return and Inbound Distribution Centers Regardless of the Relevancy.

Stock Locations API Scopes

Many zDirect APIs require clients to have specific permissions or scopes for read or write access. You may assign scopes to your apps in the "Applications" section of the zDirect Portal.

For more information on configuring app scopes, see the Applications section of our zDirect Portal guide.

Required scopes are:

Endpoint scope
/zfs/stock-locations zfs/stock-location/read
/zfs/stock-locations/{id} zfs/stock-location/read

Rate Limiting

Each endpoint may only make the following number of requests per second:

Request req/min (sandbox) req/min (production) rate-limit quota
GET /zfs/stock-locations 10 100 per Merchant
GET /zfs/stock-locations/{id} 10 100 per Merchant

For more information, see Rate Limiting.

Sandbox Behavior

When calls are made to the Stock Locations API in the sandbox environment, we run basic validation on the request, and if it is well-formed, return appropriate sample values.

For more information, see Sandbox Testing in our Getting Started Guide.

Authentication

The zDirect API requires OAuth 2.0 authentication for all API calls. Use the Authentication API to generate access tokens as described in the Authentication section.

Getting all stock locations endpoint

This call returns the list of all Fulfillment, Return and Inbound Distribution Centers.

GET /zfs/stock-locations

The same call using httpie:

http GET \
https://api-sandbox.merchants.zalando.com/zfs\
/stock-locations \
"Authorization:Bearer $YOUR_ACCESS_TOKEN"

Response: Successful

You will receive an HTTP 200 reply to a successful request. The following JSON reply example shows a response with a list of center items:

[
  {
    "id": "95eacdb2-4122-4f46-bb9e-2f1eb631a26c",
    "name": "Halle",
    "type": "INBOUND_DISTRIBUTION_CENTER",
    "location": {
      "postal_code": "06116",
      "country_code": "DE",
      "street": "Wegastraße 4a",
      "city": "Halle (Saale)",
      "latitude": 51.4933094,
      "longitude": 12.078615
    },
    "abbreviation": "HAL",
    "valid_from": "1970-01-01T00:00:00Z",
    "capabilities": [
      "INBOUND_ITEM",
      "OUTBOUND_REPLENISHMENT",
      "CROSS_DOCKING",
      "STORE_ITEM"
    ]
  },
...
]

Getting stock location details by id endpoint

This call returns the details of Fulfillment, Return or Inbound Distribution Center by Stock Location ID

GET /zfs/stock-locations/95eacdb2-4122-4f46-bb9e-2f1eb631a26c

The same call using httpie:

http GET \
https://api-sandbox.merchants.zalando.com/zfs\
/stock-locations/95eacdb2-4122-4f46-bb9e-2f1eb631a26c \
"Authorization:Bearer $YOUR_ACCESS_TOKEN"

Response: Successful

You will receive an HTTP 200 reply to a successful request. The following JSON reply example shows a response with a list of center items:

{
  "id": "95eacdb2-4122-4f46-bb9e-2f1eb631a26c",
  "name": "Halle",
  "type": "INBOUND_DISTRIBUTION_CENTER",
  "location": {
    "postal_code": "06116",
    "country_code": "DE",
    "street": "Wegastraße 4a",
    "city": "Halle (Saale)",
    "latitude": 51.4933094,
    "longitude": 12.078615
  },
  "abbreviation": "HAL",
  "valid_from": "1970-01-01T00:00:00Z",
  "capabilities": [
    "INBOUND_ITEM",
    "OUTBOUND_REPLENISHMENT",
    "CROSS_DOCKING",
    "STORE_ITEM"
  ]
}

Response: Not found

You will receive an HTTP 404 reply when there is no Stock Location matching provided Stock Location ID have been found.

Error Handling

If you receive a non-200 error response, try re-fetching after two minutes or more.

Additional Resources

Contact Support