User API
User Object
Type
Value | Meaning | Description |
|---|---|---|
|
| Admin user |
|
| For system use |
|
| For system use |
|
| Admin user |
|
| For system use |
|
| A registered patient |
|
|
|
|
| Provider: Physician or CSR |
|
| Guest one-time user |
|
| User joined by dial-in |
|
| deprecated |
Subtype
Value | Meaning | Description |
|---|---|---|
|
| Remote Medic |
|
| Licensed Service Provider |
|
| Remote Medic |
|
| deprecated |
|
| Customer Service Representative |
|
| Medical Assistant |
GET /users V3
Filter Parameters
Parameter | Type | Description |
|---|---|---|
|
| E.g:
|
|
| Full text search (minimum 3 chars) |
String | Like search (minimum 3 chars) | |
|
| Search keyword (minimum 3 chars)
Should be used in conjunction with |
|
|
|
|
| |
|
|
|
|
| Status, e.g:
|
|
| User type, e.g:
|
|
| Role, e.g:
|
|
|
|
|
|
|
|
| Clinic group |
|
| Provider sub type |
Other Parameters
Parameter | Type | Description |
|---|---|---|
|
| E.g:
|
|
| Offset |
|
| Page size |
|
| E.g:
Available fields params
|
Response:
curl --location 'https://api-vclinic.vseepreview.com/vc/stable/api_v3/users?q=anton%2Bpatient1%40vseelab.com&type=200' \
--header 'X-ApiToken: vclinic_api_token' \
--header 'X-AccountCode: vclinic'
{
"data": [
{
"email": "anton+patient1@vseelab.com",
"id": "20008869839",
"full_name": "Anton Patient1"
},
...
],
"total_count": 500
}
GET /users/:id V3
Get profile’s data of a particular user, including fields from the extended profile (if any).
Response:
curl --location --request GET 'https://api-vclinic.vsee.me/api_v3/users/27769243' \
--header 'X-ApiToken: xxxxxxxxxxxxx' \
--header 'X-AccountCode: vclinic'
{
"data": {
"id": "27769243",
"code": "63f67706de344db98a6461d00adc646e",
"first_name": "anton",
"last_name": "test_2",
"full_name": "anton test_2",
"username": "anton+test2@vseelab.com",
"vseeid": "cmo+user27769243",
"dob": "1980-01-01",
"email": "anton+test2@vseelab.com",
"gender": 1,
"active": true,
"tos": true,
"status": 20,
"subtype": "",
"timezone": "Europe/Berlin",
"email_verified": true,
"signup_step": 99,
"extra": {
"marital_status": "married",
"gender_identity": "Choose Not To Disclose",
"social_security_no": "",
"veteran": "",
"race": "",
"ethnicity": "",
"health_insurance": "",
"insurance": "",
"insurance_policy_number": "",
"attachments": null,
"emerg_contact_name": ""
},
"dashboard_url_alternative": "/u/uat",
"account_code": "vclinic",
"clinics": [
"vclinic"
],
"rooms": [
{
"id": "865244556",
"code": "vclinic_room_code",
"slug": "uat",
"name": "UAT",
"account_code": "vclinic",
"domain": "vclinic.vsee.me",
"default": true,
"added_time": 1677096710,
"source": "signup"
}
],
"created": 1677096710,
"type": 200
}
}POST /users/sso V3
Single Sign On for patient and provider.
This is disabled by default, you need to contact admin@vsee.com to request for it.
SSO process will create a user record on VSee side when you first call this API and will map to and return existing user record for further requests.
GET parameters
Use POST /users/sso?fields=vsee parameter to include the following object as part of the response. This may be used for Browser Call SDK workflow.
"vsee": {
"id": "ccpreview+606ce3e353c8411a8e7b52c664457b1f",
"token": "78fc497ff743d2b51050d9102acabe63"
}POST Parameters
Parameter | Type | Description |
|---|---|---|
|
|
|
|
|
|
|
|
YYYY-MM-DD format |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
POST Parameters required in order to be able to e-prescribe for this user
Parameter | Type | Description |
|---|---|---|
|
|
|
|
|
|
|
|
YYYY-MM-DD format |
|
|
|
|
|
Max length: 128 character |
|
|
male / female |
|
|
|
|
|
|
|
|
Two-Letter State Abbreviation |
|
|
|
|
|
|
Response
Note: you can use the data.token.token return here to redirect user from your portal to VSee Clinic portal, please see Workflows section.
Guest SSO
curl -X POST \
-H "X-AccountCode: vclinic" \
-H "X-ApiKey: vclinic_api_key" \
-H "X-ApiSecret: vclinic_api_secret" \
-H "Content-Type: multipart/form-data;" \
-F "first_name=John" \
-F "last_name=Smith" \
-F "type=600" \
"https://api-vclinic.vseepreview.com/vc/stable/api_v3/users/sso.json" -k
{
"data": {
"id": "10008",
"code": "57d76ada0bb444f9b3057855ac1f0144",
"first_name": "John",
"last_name": "Smith",
"username": "57d76ad979b843e6973e7855ac1f0144",
"vseeid": "conciergedev+57d76ad979b843e6973e7855ac1f0144",
"dob": "1990-01-01",
"active": true,
"tos": false,
"subtype": "",
"token": {
"user_id": "10008",
"token": "0437c1ce3b7079906e2ff247aad1adda",
"expiry": 1473821786,
"refresh_token": {
"user_id": "10008",
"token": "2693615fd2a46edf13334b3f35580e26",
"expiry": 1476327386,
"created": 1473735386
}
}
}
}Patient SSO
curl -X POST \
-H "X-AccountCode: vclinic" \
-H "X-ApiKey: vclinic_api_key" \
-H "X-ApiSecret: vclinic_api_secret" \
-H "Content-Type: multipart/form-data;" \
-F "first_name=John" \
-F "last_name=Smith" \
-F "code=anton+johnsmith@vseelab.com" \
-F "email=anton+johnsmith@vseelab.com" \
-F "type=200" \
"https://api-vclinic.vseepreview.com/vc/stable/api_v3/users/sso.json" -k
{
"data": {
"id": "10008",
"code": "ca978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb",
"first_name": "John",
"last_name": "Smith",
"username": "57d76ad979b843e6973e7855ac1f0144",
"vseeid": "conciergedev+57d76ad979b843e6973e7855ac1f0144",
"active": true,
"tos": false,
"subtype": "",
"token": {
"user_id": "10008",
"token": "0437c1ce3b7079906e2ff247aad1adda",
"expiry": 1473821786,
"refresh_token": {
"user_id": "10008",
"token": "2693615fd2a46edf13334b3f35580e26",
"expiry": 1476327386,
"created": 1473735386
}
}
}
}Provider SSO
curl -X POST \
-H "X-AccountCode: vclinic" \
-H "X-ApiKey: vclinic_api_key" \
-H "X-ApiSecret: vclinic_api_secret" \
-H "Content-Type: multipart/form-data;" \
-F "first_name=John" \
-F "last_name=Provider" \
-F "code=anton+johnsmithprovider@vseelab.com" \
-F "email=anton+johnsmithprovider@vseelab.com" \
-F "type=400" \
"https://api-vclinic.vseepreview.com/vc/stable/api_v3/users/sso.json" -k
{
"data": {
"id": "10008",
"code": "cd978112ca1bbdcafac231b39a23dc4da786eff8147c4e72b9807785afee48bb",
"first_name": "John",
"last_name": "Provider",
"username": "57d76ad979b843e6973e7855ac1f0144",
"vseeid": "anton+johnsmithprovider@vseelab.com",
"email": "anton+johnsmithprovider@vseelab.com",
"active": true,
"tos": false,
"subtype": "",
"token": {
"user_id": "10008",
"token": "0437c1ce3b7079906e2ff247aad1adda",
"expiry": 1473821786,
"refresh_token": {
"user_id": "10008",
"token": "2693615fd2a46edf13334b3f35580e26",
"expiry": 1476327386,
"created": 1473735386
}
}
}
}GET /auth V3
Use this URL when you need to provide the user with a button or link to redirect to VSee Clinic. The URL will follow this pattern
https://vclinic.vseepreview.com/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
Parameters
Parameter | Type | Description |
|---|---|---|
|
| SSO token from User API - SSO API response |
|
| URL path to redirect the user to after login |
|
| 1 - invalidate the sso_token after login. This is optional for additional security. |
|
| 1 - disable all email communication |
POST /users/login.json [public access] V3
Log user in and retrieve access token
Notes:
user_type will be member(200), provider(400), …, etc
There is 2 methods for log in
active user
use username and password field
inactive user
user email and email token sent to their email
only after user update their password via API, their status will change to active and can log in via active user log in method above.
Parameters
Parameter | Type | Description |
|---|---|---|
|
| (for active user only) |
|
| (for active user only) |
|
| (for non-active user who has not set the password yet) |
|
| (for non-active user who has not set the password yet) |
Response
Note: you can use the token.token return here to redirect user from your portal to VSee Clinic portal, please see Section Web log in using SSO Token.
curl -X POST -d "username=member-201&password=111111" https://api.vsee.me/api_v3/users/login.json
curl -X POST -d "email=an+1@vsee.com&email_token=ztpand" https://api.vsee.me/api_v3/users/login.json
{
"data": {
"user_id": "201",
"token": "18c31fa10afb6f0857c803eb01a2b392",
"expiry": 1473822319,
"created": 1473735919,
"user_type": "200",
"refresh_token": {
"user_id": "201",
"token": "6338a6e42f407acf39d07a63442efb9d",
"expiry": 1476327919,
"created": 1473735919
},
"user": {
"id": "201",
"code": "54bdf165f02c4a0fbaac2603ac1f0144",
"first_name": "Lemuel",
"last_name": "Eveline (201)test",
"username": "member-201",
"vseeid": "conciergedev+richard",
"dob": "1960-01-01",
"email": "an+user1@vsee.com",
"gender": 2,
"photo": "https://api.vsee.me/api_v3/files/index/app_user/photo/201/?auth_code=e965cbbe29c1fc1e8076ff00733648625bd56ac0",
"active": true,
"tos": false,
"phone": "800-555-5555",
"subtype": "",
"street_addr": "FIrst str 12",
"state": "CA",
"city": "San Francisco",
"zip": "01234",
"pcp_name": "",
"pcp_phone": ""
}
}
}GET /me V3
Retrieve the current user profile
Parameters
Parameter | Type | Description |
|---|---|---|
|
|
|
Response
curl -X GET -H "X-ApiToken: 6366a7018a39536a1ef4b63626f8e734" https://api.vsee.me/api_v3/me.json
{
"data": {
"id": "201",
"first_name": "An",
"last_name": "Nguyen",
"username": "member-201",
"dob": "1960-01-01",
"email": "an+user1@vsee.com",
"gender": 2,
"active": true,
"nationality": "Vietnamese",
"tos": false,
"photo": "https://api.vsee.me/api_v3/files/57e8c9a2-5c30-4b2c-b9d0-11d6ac1f0144?auth_code=8cd13ff90604b5820d2cfb16859054e9c1c074c4&time=1474873881&size=320x240",
}
}POST /me V3
Update current user profile
Parameters
Parameter | Type | Description |
|---|---|---|
|
| (optional) Should be sent alone if it’s first time setting password, or together with old_password to change it. |
|
|