PlanDocket

Pagination

How to navigate through large result sets.

Pagination Parameters

Parameter Type Default Description
page integer 1 Page number (starts at 1)
per_page integer 25 Number of results per page (max 100)

Example

GET /api/v1/events?page=2&per_page=25

Paginated Response

{
  "data": [...],
  "meta": {
    "current_page": 2,
    "per_page": 25,
    "total": 150,
    "total_pages": 6
  }
}

GET /api/v1/notes is paginated as well; its "meta" additionally contains entity_type and entity_id.

Unpaginated lists

A few lists are naturally small and always return all entries in one response, without "meta" and ignoring page/per_page:

  • GET /api/v1/categories?hierarchical=1 (the complete category tree; without hierarchical=1 the list is paginated)
  • GET /api/v1/webhooks (the webhooks of the calling API key)
  • GET /api/v1/custom-fields/definitions (all custom field definitions)