Skip to content

Partner accounts

Platforms that resell First Delivery to their own partners (restaurants, brands, or local resellers) use one sub-operator account per partner and country. The platform’s own account and its sub-operators belong to one organization.

Every operator, including each sub-operator, has exactly one country. That country decides:

  • which fleets can quote and deliver for it;
  • which country-level fleet credentials First uses;
  • how merchant and customer phone numbers are parsed when they have no country code; and
  • how the account is billed by fleets that bill per country.

A partner that operates in two countries needs two sub-operators. For example, a partner in Australia and the United States gets one sub-operator stored as australia and one stored as usa, each with its own merchants, API clients, and webhook destinations. The stored country is a lowercase name such as usa, canada, uk, or australia, not an ISO code. See Country names for every supported value. Several sub-operators can share a country.

Do not put merchants from different countries under one sub-operator. Their orders would be quoted against the wrong fleets and credentials.

First creates sub-operators during onboarding. API clients cannot create operators. Tell First the partner name, owner contact, and country for each one.

An operator’s country is a lowercase English country name. It is based on the English short names in ISO 3166-1, the international standard for country names and codes. You can look up any name or code on the ISO Online Browsing Platform.

The stored value is the ISO short name lowercased, with three exceptions:

  • usa for the United States of America (US);
  • uk for the United Kingdom of Great Britain and Northern Ireland (GB); and
  • netherlands for the Netherlands (Kingdom of the) (NL), without the parenthetical.

The stored value is never the ISO 3166-1 alpha-2 or alpha-3 code. If your system keeps ISO alpha-2 codes, map them through this table when you tell First a sub-operator’s country or compare it with operator.country from GET /api/me. Do not use US: fleet matching does not treat us as usa.

These are the countries First supports. Ask First before onboarding a partner in a country that is not listed.

Country Stored country ISO 3166-1 alpha-2
United States usa US
Canada canada CA
Mexico mexico MX
Australia australia AU
New Zealand new zealand NZ

In Europe, First supports the European Union and European Economic Area countries, the United Kingdom, Switzerland, and Serbia:

Country Stored country ISO 3166-1 alpha-2
Austria austria AT
Belgium belgium BE
Bulgaria bulgaria BG
Croatia croatia HR
Cyprus cyprus CY
Czechia czechia CZ
Denmark denmark DK
Estonia estonia EE
Finland finland FI
France france FR
Germany germany DE
Greece greece GR
Hungary hungary HU
Iceland iceland IS
Ireland ireland IE
Italy italy IT
Latvia latvia LV
Liechtenstein liechtenstein LI
Lithuania lithuania LT
Luxembourg luxembourg LU
Malta malta MT
Netherlands netherlands NL
Norway norway NO
Poland poland PL
Portugal portugal PT
Romania romania RO
Serbia serbia RS
Slovakia slovakia SK
Slovenia slovenia SI
Spain spain ES
Sweden sweden SE
Switzerland switzerland CH
United Kingdom uk GB

Greece is GR in ISO 3166-1. The European Union’s own abbreviation EL is not an ISO code.

Some older operators store a different spelling, such as USA or united kingdom. GET /api/me returns the value from this table for those, so USA reads as usa and united kingdom reads as uk. An operator with no stored country is treated as usa and returned as usa.

Create API clients and webhook destinations on each sub-operator, not only on the parent account. Send orders for a sub-operator’s merchants with that sub-operator’s key.

A new account can authenticate before First switches it on. Its key is accepted, reads and quotes work, and order creation returns 402 Payment Required with the message Operator billing not verified until First verifies billing and enables ordering:

{
"type": "AuthorizationError",
"message": "Operator billing not verified"
}

Use the HTTP status, not the body’s nested status field.

GET /api/me reads the operator that owns the API key. The caller must be a f1rst_k1_ key with the account:read scope. Production is https://api.firstdelivery.com/api/me and sandbox is https://sandbox.firstdelivery.com/api/me. Send the key as Authorization: Bearer f1rst_k1_….

The request has no parameters. The operator id comes from the key. A query string or body cannot select another operator.

{
"operator": {
"id": 123,
"name": "Partner AU",
"country": "australia",
"billing_verified": false
}
}
Field Meaning
operator.id The operator that owns the key.
operator.name That operator’s name. All-operator order reads already return this as operator_name.
operator.country The operator’s country from Country names, such as usa, uk, or germany. It is never an ISO code and never empty: an operator with no stored country returns usa.
operator.billing_verified When this is false, creating an order returns the 402 above. true means that billing check will not block the order. null is not false, so it does not by itself produce that 402.

The response does not include API keys, Stripe identifiers, invoice email, passwords, pins, retreat points, fleet membership, other users, or a parent operator. Dispatch and the driver app call this same path with a user session and receive a different payload. Do not build an integration on that session payload. Reference: Get account.

GET /api/me does not report service shut-off. While First has suspended the account, the key is rejected before this handler runs, with the same empty 401 as a revoked key. This endpoint does not bypass that rejection.

A successful order is still the check that the merchant, strategy, and fleets accepted a delivery. billing_verified: true does not by itself prove an order will succeed.

What you see What it means What to do
GET /api/me with billing_verified: false Ordering is not enabled. Ask First to finish activation. Order creation returns 402. Do not retry it automatically.
GET /api/me with billing_verified: true The billing check will not block orders. Continue onboarding. Place an order when you are ready to prove the rest of the setup.
2xx on other reads or quotes The key is valid. It does not prove the account can create orders. Read GET /api/me for billing standing.
402 on order creation billing_verified is false, so ordering is not enabled. Ask First to finish activation. Do not retry automatically.
401 with an empty body The key was revoked or expired, its API client was disabled, or First has suspended the account. Mark the connection as disconnected. Keep the key and retry later, as described below.
403 The API client lacks the scope for that route. Add the scope. GET /api/me needs account:read.

An accepted key still does not mean the account is live. Until First activates it, order creation returns 402.

The 401 response is the same whether the key was revoked or the account is suspended. Its body is empty and does not say which.

When First suspends (shuts off) an account, its f1rst_k1_ keys return 401 for as long as the suspension lasts. First keeps the keys. They work again, unchanged, as soon as First re-enables the account. While the account is suspended, First also switches off external fleets and automatic routing for it.

When a key starts returning 401:

  1. Mark the connection as disconnected or suspended, and stop sending orders with it.
  2. Keep the key. Do not delete it.
  3. Ask the partner, or First, whether the key was revoked or the account is suspended.
  4. Retry with a read the key is scoped for, about once an hour with backoff, and again when the partner says the issue is resolved. GET /api/me is that read when the key has account:read. A 200 means the key works again. An empty 401 still does not say whether the key was revoked or the account is suspended.
  5. If the partner revoked the key or disabled its API client, ask for a new key.

Older operator keys that do not start with f1rst_k1_ can be deleted when First suspends an account. If one still returns 401 after the account is re-enabled, create a named API client and use its key.

If orders stop routing while the key still works, ask First about the account’s state.

See API v3 authentication and errors for scopes and key rotation.

Each sub-operator has its own customer tracking page settings: logo, footer banner, accent color, which fields are shown, and text-message templates. A partner’s customers see that partner’s brand, not First’s and not the platform’s. The link is on First’s neutral tracking domain, trackdelivery.io.

Set these up for each sub-operator, while signed in to that sub-operator in Dispatch, or send First the partner’s logo and brand color during onboarding.

Tracking links covers the page, its branding and text messages, and the link fields in webhooks.

A parent account does not receive its sub-operators’ order updates. Each event goes to the destinations registered on the operator that owns the order, so every update reaches you once per destination you registered for that sub-operator.

To receive every partner’s updates in one service, register a destination on each sub-operator. Each one can point at the same receiver, with a header or path that identifies the partner:

{
"url": "https://hooks.example.com/first/partner-123",
"http_options": {
"headers": {
"Authorization": "Bearer <YOUR_RECEIVER_SECRET>",
"X-Partner-Id": "partner-123"
}
}
}

Events can still repeat, as with any webhook. Deduplicate by orderId and status. See Webhooks.

  • Cancellation fees: First adds no cancellation fee of its own, and the fleet’s fee is not known before you cancel.
  • Refunds: what each refund reason means, and which fleets accept refund requests.