Batch retrieve inventory changes
Returns historical physical counts and adjustments based on the provided filter criteria.
Results are paginated and sorted in ascending order according their
occurred_at
timestamp (oldest first).
BatchRetrieveInventoryChanges is a catch-all query endpoint for queries that cannot be handled by other, simpler endpoints.
Name | Description |
---|---|
catalog_
|
The filter to return results by |
location_
|
The filter to return results by |
types
|
The filter to return results by |
states
|
The filter to return |
updated_
|
The filter to return results with their 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 |
updated_
|
The filter to return results with their 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 |
cursor
|
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. |
limit
|
The number of records to return. |
Response Fields
Name | Description |
---|---|
errors
|
Any errors that occurred during the request. |
changes
|
The current calculated inventory changes for the requested objects and locations. |
cursor
|
The pagination cursor to be used in a subsequent request. If unset, this is the final response. See the Pagination guide for more information. |
Examples
- cURL
- Ruby
- Python
- C#
- Java
- PHP
- Node.js
curl https://connect.squareup.com/v2/inventory/changes/batch-retrieve \
-X POST \
-H 'Square-Version: 2023-03-15' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"catalog_object_ids": [
"W62UWFY35CWMYGVWK6TWJDNI"
],
"location_ids": [
"C6W5YS5QM06F5"
],
"types": [
"PHYSICAL_COUNT"
],
"states": [
"IN_STOCK"
],
"updated_after": "2016-11-01T00:00:00.000Z",
"updated_before": "2016-12-01T00:00:00.000Z"
}'
{
"errors": [],
"changes": [
{
"type": "PHYSICAL_COUNT",
"physical_count": {
"id": "46YDTW253DWGGK9HMAE6XCAO",
"reference_id": "22c07cf4-5626-4224-89f9-691112019399",
"catalog_object_id": "W62UWFY35CWMYGVWK6TWJDNI",
"catalog_object_type": "ITEM_VARIATION",
"state": "IN_STOCK",
"location_id": "C6W5YS5QM06F5",
"quantity": "86",
"source": {
"product": "SQUARE_POS",
"application_id": "416ff29c-86c4-4feb-b58c-9705f21f3ea0",
"name": "Square Point of Sale 4.37"
},
"team_member_id": "LRK57NSQ5X7PUD05",
"occurred_at": "2016-11-16T22:24:49.028Z",
"created_at": "2016-11-16T22:25:24.878Z"
}
}
]
}