> ## Documentation Index
> Fetch the complete documentation index at: https://docs.automate.ax/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Automate.ax automations are TypeScript programs.
> Use Bun for installation and command examples.
> Use Automate.ax for the product name and automate.ax for the package, CLI, and domain.
> Treat documented public APIs as current; do not invent transitional or deprecated names.

# Batch Retrieve Inventory Counts

> Returns current counts for the provided [CatalogObject](entity:CatalogObject)s at the requested [Location](entity:Location)s.

`square.batchRetrieveInventoryCounts` returns current counts for the provided [CatalogObject](entity:CatalogObject)s at the requested [Location](entity:Location)s.

## Example

```ts automations/square-batch-retrieve-inventory-counts.automation.ts theme={null}
import { automation, onDashboardRun } from "automate.ax"
import { square } from "automate.ax/square"

export default automation("Batch Square Retrieve Inventory Counts", () => {
  onDashboardRun({ title: "Batch Square Retrieve Inventory Counts" })

  square.batchRetrieveInventoryCounts({})
})
```

## Inputs

Every input accepts a compatible signal. It requires `INVENTORY_READ`.

| Field              | Type                              | Required | Default                                    | Description                                                                                                                                                                                                                                                   |
| ------------------ | --------------------------------- | -------- | ------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `catalogObjectIds` | `string[] \| null`                | No       | —                                          | The filter to return results by `CatalogObject` ID. The filter is applicable only when set. The default is null.                                                                                                                                              |
| `locationIds`      | `string[] \| null`                | No       | —                                          | The filter to return results by `Location` ID. This filter is applicable only when set. The default is null.                                                                                                                                                  |
| `updatedAfter`     | `string \| null`                  | No       | the UNIX epoch of (`1970-01-01T00:00:00Z`) | 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`).                                                                    |
| `cursor`           | `string \| null`                  | No       | —                                          | 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](https://developer.squareup.com/docs/working-with-apis/pagination) guide for more information. |
| `states`           | `Square.InventoryState[] \| null` | No       | —                                          | 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.                                                                         |
| `limit`            | `number \| null`                  | No       | —                                          | The number of records to return.                                                                                                                                                                                                                              |

Use the official [BatchRetrieveInventoryCounts reference](https://developer.squareup.com/reference/square/inventory-api/batch-retrieve-inventory-counts) for provider field semantics and limits.

## Output

Returns the official `Square.BatchGetInventoryCountsResponse` response as a codec-safe object. Square integer money amounts remain `bigint` values.
