Pagination

eCurring uses a page based pagination strategy that limits the results returned in a single request. Although it's sometimes convenient to retrieve all objects at once, this may cause performance issues on the server or client side.

By default the results are limited at 10 items per page, but this can be changed by setting the page[size] parameter.

Every resource collection response will include links to make it convenient for you to page through the results.

Parameters

page[number]
integer
The number of the page (default is 1)
page[size]
integer
The number of objects to return (default is 10)

Response

links
object
Links to help navigate through the lists of objects, based on the given page number and page size.
self string The current page
first string Optional - The first page of the set
last string Optional - The last page of the set
prev string Optional - The previous page in the set
next string Optional - The next page in the set

Example

For this example we will be fetching all of the customers in your account, as described in List customers.

Request

GET /customers HTTP/1.1
X-Authorization: 53b9e049186e04743bcdd685ea0bafbd1ff9e0c7f

Response

{
  "meta": {
    "total": 10
  },
  "links": {
    "self": "https://api.ecurring.com/customers?page[number]=1&page[size]=10",
    "first": "https://api.ecurring.com/customers?page[number]=1&page[size]=10",
    "last": "https://api.ecurring.com/customers?page[number]=18&page[size]=10",
    "prev": null,
    "next": "https://api.ecurring.com/customers?page[number]=2&page[size]=10"
  },
  "data": [
    {
      "links": {
        "self": "https://api.ecurring.com/customers/1"
      },
      "data": {
        "type": "customer",
        "id": "1",
        "links": {
          "self": "https://api.ecurring.com/customers/1"
        },
        "attributes": {
          "gender": "m",
          "first_name": "Jeroen",
          "middle_name": null,
          "last_name": "van der Geer",
          "bank_holder": "J van der Geer",
          "iban": "NL66ECUR0123456789",
          "postalcode": "1016EE",
          "house_number": "313",
          "house_number_add": "",
          "street": "Keizersgracht",
          "city": "Amsterdam",
          "country_iso2": "NL",
          "email": "support@ecurring.com",
          "telephone": "+31202616739"
        },
        "relationships": {
          "subscriptions": {
            "links": {
              "related": "https://api.ecurring.com/customers/1/subscriptions"
            },
            "data": [
              {
                "type": "subscription",
                "id": "1"
              }
            ]
          }
        }
      }
    },
    { ... }
  ]
}