Skip to content

Pagination

List endpoints (GET /v1/products, GET /v1/fit_groups, GET /v1/audit_events…) return one page at a time, newest first.

Parameter
limit Page size: default 20, at most 100.
cursor The next_cursor of the previous page. Omit it for the first page.
{
"data": [ { "id": "…", "external_id": "CREW-TSHIRT" } ],
"has_more": true,
"next_cursor": "eyJ…"
}

Request the next page while has_more is true. Cursors are opaque: do not build or parse them.

// Node: auto-pagination
for await (const p of tys.products.list({ limit: 50 })) {
console.log(p.external_id);
}
# Python
for p in tys.products.list(limit=50).auto_paging_iter():
print(p["external_id"])

Was this page helpful?