API Reference

Response Body

Code Field

All NexHealth Synchronizer API responses will return a boolean field named code, which will either be true or false.

  • False indicates an error processing the request and includes an error message.
  • True means the request was successful or accepted, though the response body may still be empty.

Response Format

All responses are JSON encoded. The response object is composed of the following properties:

code: Boolean value indicating the success or failure of the request.

data: Array or object containing the requested data set. It will be an Array or Object depending if you made a request to a singular resource, or the collection itself.

description: Array providing messaging about the result of the requested action.

error: Array containing an accumulation of errors which occurred during the execution of the request.

page_info: Structure that will be provided when accessing endpoints that can return more than one record, usually the index. The structure will be like this:

{ 
  "has_previous_page": false,
  "has_next_page": false,
  "start_cursor": string,
  "end_cursor": string,
}

has_previous_page: true if has previous page.

has_next_page: true if has next page.

start_cursor: the identifier of the first record of the page, and will be used if you want to retrieve the previous page.

end_cursor: the identifier of the last record of the page, and will be used if you want to retrieve the next page.

Errors

Response results always include an error property that contains error that occurred during the execution of the request. If there were no errors, the value will be an empty array.

Below you can see an example request and response with errors stating that patient and provider IDs were passed even though the endpoint /operatories does not accept those parameters. Note that the request was still successful.

Request

curl --request GET 'https://nexhealth.info/operatories/2?subdomain=test&location_id=148&patient_id=15215&provider_id=531' \
--header 'Authorization: ********' \
--header 'Accept: application/vnd.Nexhealth+json;version=2'

Response

{
    "code": true,
    "data": {
        "id": 2,
        "name": "Dr. Sarah Lexington",
        "foreign_id": "2",
        "foreign_id_type": "msg-opendental-DataSource-35",
        "rel_ids": {
            "1,Location,location_id": "1"
        },
        "location_id": 148,
        "last_import_id": "90dff8ed-5a1e-4e86-85b1-826a15bcd753",
        "last_sync_time": null,
        "updated_at": "2020-08-12T22:42:21.444Z",
        "created_at": "2020-08-12T18:56:55.893Z",
        "display_name": "OP-2",
        "active": true,
        "static_image_url": null,
        "appt_categories": [],
        "profile_url": "https://storage.googleapis.com/nexassets/app/img/icon/avatar.svg",
    },
    "description": [],
    "count": null,
    "error": [
        "Unknown parameter specified: patient_id",
        "Unknown parameter specified: provider_id"
    ]
}

Field Types

Below is a subset data types that can be returned in API responses.

TypeSample NameSample ValueSample JSON
stringname"Dr. Sarah Lexington"{"name":"Dr. Sarah Lexington"}
integerlocation_id148{"location_id":148}
floatlatitude38.8976633{"latitude":38.8976633}
booleaninactivefalse{"inactive":false}
datetimeupdated_at"2020-08-12T22:42:21.444Z"{"updated_at":"2020-08-12T22:42:21.444Z"}
nullnpinull{"npi":null}

📘

DateTime Format

All DateTime data returned by the API follows the format yyyy-MM-ddTHH:mm:ssZ. Note the Z indicating that the time zone is UTC.

e.g. "2020-08-12T22:42:21.444Z"