The BOLDO Telemedicine API allows you to access all queries related to manipulating the patients and doctors collections like patients,doctors,appointments and to broadcast information about call-readiness.
All of there endpoints are available at {server}/api
Requests containing JSON in the request body are required to have a 'Content-Type: application/json'
header.
For simplicity, expect the following error codes:
- 200 (OK)
- 400 (Client Error). There should be a
{messsage: string}
that includes a description of what went wrong. - 500 (Server Error). Something happened, that we did not think about it would be possibly. You broke the server 🤨 Let us know!
HTTP requrest to the REST API are protected with jwt based authentication.
Expect the following error codes when facing authentication troubles:
- 401 (Not Authenticated). The accessToken is not present or expired.
To invoke a session, Login and Registration is generally handled by Keycloak server.
Accepts a Keycloak authorization code.
Parameters:
- code: string
- type: Role
Return Value: 200 (OK)
This endpoint sets access_token and refresh_token cookies
First time the user is logging in, we will create a user profile with firstName, lastName, nationalID and email
🔒 Requires auth Returns a list of doctors
Parameters: none
🔒 Requires auth Returns a list of patients
Parameters: none
class Doctor {
id : number // primary key; autoincrement
nId: string // unique index; the national ID (cedula)
firstName: string
lastName: string
gender: string
dob: string // OR Date
email: string
phone: string
imageUrl: string
state: number // 0: has to create account, 1: has created account
...
}
class Patient {
id : number // primary key; autoincrement
nId: string // unique index; the national ID (cedula)
firstName: string
lastName: string
gender: string
job: string
dob: string // OR Date
email: string
phone: string
imageUrl: string
streetAddress: string
locality: string // neighbourhood
city: string
state: number // 0: has to create account, 1: has created account
...
}
class Devices {
id: number
userId: number // foreign key
type: 'Patient' | 'Doctor'
expires: Date
accessToken: string
refreshToken: string
}
class Permissions {
doctorId: number // foreign key
patientId: number // foreign key
}
AccessToken {
userId: number
type: 'Patient' | 'Doctor'
deviceId: number
}
Role = 'Patient' | 'Doctor'