Pagination
Every list answers items and a cursor. How to read a whole list.
Every list on both APIs has the same shape:
{
"data": {
"items": [],
"nextCursor": "<cursor>"
}
}| Field | Meaning |
|---|---|
items | This page |
nextCursor | Opaque. Send it back as cursor to get the next page. null on the last page |
Some Merchant API lists add fields of their own beside these, such as total.
Parameters
| Parameter | Meaning |
|---|---|
limit | Page size. Each list has a default and a maximum. More than the maximum is the maximum. A missing or unusable value is the default |
cursor | The nextCursor from the previous page |
Never parse or build a cursor: what is inside it can change. A cursor that is not one ShopEazy gave you is 400 invalid_parameter on the Storefront API and 400 bad_request on the Merchant API.
The cursor resumes after the last item sent, so a list that changed between two calls does not repeat or skip an item.
Read a whole list
curl "https://api.shopeazy.co/v1/store/products?limit=100" \
-H "Authorization: Bearer sez_pub_..."
# Then, while nextCursor is not null:
curl "https://api.shopeazy.co/v1/store/products?limit=100&cursor=<cursor>" \
-H "Authorization: Bearer sez_pub_..."With the Storefront client:
import { listAll } from '@shopeazy/storefront-client';
const everything = await listAll((cursor) => shopeazy.products.page({ cursor }));Limits on the Storefront API
| List | Default | Maximum |
|---|---|---|
| Products, services and kits | 100 | 200 |
| Policies | 20 | 50 |
| A shopper's orders and bookings | 50 | 100 |
| Members (secret key) | 50 | 100 |
Limits on the Merchant API
Each operation in the reference states its own default and maximum. A few examples:
| List | Default | Maximum |
|---|---|---|
listOrders | 30 | 100 |
listCustomers | 50 | 200 |
listBookings | 50 | 250 |
listNotifications | 30 | 100 |
Lists that can only reach the newest rows of their source say so on the operation. These are the bell, WhatsApp threads, the activity trail, reviews, supplier orders, social posts and the Library.
The old list fields
Before paging, the Storefront API answered products as { products, count }, services as { services, count }, and so on. Those fields are still sent beside items, always as the whole list whatever limit and cursor say. They are deprecated and go after 1 February 2027. Every response from those list operations carries Deprecation and Sunset headers until then.
Read items and nextCursor and ignore the rest. See Versioning and deprecation.