Worxley for Developers

Pagination

List endpoints take page, limit and sortBy, and answer with results plus page totals.

Parameters#

List endpoints take page (from 1), limit (default 10) and sortBy as field:asc or field:desc.

GET /leads?page=2&limit=50&sortBy=createdAt:desc
{
  "status": true,
  "data": {
    "results": [ { "id": "…", "name": "Asha Rao", … } ],
    "page": 2, "limit": 50, "totalPages": 7, "totalResults": 318
  }
}

Large lists#

Totals are counted up to 10,000. Past that, totalResults stays at 10,000 and "totalResultsCapped": true is added, so on very large lists keep requesting pages until one comes back with fewer than limit results instead of relying on totalPages.

Syncing changes#

To sync changes, sort by updatedAt:desc and stop at the first record you already have, or use webhooks instead of polling.