Skip to content
Get API key

API reference

Locations API

The outlets this key may read. Call it first: most other endpoints take a location_id.

List locations

GET/api-v1-locations

Returns every outlet the key may read, default outlet first. A key pinned to one outlet sees only that outlet. Not paginated.

No parameters.

Response fields (200)

NameTypeDescription
data[].typestringThe outlet type.
data[].is_defaultbooleanThe business’s default outlet.
data[].is_activebooleanInactive outlets are listed too.
data[].receipt_namestring | nullThe name printed on receipts.
data[].addressstring | nullThe receipt address.
data[].phonestring | nullThe receipt phone.
data[].taxobjectenabled, rate, label.
data[].operating_hoursobject | nullOpening hours as set in the app.

Errors

Every error answers { "error": { "code", "message", "request_id" } }. Branch on code; see Errors for retrying.

HTTPCodeWhen
401invalid_keyThe Authorization header is missing, malformed, or the key is revoked or inactive.
402payment_requiredThe business’s plan does not include API access (Sansflow Premium). The key itself is fine.
403insufficient_scopeThe key does not carry the scope this endpoint needs, or it is pinned to a different outlet.
429rate_limitedOver the key’s per-minute limit (60 for sf_test_, 300 for sf_live_). Wait the seconds in Retry-After.
500internal_errorSomething failed on our side. Quote the request_id when you report it.
Request
curl "https://ewpuclvmnygoddunkyrb.supabase.co/functions/v1/api-v1-locations" \
  -H "Authorization: Bearer $SANSFLOW_API_KEY"
Response200 OK
{
  "data": [
    {
      "id": "3f6c2a1e-8b4d-4c2a-9e51-7a0d2b6c9f10",
      "name": "Main",
      "type": "storefront",
      "is_default": true,
      "is_active": true,
      "receipt_name": "Kopi Contoh",
      "address": "Jl. Contoh No. 1, Jambi",
      "phone": "0741000000",
      "tax": {
        "enabled": false,
        "rate": null,
        "label": null
      },
      "operating_hours": null
    }
  ],
  "request_id": "5d0c7e2a-91f4-4b3e-a8c6-0f2e4b6d8a1c"
}

Example values. Run replays this response here; nothing is sent.

Base URL, keys and conventions: API reference overview.

Stuck? Quote the request_id from the response and write toSansflow support.Checked against API v1 on .