The Definitive Healthcare API (v5) enables you to programatically access Definitive Healthcare facility and executive data, as well as saved reports (static or dynamic), using HTTP POST and GET requests. The API is RESTful, ensuring maximum programming flexibility and scalability.
A Data Integration License is required to utilize data outside of DefinitiveHealthcare.com.
All requests are made using https://api.defhc.com/v5, and the URL string determines the result or set of data that is returned.
In order to access the Definitive Healthcare API, you are required to authenticate through the OpenID process. You will need to send an authentication request (POST) to https://api.defhc.com/v5/token with the following parameters: username, password and grant_type=password. In return, you will receive an assigned Bearer Token from the Definitive Healthcare server for the respective set of user credentials. The token will look similar to the following:
The following data should be posted with the url encoded (application/x-www-form-urlencoded)
curl -X POST -H "Content-Type: application/x-www-form-urlencoded" -d "grant_type=password&username={{userName}}&password={{password}}" "https://api.defhc.com/v5/token"
POST https://api.defhc.com/v5/token HTTP/1.1
Host:
Content-Type: application/x-www-form-urlencoded
grant_type=password&username={{userName}}&password={{password}}
Hospital API contains several expandable navigation properties. The following related entities can be included by using the $expand option in the query string. For example, https://api.defhc.com/v5/odata-v4/Hospitals(1973)?$expand=Fin.
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v5/odata-v4/Hospitals"
GET https://api.defhc.com/v5/odata-v4/Hospitals HTTP/1.1
Host:
Authorization: Bearer {{token}}
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v5/Reports?returnType={{returnType}}"
GET https://api.defhc.com/v5/Reports?returnType={{returnType}} HTTP/1.1
Host:
Authorization: Bearer {{token}}
customReportName File name of the report to be downloaded
After initial authentication is complete, please use the end user base URL with the name of the report to retrieve the requested data. Note, the report name should be without the file extension .
Example : HospitalReport
Please work with your dedicated account manager to receive a list of the complete report names that need to be pulled through the Definitive Healthcare API.
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v5/Reports/{{customReportName}}"
GET https://api.defhc.com/v5/Reports/%7B%7BcustomReportName%7D%7D HTTP/1.1
Host:
Authorization: Bearer {{token}}
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v5/reports/{{reportName}}?pageSize={{pageSize}}&page={{page}}&returnType={{returnType}}"
GET https://api.defhc.com/v5/reports/%7B%7BreportName%7D%7D?pageSize={{pageSize}}&page={{page}}&returnType={{returnType}} HTTP/1.1
Host:
Authorization: Bearer {{token}}