Visit API

post /visits/add_econsult

Create an asynchronous e-consult visit

Base URL https://api.vseepreview.com/api_v3 · operationId createEconsult

Authentication: User Token — Requires a user access token from login or SSO.

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

Parameters

NameInTypeRequiredEnumDefaultDescription
X-ApiTokenheaderstringyesAPI token (e.g. your_api_token)
X-AccountCodeheaderstringyesAccount code (e.g. vclinic)

Request body

Content type: application/json

FieldTypeRequiredEnumDescription
intake_idstringyesThe ID of the intake
room_codestringyesRoom code (required)

Example:

{
  "intake_id": "6050d1a8-b120-45b4-a568-61a664457b11",
  "room_code": "vclinic_room_code"
}

Responses

200 — E-consult created successfully

E-consult created — Successfully created e-consult visit

{
  "data": {
    "incharge": false,
    "isEditExpired": false,
    "id": "14814100",
    "member_id": 14396847,
    "provider_id": 0,
    "account_code": "vclinic",
    "code": "6050d2e590d847429d312c8664457b11",
    "start": 1615909605,
    "end": 1615910505,
    "type": 3,
    "status": 20,
    "room_id": 10019500,
    "room_code": "vclinic_room_code",
    "member": {
      "id": "14396847",
      "code": "member_01",
      "first_name": "Ligeng",
      "last_name": "Member 01"
    },
    "intake": {
      "reason_for_visit": "This is to test the API",
      "question_1": "Answer 1",
      "question_2": "Answer 2",
      "id": "6050d1a8-b120-45b4-a568-61a664457b11"
    },
    "account": {
      "code": "vclinic",
      "name": "VClinic"
    }
  }
}

400 — Bad request - missing required parameters

{
  "error": "Unauthorized",
  "message": "Invalid or missing API token"
}

401 — Unauthorized

{
  "error": "Unauthorized",
  "message": "Invalid or missing API token"
}

Machine-readable: OpenAPI JSON (operationId: createEconsult)