OAuth 2.0 is an industry-standard protocol for authorization that allows users to grant limited access to their resources on one website to another website without sharing their credentials. It provides a secure and standardized way for applications to authenticate and authorize users.
Before you can start using OAuth 2.0, you need to register your application with VerifyTreatment. Please send your registration request to [email protected] to obtain your client credentials, including a client ID and client secret.
OAuth 2.0 supports multiple authorization flows, each designed for different use cases. VerifyTreatment limits 3rd party access to following flows:
The authorization code flow is a "three-legged OAuth" configuration. It involves three parties: the user (resource owner), the client (application), and the server (VerifyTreatment). Initially, the user obtains an authorization grant, which is then exchanged for an access token by the client.
The client initiates the flow by directing the user to the authorization endpoint. The client includes its client identifier, requested scope, local state, and a redirection URI to which the authorization server will send the user-agent back once access is granted (or denied).
Property | Description |
---|---|
response_type | code, client_credentials |
client_id | client identifier provided by VerifyTreatment |
redirect_uri | Where the user is redirected after successful log in |
scope | (optional) permissions you wish to request from the user, if none are defined default scopes will be used |
state | (optional) This parameter is optional but highly recommended. You should store the value of the CSRF token in the user’s session to be validated when they return. |
When the user clicks the link, they must first log in to VerifyTreatment, then will be prompted to authorize or deny the client's request to access data. If the user clicks authorize, VerifyTreatment redirects the user-agent to the client's redirection endpoint provided earlier. The redirection URI includes an authorization code and the client's local state.
Property | Description |
---|---|
code | authorization code |
state | the state parameter sent in the original request. You should compare this value with the value stored in the user’s session to ensure the authorization code obtained is in response to requests made by this client rather than another client application. |
Property | Description |
---|---|
error | access_denied |
error_description | User+denied+the+request |
Once you have obtained the authorization grant, you need to exchange it for an access token. The exact process depends on the chosen flow.
Property | Description |
---|---|
grant_type | Set to "authorization_code" |
code | The authorization code obtained in the previous step |
client_id | client identifier provided by VerifyTreatment |
client_secret | client secret provided by VerifyTreatment |
redirect_uri | Must match the redirect_uri used in the authorization request |
Property | Description |
---|---|
token_type | bearer |
id | User id |
access_token | Access token |
refresh_token | Refresh token |
expires_at | Access token expiration time |
scopes | Requested scopes |
Property | Description |
---|---|
grant_type | Set to "client_credentials" |
client_id | client identifier provided by VerifyTreatment |
client_secret | client secret provided by VerifyTreatment |
Property | Description |
---|---|
token_type | bearer |
id | User id |
access_token | Access token |
refresh_token | Refresh token |
expires_at | Access token expiration time |
scopes | Requested scopes |
Once you have obtained an access token, you can use it to make requests to the API on a user’s behalf.
The access token must be sent as a Bearer token in the Authorization header of each request. The API will return a 401 Unauthorized response if the access token is missing or invalid.
Access tokens have a limited lifetime specified by the expires_at field. If you attempt to use an expired token, you will receive a 401 Unauthorized response from the API. You can refresh an access token by using the refresh_token which is returned when the access token is generated.
Property | Description |
---|---|
grant_type | refresh_token |
refresh_token | refresh_token received from the authorization request |
client_id | client identifier issued by VerifyTreatment |
client_secret | client secret issued by VerifyTreatment |
scope | (optional) This is optional; if not sent the original scopes will be used, otherwise you can request a reduced set of scopes. |
You can create a new VOB by sending a POST request to the /vobs endpoint. The facility
and payer_id
fields are required to complete the configuration request.
Property | Description |
---|---|
first_name | first name |
last_name | last name |
member_id | client member id |
payer_id | vtx_payer_id GET /payers |
date_of_birth | date of birth MM/DD/YYYY , YYYY-MM-DD |
client_type | (optional) client_type [ prospect , termed , client , referred , discharged ] |
subscriber_relation | (optional) client relation to the subscriber |
insurance_phone | (optional) insurance company phone |
client_phone | (optional) client company phone |
ssn | (optional) client ssn |
gender | (optional) M/F/Other, |
facility | (optional) Facility _id/ACCOUNT_DEFAULT from GET /facility request. If facility is included it will overwrite the accounts default facility when submitting the insurance request |
Property | Description |
---|---|
sort | available fields to sort are:
|
coverage |
|
payer_name | Payer name from GET /payers |
facility | Facility ID from GET /facilities |
client_type |
|
range |
|
created_by | User ID from GET /users |
q | Free text search |
skip | Number of vobs to skip (defaults to 0) |
limit | Number of vobs to return (defaults to 20) |
Property | Description |
---|---|
action | save / verify |
client_type |
|
date_of_birth | xxx |
email | xxx |
facility | xxx |
first_name | xxx |
gender | xxx |
group_number | xxx |
insurance_phone | xxx |
last_name | xxx |
member_id | xxx |
payer_id | xxx |
payer_name | xxx |
phone | xxx |
place_of_service | xxx |
ssn | xxx |
subscriber_relation | xxx |
tag | xxx |
Property | Description |
---|---|
_id | VOB ID to re-verify |
Property | Description |
---|---|
SR01 | Self |
SR02 | Spouse |
SR03 | Child |
SR04 | Other Relationship |
SR05 | Other Adult |
Property | Description |
---|---|
format | |
vob_id | Vob ID to export |
type | custom |
out_of_network['AI', '30'] | Out of network service types to export |
in_network['AI', '30'] | In network service types to export |
Requires access to VerifyTreatment export subscription
Property | Description |
---|---|
format | csv |
type | vobs |
start | Start date YYYY-MM-DD |
end | End date YYYY-MM-DD |
coverage | Coverage status ['active', 'inactive', 'unavilable'] |
sort | -created_at | created_at (asc/desc) |
You can import / update batch data by sumbitting a CSV file
Import batch data
Property | Description |
---|---|
file | CSV file |
type |
|
action |
|
facility | Facility ID (optional) |
Property | Description |
---|---|
_id | VOB ID to update (required when action is update) |
first_name | First name |
last_name | Last name |
date_of_birth | Date of birth |
client_type |
|
payer_id | Payer ID |
facility | Facility ID |
tag | Tag |
external_id | External ID |
place_of_service |
|
VerifyTreatment provides two options for batch eligibility verification: Auto VOB Monitoring and Run Now.
Auto VOB Monitoring method re-verifies each VOB record when the "Client Type" field is set to "client," according to the specified schedule and settings.
Run Now method enables the user to generate a one-time batch eligibility report.
Please note that the VerifyTreatment Automate Subscription is require to access this feature.
Configure batch eligibility scheduled run
Property | Description |
---|---|
enabled | boolean |
frequency |
|
days | Array of days to run the scheduled batch eligibility, only applies if frequency is set to daily |
start_date | Date to run the scheduled batch eligibility. This is used to calculate the next run dates. Only applies if frequency is set to bi-weekly or monthly |
Configure batch eligibility for manual run
Property | Description |
---|---|
manual | true |
options | JSON Payload: { "vob_status": "VOB_STATUS", // optional defaults to client "vob_coverage": "COVERAGE_STATUS", // optional "tag": "OPTIONAL_VOB_TAG", // optional "vob_last_update": "LAST_UPDATED_DATE (YYYY-MM-DD)", // optional }vob_status: [ prospect , termed , client , referred , discharged ] vob_coverage: [ Active Coverage , Inactive , Unknown ] |
Property | Description |
---|---|
q | Search Payer |
limit | Number of payers to return |
skip | Number of payers to skip |
Each insurance company requires a unique combination of patient/provider details. For example, some insurance companies may require less information than others.
The configuration API allows you to look up all the required fields for a specific payer.
Tip: Sometimes the insurance company may allow you to submit requests using only the patient's first name, last name, and date of birth. However, you may still receive a "Patient Not Found" error message, even if you have verified the information. In these cases, you will still need to submit the request using the Member ID
Property | Description |
---|---|
facility | Facility ID |
Property | Description |
---|---|
q | Search Facility |
limit | Number of payers to return |
skip | Number of payers to skip |