v1

latestOpenAPI 3.0.0Apache 2.02026-07-142008071.1 MB
Inventory

RetrieveInventoryCount

Retrieves the current calculated stock count for a given CatalogObject at a given set of Locations. Responses are paginated and unsorted. For more sophisticated queries, use a batch endpoint.

get/v2/inventory/{catalog_object_id}

Path parameters

catalog_object_idstring required

ID of the CatalogObject to retrieve.

Query parameters

location_idsstring

The Location IDs to look up as a comma-separated list. An empty list queries all locations.

cursorstring

A pagination cursor returned by a previous call to this endpoint. Provide this to retrieve the next set of results for the original query.

See the Pagination guide for more information.

Response

Success

cursorstring

The pagination cursor to be used in a subsequent request. If unset, this is the final response.

See the Pagination guide for more information.

Example response

{
  "counts": [
    {
      "calculated_at": "2016-11-16T22:28:01.223Z",
      "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI",
      "catalog_object_type": "ITEM_VARIATION",
      "location_id": "C6W5YS5QM06F5",
      "quantity": "22",
      "state": "IN_STOCK"
    }
  ],
  "errors": []
}