<- Inventory API

Inventory API

Batch retrieve inventory counts

POST

 /v2/inventory/counts/batch-retrieve

Results are paginated and sorted in descending order according to their calculated_at timestamp (newest first).

When updated_after is specified, only counts that have changed since that time (based on the server timestamp for the most recent change) are returned. This allows clients to perform a "sync" operation, for example in response to receiving a Webhook notification.

Permissions:INVENTORY_READ
Try in API Explorer
Link to section

Request body

Example code

Link to section

catalog_object_ids

string [ ]

The filter to return results by CatalogObject ID. The filter is applicable only when set. The default is null.

Link to section

location_ids

string [ ]

The filter to return results by Location ID. This filter is applicable only when set. The default is null.

Link to section

updated_after

string

The filter to return results with their calculated_at value after the given time as specified in an RFC 3339 timestamp. The default value is the UNIX epoch of (1970-01-01T00:00:00Z).

Examples for January 25th, 2020 6:25:34pm Pacific Standard Time:

UTC: 2020-01-26T02:25:34Z

Pacific Standard Time with UTC offset: 2020-01-25T18:25:34-08:00

Link to section

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.

Link to section

states

string [ ]

The filter to return results by InventoryState. The filter is only applicable when set. Ignored are untracked states of NONE, SOLD, and UNLINKED_RETURN. The default is null.

Link to section

limit

integer(32-bit)

Link to section

Response fields

Link to section

errors

Any errors that occurred during the request.

Link to section

counts

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

Link to section

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.