Cancel a delivery
PATCH
/api/v1/external/dispatches/:id/statusCalls off a delivery and returns it in CANCELLED. A webhook follows, the same as for any other status change.
Body
status'CANCELLED'requiredThe only status an integration sets. Riders and dispatchers move the rest.reasonstringWhy, in your words. Up to 500 characters; shown to the operator.
Authorization: X-API-Key
curl -X PATCH https://api.dispatch.gumza.ke/api/v1/external/dispatches/$ID/status \
-H "X-API-Key: $DISPATCH_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "status": "CANCELLED", "reason": "Customer cancelled the order" }'{
"success": true,
"data": {
"id": "c0ffee11-2233-4455-6677-8899aabbccdd",
"externalId": "order_10294",
"status": "CANCELLED",
"…": "every field from Create a delivery"
}
}