Pagination

.md

Cursor pagination, newest first. No page numbers.

List endpoints return the newest resources first and are paginated with a cursor.

curl "https://api.proppertrading.com/v1/affiliates/pre-registrations?limit=50" \
  -H "Authorization: Bearer sk_live_a1b2c3d4_9f83c2e15b7a4d6e8091c3f5a7b9d1e2"
{
    "data": [{ "id": "aff_pre_zd95p9x9prp3cga9thjusesr" }],
    "meta": {
        "request_id": "req_01kz4bkr1aj1gv63d8fv3133ey",
        "has_more": true,
        "next_cursor": "aff_pre_gvns2m4fkk8v7pfyp5bcb7ma"
    }
}

Parameters

ParameterDescription
limitNumber of items, 1 to 100. Defaults to 20.
starting_afterContinue after this resource id.

Walking every page

Keep going while has_more is true, passing the previous next_cursor:

curl "https://api.proppertrading.com/v1/affiliates/pre-registrations?limit=100&starting_after=aff_pre_gvns2m4fkk8v7pfyp5bcb7ma" \
  -H "Authorization: Bearer sk_live_a1b2c3d4_9f83c2e15b7a4d6e8091c3f5a7b9d1e2"

Why not page numbers

While you are walking a list, new resources are being created. With page numbers that silently shifts everything down, so you see some rows twice and miss others entirely. A cursor is anchored to a specific resource, so that cannot happen.

An unknown starting_after returns invalid_cursor rather than quietly starting from the top.