# stockCard

query · in the family [Reading your records](/reference/reading-your-records/)

## What it does

One item’s full stock story at a location — every movement, in order.

The Stock Card: one InventoryItem's posted movement entries, NEWEST-FIRST + bounded (limit defaults 50, clamps 1..200; before = an EXCLUSIVE upper entry-id bound — v7 ids are time-ordered, the older-page cursor). Voided entries excluded. Requires authentication; the II is tenant-scoped server-side.

## What happens

Reads only — the audit view of how the on-hand got here.

## Who may call it

Capability area: **Reading your records** — Looking up and listing the records of your organization.

- Owner
- System Administrator
- Manager
- Associate Manager
- Warehouse Associate
- Sales Associate
- Cashier
- An API key whose scope allows `api:stockCard`

## Arguments

| Name | Type | Required | Notes |
| --- | --- | --- | --- |
| `inventoryItemId` | [ID](/types/#scalars) `ID!` | yes | No further notes. |
| `limit` | [Int](/types/#scalars) | no | How many records to answer at most; a page may hold fewer. |
| `before` | [ID](/types/#scalars) | no | No further notes. |

## Returns

[InventoryEntry](/types/InventoryEntry/) `[InventoryEntry!]!` — ONE posted Stock-Card movement fact: the magnitude rides quantity (POSITIVE), the direction rides fromBucket/toBucket (the classic in/out card form; a bucket balance = sum of to minus sum of from). sysId-LESS (the class); IMMUTABLE — NO update or doom op exists; posted ONLY by the movement mutations in ONE transaction with the II cache stamp.

## Example request

```graphql
query ExampleStockCard($inventoryItemId: ID!, $limit: Int) {
  stockCard(inventoryItemId: $inventoryItemId, limit: $limit) {
    id
    type
    caption
    status
    parentId
    rootId
    movement
    quantity
    fromBucket
    toBucket
    reason
    refs
    overcommitted
    fromBinId
    toBinId
    lotCode
    createdAt
    updatedAt
    revision
    revisionNum
  }
}
```

Variables:

```json
{
  "inventoryItemId": "01900000-0000-7000-8000-9307d9650000",
  "limit": 1
}
```

## Example response

```json
{
  "data": {
    "stockCard": [
      {
        "id": "01900000-0000-7000-8000-37386ae00000",
        "type": "<type>",
        "caption": "Blue jeans",
        "status": "<status>",
        "parentId": "01900000-0000-7000-8000-065235280000",
        "rootId": "01900000-0000-7000-8000-a093dd800000",
        "movement": "receive",
        "quantity": "2",
        "fromBucket": "on_hand",
        "toBucket": "on_hand",
        "reason": "Correcting a miscount.",
        "refs": [
          "<refs>"
        ],
        "overcommitted": true,
        "fromBinId": "01900000-0000-7000-8000-f29255530000",
        "toBinId": "01900000-0000-7000-8000-c548ffc80000",
        "lotCode": "BJ-001",
        "createdAt": "2027-01-31T00:00:00.000Z",
        "updatedAt": "2027-01-31T00:00:00.000Z",
        "revision": "01900000-0000-7000-8000-b7960e180000",
        "revisionNum": 1
      }
    ]
  },
  "extensions": {
    "at": {
      "callId": "01EXAMPLE-CALL-ID",
      "version": {
        "requested": null,
        "serviced": {
          "name": "genesis",
          "number": 0
        }
      }
    }
  }
}
```

## Errors this call can answer

- `VALIDATION/INVALID` — Something in the request is not valid. ([VALIDATION](/errors/VALIDATION/))
- `AUTHN/REQUIRED` — Sign in to do this. ([AUTHN](/errors/AUTHN/))
- `AUTHZ/FORBIDDEN` — Your role does not allow this action. ([AUTHZ](/errors/AUTHZ/))
- `RATE_LIMIT/THROTTLED` — Too many requests in a short time. ([RATE_LIMIT](/errors/RATE_LIMIT/))
- `NOT_FOUND/*` — That record could not be found. ([NOT_FOUND](/errors/NOT_FOUND/))

## Used in

- [Correct stock on hand, with a reason](/use-cases/correct-stock/)
