The Definitive Healthcare API (V4) works using the custom reports created for you by Definitive Healthcare or using the saved reports created through https://www.defhc.com.
Requirements to access the Definitive Healthcare API are standard and basic practice, which include the following unique identifiers: username, password, and grant type.
All requests will be made at https://api.defhc.com/v4, in which the URL string will determine the result or set of data that is returned.
Please note that all requests will go over https , and all other types of requests will not be returned.
In order to access the Definitive Healthcare API, the end user is required to authenticate through the OpenID process. The user will need to send an authentication request (POST) to the following URL: https://api.defhc.com/v4/token with their respective username , password and granttype=password parameters.
In return, the user will receive an assigned access token from the Definitive Healthcare server for the respective set of user credentials. An access token, for example, could look like the following examples:
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/v4/token"
POST https://api.defhc.com/v4/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
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v4/odata-v4/Hospitals"
GET https://api.defhc.com/v4/odata-v4/Hospitals HTTP/1.1
Host:
Authorization: Bearer {{token}}
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v4/Reports?returnType={{returnType}}"
GET https://api.defhc.com/v4/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/v4/Reports/{{customReportName}}"
GET https://api.defhc.com/v4/Reports/%7B%7BcustomReportName%7D%7D HTTP/1.1
Host:
Authorization: Bearer {{token}}
curl -X GET -H "Authorization: Bearer {{token}}" "https://api.defhc.com/v4/reports/{{reportName}}?pageSize={{pageSize}}&page={{page}}&returnType={{returnType}}"
GET https://api.defhc.com/v4/reports/%7B%7BreportName%7D%7D?pageSize={{pageSize}}&page={{page}}&returnType={{returnType}} HTTP/1.1
Host:
Authorization: Bearer {{token}}