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

# storageLocationInventoryCount

> Count a bin or other storage location and set its quantities to what was found, as the warehouse app's direct bin count does. Each line is a product's units, one of its lots, or license-plated units. Each difference moves to or from the warehouse's Lost bin, or from its default bin the first time a bin is counted, and is written to the inventory ledger as a count, recorded under the API key or app that made it; the new availability is then pushed to the store. Only the listed products change unless `countsWholeBin` is true. A product that tracks lots is counted by lot: the API never records lot-tracked stock without a lot. Returns the bin, or null when it isn't one of your bins or storage locations. Only where Redo is the inventory source of truth for the warehouse. Errors: BAD_USER_INPUT for a quantity out of range, more than 500 lines, no lines without `countsWholeBin`, an inventory item listed twice, a product listed twice without its lots, a line mixing a lot with other items, or license plates that don't match the quantity; PRODUCT_NOT_FOUND (400) and INVENTORY_ITEM_NOT_FOUND (400) for one that isn't yours or a managed merchant's; INVENTORY_ITEM_PRODUCT_MISMATCH (400) for an inventory item of another product; LOT_REQUIRED (400) for a lot-tracked product counted above 0 without its lot; LICENSE_PLATE_SCAN_REQUIRED (400) when the warehouse counts by inventory label and a line doesn't list one inventory item per unit; LOCATION_NOT_INVENTORY_SOURCE_OF_TRUTH (400); BIN_COUNT_BELOW_OPEN_PICKS (409) when a count is below what open picks reserve in the bin, unless `allowOpenPickShortfall` is true; IDEMPOTENCY_KEY_REUSED (422).

**Required scopes:** [`inventory_write`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_write)

**Store must have one of:** `WMS`

## Arguments

**allowOpenPickShortfall** `Boolean`

true applies a count below what open picks reserve in the bin, as confirming the warning in the app does. Those picks then come up short.

**countsWholeBin** `Boolean`

true counts everything in the bin: a product in the bin but not in `items` is counted as 0, and an empty `items` empties the bin. false (the default) changes only the listed products.

**idempotencyKey** `String`

A key you choose, 1 to 400 characters, that makes a retry safe. Repeating the request with the same key changes nothing more and returns the bin as it is now. The key is kept with the inventory ledger rows the first request wrote, so it never expires; a count that changed no quantity wrote no rows, so its retry counts again. The same key with a different request fails with IDEMPOTENCY\_KEY\_REUSED (422). Omit it and every call applies.

**items** `[\[StorageLocationInventoryCountItemInput!\]!](/docs/api-reference/v3/reference/inventory/storage-location-inventory-count-item-input)` *required*

The lines counted, up to 500.

**fields**

**countedQuantity** `Int!` *required*

The units found, from 0 to 1000000. The bin's quantity of the product, or of the lot, is set to this.

**inventoryItemIds** `[ID!]`

The inventory items found, up to 1000: one lot (its units are `countedQuantity`), or one license plate per unit counted. A product that tracks lots needs its lot here when `countedQuantity` is above 0; count each lot on its own line. A warehouse that counts by inventory label needs one per unit.

**productId** `ID`

The product counted: yours or a managed merchant's. Omit only for license-plated units without a product, listed in `inventoryItemIds`.

**storageLocationId** `ID!` *required*

The bin or storage location counted. Find one with `storageLocations`.

## Returns

**storageLocationInventoryCount** `[StorageLocation](/docs/api-reference/v3/reference/inventory/storage-location)`

A bin, tote, staging area, or other slot that holds inventory within a location.

**fields**

**binInventoryLevels** `[BinInventoryLevelConnection!](/docs/api-reference/v3/pagination)` *required*

Product quantities held in this storage location.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**inStock** `Boolean`

true returns only rows holding stock (quantity above zero). false returns only empty or negative rows, such as emptied assignments and LOST balancing entries.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**orderBy** `[BinInventoryLevelSortKey](/docs/api-reference/v3/reference/inventory/bin-inventory-level-sort-key)`

Which key to sort by (creation time, newest first). Combine with `reverse` to flip direction.

**reverse** `Boolean`

Reverses the sort direction selected by `orderBy` (or its default).

**Fields**

**edges** `[\[BinInventoryLevelEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[BinInventoryLevel!](/docs/api-reference/v3/reference/inventory/bin-inventory-level)` *required*

The item at this edge.

**nodes** `[\[BinInventoryLevel!\]!](/docs/api-reference/v3/reference/inventory/bin-inventory-level)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was created.

**id** `ID!` *required*

The id of this bin-level inventory record.

**inventoryItem** `[InventoryItem](/docs/api-reference/v3/reference/inventory/inventory-item)`

The specific inventory item this level tracks, when item-scoped.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**inventoryProduct** `[InventoryProduct](/docs/api-reference/v3/reference/inventory/inventory-product)`

The product this quantity belongs to, when the level is product-scoped.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**lastCountedAt** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

When this bin-level quantity was last cycle-counted.

**ledgerEntries** `[InventoryLevelLedgerEntryConnection!](/docs/api-reference/v3/pagination)` *required*

Append-only quantity change history for this bin-level inventory record. Load via `storageLocationInventoryLevel(id) { ledgerEntries(...) }` or `StorageLocation.binInventoryLevels { ledgerEntries(...) }`.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**createdAtAfter** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only return entries recorded at or after this instant.

**createdAtBefore** `[DateTime](/docs/api-reference/v3/reference/common/date-time)`

Only return entries recorded before this instant.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**kind** `[\[InventoryLevelAdjustmentKind!\]](/docs/api-reference/v3/reference/inventory/inventory-level-adjustment-kind)`

Only return entries with one of these adjustment kinds.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**orderBy** `[InventoryLevelLedgerEntrySortKey](/docs/api-reference/v3/reference/inventory/inventory-level-ledger-entry-sort-key)`

Which key to sort by (defaults to the first key, newest-first). Combine with `reverse` to flip direction.

**reverse** `Boolean`

Reverses the sort direction selected by `orderBy` (or its default).

**location** `[Location](/docs/api-reference/v3/reference/inventory/location)`

The warehouse this quantity is held at.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**maxQuantity** `Int`

Maximum quantity allowed in the bin, when capped.

**quantity** `Int!` *required*

Quantity on hand in the storage location.

**storageLocation** `[StorageLocation!](/docs/api-reference/v3/reference/inventory/storage-location)` *required*

The bin or slot holding this quantity.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was last updated.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was created.

**id** `ID!` *required*

The id of this storage location.

**inventoryItems** `[InventoryItemConnection!](/docs/api-reference/v3/pagination)` *required*

Inventory items currently in this storage location.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[InventoryItemEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**fields**

**cursor** `String!` *required*

Opaque cursor for this item; pass to `after`/`before` to page from here.

**node** `[InventoryItem!](/docs/api-reference/v3/reference/inventory/inventory-item)` *required*

The item at this edge.

**nodes** `[\[InventoryItem!\]!](/docs/api-reference/v3/reference/inventory/inventory-item)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**fields**

**binInventoryLevels** `[BinInventoryLevelConnection!](/docs/api-reference/v3/pagination)` *required*

Bin-level quantity rows for this inventory item.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was created.

**disposition** `[InventoryItemDisposition](/docs/api-reference/v3/reference/inventory/inventory-item-disposition)`

Planned disposition for return inventory.

**expirationDate** `[Date](/docs/api-reference/v3/reference/common/date)`

Expiration date for lot-tracked stock. Null when the lot has no expiration set.

**grade** `String`

The condition grade as stored: a standard grade (A to E) or a merchant-defined name. Null when ungraded.

**id** `ID!` *required*

The id of this inventory item.

**itemClass** `[InventoryItemClass](/docs/api-reference/v3/reference/inventory/inventory-item-class)`

Item classification.

**kind** `[InventoryItemKind!](/docs/api-reference/v3/reference/inventory/inventory-item-kind)` *required*

The kind of inventory unit.

**location** `[Location!](/docs/api-reference/v3/reference/inventory/location)` *required*

The warehouse this unit is associated with.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**lotNumber** `String`

Lot number, when lot tracking applies.

**product** `[InventoryProduct](/docs/api-reference/v3/reference/inventory/inventory-product)`

The product this unit is tied to, when applicable.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**quantity** `Int!` *required*

The number of units this record represents.

**storageLocation** `[StorageLocation](/docs/api-reference/v3/reference/inventory/storage-location)`

The bin or slot where this unit currently resides.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was last updated.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**fields**

**endCursor** `String`

Cursor of the last edge in this page; pass to `after` to page forward.

**hasNextPage** `Boolean!` *required*

Whether more items exist after this page (drives forward pagination with `first`/`after`).

**hasPreviousPage** `Boolean!` *required*

Whether more items exist before this page (drives backward pagination with `last`/`before`).

**startCursor** `String`

Cursor of the first edge in this page; pass to `before` to page backward.

**isSellable** `Boolean!` *required*

Whether on-hand quantity in this slot counts as sellable inventory.

**location** `[Location!](/docs/api-reference/v3/reference/inventory/location)` *required*

The warehouse this storage location belongs to.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**fields**

**city** `String`

The city of the location's address.

**company** `String`

The company name associated with the location.

**countryCode** `String`

The country code, e.g. "US".

**createdAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was created.

**id** `ID!` *required*

The id of this location.

**inventoryItems** `[InventoryItemConnection!](/docs/api-reference/v3/pagination)` *required*

Traceable inventory units at this warehouse.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[InventoryItemEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[InventoryItem!\]!](/docs/api-reference/v3/reference/inventory/inventory-item)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**inventoryLevels** `[LocationInventoryLevelConnection!](/docs/api-reference/v3/pagination)` *required*

Per-product inventory levels held at this location.

**Requires:** [`inventory_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-inventory_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[LocationInventoryLevelEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[LocationInventoryLevel!\]!](/docs/api-reference/v3/reference/inventory/location-inventory-level)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**name** `String!` *required*

The location's display name.

**phone** `String`

The contact phone number for the location.

**postalCode** `String`

The postal or ZIP code, e.g. "84101".

**stateCode** `String`

The state or province code, e.g. "UT".

**storageLocations** `[StorageLocationConnection!](/docs/api-reference/v3/pagination)` *required*

Bins and other storage locations within this warehouse.

**Requires:** [`locations_read`](https://developers.redo.com/docs/api-reference/v3/reference/scopes#scope-locations_read)

**fields**

**Arguments**

**after** `String`

Forward pagination cursor — returns items after it. Pass an `edges[].cursor` or `pageInfo.endCursor` from a previous page.

**before** `String`

Backward pagination cursor — returns items before it. Pass an `edges[].cursor` or `pageInfo.startCursor` from a previous page.

**first** `Int`

Forward pagination: returns the first N items (max 100, default 25). Use with `after`; mutually exclusive with `last`/`before`.

**last** `Int`

Backward pagination: returns the last N items (max 100, default 25). Use with `before`; mutually exclusive with `first`/`after`.

**Fields**

**edges** `[\[StorageLocationEdge!\]!](/docs/api-reference/v3/pagination)` *required*

The list of edges (each a node plus its pagination `cursor`).

**nodes** `[\[StorageLocation!\]!](/docs/api-reference/v3/reference/inventory/storage-location)` *required*

The nodes in this page, without the edge/cursor wrapper — a convenience over `edges`.

**pageInfo** `[PageInfo!](/docs/api-reference/v3/pagination)` *required*

Pagination metadata for the current page.

**street1** `String`

The first line of the street address.

**street2** `String`

The second line of the street address.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was last updated.

**name** `String!` *required*

The display name of the bin or slot.

**priority** `[StorageLocationPriority](/docs/api-reference/v3/reference/inventory/storage-location-priority)`

Pick priority relative to other bins, when set.

**source** `[StorageLocationSource!](/docs/api-reference/v3/reference/inventory/storage-location-source)` *required*

How this record was created.

**stockedProductCount** `Int!` *required*

How many product levels in this storage location have a quantity above zero.

**totalQuantity** `Int!` *required*

The sum of every level's quantity in this storage location.

**type** `[StorageLocationType!](/docs/api-reference/v3/reference/inventory/storage-location-type)` *required*

The kind of storage location.

**updatedAt** `[DateTime!](/docs/api-reference/v3/reference/common/date-time)` *required*

When the record was last updated.

## Example

```graphql theme={null}
mutation {
  storageLocationInventoryCount(allowOpenPickShortfall: true, countsWholeBin: true, idempotencyKey: "...", items: { ... }, storageLocationId: "...") {
    binInventoryLevels {
      nodes {
        createdAt
        id
        lastCountedAt
        maxQuantity
        quantity
        updatedAt
      }
      pageInfo { hasNextPage endCursor }
    }
    createdAt
    id
    inventoryItems {
      nodes {
        createdAt
        disposition
        expirationDate
        grade
        id
        itemClass
        kind
        lotNumber
        # ...
      }
      pageInfo { hasNextPage endCursor }
    }
    isSellable
    name
    priority
    source
    # ...
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.