API Reference

Updated Pagination

For the beta version v20240412 we are introducing a new way of fetching pages from our API.

Instead of passing the desired page, we would need to pass the cursor that identifies the first record of that page and the number of records you want to fetch.

The parameters expected now are:

  • start_cursor: Used when you want to paginate backwards. Starts empty.
  • end_cursor: Used when you want to paginate forward. Starts empty.
  • per_page: Number of results to return per page. The default is 1000.

When fetching data this would be the extra information about the page you will receive:

"page_info": {
    "has_previous_page": false,
    "has_next_page": false,
    "start_cursor": "AAAAA",
    "end_cursor": "BBBBBB"
 '}

Paginating Forward

Based on the page_infoyou know what are the first and last cursor of that page, so if you want to paginate forward, it is just add end_cursor with the value you've got from the page into the next request.

This way we have only one parameter to add, without the need to set the "direction" we are paginating, as we use the end_cursoras the record we will use as a query to fetch everything "after" that record.

Paginating Backwards

Based on the page_infoyou know what are the first and first cursor of that page, so if you want to paginate backwards, it is just add start_cursor with the value you've got from the page into the next request.

This way we have only one parameter to add, without the need to set the "direction" we are paginating, as we use the start_cursoras the record we will use as a query to fetch everything "before" that record.

Sample of request:


curl --request GET \
     --url 'https://nexhealth.info/procedures?subdomain=YOUR_SUBDOMAIN&location_id=YOUR_LOCATION_ID&per_page=100&start_cursor=WWWWW' \
     --header 'Nex-Api-Version: v20240412' \
     --header 'Authorization: YOUR_BEARER_TOKEN

For now, the endpoints that support the new pagination are:

  • Procedures
  • Adjustments
  • Charges
  • Payments
  • Claims
  • Appointments