eConsult (Asynchronous Visit)

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.
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/users/sso?fields=vsee' \
--header 'X-AccountCode: sandbox' \
--header 'X-ApiKey: 8acd6ac0a7193ad17f56ce694e94df2f' \
--header 'X-ApiSecret: 8ece42756425bb1ec31aee0f29d02a87' \
--header 'Content-Type: application/json' \
--data-raw '{
    "first_name": "VSee Edward",
    "last_name": "Patient Sandbox",
    "type": 200,
    "email": "edward+002.patient.sandbox@vseelab.com",
    "code": "edward+002.patient.sandbox@vseelab.com"
}'
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
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/intakes' \
--header 'X-AccountCode: sandbox' \
--header 'X-ApiToken: {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "type": 1,
    "room_code": "sandbox",
    "reason_for_visit": "followup"
}'
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.
The eConsult can be viewed by going to the Patient Dashboard. Ploease follow the steps in use case VSee Clinic's Patient Dashboard
curl --location 'https://api.vseepreview.com/vc/stable/api_v3/visits/add_econsult' \
--header 'X-AccountCode: sandbox' \
--header 'X-ApiToken: {{token}}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "room_code": "sandbox",
    "intake_id": "{{intake_id}}"
}'