---
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.

## Changes

- **2026-07-07** `a3b4750a505f` — 3 breaking, 1 info
  - added the new required request property `items`
  - removed `#/components/schemas/InventorySnapshotIngest, #/components/schemas/InventoryDeltaIngest` from the request body `oneOf` list
  - the request's body type/format changed from ``/`` to `object`/``
  - removed the `DELTA` enum value from the `update_type` response property for the response status `202`

[Change history](https://skmtc.dev/kruzer-corp/apis/oms-api/changes/api/v1/inventory/post.md)

---

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