GreenFlow docs

Utility

Small endpoints that don't fit neatly elsewhere — health checks, identity probes, sandbox helpers, and locale switching.

GET /me — identity probe

Returns the tenant the current API key resolves to. Use as a smoke test before driving the booking flow — a 401 here means the key is wrong or has been rotated.

Request

bash
curl -s https://greenflow.live/api/v1/me \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP"

Response

json
{
  "client": {
    "id": 1,
    "name": "Movix (demo)",
    "slug": "movix"
  }
}

GET /ping — health check

Unauthenticated liveness probe. Returns the current server time in ISO-8601 so monitoring tooling can also assert clock drift.

bash
curl -s https://greenflow.live/api/v1/ping
json
{"pong": "2026-04-19T12:34:56+00:00"}

GET /sandbox/defaults — brand smart defaults

Per-vendor default region (country + city + place_uuid). Consumed by the Sandbox UI to pre-fill the pickup field. Intentionally unstable — not part of the public contract — but useful for prototyping.

bash
curl -s "https://greenflow.live/api/v1/sandbox/defaults?brand=11" \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP"
json
{
  "vendor": "LOCALIZA",
  "country": "BR",
  "city": "São Paulo",
  "lat": -23.5557714,
  "lng": -46.6395571,
  "place_uuid": "d4fb7714-3c40-41bd-b46c-f37f84fe11c3",
  "place_name": "São Paulo"
}

Locale switching

Pass X-Locale or `?lang=` to translate user-facing strings (rate names, office names, country names) into `en | es | pt`. The Accept-Language HTTP header is also honored. Locale is baked into the cache key, so a `pt` request is cached separately from `en`.

bash
# Switch to Portuguese via header:
curl -s https://greenflow.live/api/v1/me \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP" \
  -H "X-Locale: pt"

# Or via query string:
curl -s "https://greenflow.live/api/v1/me?lang=es" \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP"

# Or via Accept-Language:
curl -s https://greenflow.live/api/v1/me \
  -H "Authorization: Bearer gfc_7s2wprmy_DWTZRBGBEV6La4dTOoFdMkEhWmWCsXdwc3zVMnqP" \
  -H "Accept-Language: pt-BR"

Errors

HTTP Body Cause
401{"message": "Invalid API key"}/me without a valid token (/ping is public).
422{"message": "Unknown brand."}/sandbox/defaults with an unknown brand id.