Skip to content

Medivice/medivice-client-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 

Repository files navigation

Medivice Client API

Medivice Client API is for registered Medivice Clinics. If you would like to use the Medivice Client API, register your clinic at https://medivice.com.

The response of all requests is in JSON.

Authorization

The API requires authorization in order to retrieve an Access Token. These Access Tokens must be passed as a header value for every request.

POST /api/authorize

In order to retrieve your Access Token, you must make an authorization request with your client_id and client_secret. A registered Medivice Clinic will be given these credentials when verified.

METHOD: POST
URL: https://medivice.com/api/authorize

BODY:
{
    "client_id": your_client_id,
    "client_secret": your_client_secret
}

RESPONSE:
{
    "token": your_access_token
}

Request Headers

Every request requires the Access Token to be passed through the header.

HEADER: Authorization: your_access_token

GET /api/users

Retrieve a list of registered Medivice Users who are members of the Medivice Clinic.

METHOD: GET
URL: https://medivice.com/api/users
HEADERS: Authorization: your_access_token

RESPONSE:
{
    "count": 1,
    "users": [
        {
            "_id": "5a355ea3bacdbca5a6ca5",
            "first_name": "Jane",
            "last_name": "Smith",
            "email": "[email protected]",
            "languages": [
                "English"
            ],
            "location": "Toronto, ON"
        }
    ]
}

GET /api/users/{user_id}

Retreive a single Medivice User's profile who is a member of the Medivice Clinic.

METHOD: GET
URL: https://medivice.com/api/users/5a355ea3bacdbca5a6ca5
HEADERS: Authorization: your_access_token

RESPONSE:
{
    "_id": "5a355ea3bacdbca5a6ca5",
    "email": "[email protected]",
    "title_suffix": "M.D.",
    "title_prefix": "Dr.",
    "first_name": "Jane",
    "last_name": "Smith",
    "location": "Toronto, ON",
    "languages": [
        "English"
    ],
    "gender": "",
    "bio": "Jane Smith"
}

POST /api/chat

Create a Medivice video chat session. A patient name and email is required.

METHOD: POST
URL: https://medivice.com/api/chat
HEADERS: Authorization: your_access_token

BODY:
{
    "professional_id": "5a355ea3bacdbca5a6ca5",
    "patient_name": "John Doe",
    "patient_email": "[email protected]"
}

RESPONSE:
{
    "url": "https://medivice.com/video-session/5588b915be0c5b7f1090a7d6"
}

About

Medivice Client API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published