Getting started
- Get onboarded. Our team creates your integration as a partner, a brand or a single restaurant. That decides what you send with each order.
- Receive a test key. You get an API key (
dlv_test_…) and a signing secret (dlvsk_…). Each secret is shown once, so store it in your secret manager. - Register a webhook URL. Send us an HTTPS endpoint. You'll get a webhook signing secret (
whsec_…) to verify our calls. - Build against the sandbox. Create orders with the test key and drive them through the lifecycle yourself (Sandbox). Your webhook receives real events.
- Go live. When you're ready we activate your integration and issue a live key (
dlv_live_…). Orders then go to real captains.
All requests and responses are JSON. Every response uses the same envelope. Branch on result.code, never on the human-readable message:
{ "status": 201, "success": true, "result": { "data": { … } } }
{ "status": 409, "success": false, "result": { "code": "ORDER_NOT_ELIGIBLE", "message": "…", "details": { … } } }Test & live keys
Test key dlv_test_ | Live key dlv_live_ | |
|---|---|---|
| Server | Sandbox server (writes); reads work anywhere | Production, once your integration is active |
| Orders | is_sandbox: true. Never sent to a real captain, and no money moves | Real dispatch to captains |
| Status changes | You drive them with the sandbox endpoint | Real captains and restaurants |
| Webhooks | Identical in both. Build and test your handler entirely on the sandbox | |
Authentication
Every request carries three headers:
| Header | Value |
|---|---|
X-Api-Key | Your API key |
X-Timestamp | Current Unix time in seconds. Requests more than 5 minutes off are rejected |
X-Signature | Hex HMAC-SHA256(signing_secret, "<timestamp>.<METHOD>.<path>.<raw body>") |
<path>is the full path plus the query string, e.g./api/v1/partner/quote?district_id=8.<raw body>is the exact bytes you send. Use an empty string for GET. Sign the same string you send; if you re-serialize the JSON after signing, the signature won't match.- You may prefix the signature with
v1=. - Each key has a rate limit (60 requests per minute by default). On
429, wait for theRetry-Afterheader. A key can also be locked to a list of IP addresses.
const crypto = require('crypto');
const HOST = '{{HOST}}';
const API_KEY = process.env.DELIVERO_API_KEY; // dlv_test_… / dlv_live_…
const SECRET = process.env.DELIVERO_API_SECRET; // dlvsk_…
async function call(method, path, payload) {
const body = payload === undefined ? '' : JSON.stringify(payload);
const ts = Math.floor(Date.now() / 1000).toString();
const signature = crypto.createHmac('sha256', SECRET)
.update(`${ts}.${method}.${path}.${body}`).digest('hex');
const res = await fetch(HOST + path, {
method,
headers: {
'X-Api-Key': API_KEY, 'X-Timestamp': ts, 'X-Signature': signature,
...(body ? { 'Content-Type': 'application/json' } : {}),
},
body: body || undefined,
});
return res.json();
}
// Check your credentials and signing code
call('GET', '/api/v1/partner/me').then(console.log);import hashlib, hmac, json, os, time
import requests
HOST = "{{HOST}}"
API_KEY = os.environ["DELIVERO_API_KEY"]
SECRET = os.environ["DELIVERO_API_SECRET"]
def call(method, path, payload=None):
body = "" if payload is None else json.dumps(payload, separators=(",", ":"))
ts = str(int(time.time()))
sig = hmac.new(SECRET.encode(), f"{ts}.{method}.{path}.{body}".encode(), hashlib.sha256).hexdigest()
headers = {"X-Api-Key": API_KEY, "X-Timestamp": ts, "X-Signature": sig}
if body:
headers["Content-Type"] = "application/json"
return requests.request(method, HOST + path, data=body or None, headers=headers).json()
print(call("GET", "/api/v1/partner/me"))HOST={{HOST}}
REQ_PATH=/api/v1/partner/orders
BODY='{"external_order_id":"A-10023","restaurant_lat":29.9686,"restaurant_lon":30.9531,"district_id":8}'
TS=$(date +%s)
SIG=$(printf '%s' "$TS.POST.$REQ_PATH.$BODY" | openssl dgst -sha256 -hmac "$DELIVERO_API_SECRET" | sed 's/^.* //')
curl -s "$HOST$REQ_PATH" -X POST \
-H "X-Api-Key: $DELIVERO_API_KEY" -H "X-Timestamp: $TS" -H "X-Signature: $SIG" \
-H "Content-Type: application/json" --data "$BODY"Restaurant & destination
What identifies the restaurant depends on your integration type, which we set during onboarding:
| Integration | Restaurant | Customer destination |
|---|---|---|
| Restaurant (one restaurant, e.g. its POS) | Nothing: your key already identifies it | district_id, or the customer's lat + lon |
| Brand (several restaurants of one brand) | restaurant_id, or restaurant_lat + restaurant_lon (one of your restaurants) | Same |
| Partner (a marketplace whose restaurants aren't on Delivero Go) | restaurant_lat + restaurant_lon (required), plus optional restaurant_name, restaurant_phone, restaurant_address and external_restaurant_id (your own id for that restaurant) | Same |
How a location is matched
- Customer to district: a mapped district boundary containing the point wins. Otherwise we use the nearest district centre within 10 km. Beyond that the location can't be served.
- Brand restaurant: the nearest of your restaurants within 1 km of the location you send. Beyond that you get
404 RESTAURANT_NOT_FOUND_NEAR_LOCATION. - Partner restaurant: the captain collects from the location you send. Send
restaurant_nameandrestaurant_phoneso the captain can find it and call. Withexternal_restaurant_idwe remember the place, and a later order with a new name or phone updates it. A location outside every district we serve gets422 PICKUP_OUTSIDE_SERVICE_AREA. - Partner fee: the fee of the nearest Delivero Go restaurant to your restaurant's location (within 25 km), for the customer's district.
fee_source.distance_mshows how far that was. - Ambiguous matches: when the second-nearest is within 15% of the nearest distance, we use the nearest and flag it. To be certain, send the chosen
district_id(or, for a brand,restaurant_id) fromcandidates.
/quote, show the fee, then send the same restaurant fields and the district_id it returned to POST /orders. The order then matches the quote.Your bundle. Every integration has its own subscription, which sets your daily order cap and how many captains can carry your orders at once. Without an active one, orders get 409 ORDER_NOT_ELIGIBLE with reason no_active_bundle.
Endpoints
/me
Returns the integration and environment your key belongs to. Use it to check your signing code.
/districts/nearest
Finds the district at a point. Query parameters: lat, lon.
{ "status": "match", "method": "nearest",
"district": { "id": 8, "name": "Zayed 1", "city_id": "2", "zone_id": "4", "distance_m": 420 },
"candidates": [ { "id": 8, "name": "Zayed 1", "city_id": "2", "zone_id": "4", "distance_m": 420 } ] }status is match, ambiguous (see candidates) or none. method is polygon (inside a mapped boundary) or nearest (nearest centre).
/restaurants/nearest
brand onlySame response, with restaurant instead of district. Query parameters: lat, lon, and optional max_distance_m (default 1000, maximum 50000). Searches your own restaurants. Other integration types get 403 NOT_AVAILABLE.
/quote
Finds the restaurant and district, and tells you whether the delivery can be served and at what fee. Send the fields for your integration type:
GET /api/v1/partner/quote?restaurant_lat=29.9686&restaurant_lon=30.9531&restaurant_name=Pizza%20Roma&lat=30.06&lon=31.25
{ "serviceable": true, "reason": null, "restriction_reason": null,
"restaurant_id": null,
"restaurant": { "name": "Pizza Roma", "external_restaurant_id": null },
"pickup": { "lat": 29.9686, "lon": 30.9531, "district_id": 12, "district_name": "October 3" },
"district_id": 8, "district_name": "Zayed 1",
"delivery_fee": 30, "currency": "EGP",
"fee_source": { "distance_m": 640 },
"district_match": { "method": "nearest", "distance_m": 420, "ambiguous": false, "candidates": [] } }For a restaurant or brand integration, restaurant_id and restaurant_name are your restaurant's, there's no pickup or fee_source, and restaurant_match says how it was found.
When serviceable is false, reason is one of:
location_not_in_service_areano_delivery_fee_configureddistrict_restricted, withrestriction_reasonexplaining whyrestaurant_not_activeno_active_bundleno_fee_source_near_pickup(partner: no Delivero Go restaurant with fees within 25 km of your restaurant)daily_order_limit_reachedormax_active_trips_reached(your bundle's limits)
/orders
idempotent{
"external_order_id": "A-10023",
"restaurant_lat": 29.9686, "restaurant_lon": 30.9531,
"restaurant_name": "Pizza Roma", "restaurant_phone": "01000000001", "external_restaurant_id": "roma-12",
"district_id": 8,
"customer": { "name": "Mona", "phone": "01001234567", "address": "Bldg 4, St. 9" },
"payment_type": "cod",
"cod_amount": 250,
"avg_preparation_minutes": 15,
"notes": "Ring twice",
"metadata": { "anything": "stored as-is" }
}payment_type:cod(default) when the customer pays the captain cash on delivery, with the amount incod_amount;creditwhen the customer already paid by card. A credit order is paid from the start (is_paid: true,cod_amount0) and the captain collects nothing.201: the order was created. The delivery fee is fixed at this point. The response'smatchedshows how the restaurant and district were found.200with"duplicate": true: you already sent thisexternal_order_id, and you get the same order back. Retrying after a timeout is always safe.409 ORDER_NOT_ELIGIBLE: the order can't be placed.details.reasonuses the same values as/quote.422 VALIDATION_ERROR: invalid input.
/orders/{external_order_id}
Returns the current order object, including the captain and their live location once a captain has accepted.
/orders/{external_order_id}/cancel
Body { "reason": "…" }.
- Allowed until the captain picks the order up. After that it returns
409 CANCEL_NOT_ALLOWED_AFTER_PICKUP. - If the captain is already at the restaurant, the restaurant's cancellation policy applies: the captain is compensated, and there is a daily limit.
Sandbox: simulate the lifecycle
On the sandbox server, with a test key, you play the captain, the restaurant and our operations team yourself:
/sandbox/orders/{external_order_id}/status
sandbox only{ "status": "accepted" }
{ "status": "cancelled", "cancelled_by": "admin", "reason": "customer unreachable" }| status | Allowed from | Acts as |
|---|---|---|
accepted | created, hold | Captain |
at_restaurant | accepted | Captain |
picked_up | accepted, at_restaurant | Captain |
delivered | picked_up | Captain |
cancelled | admin: any status except cancelled · restaurant / integration: before pickup | The cancelled_by you choose |
A move that skips a step returns 409 INVALID_TRANSITION, with details.allowed_from listing the valid starting statuses. Every simulated change fires the real webhook. The captain shown is a placeholder, Sandbox Captain. This endpoint doesn't exist in production.
Order object
{
"id": 640, "external_order_id": "A-10023", "status": "picked_up", "is_sandbox": false,
"restaurant_id": null, "restaurant": { "name": "Pizza Roma", "external_restaurant_id": "roma-12" },
"district_id": 8, "delivery_fee": 30, "cod_amount": 250, "payment_type": "cod", "is_paid": false, "currency": "EGP",
"customer": { "name": "Mona", "phone": "01001234567", "address": "Bldg 4, St. 9" },
"notes": "Ring twice",
"captain": { "name": "Ahmed", "phone": "010…", "vehicle_type": "motorcycle",
"vehicle_plate": "ABC 123", "location": { "lat": 30.01, "lon": 31.02 } },
"pickup_eta_minutes": 7, "estimated_pickup_at": "2026-10-07T12:10:00Z",
"timestamps": { "created_at": "…", "accepted_at": "…", "at_restaurant_at": "…",
"picked_up_at": "…", "delivered_at": null, "cancelled_at": null },
"cancellation": null
}For a partner, restaurant_id is null and restaurant holds the name and id you sent. For a restaurant or brand it's your restaurant's id. captain is null until a captain accepts.
| status | Meaning |
|---|---|
created | Looking for a captain |
assigned | Offered to a captain, who hasn't accepted yet |
hold | No captain free right now. We retry automatically |
accepted | A captain accepted and is heading to the restaurant |
at_restaurant | The captain is at the restaurant |
picked_up | The captain has the order |
delivered | Delivered to the customer |
cancelled | Cancelled. See cancellation.cancelled_by for who cancelled it |
reassigned | Our operations team handed the order to a new captain |
Webhooks
We POST each event to your endpoint:
POST /your/webhook HTTP/1.1
Content-Type: application/json
X-Deliveroo-Event: order.picked_up
X-Deliveroo-Event-Id: evt_1234
X-Deliveroo-Timestamp: 1791391906
X-Deliveroo-Signature: v1=<hex HMAC-SHA256(whsec_secret, "<timestamp>.<raw body>")>
{ "id": "evt_1234", "event": "order.picked_up", "created_at": "…", "data": { …order object… } }| Event | When |
|---|---|
order.accepted | A captain accepted the order |
order.captain_arrived | The captain arrived at the restaurant |
order.picked_up | The captain collected the order |
order.delivered | Delivered to the customer |
order.cancelled | Cancelled by admin, restaurant, integration (you) or system |
order.dispatch_delayed | No captain is available right now. We keep trying |
order.reassigned | After a cancellation, our team handed the order to a new captain |
ping | A test event sent by our team |
Your endpoint should
- Verify the signature, and reject timestamps more than 5 minutes old.
- Respond with any
2xxwithin 10 seconds. Do slow work after you respond. - Deduplicate on
id. The same event can arrive more than once.
- Events for the same order arrive in order. A later event waits while an earlier one is being retried.
- A failed delivery (a non-2xx response or a timeout) is retried with exponential backoff: 30 s, 60 s, 120 s, and so on, up to 1 hour between attempts.
- After the last retry the event is marked failed. Our team can re-send it.
const crypto = require('crypto');
const express = require('express');
const app = express();
// Keep the raw body; the signature covers the exact bytes we sent
app.post('/webhooks/delivero', express.raw({ type: 'application/json' }), (req, res) => {
const ts = req.get('X-Deliveroo-Timestamp');
const sig = String(req.get('X-Deliveroo-Signature') || '').replace(/^v1=/, '');
const expected = crypto.createHmac('sha256', process.env.DELIVERO_WEBHOOK_SECRET)
.update(`${ts}.${req.body}`).digest('hex');
const fresh = Math.abs(Date.now() / 1000 - Number(ts)) < 300;
const valid = sig.length === expected.length &&
crypto.timingSafeEqual(Buffer.from(sig), Buffer.from(expected));
if (!fresh || !valid) return res.sendStatus(401);
const event = JSON.parse(req.body);
res.sendStatus(200); // acknowledge first…
handleEvent(event); // …then process (dedupe on event.id)
});import hashlib, hmac, os, time
from flask import Flask, request, abort
app = Flask(__name__)
@app.post("/webhooks/delivero")
def delivero_webhook():
ts = request.headers.get("X-Deliveroo-Timestamp", "")
sig = request.headers.get("X-Deliveroo-Signature", "").removeprefix("v1=")
raw = request.get_data() # exact bytes
expected = hmac.new(os.environ["DELIVERO_WEBHOOK_SECRET"].encode(),
ts.encode() + b"." + raw, hashlib.sha256).hexdigest()
if abs(time.time() - int(ts or 0)) > 300 or not hmac.compare_digest(sig, expected):
abort(401)
event = request.get_json()
# enqueue event for processing; dedupe on event["id"]
return "", 200Errors
| HTTP | result.code | Meaning |
|---|---|---|
| 401 | MISSING_CREDENTIALS | A required auth header is missing |
| 401 | INVALID_API_KEY · API_KEY_REVOKED · API_KEY_EXPIRED | The key isn't usable |
| 401 | STALE_TIMESTAMP | X-Timestamp is more than 5 minutes from our clock |
| 401 | INVALID_SIGNATURE | The signature doesn't match. Most often the body was re-serialized, or the path is missing its query string |
| 403 | IP_NOT_ALLOWED | The request IP isn't on the key's allowlist |
| 403 | INTEGRATION_SUSPENDED · PARTNER_INACTIVE · BRAND_INACTIVE | Your account is disabled |
| 403 | INTEGRATION_NOT_LIVE | A live key was used while your integration is still in testing |
| 403 | SANDBOX_DISABLED | A test key tried to write on production |
| 403 | NOT_AVAILABLE | /restaurants/nearest called by a non-brand integration |
| 404 | BRANCH_NOT_FOUND · ORDER_NOT_FOUND | Unknown or not-yours restaurant_id, or unknown external_order_id |
| 404 | RESTAURANT_NOT_FOUND_NEAR_LOCATION | Brand: none of your restaurants within 1 km of restaurant_lat / restaurant_lon |
| 409 | ORDER_NOT_ELIGIBLE | The order can't be placed. See details.reason |
| 409 | CANCEL_NOT_ALLOWED_AFTER_PICKUP · ALREADY_CANCELLED | The order can't be cancelled |
| 409 | INVALID_TRANSITION | Sandbox only: a step was skipped |
| 422 | VALIDATION_ERROR · DESTINATION_REQUIRED · RESTAURANT_REQUIRED · RESTAURANT_LOCATION_REQUIRED · INVALID_LOCATION | Invalid input |
| 422 | PICKUP_OUTSIDE_SERVICE_AREA | Partner: your restaurant's location is outside every district we serve |
| 429 | RATE_LIMITED | Too many requests. Wait for the Retry-After header |
Go-live checklist
- Requests are signed over the exact bytes sent, and your server clock is synced (NTP).
- Every order has a stable
external_order_id, and you retry timeouts with the same ID. - Your webhook handler verifies signatures, responds
2xxquickly, and deduplicates on eventid. - You've run the full sandbox flow (accepted → at_restaurant → picked_up → delivered), plus a cancellation, and seen every webhook arrive.
- Secrets live in a secret manager, never in source code or client apps.
- You've sent us the IP addresses your requests come from, if you want the key locked to them.
Ready? Contact your Delivero Go account manager to activate your integration and get a live key.