Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
curl -k -X POST \
  -H "X-ApiToken: 5a2eb231d652b49f4d7fc0fbb78328fb" \
  -H "X-AccountCode: vclinic" \
  -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" \
  -F "provider_id=826" \
  -F "intake_id=57a0705e-1c4c-4f24-b51d-3c71ac1f0144" \
  -F "room_code=ceproom1" \
  "https://api.vseepreview.com/vc/next/api_v3/visits/add_walkin"

{
  "data": {
        "id": "1525",
        "member_id": "508",
        "provider_id": "509",
        "account_code": null,
        "code": "56e8c580f55c44a2868b66f0ac1f0144",
        "start": "1458095488",
        "end": "1458096388",
        "actual_start": null,
        "actual_end": null,
        "specialty_id": null,
        "state": null,
        "type": "1",
        "status": "10",
        "completed_by": null,
        "created": 1458095488,
        "modified": 1458095488,
        "room_id": null,
        "_id": "1525",
        "payment": {
              "duration": 15,
              "amount": "00.00",
              "description": "FruitStreet Config Level One-time charge"
        },
        "intake": {
              "provider": "509",
              "reason_for_visit": "Test intake functionalities 1",
              "type": "1",
            "modified": 1458095488,
              "created": 1458095414,
              "visit_id": "1525",
              "id": "56e8c536-566c-44b6-bbca-66f0ac1f0144"
        },
        "provider": {
              "id": "509",
               "first_name": "Ligeng",
              "last_name": "Doctor",
              "vseeid": "wellikodev+user509",
              "title": ""
        },
        "member": {
              "id": "508",
              "first_name": "Ligeng",
              "last_name": "01",
              "vseeid": "wellikodev+user508",
              "dob": "2014-09-10",
              "gender": 1,
              "phone": "6506506500"
        },
  }
}

Asynchronous Visits

POST /visits/

...

add_econsult

Create an asynchronous e-consult visit. The econsult will be created without scheduling, the providers will see it on their dashboards and will need to accept it.

Parameters

...

Parameter

Type

Description

intake_id

String

The ID of the

visit/appointment

reason

String

...

"patient_end_call" - Patient click End Call button on VSee

...

"patient_exit_room" - Patient click Exit Waiting Room

...

"call_ended" - When call ended not by patient, could be due to network problem or provider ended the call

...

"patient_cancel_appointment" - Patient click cancel appointment button

intake

room_code

String

Room code (required)

Response

Code Block
curl -k-location -X-request POST -H "'https://api.vseepreview.com/vc/next/api_v3/visits/add_econsult' \
--header 'X-ApiToken: 5a2eb231d652b49f4d7fc0fbb78328fb"' \
--Hheader "'X-AccountCode: vclinic" -H "' \
--header 'X-ApiKey: 44c4d9bec884a8ca356177bebd59551d' \
--header 'Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "id=14" "https://api.vseepreview.com/vc/next/api_v3/visits/close"

{application/json' \
--data-raw '{
   "intake_id": "6050d1a8-b120-45b4-a568-61a664457b11",
   "room_code": "vclinic_room_code"
}'


{
   "data": {
        "idincharge": "1525"false,
    } }

Asynchronous Visits

POST /visits/add_econsult

Create an asynchronous e-consult visit. The econsult will be created without scheduling, the providers will see it on their dashboards and will need to accept it.

Parameters

...

Parameter

...

Type

...

Description

...

intake_id

...

String

...

The ID of the intake

...

room_code

...

String

...

Room code (required)

Response

Code Block
curl --location --request POST 'https://api.vseepreview.com/vc/next/api_v3/visits/add_econsult' \
--header 'X-ApiToken: 5a2eb231d652b49f4d7fc0fbb78328fb' \
--header 'X-AccountCode: vclinic' \
--header 'X-ApiKey: 44c4d9bec884a8ca356177bebd59551d' \
--header 'Content-Type: application/json' \
--data-raw '{
   "intake_id": "6050d1a8-b120-45b4-a568-61a664457b11",
   "room_code": "vclinic_room_code"
}'


{
   "data": {
       "incharge": false,
       "isEditExpired": false,
       "id": "14814100",
       "member_id": 14396847,
       "provider_id": 0,
       "account_code": "vclinic",
       "code": "6050d2e590d847429d312c8664457b11",
       "start": 1615909605,
       "end": 1615910505,
       "actual_start": null,
       "actual_end": null,
       "specialty_id": null,
       "state": "--",
       "type": 3,
       "status": 20,
       "completed_by": null,
       "room_id": 10019500,
       "room_code": "vclinic_room_code",
       "member": {
           "id": "14396847",
           "code": "member_01",
           "type": "200",
           "subtype": "",
           "first_name": "Ligeng",
           "last_name": "Member 01",
           "full_name": "Ligeng Member 01",
           "active": true,
           "vseeid": "cmo+604ef759ccd04d859847431864457b13"
       },
       "pending_actions": [],
       "invoice": {
           "user_id": 14396847,
           "status": 10,
           "currency": "USD",
           "livemode": false,
           "amount_due": 0,
           "visit_id": "14814100",
           "modified": 1615909605,
           "created": 1615909605,
           "id": "6050d2e5-f680-4695-b284-2c8664457b11"
       },
       "creator": {
           "id": "14396847",
           "code": "member_01",
           "vseeid": "cmo+604ef759ccd04d859847431864457b13",
           "type": 200,
           "subtype": "",
           "first_name": "Ligeng",
           "last_name": "Member 01",
           "account_code": "vclinic"
       },
       "invoice_id": "6050d2e5-f680-4695-b284-2c8664457b11",
       "intake_id": "6050d1a8-b120-45b4-a568-61a664457b11",
       "postvisit": {
           "member_id": "14396847",
           "class_id": null,
           "visit_id": "14814100",
           "modified": 1615909605,
           "created": 1615909605
       },
       "account": {
           "domain": null,
           "code": "vclinic",
           "name": "VClinic"
       },
       "room": {
           "id": "10019500",
           "code": "vclinic_room_code",
           "name": "VClinic UAT Room"
       },
       "intake": {
           "reason_for_visit": "This is to test the API",
           "question_1": "Answer 1",
           "question_2": "Answer 2",
           "location": "--",
           "modified": 1615909288,
           "created": 1615909288,
           "visit_id": "14814100",
           "invoice_id": "6050d2e5-f680-4695-b284-2c8664457b11",
           "id": "6050d1a8-b120-45b4-a568-61a664457b11"
       },
       "subtype": 4,
       "expiry": 1615924905
   }
}

...

Code Block
curl -X POST \
  -H "X-ApiToken: 5a2eb231d652b49f4d7fc0fbb78328fb" \
  -H "X-AccountCode: vclinic" \
  -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" \
  -F "member_id=575" \
  -F "slot_start=1470669300" \
  -F "slot_end=1470670200" \
  -F "type=2" \
  -F "intakeId=57a0705e-1c4c-4f24-b51d-3c71ac1f0144" \
  "https://api.vseepreview.com/vc/next/api_v3/appointments"


{
    "data": {
        "member_id": 17778181,
        "provider_id": 12456470,
        "account_code": "vclinic",
        "code": "615f2e2eabc46ad94e9b6457b11",
        "start": 1631628616,
        "end": 1631628916,
        "actual_start": 1631628211,
        "actual_end": null,
        "specialty_id": null,
        "state": null,
        "type": 2,
        "status": 30,
        "completed_by": null,
        "room_id": 1002387,
        "room_code": "vclinicroom",
        "modified": 1633630312,
        "created": 1633627694,
        "provider": {
            "id": "12456470",
            "email": "anton+providersa@vseelab.com",
            "subtype": "482",
            "vseeid": "anton+providersa@vseelab.com",
            "photo": null,
            "full_name": "Anton Provider",
            "title": "",
            "suffix": ""
        },
        "member": {
            "id": "17778181",
            "code": "anton+vclinic2@vseelab.com",
            "email": "anton+vclinic2@vseelab.com",
            "vseeid": "cmo+615f28cd70804d8994d62bd564457b11",
            "photo": null,
            "full_name": "Anton Test",
            "phone": "5551231122"
        },
        "subType": 3,
        "more_provider_ids": null,
        "guest_emails": null,
        "guest_mobiles": null,
        "reminder_type": null,
        "reminder_time": null,
        "host_ids": [
            "12456470"
        ],
        "hosts": [
            {
                "username": "anton+providersa@vseelab.com",
                "email": "anton+providersa@vseelab.com",
                "phone": "",
                "timezone": "America/Los_Angeles",
                "vseeid": "anton+providersa@vseelab.com",
                "full_name": "Anton Provider",
                "title": "",
                "suffix": "",
                "id": "12456470",
                "photo_attachment_id": "",
                "role": "owner"
            }
        ],
        "creator": {
            "id": "15729940",
            "code": "60aed4242c90409099385cef64457b11",
            "vseeid": "d55d2f77ff3653891a587fdfa83207b4@vsee.com",
            "type": 160,
            "subtype": "",
            "first_name": null,
            "last_name": null,
            "account_code": "vclinic"
        },
        "pending_actions": [],
        "is_test": false,
        "meeting": {
            "recording_auto_start": false,
            "phone_numbers": {
                "US": [
                    "+1.650.758.0255"
                ]
            },
            "hosts": [
                "anton+providersa@vseelab.com",
                "chau+provider@vseelab.com"
            ],
            "expiry": 1633643316,
            "conference_pin": 838759,
            "meeting_id": "1633627695040_2cc263f4-3d07-49fa-97b1-b2955ff40dfa__jitsi"
        },
        "one_time_link_token": "l0vht6wkxj",
        "notify_list": [],
        "payment": {
            "duration": null,
            "amount": "25.00",
            "description": "Cloud Clinic Default One-time Charge Message",
            "id": "615cec5b-14c8-4493-b9ce-365764457b11"
        },
        "intake_id": "615f2de7-8ab8-48d3-80d8-53f564457b11",
        "related_walkin_id": "18407370",
        "call_logs": {
            "total_start": 1633628208,
            "total_end": 1633628268,
            "total_duration": 60,
            "waiting_time": 0,
            "provider_id_1": "anton+providersa@vseelab.com",
            "call_start_1": 1633628208,
            "call_duration_1": 60,
            "wait_time_1": 0,
            "patients": [
                "cmo+615f28cd70804d8994d62bd564457b11"
            ],
            "source": "v2",
            "source_ids": [
                "1633628104000_1633627695040_2cc263f4-3d07-49fa-97b1-b2955ff40dfa__jitsi",
                "1633628745000_1633627695040_2cc263f4-3d07-49fa-97b1-b2955ff40dfa__jitsi"
            ]
        },
        "incharge": false,
        "intake": {
            "provider_id": "12456470",
            "member_id": "17778181",
            "room_code": "vclinicroom",
            "location": "MI",
            "phone": "5551234415",
            "type": "2",
            "room": "vclinicroom",
            "modified": 1633627623,
            "created": 1633627623,
            "visit_id": "18407167",
            "attachments": "",
            "reason_for_visit": "",
            "consent": "true",
            "consultation": {
                "description": "test",
                "duration": 60,
                "charge": false,
                "group": false,
                "slots": 1,
                "amount": 0,
                "visible_to_patient": true,
                "id": "615cec5b-14c8-4493-b9ce-365764457b11",
                "currency": "USD"
            },
            "id": "615f2de7-8ab8-48d3-80d8-53f564457b11"
        },
        "related_walkin": {
            "start": 1633628101,
            "end": 1633631701,
            "status": 30,
            "id": "18407370"
        },
        "postvisit": {
            "member_id": "17778181",
            "class_id": null,
            "visit_id": "18407167",
            "modified": 1633627695,
            "created": 1633627695,
            "id": "615f2e2f-c240-4088-a28b-594b64457b11"
        },
        "isEditExpired": false,
        "room": {
            "id": "10023087",
            "code": "vclinicroom",
            "name": "VClinic UAT",
            "domain": "vclinic.vseepreview.com",
            "account_code": "vclinic",
            "slug": "UAT"
        },
        "account": {
            "code": "vclinic",
            "name": "VClinic",
            "domain": "vclinic.vseepreview.com",
            "vsee_api": {
                "meeting": {
                    "enabled": true,
                    "guest_invite_enabled": true,_enabled": true,
                    "adhoc_group_call": {
                        "disabled": true
                    }
                }
            }
        },
        "adhocroot_group_callvisit": {
            "id": "18407167",
            "disabledgroup_chat_id": truenull,
            "participants": null
      }  },
        "id": "18407167",
    }    "subtype": 3
       },
    "s":    },
        "root_visit": {
            "id": "18407167",
            "group_chat_id": null,
            "participants": null
        },"ms"
}

POST /visits/close

Close/Cancel a visit or an appointment

Parameters

Parameter

Type

Description

id

String

The ID of the visit/appointment

reason

String

  • "patient_end_call" - Patient click End Call button on VSee

  • "patient_exit_room" - Patient click Exit Waiting Room

  • "call_ended" - When call ended not by patient, could be due to network problem or provider ended the call

  • "patient_cancel_appointment" - Patient click cancel appointment button

  • "max_waiting_time_reached" - Patient side max waiting time reached

Response

Code Block
curl -k -X POST -H "X-ApiToken: 5a2eb231d652b49f4d7fc0fbb78328fb" -H "X-AccountCode: vclinic" -H "Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW" -F "id=14" "https://api.vseepreview.com/vc/next/api_v3/visits/close"

{
  "data": {
        "id": "184071671525",
  }
}

POST /visits/delete

Force cancel a visit. You can admin token to cancel any existing visits.

Parameters

Parameter

Type

Description

id

String

The ID of the visit/appointment

Response

Code Block
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/visits/delete' \
 "subtype"--header 'X-ApiToken: 3614c588d4b03c60d9c6e480d14978164' \
--header 'X-AccountCode: vclinic' },\
    "s": "ms"
}--form 'id="5010007042332"'

GET /visits

Get the visits list of the patient. The frontend can check the data["start"] field. If the start field is greater than the current timestamp then the visit is a upcoming appointment, otherwise it’s a past session. Group appointments and one-to-one appointments are now differentiated by the field visit_group_id which only exists in group appointments data.

...