Unassign order (set pending_dispatch)
PATCH {{baseUrl}}/orders/{{orderId}}/status
Unassigns the driver from an order, returning it to the dispatch pool. Source: endpoints/orders.ts PATCH /orders/:orderId/status (drivers may only set status: "pending_dispatch" on their own order — anything else is rejected with 401).
Response: 200 with the updated order row (status reset to pending_dispatch, runner_id cleared). Exact full shape wasn’t traced field-by-field; treat it as a TransactionSQL-like row.
Request body
Section titled “Request body”{ "status": "pending_dispatch"}Examples
Section titled “Examples”curl --request PATCH 'https://api.firstdelivery.com/api/orders/REPLACE_WITH_ORDER_ID/status' \ --header 'Content-Type: application/json' \ --data '{ "status": "pending_dispatch"}'const response = await fetch("https://api.firstdelivery.com/api/orders/REPLACE_WITH_ORDER_ID/status", { "method": "PATCH", "headers": { "Content-Type": "application/json" }, "body": "{\n \"status\": \"pending_dispatch\"\n}"})const data = await response.json()import requests
response = requests.request( "PATCH", "https://api.firstdelivery.com/api/orders/REPLACE_WITH_ORDER_ID/status", headers={ 'Content-Type': 'application/json'}, data="{\n \"status\": \"pending_dispatch\"\n}",)response.raise_for_status()Saved responses
Section titled “Saved responses”{ "id": "REPLACE_WITH_ORDER_ID", "status": "pending_dispatch", "runner_id": null}
