Pagination
Every list endpoint is cursor-paginated. You get 50 items by default and can ask for up to 200 with ?page_size=.
JSON — paginated response
{
"next": "https://api.tajirpoint.com/api/v1/catalog/products/?cursor=cD0yMDI2LTA3LTExVDA5…",
"previous": null,
"results": [
{
"id": 42,
"name": "Nescafé Classic 200g",
"sku_root": "NES-200",
"sale_price": "450.00"
}
]
}Follow next until it comes back null. The cursor is opaque — it encodes a position, not an offset. Do not parse it, and do not build one yourself.
JavaScript — page through everything
let url = "https://api.tajirpoint.com/api/v1/catalog/products/?page_size=200";
const products = [];
while (url) {
const res = await fetch(url, { headers });
const page = await res.json();
products.push(...page.results);
// Follow the URL we were given. Do not rebuild it.
url = page.next;
}Why cursors, not page numbers
A POS is being written to while you read it. With ?page=2, a sale created between your first and second request shifts every row along — and you silently skip one. A cursor points at a record, so new rows appearing behind you cannot make you miss the ones in front.