DEV ENVIRONMENT · sandbox only

Delivery as a Service API

Send delivery orders from your restaurant chain, POS or ordering platform to the Delivero Go captain fleet. Track each order, and get a signed webhook every time its status changes.

أرسل طلبات التوصيل من سلسلة مطاعمك أو نظام نقاط البيع أو منصة الطلبات إلى أسطول كباتن Delivero Go. تابع كل طلب، واستقبل Webhook موقّعًا عند كل تغيير في حالته.

Base URLhttps://api.example.com/api/v1/partner

Getting started

  1. Get onboarded. Our team creates your integration as a partner, a brand or a single restaurant. That decides what you send with each order.
  2. 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.
  3. Register a webhook URL. Send us an HTTPS endpoint. You'll get a webhook signing secret (whsec_…) to verify our calls.
  4. Build against the sandbox. Create orders with the test key and drive them through the lifecycle yourself (Sandbox). Your webhook receives real events.
  5. 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:

json
{ "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_
ServerSandbox server (writes); reads work anywhereProduction, once your integration is active
Ordersis_sandbox: true. Never sent to a real captain, and no money movesReal dispatch to captains
Status changesYou drive them with the sandbox endpointReal captains and restaurants
WebhooksIdentical in both. Build and test your handler entirely on the sandbox

Authentication

Every request carries three headers:

HeaderValue
X-Api-KeyYour API key
X-TimestampCurrent Unix time in seconds. Requests more than 5 minutes off are rejected
X-SignatureHex 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 the Retry-After header. A key can also be locked to a list of IP addresses.
javascript
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);

Restaurant & destination

What identifies the restaurant depends on your integration type, which we set during onboarding:

IntegrationRestaurantCustomer destination
Restaurant (one restaurant, e.g. its POS)Nothing: your key already identifies itdistrict_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_name and restaurant_phone so the captain can find it and call. With external_restaurant_id we remember the place, and a later order with a new name or phone updates it. A location outside every district we serve gets 422 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_m shows 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) from candidates.
Recommended flow: call /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

GET

/me

Returns the integration and environment your key belongs to. Use it to check your signing code.

GET

/districts/nearest

Finds the district at a point. Query parameters: lat, lon.

json · result.data
{ "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).

GET

/restaurants/nearest

brand only

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

GET

/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:

http · partner example
GET /api/v1/partner/quote?restaurant_lat=29.9686&restaurant_lon=30.9531&restaurant_name=Pizza%20Roma&lat=30.06&lon=31.25
json · result.data
{ "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_area
  • no_delivery_fee_configured
  • district_restricted, with restriction_reason explaining why
  • restaurant_not_active
  • no_active_bundle
  • no_fee_source_near_pickup (partner: no Delivero Go restaurant with fees within 25 km of your restaurant)
  • daily_order_limit_reached or max_active_trips_reached (your bundle's limits)
POST

/orders

idempotent
json · request body
{
  "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 in cod_amount; credit when the customer already paid by card. A credit order is paid from the start (is_paid: true, cod_amount 0) and the captain collects nothing.
  • 201: the order was created. The delivery fee is fixed at this point. The response's matched shows how the restaurant and district were found.
  • 200 with "duplicate": true: you already sent this external_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.reason uses the same values as /quote.
  • 422 VALIDATION_ERROR: invalid input.
GET

/orders/{external_order_id}

Returns the current order object, including the captain and their live location once a captain has accepted.

POST

/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:

POST

/sandbox/orders/{external_order_id}/status

sandbox only
json
{ "status": "accepted" }
{ "status": "cancelled", "cancelled_by": "admin", "reason": "customer unreachable" }
statusAllowed fromActs as
acceptedcreated, holdCaptain
at_restaurantacceptedCaptain
picked_upaccepted, at_restaurantCaptain
deliveredpicked_upCaptain
cancelledadmin: any status except cancelled · restaurant / integration: before pickupThe 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

json
{
  "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.

statusMeaning
createdLooking for a captain
assignedOffered to a captain, who hasn't accepted yet
holdNo captain free right now. We retry automatically
acceptedA captain accepted and is heading to the restaurant
at_restaurantThe captain is at the restaurant
picked_upThe captain has the order
deliveredDelivered to the customer
cancelledCancelled. See cancellation.cancelled_by for who cancelled it
reassignedOur operations team handed the order to a new captain

Webhooks

We POST each event to your endpoint:

http
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… } }
EventWhen
order.acceptedA captain accepted the order
order.captain_arrivedThe captain arrived at the restaurant
order.picked_upThe captain collected the order
order.deliveredDelivered to the customer
order.cancelledCancelled by admin, restaurant, integration (you) or system
order.dispatch_delayedNo captain is available right now. We keep trying
order.reassignedAfter a cancellation, our team handed the order to a new captain
pingA test event sent by our team

Your endpoint should

  1. Verify the signature, and reject timestamps more than 5 minutes old.
  2. Respond with any 2xx within 10 seconds. Do slow work after you respond.
  3. Deduplicate on id. The same event can arrive more than once.
Ordering and retries:
  • 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.
javascript
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)
});

Errors

HTTPresult.codeMeaning
401MISSING_CREDENTIALSA required auth header is missing
401INVALID_API_KEY · API_KEY_REVOKED · API_KEY_EXPIREDThe key isn't usable
401STALE_TIMESTAMPX-Timestamp is more than 5 minutes from our clock
401INVALID_SIGNATUREThe signature doesn't match. Most often the body was re-serialized, or the path is missing its query string
403IP_NOT_ALLOWEDThe request IP isn't on the key's allowlist
403INTEGRATION_SUSPENDED · PARTNER_INACTIVE · BRAND_INACTIVEYour account is disabled
403INTEGRATION_NOT_LIVEA live key was used while your integration is still in testing
403SANDBOX_DISABLEDA test key tried to write on production
403NOT_AVAILABLE/restaurants/nearest called by a non-brand integration
404BRANCH_NOT_FOUND · ORDER_NOT_FOUNDUnknown or not-yours restaurant_id, or unknown external_order_id
404RESTAURANT_NOT_FOUND_NEAR_LOCATIONBrand: none of your restaurants within 1 km of restaurant_lat / restaurant_lon
409ORDER_NOT_ELIGIBLEThe order can't be placed. See details.reason
409CANCEL_NOT_ALLOWED_AFTER_PICKUP · ALREADY_CANCELLEDThe order can't be cancelled
409INVALID_TRANSITIONSandbox only: a step was skipped
422VALIDATION_ERROR · DESTINATION_REQUIRED · RESTAURANT_REQUIRED · RESTAURANT_LOCATION_REQUIRED · INVALID_LOCATIONInvalid input
422PICKUP_OUTSIDE_SERVICE_AREAPartner: your restaurant's location is outside every district we serve
429RATE_LIMITEDToo 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 2xx quickly, and deduplicates on event id.
  • 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.