Locations

Locations of the store: shops, warehouses, kitchens and pickup points. Stock, orders and pickup refer to them.

Loading the search index…

Locations

Objects

Location

  • idintegerrequired

    ID of the record, unique among records of its kind in the store.

  • namemap of stringrequired

    Name by language: an object of the filled languages, for example {"es": "Café", "en": "Coffee"}.

  • addressstringrequired

    Address of the location in one line.

  • coordinatesobject or nullrequired

    Point of the location on the map; null when not set. A location without it is not shown on the storefront map.

    Fields · 2
    • latnumberrequired

      Latitude in degrees.

    • lngnumberrequired

      Longitude in degrees.

  • phonestring or nullrequired

    Phone of the location; null when not set.

  • is_activebooleanrequired

    false when the store has turned the location off.

  • is_defaultbooleanrequired

    The main location of the store: delivery orders take stock from it when no other location is chosen. A store has one.

  • is_pickup_pointbooleanrequired

    Customers can pick up orders at the location.

  • is_stock_sourcebooleanrequired

    The location keeps goods: it has stock levels, receives deliveries, runs stocktakes and transfers.

  • fulfills_online_ordersbooleanrequired

    The stock of the location is sold to customers online. Meaningful only when is_stock_source is true: a kitchen keeps goods but does not sell them.

  • price_list_idinteger or nullrequired

    Price list of the location: its selling prices over the base prices. null — the location sells at base prices. One list can serve several locations.

  • working_hoursmap of array of objectrequired

    Opening hours: day of the week (mon, tue, wed, thu, fri, sat, sun) → list of intervals in the store time zone. A day without intervals is a day off.

    Fields · 2
    • fromstringrequired

      Start of the interval, HH:MM.

    • tostringrequired

      End of the interval, HH:MM. An end earlier than the start means the interval goes past midnight.

  • temporarily_closed_atstring (date-time) or nullrequired

    When the location closed temporarily; null when it is open.

  • reopens_onstring (date) or nullrequired

    Date the temporarily closed location opens again, in the store time zone; null when it is open or the date is unknown.

  • created_atstring (date-time)required

    When the record was created.

  • updated_atstring (date-time)required

    When the record last changed.

Endpoints

List the store locations available to the app

get/locations

Scope: locations:read

Parameters

Query

  • limitinteger

    Page size: up to 250 records; 50 by default.

    Minimum:
    1
    Maximum:
    250
  • cursorstring

    Opaque cursor: next_cursor of the previous page, or sync_cursor of the last page saved by the previous sync. The list goes in commit order, so the sync cursor later returns only what changed after it.

    Max length:
    4096
  • updated_sincestring (date-time)

    Only records changed after this moment, ISO 8601 with a time zone. A filter for the first sync; continue with the cursor.

    Pattern:
    ^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(\.\d{1,6})?(Z|[+-]\d{2}:\d{2})$
  • include_deletedboolean

    true — also return deleted records: archived ones with deleted_at set, and records erased from the database as tombstones {id, deleted_at} in the continuation by the sync cursor. Turn it on for a sync.

Responses

200Success

application/json

  • dataarray of Locationrequired

    Records of the page.

  • deletedarray of objectrequired

    Records erased from the database since the cursor, as tombstones: only with include_deleted=true in the continuation by the sync cursor.

    Fields · 2
    • idintegerrequired

      ID of the erased record.

    • deleted_atstring (date-time)required

      When the record was erased.

  • next_cursorstring or nullrequired

    Cursor of the next page; null on the last page.

  • has_morebooleanrequired

    true when there is a next page.

  • sync_cursorstring or nullrequired

    On the last page — the cursor to continue from later: it returns only what changed after this page. null on other pages.

401The token is missing, invalid, expired or revoked

Headers

  • WWW-Authenticatestringrequired

    Authentication scheme (RFC 6750).

    Example:
    Bearer

application/problem+json

Returns Problem

403The plan, the IP address or the token scopes do not allow the request

Headers

  • WWW-Authenticatestring

    Authentication scheme (RFC 6750).

    Example:
    Bearer error="insufficient_scope", scope="locations:read"

application/problem+json

Returns ForbiddenProblem

410The sync cursor is older than the deletion retention period or was issued before the database was restored

application/problem+json

Returns Problem

422A parameter is invalid or unknown

application/problem+json

Returns ValidationProblem

429The rate limit is exhausted

Headers

  • Retry-Afterintegerrequired

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns RateLimitProblem

503The store is temporarily unavailable

Headers

  • Retry-Afterinteger

    Seconds to wait before retrying.

    Minimum:
    0

application/problem+json

Returns Problem

Errors of this endpoint

Common errors such as token, access, input validation and rate limit can come from any endpoint; they are listed in the catalog: Errors

Example request
curl "https://api.saleya.app/v1/locations" \
  -H "Authorization: Bearer $SALEYA_API_TOKEN"
Example response · 200
{
  "data": [
    {
      "id": 0,
      "name": {
        "key": "string"
      },
      "address": "string",
      "coordinates": {
        "lat": 0,
        "lng": 0
      },
      "phone": "string",
      "is_active": true,
      "is_default": true,
      "is_pickup_point": true,
      "is_stock_source": true,
      "fulfills_online_orders": true,
      "price_list_id": 0,
      "working_hours": {
        "key": [
          {
            "from": "string",
            "to": "string"
          }
        ]
      },
      "temporarily_closed_at": "2026-01-15T12:00:00Z",
      "reopens_on": "2026-01-15",
      "created_at": "2026-01-15T12:00:00Z",
      "updated_at": "2026-01-15T12:00:00Z"
    }
  ],
  "deleted": [
    {
      "id": 0,
      "deleted_at": "2026-01-15T12:00:00Z"
    }
  ],
  "next_cursor": "string",
  "has_more": true,
  "sync_cursor": "string"
}