Orders

Confirm goods receipt (updates inventory)

POST
/deliveries/{id}/receive

Confirm goods receipt (updates inventory). Requires the MANAGER role. Idempotent: send an Idempotency-Key.

Authorization

__Host-qm_session<token>

Session cookie set by sign-in on HTTPS deployments (the hosted demo).

In: cookie

Path Parameters

id*string

Resource id (UUID).

Formatuuid

Header Parameters

X-Requested-With*string

CSRF guard: must be quartermaster on every mutation.

Idempotency-Key*string

A unique key per user action; retries with the same key return the first result.

Length8 <= length <= 128

Request Body

application/json

Quantities received per purchase order line.

Quantities received per purchase order line.

lines*array<>

Line items.

Items1 <= items <= 200
note?string

Optional note.

Lengthlength <= 500

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/deliveries/0f8fad5b-d9cb-469f-a165-70867728950e/receive" \  -H "X-Requested-With: quartermaster" \  -H "Idempotency-Key: 3b8c2c1e-6f6d-4a59-9a43-8f0c2a9e1d22" \  -H "Content-Type: application/json" \  -d '{    "lines": [      {        "purchase_order_item_id": "be5f836e-2db2-4716-bf3a-f85f33396714",        "quantity_received": 0      }    ]  }'
{  "delivery": {    "id": "string",    "purchase_order_id": "string",    "supplier_id": "string",    "status": "SCHEDULED",    "expected_date": "string",    "original_expected_date": "string",    "delivered_at": "string",    "delay_reason": "string",    "data_source": "SYNTHETIC"  }}