Table of Contents | ||||
---|---|---|---|---|
|
Introduction to VSee Clinic API
VSee Clinic API allow developer to make their own interface while still having full VSee Clinic and VSee Call capability.
Common Workflows
Example Set up
Let's take a look at a typical example set up
Key | Example | Note |
---|---|---|
Clinic Portal URL |
| This is your original portal |
Account code |
| Your VSee Clinic Account Code |
API Key |
| The key generated under Developers menu |
API Secret |
| The secret generated under Developers menu |
Admin Token |
| The admin token is a special token that allows you to perform admin functions through API. You need to create such tokens manually in your API app. https://developers.vsee.com/wiki/spaces/VD/pages/381517825/Sign+Up+for+a+Developer+Account#Create-an-Admin-token |
API Endpoint |
|
| To be advised by VSee Clinic Team |
Clinic Portal URL |
|
| To be advised by VSee Clinic Team |
Waiting Room URL |
|
| To be advised by VSee Clinic Team | |
User Code |
| This is anything that you can formular and act as a way for VSee Clinic to identify the your user |
Patient Side Integration
...
Use case #1: Log patient in and take them to VSee Clinic's patient dashboard
Step 1: Obtain patient access token from POST /users/sso API call
...
API
...
Step 2: Redirect the user to your VSee Clinic page
You need to provide the user with a button or link to redirect to VSee Clinic. The URL will follow this pattern
{portal_base_url}auth?sso_token={token}&next={next_url}
e.g
https://vclinic.vseepreview.com/vc/next/auth?sso_token=66bcd0acff324e8a44992d9596b5d361&next=/u/clinic
This will log user in, then redirect user to
https://vclinic.vseepreview.com/vc/next/u/clinic
Additional options: - disable_navigation: 1 - disable all email communication
e.g
https://vclinic.vseepreview.com/vc/next/auth?sso_token=66bcd0acff324e8a44992d9596b5d361&next=/u/clinic&disable_navigation=1
Use case #2: Log Patient In using SSO Token and Start a Video Session
Step 1: Obtain patient access token from POST /users/sso API call
The API will return you the token (data.token.token
) look like this 66bcd0acff324e8a44992d9596b5d361
. User's ID (data.id
) will also be used as member_id
later in Step 3.
Step 2: Create intake object via POST /intakes API
Use the SSO token from Step 1 in the X-ApiToken
header field. You will get an intake ID in the response (data.id
), e.g. 61165a8e-d8cc-47da-bd8e-597d64457b1f
Step 3: Create a walkin visit via POST /visits/add_walkin API
Use SSO token from Step 1 in the X-ApiToken
header field and intake_id
from Step 2. You will get a visit ID in the response (data.id
, e.g. 67258
Step 4: Redirect the patient into the video call/chat page:
https://vclinic.vseepreview.com/vc/next/auth?sso_token=9fa6239291aa27d9528416cdcafbd6a5&next=/visits/start/67258
Use case #3: Log Patient In using SSO Token and Schedule An Appointment
Step 1: Obtain patient access token from POST /users/sso API call
The API will return you the token (data.token.token
) look like this 66bcd0acff324e8a44992d9596b5d361
. User's ID (data.id
will also be used as member_id later in Step 3.
Step 2: Create intake object via POST /intakes API
Use the SSO token from Step 1 in the X-ApiToken
header field. You will get an intake ID in the response (data.id
), e.g. 61165a8e-d8cc-47da-bd8e-597d64457b1f
Step 3: Create a scheduled appointment visit via POST /visits API
Use the SSO token from Step 1 in the X-ApiToken
header field and intake_id from Step 2. You will get a visit ID in the response (data.id
) e.g. 67258
If your clinic is configured to use one time appointment links then the visit object will also contain data.one_time_link_token
, e.g. f7gybzjd9o
You can build a link using the format below and send it to the patient:
https://vclinic.vseepreview.com/vc/next/members/appointment/67258?token=f7gybzjd9o
Note: To successfully schedule a visit, providers' Availability (Slots) should be set up first. This can only be avoided if Admin API Token is used, that will override the schedule and force create an appointment even with an empty calendar.
Use case #4: Log Patient In using SSO Token and Create an eConsult (Asynchronous Visit)
Step 1: Obtain patient access token from POST /users/sso API call
The API will return you the token (data.token.token
) look like this 66bcd0acff324e8a44992d9596b5d361
. User's ID (data.id
will also be used as member_id later in Step 3.
Step 2: Create intake object via POST /intakes API
Use the SSO token from Step 1 in the X-ApiToken
header field. You will get an intake ID in the response (data.id
), e.g. 61165a8e-d8cc-47da-bd8e-597d64457b1f
Step 3: Create an asynchronous visit (econsult) via POST /add_econsult API
Use the SSO token from Step 1 in the X-ApiToken
header field and intake_id
from Step 2. You will get a visit ID in the response (data.id
) e.g. 67258
As this is an asynchronous visit, all the providers assigned to this waiting room will see it and will need to click Accept it.
Use case #5: Guest invite link
Apply Step 1 to 3 from Use case #2 or #3 to get a visit object.
Step 4: Retrieve visit object from GET /visits/:id
Code Block |
---|
{
"id": "8888",
"code": "63ac801a697049cbbf865d660a0300ce",
...
} |
Extract out code
value and form the invite link like https://vclinic.vseepreview.com/vc/next/visits/join/63ac801a697049cbbf865d660a0300ce
Provider Side Integration
Use Case #1: Provider Accessing Web Dashboard using SSO Token
Usecase: I already have a way to sign up, manage my provider on my own providers' portal and now I want them to go to VSee Clinic for additional telehealth functionality.
Here is how you log in and redirect your provider using access token.
Step 1: Obtain provider access token from POST /users/sso API call
The API will return you the token (data.token.token
) look like this 66bcd0acff324e8a44992d9596b5d361
.
Step 2: Redirect the provider to their dashboard
You need to provide the user with a button or link to redirect to VSee Clinic. URL will follow this pattern
{portal_base_url}auth?sso_token={token}&next={next_url}
e.g https://vclinic.vseepreview.com/vc/next/auth?sso_token=66bcd0acff324e8a44992d9596b5d361&next=/providers/dashboard
This will log user in, then redirect user to https://vclinic.vseepreview.com/vc/next/providers/dashboard
Use Case #2: Create a Provider Account With a Room
Usecase: I already have a way to sign up, manage my provider on my own providers' portal and now I want them to go to VSee Clinic for additional telehealth functionality. My portal has multiple providers, each provider should have their own Waiting Room in VSee Clinic to accept their own pool of patients.
Step 1: Obtain provider access token from POST /users/sso API call
The API will return you the token (data.token.token) look like this 66bcd0acff324e8a44992d9596b5d361
.
Step 2: Create a waiting room in the clinic via POST /rooms API call
The API will return you the room ID and room code (data.id
, data.code
). If the room already exists, it will return error 400.
Step 3: Assign the newly created provider to the waiting room via POST /users/:id/rooms API call
Step 4: Redirect the provider to their dashboard. The provider will be assigned to a room already and be able to see patients from that room.
You need to provide the user with a button or link to redirect to VSee Clinic. URL will follow this pattern
{portal_base_url}auth?sso_token={token}&next={next_url}
e.g https://vclinic.vseepreview.com/vc/next/auth?sso_token=66bcd0acff324e8a44992d9596b5d361&next=/providers/dashboard
This will log user in, then redirect user to https://vclinic.vseepreview.com/vc/next/providers/dashboard
...
Documentation
API Setup
API Endpoints
Production:
https://api.vsee.me/api_v3/
Staging:
https://api.vseepreview.com/vc/nextstable/api_v3/
Note: Your clinic setting on Production environment is not available on Staging environment unless set up by VSee Clinic Support team.
API Parameters
Parameter | Location | Type | Description |
---|---|---|---|
|
|
| If the app knows the account code, it should pass it in this header for every request. Otherwise leave blank |
|
|
| Once the user logs in, the app gets the token and should pass it for every request. |
|
|
| Wherever there’s user’s :id field in API methods, it will also accept dash (-) as a mapping to the current user. |
API Errors
VSee Clinic API use standard HTTP response status codes
Code | Meaning | Response example | |||
---|---|---|---|---|---|
1 |
|
|
| ||
2 |
|
|
| ||
3 |
|
| |||
4 |
|
| |||
5 |
|
| |||
6 |
|
| |||
7 |
|
| |||
8 |
|
| |||
9 |
|
| |||
10 |
|
|
API Objects
User Object
(To be completed soon)
Visit Object
status
:
Status Code | Meaning | Description |
---|---|---|
| Pending | Visit was just created |
| Confirmed | Appointment is confirmed |
| In-progress | Visit is in progress |
| Completed | Visit is closed |
| Deleted / Cancelled | Visit is cancelled by patient or provider |
subtype:
Subtype | Meaning | Description |
---|---|---|
| In-person | In-person visit, no video call requested |
| Phone | Appointment is by phone, no video call requested |
| Video | Default: VSee video call |
| E-consult | Async visit, no video call |
subtype
Intake Object
(To be completed soon)
Settings API
See Settings API
Users API
See User API
EMR API
See EMR API
Pharmacy API
See Pharmacy API
Visits API
See Visit API
Payment API
See Payment API
Clinic Account API
Rooms API
See Rooms API
Push Notification API
Mostly for mobile app
File Upload API
See File Upload API
VSee Clinic Webhooks
See https://developers.vsee.com/wiki/spaces/VD/pages/192905327/ Webhooks
Page Properties | ||
---|---|---|
| ||
Recordings APISee Recordings API |