POST /shop/deliveries/{id}/products
Book the Items from a delivery into an existing area. For a delivery recorded through the API, its status is initially ARRIVED. The {id} is the numeric ID returned at creation. This request records received goods; it does not order them from a Supplier. It requires Deliveries:READ_LIST permission for that delivery.
Request properties
location: ID of the destination area from GET /areas. (required)products: Optional array of Item IDs to book. Omit it to book all remaining Items into the specified area and complete the delivery. (optional)
For the simple, single-area flow, omit products. The request can first return 200 with status PROCESSING; the stock change runs asynchronously. Read GET /shop/deliveries/{id} until the delivery reports COMPLETED. If it does not complete, do not send the same booking request again without checking the delivery and its Timeline.
Whether a quantity appears in the Stock report depends on the destination area's stock_pool setting:
STOCK_TRACKING: The booked quantity is added to the area's counted stock.ITEMS_ONLY: The delivery and stock-change event are recorded, but the area does not maintain a counted stock balance.
The request returns 200 when accepted, possibly with status PROCESSING. Invalid input, an unsuitable delivery status or an archived area returns 400; an unknown delivery or area returns 404.
Example
Replace DELIVERY_ID with the created delivery ID and AREA_ID with the intended area ID:
curl 'https://app.yourbarmate.com/api/shop/deliveries/DELIVERY_ID/products' \
--request POST \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--header 'authorization: token YOUR_API_TOKEN' \
--data '{"location":"AREA_ID"}'
After completion, verify the destination area and quantities with the Stock report or Timeline entries for the delivery.