Get Account
GET {{BASE_HABITAT_URL}}/api/me
Required scope: account:read
Returns the operator that owns this f1rst_k1_ key, its country, and whether that operator can place orders.
Who can call it. An API client key with the account:read scope. Send Authorization: Bearer f1rst_k1_…. A key without that scope receives 403. A missing, unknown, expired, or revoked key, a disabled API client, or an account First has suspended receives 401 with an empty body. That empty body does not say which of those happened.
Human sessions for Dispatch and the driver app use this same path and receive a different payload. Do not build an integration on the session payload.
Path. GET /api/me
- Production:
https://api.firstdelivery.com/api/me - Sandbox:
https://sandbox.firstdelivery.com/api/me
The request has no parameters. The operator id is taken from the key. A query string or body cannot select another operator.
Response fields.
| Field | Meaning |
|---|---|
operator.id |
Operator that owns the key. |
operator.name |
That operator’s name. |
operator.country |
The operator’s country as a lowercase name, such as usa, uk, or germany. This is not an ISO 3166-1 code: usa is US and uk is GB. A blank stored country is returned as usa. See the country table in Partner accounts. |
operator.billing_verified |
When false, order creation returns 402 with Operator billing not verified. true means that billing check does not block the order. null is not false, so it does not by itself produce that 402. |
service_shut_off is not returned. While the account is suspended, authentication rejects the key with an empty 401 before this response is built. Re-enabling the account makes the same key work again. This endpoint does not bypass that rejection.
The response does not include API keys, Stripe identifiers, invoice email, passwords, pins, retreat points, fleet membership, other users, or a parent operator.
Examples
Section titled “Examples”curl --request GET '${BASE_HABITAT_URL}/api/me'const response = await fetch("${BASE_HABITAT_URL}/api/me", { "method": "GET", "headers": {}})const data = await response.json()import requests
response = requests.request( "GET", "${BASE_HABITAT_URL}/api/me", headers={},)response.raise_for_status()Saved responses
Section titled “Saved responses”{ "operator": { "id": 123, "name": "Partner AU", "country": "australia", "billing_verified": false }}{ "type": "ForbiddenError", "message": "API client requires scope: account:read"}
