Overview /
Stock & supply /
Approve a warehouse request
Approve a warehouse request
post
https://api.flactrum.com/v1/warehouse-requests/{request}/approve
The WAREHOUSE agrees to send all or part of what the branch asked for. The approved quantity comes off warehouse stock straight away — the goods are on the road from that moment. Warehouse stock is managed centrally, so a branch-scoped key cannot approve. 409 if the request is not awaiting approval, or a quantity exceeds what was requested or what the warehouse actually holds.
| Required scope | warehouse_requests.write |
| Panel screen | Stock & supply → Warehouse requests |
| Success status | 200 |
| Returns | One WarehouseRequest object |
Parameters
| Name | In | Type | Description |
|---|---|---|---|
| request * | path | string | ULID of the record. |
Request body
| Field | Type | Description |
|---|---|---|
| items | array | Omit to approve the request in full. Send it to approve part of it: each entry is {stock_item_id, quantity} in the base unit, and a line you send as 0 (or leave out) is not sent at all. A quantity above what was requested, or above what the sending branch actually has in stock, is refused. |
| note | string|null | Shown to the requesting branch. |
Response fields
| Field | Type | Description |
|---|---|---|
| id | string | — |
| branch_id | string | — |
| warehouse_id | string | — |
| status | string | pending awaits the warehouse's approval; shipped means approved and already off warehouse stock but not yet counted in; received means counted and on branch stock. Set it through the approve/reject/receive endpoints — writing it directly moves no stock. |
| decision_note | string|null | Why the warehouse approved only part of it, or rejected it. |
| requested_at | string|null | — |
| approved_at | string|null | — |
| shipped_at | string|null | — |
| received_at | string|null | — |
| items | array | — |
Examples
Recorded from the test suite — these are real requests and their real responses.
curl -X POST 'https://api.flactrum.com/v1/warehouse-requests/01m43mzmrw89q1nyhs7nvtc4m4/approve' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Content-Type: application/json' \
-d '{
"items": [
{
"stock_item_id": "01m43mzmranfc8qx70q68zrnmp",
"quantity": 1500
}
],
"note": "Kalanı sevkiyattan sonra"
}'
HTTP 200 · application/json
{
"data": {
"id": "01m43mzmrw89q1nyhs7nvtc4m4",
"branch_id": "01m43mzmr1gz2gey222dk34t58",
"warehouse_id": "01m43mzmrkrs47cwt3a8t23xsk",
"status": "shipped",
"note": null,
"requested_at": "2026-10-04T14:27:14+00:00",
"approved_at": "2026-10-04T14:27:14+00:00",
"shipped_at": "2026-10-04T14:27:14+00:00",
"received_at": null,
"items": [
{
"id": "01m43mzmrynk08qp7v1tg3vfvv",
"stock_item_id": "01m43mzmranfc8qx70q68zrnmp",
"requested_quantity": 2000,
"approved_quantity": 1500,
"sent_quantity": 1500,
"received_quantity": null
}
],
"created_at": "2026-10-04T14:27:14+00:00",
"updated_at": "2026-10-04T14:27:14+00:00"
}
}
curl -X POST 'https://api.flactrum.com/v1/warehouse-requests/01m43mzn0r1dv2y9847vpgvkym/approve' \
-H 'Authorization: Bearer flk_your_key:your_secret' \
-H 'Accept: application/json'
HTTP 409 · application/json
{
"error": {
"code": "conflict",
"message": "Espresso çekirdeği için depoda 1 kilogram var; 2 kilogram gönderilemez."
}
}