Concepts
FISCALISTO / API
Lists and pagination
Walk through invoices, customers or events page by page with limit and starting_after.
Routes that list (GET /v1/invoices, GET /v1/customers, GET /v1/events…) answer one page, most recent first:
{
"object": "list",
"data": [{ "id": "inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrg", "object": "invoice", "...": "..." }],
"has_more": true,
"url": "/v1/invoices"
}| Parameter | What it does |
|---|---|
limit | How many per page, 1 to 100. 10 by default. |
starting_after | The id of the last object of the previous page: the next one starts after it. |
While has_more is true there's more: ask for the next one with the id of the last item in data.
curl -G https://api.fiscalisto.com/v1/invoices \
-H "Authorization: Bearer $FISCALISTO_API_KEY" \
-d limit=100 \
-d starting_after=inv_OufpKqnrvx9p0Nfbydl9jG4UNGeTYcvdrgasync function* facturas(filtros = {}) {
let startingAfter;
while (true) {
const q = new URLSearchParams({ limit: "100", ...filtros });
if (startingAfter) q.set("starting_after", startingAfter);
const res = await fetch(`https://api.fiscalisto.com/v1/invoices?${q}`, {
headers: { Authorization: `Bearer ${process.env.FISCALISTO_API_KEY}` },
});
const page = await res.json();
yield* page.data;
if (!page.has_more) return;
startingAfter = page.data.at(-1).id;
}
}
for await (const f of facturas({ status: "valid", created_gte: "2026-10-01" })) {
console.log(f.uuid, f.total);
}Pages never skip or repeat objects even if others are created while you walk the list.
Filters
Each list has its own, for example:
- Invoices:
issuer,status,type(I, E, P, T or N),customer(the customer's RFC),created_gteandcreated_lte. - Withholding certificates:
issuer,status,recipient(RFC) andyear. - Customers:
tax_id. Products:sku,product_keyandcategory. - Events:
type(invoice.stamped…) andobject(the document's id, to see everything that happened to it).
Lists of documents, customers, products, employees and batches belong to one issuer: send issuer if the account has several. SAT catalogs (q searches by key or description) and advances answer a single list, without pages.
Each route's reference says which filters it accepts.
Was this page helpful?