ecomone developers
Open Ecomone
Docs / Pagination

Pagination

List endpoints use cursor pagination, newest items first.

How it works#

ParameterDescription
limitItems per page, 1–200. Default 50.
cursorThe next_cursor value from the previous page (an ISO timestamp). Omit it for the first page.

Most list endpoints return { "data": [...], "next_cursor": "…" | null }. When next_cursor is null you have reached the last page. GET /customers pages by the customer's last order date instead of the creation date.

Orders response#

GET /orders returns the cursor inside a pagination object:

GET /orders
{
  "data": [
    "…"
  ],
  "pagination": {
    "limit": 50,
    "has_more": true,
    "next_cursor": "2026-11-12T08:41:02.118Z"
  }
}

Loop through all pages#

async function all(path) {
  const items = [];
  let cursor = null;
  do {
    const url = new URL("https://api.ecomone.shop/api/public/v1" + path);
    url.searchParams.set("limit", "200");
    if (cursor) url.searchParams.set("cursor", cursor);
    const res = await fetch(url, { headers: { "X-Api-Key": KEY, "X-Api-Secret": SECRET } });
    const body = await res.json();
    items.push(...body.data);
    cursor = body.next_cursor ?? body.pagination?.next_cursor ?? null;
  } while (cursor);
  return items;
}
i

Items that share exactly the same timestamp at a page boundary can be skipped. For complete exports, re-read the last second of each page or de-duplicate by id.

Authorize requests

Requests go straight from your browser to https://api.ecomone.shop. Your credentials stay in this browser tab and are never sent to this documentation site.