Skip to content

Every sale happens in a store. LoyX knows the brand’s stores, and each store can carry your own code for it: external_store_id. Use that code everywhere and you never have to keep LoyX’s ids.

GET /v1/stores/external/{external_store_id}

Returns the store, or 404 store_not_found. The same path takes PATCH (change some fields) and DELETE (remove the store; it is kept for history, not erased).

GET /v1/stores?limit=50&offset=0

Filter with status and type. Use it during setup to let the user pick the store a till belongs to.

POST /v1/stores
{
"external_store_id": "store12",
"name": "Example Store Central",
"timezone": "Europe/Stockholm",
"type": "physical",
"address": {
"street1": "Exempelgatan 1",
"postal_code": "111 22",
"city": "Stockholm",
"country": "SE"
},
"geo": { "latitude": 59.3326, "longitude": 18.0649 }
}
  • external_store_id, name and timezone are required.
  • Physical and pop-up stores need an address and a location. Online and warehouse stores do not.
  • A second store with the same external_store_id answers 409. Read the existing one instead.

Most brands set their stores up in the LoyX Portal. Create stores through the API only when your system is the brand’s source of truth for them.

Put your code on the sale as external.external_store_id. LoyX maps it to the store. See Record a sale.

The exact fields for each call are in the API reference.