Inventory service API (1.0.0-inventory)

Download OpenAPI specification:

Inventory related service API

inventory

Related to inventory service

Get inventory for specific skus

Retrieves inventory for a list of skus provided based on site and optionally delivery country. You can also specify whether to avoid the cache when retrieving inventory information.

Note that although this is a POST request, nothing is created on the server. The POST verb is used because the request body is large and the GET verb has a limit on the size of the request body.

Authorizations:
api_key
Request Body schema: application/json
required

The payload schema describes the information required to retrieve inventory.

required
Array of objects

List of skus to retrieve inventory information for.

siteKey
required
string

The id of the site to retrieve sku inventory for e.g. specsavers-gb

deliveryCountryCode
string

The code of the country the sku will be delivered to. e.g. FR

live
required
boolean

If true, retrieve inventory from source system, otherwise check for a cached value first

Responses

Request samples

Content type
application/json
{
  • "items": [
    ],
  • "siteKey": "specsavers-gb",
  • "deliveryCountryCode": "GB",
  • "live": true
}

Response samples

Content type
application/json
{
  • "data": { }
}

Get inventory for all skus

Retrieves inventory for all skus. Optionally filtered by the query parameters siteKey or fulfilmentCountryCode

Results can be paged using the query parameter limit along with a cursor using before or after query parameter.

Authorizations:
api_key
query Parameters
siteKey
required
string

The site key

limit
number [ 1 .. 500 ]

The maximum number of results to return. 0 defaults to the maximum of 500

before
string <= 10000

Cursor to retrieve results before.

after
string

Cursor to retrieve results after.

fulfilmentCountryCode
required
string

The code of the country the sku will be fulfilled from. e.g. GB

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}

Get inventory for sku

Retrieves inventory for a single sku provided based on specified parameters. You can also specify whether to avoid the cache when retrieving inventory information.

Authorizations:
api_key
path Parameters
sku
required
string

The id of the sku to retrieve inventory information for.

query Parameters
siteKey
required
string

The site key

fulfilmentCountryCode
required
string

The code of the country the sku will be fulfilled from. e.g. GB

deliveryCountryCode
string

The code of the country the sku will be delivered to. e.g. FR

live
required
boolean

If true, retrieve inventory from source system, otherwise check for a cached value first

Responses

Response samples

Content type
application/json
{
  • "data": { }
}

Health check information for the inventory service

The health endpoint.

Authorizations:
api_key

Responses

Response samples

Content type
application/json
{
  • "data": {
    }
}