Dolphin Cafe API reference

Atlantic-Backend — the REST API behind the Dolphin Cafe iOS app and staff dashboard.
https://dolphin.fortranpay.com/v1 http://localhost:8080/v1 (dev)

Authentication — read this first

Sign up or log in once to get a token string back. On every following request, send it as Authorization: Bearer <token>. Tokens are opaque, DB‑backed session IDs (not JWTs) — they last 14 days and can be revoked early by calling Log out.

For the iOS app: store the token field from the signup/login response (e.g. in the Keychain) and send it as a Bearer header on every request. The dc_session cookie the API also sets is a convenience for browser/cURL testing — native clients don't need it.

Every endpoint below marked 🔒 auth requires this header; a missing or expired token gets a 401 with {"error":"Sign in required."}.

Every route also works with an /api prefix (e.g. /api/v1/auth/login) if that's easier for your client config — both resolve identically.

Staff and admins sign in with the same kind of token via POST /v1/staff/login, and use the web dashboard at /dashboard/. Staff need an admin's approval before they can sign in.

Localization: add ?lang=tr to any menu, cart, order, cafe, home, Finn or suggestions endpoint to get Turkish text instead of English — same fields, same shape, just different words in name/description/category/milk and add-on names. Leave it off, or pass lang=en, for English (the default). It's stateless like locationId — send it on every call rather than expecting the server to remember a preference. An unrecognized value silently falls back to English. Menu search (?q=) always matches the English text regardless of lang. GET /v1/suggestions is fully localized, headline and button label, on both the real model and its offline mock/fallback — same for GET /v1/finn/suggestions' chat-starter chips (and the suggestions field bundled into GET /v1/finn). Two gaps as of this writing: Finn chat's own reply text — what Finn says back once a conversation is underway, mock or real — is still English-only; and a placed order's bag line detail (milk/add-on names, not the product name) isn't translated yet.

Washington and Istanbul sell different menus — Istanbul isn't Washington's catalog with a currency swap. Every product, category and price is store-specific: pass ?locationId=dc or ?locationId=istanbul (or rely on the signed-in customer's saved store) on every menu/cart/checkout/order call. A product id that exists at one store may not exist at the other — check GET /v1/locations for what each store sells, and don't assume an id like baklava-latte is universal. A handful of ids that are genuinely the same drink at both stores (e.g. latte, cappuccino, turkish-coffee, simit) are shared on purpose, so they keep one photo and a favorite carries over.