v3.0.0 (v20240412) uses cursor pagination on list endpoints.
You do not pass a page number. You pass a cursor that marks where the page starts or ends, and the number of records you want.
Pagination parameters
- start_cursor: Use this to paginate backward. Starts empty.
- end_cursor: Use this to paginate forward. Starts empty.
- per_page: Number of results per page (default: 5, maximum: 1000).
Pass start_cursor or end_cursor, not both. A request with both returns 400.
Page info in the response
Each response includes page information.
"page_info": {
"has_previous_page": false,
"has_next_page": false,
"start_cursor": "AAAAA",
"end_cursor": "BBBBBB"
}Paginating forward
The page_info object holds the first and last cursor of the page. To go forward, send the end_cursor from the response in your next request. It fetches the records after that cursor. Stop when has_next_page is false.
curl --request GET \
--url 'https://nexhealth.info/procedures?subdomain=YOUR_SUBDOMAIN&location_id=YOUR_LOCATION_ID&per_page=100&end_cursor=BBBBBB' \
--header 'Nex-Api-Version: v3.0.0' \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN'Paginating backward
To go backward, send the start_cursor from the response in your next request. It fetches the records before that cursor.
curl --request GET \
--url 'https://nexhealth.info/procedures?subdomain=YOUR_SUBDOMAIN&location_id=YOUR_LOCATION_ID&per_page=100&start_cursor=AAAAA' \
--header 'Nex-Api-Version: v3.0.0' \
--header 'Authorization: Bearer YOUR_BEARER_TOKEN'Supported endpoints
Every list endpoint that takes per_page uses cursor pagination, with one exception. GET /nex_staff uses page and per_page.
Cursor pagination applies to these resources:
- Patients, providers and operatories
- Appointments, working hours, working hour labels, patient recalls and procedures
- Adjustments, adjustment types, charges, claims, payments, payment plans and payment types
- Fee schedules, fee schedule procedures, guarantor balances, insurance balances, insurance plans and insurance coverages
- Clinical notes and treatment plans