Getting Started

Pagination

List endpoints are paginated with page-based parameters and return a meta object describing the result set.

Query parameters

Parameters

NameTypeRequiredDescription
pageintegerOptional1-based page number. Defaults to 1.
limitintegerOptionalItems per page. Defaults to 20, maximum 100.

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

NameTypeRequiredDescription
totalintegerRequiredTotal number of items matching the query across all pages.
pageintegerRequiredThe current page number.
limitintegerRequiredThe page size used for this response.
totalPagesintegerRequiredTotal number of pages: ceil(total / limit).

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.