Skip to content
API referencePagination

Pagination

A list answers a page at a time: data, then has_more and next_cursor. Send next_cursor back as cursor for the next page, with the same filters, until has_more is false.

The two parameters

limitinteger1–100optional
Rows per page, 1 to 100.

Default 50.

cursorstringidoptional
next_cursor from the previous page.
  • A cursor holds only in the list it came from, with the same filters. Any other is 422 invalid_cursor: start again without it.
  • next_cursor is the id of the page’s last row, and the next page starts after it. It is null on the last page.

Each list

GETList menu categories

By id, ascending.

Page: 50 by default, up to 100.

Filters: none

GETList menu items

By id, ascending.

Page: 50 by default, up to 100.

Filters: q, category_id, available, active

GETList tables

By id, ascending.

Page: 50 by default, up to 100.

Filters: none

GETList orders

Newest first: created, then id, descending.

Page: 50 by default, up to 100.

Filters: status, channel, opened_from, opened_to, table_id, q

GETList materials

By id, ascending.

Page: 50 by default, up to 100.

Filters: q, below_reorder

GETGet a stock card

Newest first: created, then id, descending.

Page: 50 by default, up to 100.

Filters: none

Not paged, and answered whole: List reports.

Walking a whole list

JavaScript
// Every order opened on September 29, page by page.
let cursor = null;
do {
  const url = new URL(`${process.env.TABLEBUDDY_URL}/api/v1/orders`);
  url.searchParams.set("opened_from", "2026-09-29");
  url.searchParams.set("opened_to", "2026-09-29"); // the same filters on every page
  url.searchParams.set("limit", "100");
  if (cursor) url.searchParams.set("cursor", cursor);
  const response = await fetch(url, { headers: { Authorization: `Bearer ${process.env.TABLEBUDDY_API_KEY}` } });
  const page = await response.json();
  for (const order of page.data) console.log(order.number, order.total);
  cursor = page.has_more ? page.next_cursor : null;
} while (cursor);