RCUR

Getting started

Pagination

List endpoints return results in pages.

Most endpoints that list resources, such as list customers, return their results in pages of 15. The endpoints that do are marked with a page query parameter in the reference. Ask for a page with the page query parameter; it starts at 1.

curl "https://rcur.app/api/v2/customers?page=2" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Accept: application/json"

Response

The records are in data. links holds ready-made URLs for the other pages, and meta tells you where you are:

{
    "data": [],
    "links": {
        "first": "https://rcur.app/api/v2/customers?page=1",
        "last": "https://rcur.app/api/v2/customers?page=3",
        "prev": "https://rcur.app/api/v2/customers?page=1",
        "next": "https://rcur.app/api/v2/customers?page=3"
    },
    "meta": {
        "current_page": 2,
        "from": 16,
        "last_page": 3,
        "per_page": 15,
        "to": 30,
        "total": 42
    }
}

To fetch everything, keep following links.next until it is null.