Delivery API
A small REST surface over HTTPS. One header to authenticate, one to make writes safe to retry, and a JSON envelope on every response. No SDK required — if your language can POST, you can integrate.
Base URL#
https://api.dispatch.gumza.keEvery path in this reference is relative to that host. If your operator runs their own deployment, swap the host and nothing else changes.
Authentication#
Send your key in the X-API-Key header on every request. The key has the form <keyId>.<secret>; send it whole, exactly as issued.
X-API-Key: ebx_7f3c91a2.9Xq2vK8mPzR4tL6nW1yB3dH5sA7cF0jEThe key identifies your merchant account. A missing, malformed, revoked or suspended key is a 401 with code UNAUTHORIZED. There is no OAuth dance and no token to refresh.
Idempotency#
Every request under /api/v1/external/dispatches requires an Idempotency-Key header. A UUID is the right thing to send.
- Replaying a key with the same body returns the original response verbatim, without creating a second delivery.
- Replaying a key with a different body is a
409with codeCONFLICT— that combination is always a bug on the caller side. - Keys are scoped to your merchant and expire after 24 hours.
- Omitting the header is a
422with codeVALIDATION_ERROR.
So: generate one key per logical write, store it alongside your order, and reuse it when you retry after a timeout. Use a fresh key for ordinary reads rather than reusing one, or you will be served a cached copy of an earlier response.
Endpoints#
- POST
/api/v1/external/pingVerify the key and mark your integration connected - GET
/api/v1/external/quotesFee, distance and ETA for a pickup/dropoff pair - POST
/api/v1/external/dispatchesCreate a delivery - POST
/api/v1/external/dispatches/bulkCreate up to 500 deliveries in one transaction - GET
/api/v1/external/dispatchesList deliveries, filtered and cursor-paginated - GET
/api/v1/external/dispatches/:idRead one delivery - GET
/api/v1/external/dispatches/:id/eventsThe full status history for a delivery - GET
/api/v1/external/dispatches/:id/webhooksWebhook delivery attempts for a delivery - PATCH
/api/v1/external/dispatches/:id/statusCancel a delivery
Status lifecycle#
NEW ──► ASSIGNED ──► PICKED_UP ──► IN_TRANSIT ──► DELIVERED
│ │ │ │
└──────────┴─────────────┴──────────────┴────────► FAILED
└──────────────────────────────────────────────► CANCELLED| Status | Means |
|---|---|
| NEW | Accepted and waiting for a rider |
| ASSIGNED | A rider has it and is heading to the pickup |
| PICKED_UP | Parcel collected |
| IN_TRANSIT | On the way to the customer |
| DELIVERED | Handed over, with proof of delivery attached |
| FAILED | Could not be completed; carries a reason code |
| CANCELLED | Called off before completion |
A failed delivery carries one of CUSTOMER_UNREACHABLE, WRONG_ADDRESS, REFUSED, DAMAGED, RIDER_UNAVAILABLE or OTHER, plus free-text detail from the rider.
Next#
Start with Create a delivery. Creating deliveries is the easy half; the half that decides whether your integration is any good is what happens when status changes, so read Webhooks after it.