Download OpenAPI specification:
This API reference documents the endpoints available to integrators using the Halo Connect Cloud API. It covers:
For more information about Halo Connect, visit our website or blog.
All API endpoints require an active pairing with the target site. Use the Pair with a site endpoint to establish access before making queries.
For detailed documentation and guides, see our documentation portal.
Pair with a site to enable API access. Best Practice sites require a pairing code generated by the practice. Pairing is still required for other PMS types, but no pairing code is needed.
| practiceManagementSiteId required | string Example: practiceManagementSiteId=12345 The PMS ID of the site to pair with. |
| practiceManagementName required | string Enum: "Best Practice" "Zedmed" "D4w" Example: practiceManagementName=Best Practice The name of the Practice Management Software used by the site. |
| pairingCode | string Example: pairingCode=ABC123 A pairing code generated by the practice. Required for Best Practice sites only. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pmsType": "BestPractice",
- "availability": "online",
- "status": "initialising",
- "haloLinkVersion": "22.1207.209",
- "enrichedAt": "2019-08-24T14:15:22Z",
- "catalogue": [
- {
- "name": "Patients",
- "isDefault": true
}
], - "practiceMetadata": {
- "pmsType": "BestPractice",
- "practiceName": "Halo Clinic South",
- "practiceManagementSiteId": "12345",
- "practiceManagementVersion": "3.4.1"
}, - "name": "Halo Clinic",
- "practiceManagementSiteId": "string",
- "practiceManagementName": "Best Practice",
- "practiceManagementVersion": "3.4.1",
- "createdAt": "2019-08-24T14:15:22Z",
- "authoritative": true,
- "clientTimestampUTC": "2022-12-25T12:25:01Z",
- "heartbeatTimestampUTC": "2022-12-25T12:25:01Z"
}Deprecated: Use /integrator/pair-site instead. Pair with a site to enable API access. Best Practice sites require a pairing code generated by the practice. Pairing is still required for other PMS types, but no pairing code is needed.
| practiceManagementSiteId required | string Example: practiceManagementSiteId=12345 The PMS ID of the site to pair with. |
| practiceManagementName required | string Enum: "Best Practice" "Zedmed" "D4w" Example: practiceManagementName=Best Practice The name of the Practice Management Software used by the site. |
| pairingCode | string Example: pairingCode=ABC123 A pairing code generated by the practice. Required for Best Practice sites only. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pmsType": "BestPractice",
- "availability": "online",
- "status": "initialising",
- "haloLinkVersion": "22.1207.209",
- "enrichedAt": "2019-08-24T14:15:22Z",
- "catalogue": [
- {
- "name": "Patients",
- "isDefault": true
}
], - "practiceMetadata": {
- "pmsType": "BestPractice",
- "practiceName": "Halo Clinic South",
- "practiceManagementSiteId": "12345",
- "practiceManagementVersion": "3.4.1"
}, - "name": "Halo Clinic",
- "practiceManagementSiteId": "string",
- "practiceManagementName": "Best Practice",
- "practiceManagementVersion": "3.4.1",
- "createdAt": "2019-08-24T14:15:22Z",
- "authoritative": true,
- "clientTimestampUTC": "2022-12-25T12:25:01Z",
- "heartbeatTimestampUTC": "2022-12-25T12:25:01Z"
}Retrieve Halo GUIDs for sites matching the query parameters. Use this to exchange a known PMS ID for the corresponding Halo GUID.
| practiceManagementSiteId required | string Filters by the PMS Site Id. |
| practiceManagementName required | string (PracticeManagementName) Enum: "Best Practice" "Zedmed" "D4w" Filters by the name of the Practice Management Software used by the site. |
{- "sites": [
- {
- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pmsType": "BestPractice",
- "availability": "online",
- "status": "initialising",
- "haloLinkVersion": "22.1207.209",
- "enrichedAt": "2019-08-24T14:15:22Z",
- "catalogue": [
- {
- "name": "Patients",
- "isDefault": true
}
], - "practiceMetadata": {
- "pmsType": "BestPractice",
- "practiceName": "Halo Clinic South",
- "practiceManagementSiteId": "12345",
- "practiceManagementVersion": "3.4.1"
}, - "name": "Halo Clinic",
- "practiceManagementSiteId": "string",
- "practiceManagementName": "Best Practice",
- "practiceManagementVersion": "3.4.1",
- "createdAt": "2019-08-24T14:15:22Z",
- "authoritative": true,
- "clientTimestampUTC": "2022-12-25T12:25:01Z",
- "heartbeatTimestampUTC": "2022-12-25T12:25:01Z"
}
]
}Check the status of a site using its Halo GUID.
| siteId required | string Halo GUID of the site. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "pmsType": "BestPractice",
- "availability": "online",
- "status": "initialising",
- "haloLinkVersion": "22.1207.209",
- "enrichedAt": "2019-08-24T14:15:22Z",
- "catalogue": [
- {
- "name": "Patients",
- "isDefault": true
}
], - "practiceMetadata": {
- "pmsType": "BestPractice",
- "practiceName": "Halo Clinic South",
- "practiceManagementSiteId": "12345",
- "practiceManagementVersion": "3.4.1"
}, - "name": "Halo Clinic",
- "practiceManagementSiteId": "string",
- "practiceManagementName": "Best Practice",
- "practiceManagementVersion": "3.4.1",
- "createdAt": "2019-08-24T14:15:22Z",
- "authoritative": true,
- "clientTimestampUTC": "2022-12-25T12:25:01Z",
- "heartbeatTimestampUTC": "2022-12-25T12:25:01Z"
}Send SQL queries to practices as immediate, async or registered queries.
Immediate queries are small, time-sensitive queries that return a result in seconds. Response size is limited to 8MB.
Async queries are queued for execution and results can be retrieved later. The workflow is:
queryId on success.Registered Queries are also supported. See the Registered Queries section for more information.
Send an immediate query to a site and receive the result in the response.
Query status can also be retrieved using the GET Query status endpoint.
| siteId required | string Halo GUID of the site. |
| maxTimeInQueue | number <milli-seconds> (ImmediateMaxTimeInQueue) [ 0 .. 60000 ] |
required | object (Command) |
| catalogue | string (Catalogue) Indicates which database to run against. If no catalogue is specified a default catalogue will be chosen instead. Supported for all PMS with multiple databases. Database catalogues, including the default catalogue, can be identified from the catalogue.name property returned by the Site API endpoints, and are consistent across all sites of a single PMS type. |
{- "maxTimeInQueue": 15000,
- "command": {
- "text": "GetPatientID",
- "executionMode": "reader",
- "type": "text",
- "parameters": [
- {
- "name": "@siteid",
- "direction": "output",
- "type": "BigInt",
- "value": "66",
- "size": 43
}
]
}, - "catalogue": "Patients"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "integratorId": "1acd5efb-e960-4c96-8a84-ca37f187f58b",
- "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
- "mode": "immediate",
- "maxTimeInQueue": 15000,
- "commandSize": 98,
- "requestSize": 98,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "status": "successful",
- "statusTiming": {
- "initialising": {
- "startTime": "2019-08-24T14:15:22Z"
}, - "executing": {
- "startTime": "2019-08-24T14:15:22Z"
}, - "downloading": {
- "startTime": "2019-08-24T14:15:22Z"
}, - "uploading": {
- "startTime": "2019-08-24T14:15:22Z"
}
}, - "metrics": {
- "sqlExecutionDuration": 1000
}, - "result": {
- "rows": 30,
- "size": 25,
- "data": "e2lk...",
- "parameters": [
- {
- "name": "@siteid",
- "direction": "output",
- "type": "BigInt",
- "value": "66",
- "size": 43
}
]
}, - "resultSize": 98,
- "completedAt": "2019-08-24T14:15:22Z"
}Queue an async query for execution. Use the GET Query status endpoint to check progress and retrieve pagination details for results.
| siteId required | string Halo GUID of the site. |
| maxTimeInQueue | number <milli-seconds> (AsyncMaxTimeInQueue) [ 0 .. 7200000 ] |
required | object (Command) |
| catalogue | string (Catalogue) Indicates which database to run against. If no catalogue is specified a default catalogue will be chosen instead. Supported for all PMS with multiple databases. Database catalogues, including the default catalogue, can be identified from the catalogue.name property returned by the Site API endpoints, and are consistent across all sites of a single PMS type. |
{- "maxTimeInQueue": 900000,
- "command": {
- "text": "GetPatientID",
- "executionMode": "reader",
- "type": "text",
- "parameters": [
- {
- "name": "@siteid",
- "direction": "output",
- "type": "BigInt",
- "value": "66",
- "size": 43
}
]
}, - "catalogue": "Patients"
}{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "integratorId": "1acd5efb-e960-4c96-8a84-ca37f187f58b",
- "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
- "mode": "async",
- "status": "initialising",
- "maxTimeInQueue": 900000,
- "commandSize": 98,
- "requestSize": 98,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "statusTiming": {
- "initialising": {
- "startTime": "2019-08-24T14:15:22.847Z"
}
}
}Check the status of an immediate or async query.
For async queries, successful responses include a results object with pagination details for retrieving result pages. Immediate queries do not include pagination since results are returned with the initial request.
| siteId required | string Halo GUID of the site. |
| queryId required | string Id of the query. |
{- "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
- "integratorId": "1acd5efb-e960-4c96-8a84-ca37f187f58b",
- "siteId": "60189e9c-7d12-438c-b9ca-6998d9c364b1",
- "mode": "async",
- "status": "successful",
- "maxTimeInQueue": 900000,
- "commandSize": 98,
- "requestSize": 98,
- "createdAt": "2019-08-24T14:15:22Z",
- "updatedAt": "2019-08-24T14:15:22Z",
- "statusTiming": {
- "initialising": {
- "startTime": "2019-08-24T14:15:22.847Z",
- "endTime": "2019-08-24T14:15:22.847Z"
}, - "queued": {
- "startTime": "2019-08-24T14:15:22.847Z",
- "endTime": "2019-08-24T14:15:22.847Z"
}, - "executing": {
- "startTime": "2019-08-24T14:15:22.847Z",
- "endTime": "2019-08-24T14:15:22.847Z"
}, - "uploading": {
- "startTime": "2019-08-24T14:15:22.847Z"
}
}, - "metrics": {
- "sqlExecutionDuration": 1000
}, - "result": {
- "rows": 30,
- "size": 25,
- "pages": [
- {
- "pageNumber": 1,
- "status": "queued",
- "size": 0,
- "rows": {
- "count": 10,
- "rangeStart": 1,
- "rangeEnd": 11
}
}
]
}, - "resultSize": 98,
- "completedAt": "2019-08-24T14:15:22Z"
}Returns the status of the specified queries for a site. Submit an array of query IDs in the request body to retrieve their current status.
Each result indicates whether the query was found or not found, and includes the full query details when found.
| siteId required | string Halo GUID of the site. |
| queryIds required | Array of strings <uuid> [ items <uuid > ] Array of query IDs to retrieve status for. |
{- "queryIds": [
- "497f6eca-6276-4993-bfeb-53cbbbba6f08"
]
}{- "results": [
- {
- "queryId": "1366ef6e-d536-457c-8f1b-eaa4352059f9",
- "status": "found",
- "query": {
- "id": "1366ef6e-d536-457c-8f1b-eaa4352059f9",
- "siteId": "3f91c577-20a8-467b-8991-b96dfb90e8c6",
- "mode": "async",
- "status": "successful",
- "result": {
- "rows": 14,
- "size": 15344,
- "pages": [
- {
- "pageNumber": 1,
- "status": "cached",
- "size": 15467,
- "rows": {
- "count": 14,
- "rangeStart": 0,
- "rangeEnd": 13
}
}
]
}
}
}, - {
- "queryId": "aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee",
- "status": "notFound"
}
]
}Get a result page from a successful async query.
| siteId required | string Halo GUID of the site. |
| queryId required | string Id of the query. |
| pageNumber required | number >= 1 Page number of the results for a query. |
{- "data": "e2lk...",
- "parameters": [
- {
- "name": "@siteid",
- "direction": "output",
- "type": "BigInt",
- "value": "66",
- "size": 43
}
]
}Streams the JSON content of a single page of query results. This is useful for large result sets that are paginated and delivered as streamed responses to reduce memory usage.
| siteId required | string Halo GUID of the site. |
| queryId required | string Id of the query. |
| pageNumber required | number >= 1 Page number of the results for a query. |
"string"Send a FHIR query to a site and receive the result in the response.
Include the resource name and search parameters in fhirParameters. Example: Patient?given=John
See the FHIR API docs for supported resources and parameters.
| siteId required | string Halo GUID of the site. |
| fhirParameters required | string Resource names and search parameters per the R4 FHIR specification for using RESTful APIs and search. |
{- "application/json": {
- "resourceType": "Patient",
- "id": "1",
- "name": [
- {
- "use": "official",
- "text": "Mr John Smith",
- "family": "Smith",
- "given": [
- "John"
], - "prefix": [
- "Mr"
]
}
]
}
}Send a FHIR search query with parameters in the request body.
POST is recommended for sensitive queries containing personally identifiable information (PII), as it avoids URL length limits and keeps parameters out of logs.
See the FHIR API docs for supported resources and parameters. Errors may return as HTTP errors or FHIR OperationOutcome resources.
| siteId required | string Halo GUID of the site. |
| resource required | string The name of the FHIR resource to search for. |
FHIR search parameters.
| property name* additional property | any |
given=John&birthdate=gt1900-01-01&_sort=birthdate
{- "application/json": {
- "resourceType": "Bundle",
- "type": "searchset",
- "total": 0
}
}Recurring queries that run at a specified frequency, and can be used to monitor for updates or new records. This type is recommended for polling use cases.
Create a registered query to be queued for execution.
| siteId required | string Halo GUID of the site. |
| name required | string Customer set identifier for this registered query. |
| registeredQueryType required | string Value: "query" |
| frequency required | number Seconds between each query execution. |
| duration required | number Duration in seconds the query will run for. Up to 86400 seconds (24 hours). |
required | object Command to be executed by the registered query. |
{- "name": "string",
- "registeredQueryType": "query",
- "frequency": 300,
- "duration": 43200,
- "registerCommand": {
- "command": {
- "text": "GetPatientID",
- "executionMode": "reader",
- "type": "text",
- "parameters": [
- {
- "name": "@siteid",
- "direction": "output",
- "type": "BigInt",
- "value": "66",
- "size": 43
}
]
}
}
}{- "id": "785f1ae1-1234-abcd-56ef-8679258f4aee"
}List all registered queries that are currently active and queued for execution.
| siteId required | string Halo GUID of the site. |
{- "registeredQueries": [
- {
- "id": "d8d667d9-1234-abcd-56ef-1234567890ab",
- "name": "Test",
- "registeredQueryType": "query",
- "status": "enabled",
- "frequency": 60,
- "duration": 120,
- "createdAt": "2025-05-27T05:23:40.983Z",
- "lastHash": "dOFA...",
- "metrics": {
- "lastExecutionDuration": 15,
- "executionSucceededCount": 1,
- "executionFailedCount": 0,
- "resultSizeSum": 8,
- "requestSize": 180,
- "lastSucceededAt": "2025-05-27T05:23:46.836Z"
}
}, - {
- "id": "6cf4e9be-1234-abcd-56ef-1234567890ab",
- "name": "Test",
- "registeredQueryType": "query",
- "status": "completed",
- "frequency": 60,
- "duration": 120,
- "createdAt": "2025-05-27T04:57:48.791Z",
- "completedAt": "2025-05-27T04:59:54.226Z",
- "lastErrorDetails": {
- "errorType": "mssql",
- "errorCode": 2812,
- "errorMessage": "Could not find stored procedure 'selct'."
}, - "metrics": {
- "lastExecutionDuration": 0,
- "executionSucceededCount": 0,
- "executionFailedCount": 3,
- "resultSizeSum": 0,
- "requestSize": 179,
- "lastFailedAt": "2025-05-27T04:59:54.226Z"
}
}
]
}Get the details of a registered query.
| siteId required | string Halo GUID of the site. |
| queryId required | string Id of the query. |
{- "id": "d8d667d9-1234-abcd-56ef-1234567890ab",
- "name": "Test",
- "registeredQueryType": "query",
- "status": "enabled",
- "frequency": 60,
- "duration": 120,
- "createdAt": "2025-05-27T05:23:40.983Z",
- "lastHash": "dOFA...",
- "metrics": {
- "lastExecutionDuration": 15,
- "executionSucceededCount": 1,
- "executionFailedCount": 0,
- "resultSizeSum": 8,
- "requestSize": 180,
- "lastSucceededAt": "2025-05-27T05:23:46.836Z"
}
}Cancel a registered query that is currently queued for execution.
| siteId required | string Halo GUID of the site. |
| queryId required | string Id of the query. |
{- "error": {
- "status": 400,
- "statusText": "Bad Request",
- "message": "Malformed SQL"
}
}Get the result of a registered query that has completed execution.
| siteId required | string Halo GUID of the site. |
| queryId required | string Id of the query. |
{- "data": "e2lk...",
- "parameters": [
- {
- "name": "@siteid",
- "direction": "output",
- "type": "BigInt",
- "value": "66",
- "size": 43
}
], - "rows": 12,
- "size": 25
}