Getting Started
Pagination
List endpoints are paginated with page-based parameters and return a meta object describing the result set.
Query parameters
Parameters
Response shape
List responses return an array under data and pagination details under meta:
json
{
"data": [
{ "id": "bkg_1a2b...", "status": "CONFIRMED" },
{ "id": "bkg_3c4d...", "status": "PENDING" }
],
"meta": {
"total": 137,
"page": 1,
"limit": 20,
"totalPages": 7
}
}meta fields
When are there more pages?
There is a next page whenever
page < meta.totalPages. Stop once you have fetched totalPages pages.Example
Request page 2, 50 per page
curl "https://api.salonify.eu/api/v1/businesses/{businessId}/bookings?page=2&limit=50" \
-H "X-API-Key: sk_live_your_key_here"Iterating every page
async function listAll(businessId, key) {
const all = [];
let page = 1;
while (true) {
const res = await fetch(
`https://api.salonify.eu/api/v1/businesses/${businessId}/bookings?page=${page}&limit=100`,
{ headers: { "X-API-Key": key } }
);
const { data, meta } = await res.json();
all.push(...data);
if (page >= meta.totalPages) break;
page += 1;
}
return all;
}Keep each call well within the rate limit by using the largest practical limit and pausing between bursts.