API reference
Search
K
Links

Stock reservations

The stock reservation object and the allowed CRUD operations on the related resource endpoint
Stock reservations are used to reserve the stock associated with an order's line items of type skus or bundles until the order is approved.
Active stock reservations (if any) determine the actual availability of the associated stock items.

Manual stock reservation before order placement

You can temporarily reserve the stock associated with a line item before the order placement by sending a specific trigger attribute when adding the line item to the order. This way the necessary stock reservations are created in draft status, with an expiration date of 1 hour (you can change the default value at the inventory model level). If the order isn't placed before the expiration date or the line item is removed, the corresponding reserved stock is released and any associated active stock reservation is deleted.
Stock reservations act on the whole line item quantity. If the available stock is split between different stock locations, multiple stock reservations are created.

Automatic stock reservation at order placement

When the order is placed any existing active stock reservation associated with its line items is moved from draft to pending. If no draft stock reservation is associated with the order's line items, the stock reservations needed to block the whole order's stock are automatically created in pending status and the associated stock is reserved without decrementing the stock item quantities. Once the order is approved, the stock item quantities are decremented. If the order is cancelled before approval, the reserved stock is released becoming available again. In both cases, the involved stock reservations are deleted.
Only draft stock reservations have an expiration date before order placement. Once the order is placed the stock is reserved until the order is approved or cancelled.
For security reasons, stock reservation can be managed by an integration application only.
Data model
Check the related ER diagram and explore the flowchart that illustrates how the stock reservation resource relates to the other API entities.
This is an immutable API, meaning that create, update, and delete operations are not allowed on this endpoint. You can only fetch a list of stock reservations or a specific single one.