Paginated endpoints in the Sendcloud v3 API use cursor-based pagination with HTTP Link headers.
Unlike offset-based pagination, cursor-based pagination provides stable results even when data changes between requests.
How it works
Pagination links (next, prev) are returned in the HTTP Link response header, not in the JSON response body. The response body only contains a data array.
Query parameters
| Parameter | Type | Required | Description |
|---|
cursor | string | No | The pagination cursor value from a previous response’s Link header. |
page_size | integer | No | Number of results per page. Clamped between 0 and the endpoint’s max size. |
When there are more pages available, the response includes a Link header with next and/or prev URLs:
Link: <https://panel.sendcloud.sc/v3/shipments?cursor=cD0xMjM=>; rel="next", <https://panel.sendcloud.sc/v3/shipments?cursor=cj0xJnA9NDU2>; rel="prev"
The cursor values are base64-encoded and opaque. Do not parse or construct them manually — pass them back as-is
from the Link header.
Example response
Response headers:
HTTP/1.1 200 OK
Content-Type: application/json
Link: <https://panel.sendcloud.sc/v3/shipments?cursor=cD0xMjM=>; rel="next"
Response body:
{
"data": [
{ "id": 1, "...": "..." },
{ "id": 2, "...": "..." }
]
}
Iterating through all pages
To retrieve all results, follow the next link from each response until no next link is returned:
- Make an initial request to the list endpoint (optionally with
page_size).
- Parse the
Link header from the response.
- If a
rel="next" URL is present, make a request to that URL.
- Repeat until no
next link is returned.