Pagination

Swappr uses cursor-based pagination everywhere. Offset pagination is forbidden — it breaks under inserts and gets slow on large collections.

Query

GET /api/v1/matches?cursor=eyJzY29yZSI6ODgs...&limit=20
ParamTypeDefaultMaxNotes
cursorstring | nullnullThe nextCursor from a prior page. Omit on first page.
limitinteger2050Items per page.

Response envelope

{
  "data": [
    /* array of resources */
  ],
  "nextCursor": "lst_01HZQ7K3M4N5P6Q7R8S9T0V1W2",  // null when there are no more pages
  "meta": {
    "limit": 20                                    // echo of the effective limit
  }
}

Sorting

Default sort is by creation time descending (newest first). Endpoints that allow alternate sorts document them explicitly via ?sort=field,-otherField with a whitelisted set.