Public API v2: Paging
Lists are newest first and paged by cursor; the exception is the item search. There is no total count and no page number.
| Query | Notes |
|---|---|
limit |
1–250, default 50. |
cursor |
next_cursor or prev_cursor of the last page; leave out for the first page. |
- Call
GET …/rules?limit=100with your filters. - While
meta.pagination.next_cursoris notnull, call again withcursor=<next_cursor>, or followmeta.pagination.links.next. - Keep the same filters on every page; a cursor used with other filters is refused. Changing
limitis fine.
Paging a search by body
Section titled “Paging a search by body”POST /price-list/items/search takes limit and cursor in the JSON body, not in the query string.
- Items come ordered by
product_idas text, not newest first. meta.paginationholdslimitandnext_cursoronly. There is noprev_cursorand nolinks.- Send the same
product_ids,variant_idsandrule_idswith eachcursor; a cursor used with other ids is refused with422. Changinglimitis fine. - A search with no match answers
200with an emptydataandnext_cursornull.
- Public API v2: Authentication & keysCreate Public API v2 keys with per-module permissions, send them with every request, and keep them safe.
- Public API v2: Auto TagRules that tag customers and orders, add notes or mark a customer tax exempt when an event happens.
- Public API v2: Buy X Get YBuy X Get Y offers: what the customer buys, what they get, and the discount on it.
- Public API v2: Bulk & idempotencyCreate, replace or delete up to 250 rules in one Public API v2 request, and retry POST requests safely.