Skip to content
DocsSign inCreate an account

Cancel a delivery

PATCH/api/v1/external/dispatches/:id/status

Calls off a delivery and returns it in CANCELLED. A webhook follows, the same as for any other status change.

Body

  • status'CANCELLED'required
    The only status an integration sets. Riders and dispatchers move the rest.
  • reasonstring
    Why, in your words. Up to 500 characters; shown to the operator.

Authorization: X-API-Key

Request
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" }'
Response
{
  "success": true,
  "data": {
    "id": "c0ffee11-2233-4455-6677-8899aabbccdd",
    "externalId": "order_10294",
    "status": "CANCELLED",
    "…": "every field from Create a delivery"
  }
}