Skip to content

Authentication

Every request carries a secret API key:

Authorization: Bearer gok_live_xxxxxxxxxxxxxxxxxxxxxxxx

X-API-Key: gok_live_… is also accepted if your HTTP client makes Authorization awkward.

PrefixEnvironmentWhat it does
gok_test_SandboxReads real menus; orders are simulated and never reach a restaurant
gok_live_LivePlaces real orders that restaurants prepare and riders deliver

The environment is decided by the key — there is a single base URL. A sandbox order is invisible to a live key and vice versa.

Each key carries only the permissions it needs.

ScopeAllows
catalog:readStores, menus, items, search, delivery quotes, categories
offers:readOffers and promo-code validation
orders:readRead and track orders
orders:writeCreate, pay for and cancel orders (and drive the sandbox)
webhooks:manageConfigure the webhook endpoint, read and retry deliveries

A request outside the key’s scopes fails with 403 insufficient_scope, and the error tells you which scope was required.

  • Store keys in a secret manager or environment variables — never in source control, a browser or a mobile app.
  • Use a separate key per system (production server, staging, a contractor) so one can be revoked without breaking the others.
  • GoOrder stores only a hash of each key. We cannot show it again — if you lose a key, ask us to issue a new one and revoke the old one.
  • Rotate on a schedule and whenever someone with access leaves.
  1. Ask your GoOrder contact to issue a second key with the same scopes.
  2. Deploy the new key to your servers.
  3. Confirm traffic on the new key, then ask us to revoke the old one.

Both keys work at the same time until you do.

Statuserror.codeMeaning
401missing_api_keyNo key was sent
401invalid_api_keyThe key is wrong, expired or revoked, or your account is suspended
403insufficient_scopeThe key lacks the scope this endpoint needs
403sandbox_onlyYou called a sandbox-only endpoint with a live key

See Errors for the full format.