# StockCard type


A stock card: one product variant in one warehouse, with its stock figures. Requires the
`stockCard.read` permission.

## Fields

### warehouseId

[`UUID!`](/chameleoon-max/type/uuid)

The warehouse's MAX id.

### variantId

[`UUID!`](/chameleoon-max/type/uuid)

The product variant's MAX id.

### warehouse

[`Warehouse`](/chameleoon-max/type/warehouse)

The warehouse. Requires the `warehouse.read` permission. Without it, the field is null with a
`FORBIDDEN_ROLE` error at its path, and the rest of the card is returned.

### productVariant

[`ProductVariant`](/chameleoon-max/type/product-variant)

The product variant. Requires the `item.read` permission. Without it, the field is null with a
`FORBIDDEN_ROLE` error at its path, and the rest of the card is returned.

### figures

[`StockFigures!`](/chameleoon-max/type/stock-figures)

The card's figures now.

### version

`Int!`

The version of the card's latest change record: 1, 2, 3 … per card, and 0 before its first.

- Records of this card at or below this version are already in `figures`. Ignore them.
- For a second or two, the record just above it can carry figures older than the export's. The
  record after it corrects that, so compare the figures, not only the versions.

## Used by

- [`ProductVariantStockCardConnection`](/chameleoon-max/type/product-variant-stock-card-connection)
- [`StockCardConnection`](/chameleoon-max/type/stock-card-connection)
- [`StockCardEdge`](/chameleoon-max/type/stock-card-edge)
