For developers

Connect your system to Dodo.

The Dodo API is a REST API for your server. Your system asks for a price, creates a delivery that is paid immediately from your wallet, and receives every step by webhook.

One request

Create a delivery and pay for it.

curl -X POST https://api.dodo.co.tz/api/v1/merchant/shipments \
  -H "X-API-Key: $DODO_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "sender_name": "Malaika Restaurant",
    "sender_phone": "+255712345678",
    "pickup_latitude": -6.7924,
    "pickup_longitude": 39.2083,
    "receiver_name": "Jane Doe",
    "receiver_phone": "+255765432109",
    "dropoff_latitude": -6.7600,
    "dropoff_longitude": 39.2400,
    "items": [{
      "description": "Food order",
      "weight_kg": 2.5,
      "length_cm": 25, "width_cm": 25, "height_cm": 15
    }]
  }'

The basics

Base URL
https://api.dodo.co.tz/api/v1
Key
Send it in the X-API-Key header. Keys start with dodo_live_.
Format
JSON. Amounts in Tanzanian shillings, without decimals.
Places
GPS coordinates. Dodo finds the ward itself.
Names
A delivery is a shipment in the API.

Testing

Dodo has no test environment. To test, create a delivery scheduled for tomorrow and cancel it. Before a driver is assigned, cancelling is free and the full amount returns to your wallet.

Endpoints

What the API does.

All paths start with https://api.dodo.co.tz/api/v1.

POST/merchant/shipments/rates

The price and vehicle for a delivery, and whether Dodo can deliver it. Nothing is charged.

POST/merchant/shipments

Create a delivery. It is paid from your wallet in the same request.

GET/merchant/shipments

Your deliveries, newest first.

GET/merchant/shipments/{id}

One delivery and its current status.

GET/merchant/shipments/{id}/tracking

Everything your tracking page needs, in one request.

GET/merchant/shipments/{id}/label.pdf

An A6 label with the shipment number as a QR code.

POST/merchant/shipments/{id}/reschedule

Deliver later. Free until the driver leaves to collect the order.

PATCH/merchant/shipments/{id}/delivery-instructions

Notes and another phone number for the driver.

POST/merchant/shipments/{id}/cancel

See the fee first, then confirm. The refund goes to your wallet.

Reliable

Built to be reliable.

Safe to repeat

Send the same Idempotency-Key again within 24 hours and Dodo returns the first response. It never creates a second delivery or a second charge.

Signed webhooks

Eleven events, signed with HMAC-SHA256. Dodo tries again when your server does not answer, and numbers each attempt so that you can ignore a repeat.

Clear errors

Every error gives its condition next to its message, and the API docs list every condition.

Go live

From registration to your first delivery.

1

Register

Register your business in the merchant portal. Dodo checks it and sends you an email when it is approved.

2

Create an API key

In the portal, open Developers and choose Make a new key. The key is shown only once, so copy it to your server.

3

Deposit money

Deposit money into your wallet in the portal, with mobile money or a card. Each delivery is paid from it.

4

Test and start

Add a webhook under Developers, send it a test event, and create your first delivery.