Pagination


The v2 (some) and v3 API endpoints support pagination. But pagination works a bit differently for v2 and v3 endpoints and uses different query parameters.

V3 API Endpoint Pagination

All v3 collection GET API endpoints support pagination with the parameters specified below.

Default Page Size (v3)

The default page size is 30 records/items per page. To set a larger page size, pass the itemsPerPage parameter.

Query Parameters (v3)

parametertyperangedescription
pageinteger-Page number (within the collection). Item ordering will be consistent for the lifetime of the records.
Default value: 1
itemsPerPageinteger1 - 999The number of records/items to include on each page.
Default value: 30

V3 Example

https://api.subscribepro.com/products?itemsPerPage=99&page=3

This will return a JSON array of up to 99 product records, starting at the 3rd page.

Here is the format of one record being returned by this endpoint:

{
  "products": [
    {
      "id": 123456,
      "sku": "test-product",
      ...
      "created": "2015-05-19T16:00:45+0000",
      "updated": "2016-07-14T18:50:32+0000"
    },
    {
      ...
    },
    {
      ...
    },
    ...
  ]
}

V2 API Endpoint Pagination

Our v2 API endpoints (most, but not all of them) support pagination with the parameters specified below.

Default Page Size (v2)

By default, the Subscribe Pro API returns 30 entries when a GET request is made to, for instance, the subscription endpoint. To see more than 30 items per request, or to view items on a subsequent page, you can supply the following parameters in your request.

Query Parameters (v2)

parametertyperangedescription
since_idinteger-Fetch a single page of rows starting with this entity ID.
Default value: null
countinteger1 - 999The number of rows to include on each page.
Default value: 30

V2 Example

https://api.subscribepro.com/services/v2/subscriptions.json?access_token=xyz&since_id=11111&count=100

Assuming 11111 is the ID of a subscription on your Subscribe Pro Environment, this will return a JSON array of 100 subscription records, starting at subscription ID 11111.

Here is the format of one record being returned by this endpoint:

{
  "subscriptions": [
    {
      "id": 123456,
      "customer_id": "1",
      "status": "Cancelled",
      "product_sku": "test-product",
      "qty": 1,
      ...
      "created": "2015-05-19T16:00:45+0000",
      "updated": "2016-07-14T18:50:32+0000"
    },
    {
      ...
    },
    {
      ...
    },
    ...
  ]
}