action square_retrieve_inventory_count { label: "RetrieveInventoryCount" description: "Retrieves the current calculated stock count for a given\n[CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) at a given set of\n[Location](https://developer.squareup.com/reference/square_2021-08-18/objects/Location)s. Responses are paginated and unsorted.\nFor more sophisticated queries, use a batch endpoint." provider: square method: GET path: "/v2/inventory/{catalog_object_id}" encoding: json input: { type: "object" properties: { catalog_object_id: { type: "string" } cursor: { type: "string" } location_ids: { type: "string" } } required: ["catalog_object_id"] additionalProperties: false } output: { type: "object" properties: { counts: { type: "array" description: "The current calculated inventory counts for the requested object and\nlocations." items: { type: "object" description: "Represents Square-estimated quantity of items in a particular state at a\nparticular seller location based on the known history of physical counts and\ninventory adjustments." properties: { calculated_at: { type: "string" description: "An RFC 3339-formatted timestamp that indicates when the most recent physical count or adjustment affecting\nthe estimated count is received." } catalog_object_id: { type: "string" description: "The Square-generated ID of the\n[CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) being tracked." } catalog_object_type: { type: "string" description: "The [type](https://developer.squareup.com/reference/square_2021-08-18/enums/CatalogObjectType) of the\n[CatalogObject](https://developer.squareup.com/reference/square_2021-08-18/objects/CatalogObject) being tracked. Tracking is only\nsupported for the `ITEM_VARIATION` type." } is_estimated: { type: "boolean" description: "Whether the inventory count is for composed variation (TRUE) or not (FALSE). If true, the inventory count will not be present in the response of\nany of these endpoints: [BatchChangeInventory](https://developer.squareup.com/reference/square_2021-08-18/inventory-api/batch-change-inventory), \n[BatchRetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-08-18/inventory-api/batch-retrieve-inventory-changes), \n[BatchRetrieveInventoryCounts](https://developer.squareup.com/reference/square_2021-08-18/inventory-api/batch-retrieve-inventory-counts), and \n[RetrieveInventoryChanges](https://developer.squareup.com/reference/square_2021-08-18/inventory-api/retrieve-inventory-changes)." } location_id: { type: "string" description: "The Square-generated ID of the [Location](https://developer.squareup.com/reference/square_2021-08-18/objects/Location) where the related\nquantity of items is being tracked." } quantity: { type: "string" description: "The number of items affected by the estimated count as a decimal string.\nCan support up to 5 digits after the decimal point." } state: { type: "string" description: "The current [inventory state](https://developer.squareup.com/reference/square_2021-08-18/enums/InventoryState) for the related\nquantity of items." } } } } cursor: { type: "string" description: "The pagination cursor to be used in a subsequent request. If unset,\nthis is the final response.\n\nSee the [Pagination](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information." } errors: { type: "array" description: "Any errors that occurred during the request." items: { type: "object" description: "Represents an error encountered during a request to the Connect API.\n\nSee [Handling errors](https://developer.squareup.com/docs/build-basics/handling-errors) for more information." required: ["category", "code"] properties: { category: { type: "string" description: "The high-level category for the error." } code: { type: "string" description: "The specific code of the error." } detail: { type: "string" description: "A human-readable description of the error for debugging purposes." } field: { type: "string" description: "The name of the field provided in the original request (if any) that\nthe error pertains to." } } } } } } }