Skip to content
DocsSign inCreate an account

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#

Production
https://api.dispatch.gumza.ke

Every 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.

Every request
X-API-Key: ebx_7f3c91a2.9Xq2vK8mPzR4tL6nW1yB3dH5sA7cF0jE

The 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 409 with code CONFLICT — 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 422 with code VALIDATION_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#

Status lifecycle#

Happy path, and the ways out of it
NEW ──► ASSIGNED ──► PICKED_UP ──► IN_TRANSIT ──► DELIVERED
 │          │             │              │
 └──────────┴─────────────┴──────────────┴────────► FAILED
 └──────────────────────────────────────────────► CANCELLED
StatusMeans
NEWAccepted and waiting for a rider
ASSIGNEDA rider has it and is heading to the pickup
PICKED_UPParcel collected
IN_TRANSITOn the way to the customer
DELIVEREDHanded over, with proof of delivery attached
FAILEDCould not be completed; carries a reason code
CANCELLEDCalled 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.