Skip to content

Allocate Inventory

POST /inventory/allocate command bearer

Soft-allocates inventory for an order line, reducing ATP and creating a Reservation record. Idempotent per order line.


Overview

ID allocate-inventory-api
Method POST
Path /inventory/allocate
Classification command
Domain inventory
Capability inventory-allocation
Service allocate-inventory
Application inventory-service — Inventory Service
Auth bearer

Request Body

Business Object reservation
Description Temporary hold on inventory for a customer, basket, order, or fulfillment flow.
Classification aggregate-root
Lifecycle requested → confirmed → fulfilled → expired → cancelled → released

Response

Business Object reservation
Description Temporary hold on inventory for a customer, basket, order, or fulfillment flow.
Lifecycle requested → confirmed → fulfilled → expired → cancelled → released

Events Emitted

Event Classification Object Description
inventory-reserved created reservation Stock was soft-reserved against a basket or order to prevent overselling.

Integration Patterns

Pattern Flow Style Description
SIM → Inventory Service ATP Calculation siminventory-service synchronous-api The SIM delegates ATP calculation and allocation logic to the Inventory Service, which applies network-wide optimisation rules across all nodes.

Scenarios using inventory-allocation

Scenario Description
Buy Online, Pick Up In Store Customer browses and purchases online, then collects the order from a physical store. The canonical
Ship From Store An online order is fulfilled by shipping the goods directly from a physical store rather than a cent
Ship To Store Customer places an online order for collection at a chosen store while stock is sourced from a wareh
API Method Path Type
Get Inventory GET /inventory/items/{sku} query
Reserve Inventory POST /inventory/reservations command
Confirm Reservation POST /inventory/reservations/{id}/confirm action
Release Reservation DELETE /inventory/reservations/{id} action
Get Stock Locations GET /stock/{sku}/locations query
Check Availability GET /inventory/{sku}/availability query