You are viewing an old version of the API
Retrieve inventory count

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.

Required permissions INVENTORY_READ

Path Parameters

Name Description
catalog_object_id
string

Required

ID of the CatalogObject to retrieve.

Query Parameters

Name Description
location_ids
string

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

cursor
string

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 Fields

Name Description
counts
Inventory​Count [ ]

The current calculated inventory counts for the requested object and locations.

cursor
string

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

See the Pagination guide for more information.

errors
Error [ ]

Any errors that occurred during the request.

Examples

You are viewing an old version of the API
GET /v2/inventory/{catalog_object_id}
cURL
  • cURL
  • Ruby
  • Python
curl https://connect.squareup.com/v2/inventory/{catalog_object_id} \
  -H 'Square-Version: 2019-11-20' \
  -H 'Authorization: Bearer ACCESS_TOKEN'
Response JSON
{
  "errors": [],
  "counts": [
    {
      "catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI",
      "catalog_object_type": "ITEM_VARIATION",
      "state": "IN_STOCK",
      "location_id": "C6W5YS5QM06F5",
      "quantity": "22",
      "calculated_at": "2016-11-16T22:28:01.223Z"
    }
  ]
}

Share Feedback

Thanks for visiting the Square API documentation. What's on your mind?