Get a token
- In the store admin, open Settings → API and webhooks and create an app. Name it after your system, for example
ERP sync. - Choose the scopes the app needs, for example
catalog:readandinventory:write, and no more: see apps, tokens and scopes. - Issue a token for the app. It is shown once: copy it into the secret storage of your system.
The examples read the token from the SALEYA_API_TOKEN environment variable. Every request sends it in the Authorization: Bearer header; a token in the address is rejected.
Check the token
GET /me works with any token and tells who it speaks for: the app, its scopes and locations, and its rate limits.
curl "https://api.saleya.app/v1/me" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"HTTP/1.1 200 OK
{
"app": {
"id": 12,
"name": "ERP sync",
"description": null,
"scopes": [
"catalog:read",
"catalog:write",
"inventory:read",
"inventory:write",
"orders:read"
],
"allowed_ips": [
"203.0.113.10"
],
"all_locations": true,
"location_ids": [],
"created_at": "2026-11-02T09:15:00Z"
},
"token": {
"name": "Production",
"prefix": "saleya_at_3kQ9",
"expires_at": null
},
"store_id": 7,
"rate_limits": {
"app": {
"per_minute": 300,
"burst": 100
},
"store": {
"per_minute": 1200,
"burst": 400
}
}
}A 401 here means the token was not accepted: check that it was copied whole. The type of the response says what exactly is wrong — see errors.
Read the store settings
GET /store returns what the other responses are read with:
- money is an integer in the minor units of
currency:129900in ARS is 1,299.00; fields ending in_micro, such as cost prices, are in millionths of a minor unit; - moments are in UTC, RFC 3339:
2026-11-11T14:30:00Z; business days and hours of the store follow itstimezone; - names and descriptions are objects by language,
{"es": "…", "en": "…"}, in the languages ofsupported_locales.
curl "https://api.saleya.app/v1/store" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"HTTP/1.1 200 OK
{
"id": 7,
"name": {
"es": "Almacén Norte",
"en": "North Grocery"
},
"currency": "ARS",
"timezone": "America/Argentina/Buenos_Aires",
"country": "AR",
"default_locale": "es",
"supported_locales": [
"es",
"en"
],
"marketing_consent_mode": "opt_in"
}Read the products
A list returns a page of records in data and the cursor of the next page. Ask for the first page of products:
curl "https://api.saleya.app/v1/products?limit=50" \
-H "Authorization: Bearer $SALEYA_API_TOKEN"To keep a copy of the catalog, read the list to the end and save the sync cursor of the last page: pagination and sync shows the loop.
Next steps
- Send an
Idempotency-Keywith every write, so that a retry does not apply it twice — idempotency. - A change of a record with a version needs its
ETaginIf-Match— versions and If-Match. - Subscribe to events instead of polling — webhooks.
- Test against a separate store of your account — development store.