Skip to content

Pagination

Most of the “List” endpoints exposed by the Fyendal’s Collection API use pagination. A cursor is used to request subsequent results after the first page.

Responses from paginated endpoints use the following schema:

PaginatedResponseModel.ts
interface PaginatedResponseModel<T> {
readonly results: T[];
readonly nextCursor?: number;
}

The nextCursor field is only included in the response if there are subsequent results to retrieve. When nextCursor is included, you can append this value as a query parameter to your original request to retrieve the next page:

GET /collection?cursor=100 HTTP/1.1
Host: api.fyendalscollection.com
Authorization: Bearer eyJ...

Some paginated endpoints, but not all, support an additional pageSize query parameter that can be used to change the number of results that are returned.