Pagination

Most list endpoints return one page at a time. Pagination works in one of two ways depending on the endpoint, and a few short lists aren't paginated at all.

Page numbers

Reviews, enrollments, invoices, payments, visits, communications and feedbacks use page numbers. Pass page (starting at 1) and limit (default 25, maximum 100). The response puts the results under the resource's name and adds a pagination object:

Request

curl -G https://api.reviewrover.co/api/v1/reviews \
  -H "Authorization: Bearer {token}" \
  -d page=2 \
  -d limit=50

Response

{
  "reviews": [
    { "id": "rev_Tq7mW2xK9bLp", "rating": 5 }
  ],
  "pagination": {
    "page": 2,
    "limit": 50,
    "total": 112,
    "total_pages": 3
  }
}

Keep requesting the next page until page equals total_pages.

Contacts

GET /v1/contacts returns the results under data, with a has_more flag. Pass page (starting at 1) and limit (default 20, maximum 100). When has_more is false, you've reached the last page.

Request

curl -G https://api.reviewrover.co/api/v1/contacts \
  -H "Authorization: Bearer {token}" \
  -d limit=100

Response

{
  "has_more": true,
  "data": [
    { "id": "cont_8f3k2LmQ9xWz", "email": "[email protected]" }
  ]
}

Lists that aren't paginated

These endpoints return every item in one response:

  • GET /v1/accounts
  • GET /v1/campaigns, under campaigns
  • GET /v1/campaigns/:campaign_id/steps, under campaign_steps
  • GET /v1/webhook_subscriptions, under data

The API reference shows the exact response for each endpoint.