inventory

Ingest inventory snapshot batch

Changed on

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.

post/api/v1/inventory

Request

Request body

Example request

{
  "items": [
    {
      "blocked": 5,
      "onHand": 150,
      "safetyStock": 10,
      "sku": "SKU-001",
      "strategyCode": "loja-barra"
    }
  ]
}

Response

Batch accepted and published to Kafka.

acceptednumber required

Number of items accepted and published to Kafka (always equals items.length on 202).

correlation_idstring required

Batch correlation id (UUID) shared by every published event.

update_type'SNAPSHOT' required

Update mode of the accepted batch.

Example response

{
  "accepted": 150,
  "correlation_id": "8f2a3b1c-7d6e-4f5a-9b8c-1d2e3f4a5b6c",
  "update_type": "SNAPSHOT"
}

Changes

    • breaking

      added the new required request property

    • breaking

      removed from the request body oneOf list

    • breaking

      the request's body type changed from no type to object

    • info

      removed the DELTA enum value from the response property for the response status