Overview / Stock & supply / Reject a warehouse request

Reject a warehouse request

post https://api.flactrum.com/v1/warehouse-requests/{request}/reject

The warehouse declines the request outright. No stock moves. Use this rather than approving nothing.

Required scope warehouse_requests.write
Success status200
Returns One WarehouseRequest object

Parameters

NameInTypeDescription
request * path string ULID of the record.

Request body

FieldTypeDescription
reason string|null Shown to the requesting branch.

Response fields

FieldTypeDescription
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/01m43mzmx88766v916wqdngg85/reject' \
  -H 'Authorization: Bearer flk_your_key:your_secret' \
  -H 'Content-Type: application/json' \
  -d '{
    "reason": "Depoda da kalmadı"
}'

HTTP 200 · application/json

{
    "data": {
        "id": "01m43mzmx88766v916wqdngg85",
        "branch_id": "01m43mzmweedvr7maersdtjyn4",
        "warehouse_id": "01m43mzmx1w1ye7j3q4d9she64",
        "status": "rejected",
        "note": null,
        "requested_at": "2026-10-04T14:27:14+00:00",
        "approved_at": "2026-10-04T14:27:14+00:00",
        "shipped_at": null,
        "received_at": null,
        "items": [
            {
                "id": "01m43mzmxa12kv137cfht0e4mx",
                "stock_item_id": "01m43mzmwqa7k9qgk2vw4ny1dy",
                "requested_quantity": 2000,
                "approved_quantity": null,
                "sent_quantity": null,
                "received_quantity": null
            }
        ],
        "created_at": "2026-10-04T14:27:14+00:00",
        "updated_at": "2026-10-04T14:27:14+00:00"
    }
}