---
title: "Ingest inventory snapshot batch"
method: POST
path: "/api/v1/inventory"
tags: ["inventory"]
---

# Ingest inventory snapshot batch

`POST /api/v1/inventory`

Validates a batch of absolute inventory positions and publishes them to Kafka for asynchronous processing. Each item overwrites the position (onHand, blocked, safetyStock) for its sku/strategyCode. Returns 202 with a correlation id shared by every published event of the batch.

## Request body

- InventorySnapshotIngest
  - `items` InventorySnapshotItemIngest[], required — Batch de posições absolutas (1..5000). Sobrescreve onHand, blocked e safetyStock da posição.
    - `blocked` number, required — Quantidade bloqueada na posição (inteiro >= 0).
    - `onHand` number, required — Quantidade física disponível na posição (inteiro >= 0).
    - `safetyStock` number, required — Estoque de segurança configurado (inteiro >= 0).
    - `sku` string, required — SKU do produto.
    - `strategyCode` string, required — Código da strategy (posição de estoque).

## Response `202`

Batch accepted and published to Kafka.

- InventoryIngestResponse
  - `accepted` number, required — Number of items accepted and published to Kafka (always equals items.length on 202).
  - `correlation_id` string, required — Batch correlation id (UUID) shared by every published event.
  - `update_type` 'SNAPSHOT', required — Update mode of the accepted batch.

## Other responses

- `400` — Invalid payload: schema violation on any item or batch size out of bounds.
- `401` — Authentication is missing, malformed, expired, or refers to a session that is no longer active.
- `403` — The caller is authenticated but lacks the required permission for this action.
- `500` — Unexpected server error. The response body never leaks internal details.
- `503` — The message bus rejected or timed out the publish. The batch was not accepted; retry.

---

[API](https://skmtc.net/kruzer-corp/apis/oms-api.md) · [All operations](https://skmtc.net/kruzer-corp/apis/oms-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/kruzer-corp/oms-api/revisions/38ef6e16a7a8/schema)
