api-docs v5.116.0

API Docs

Table of contents


Account

Account - Delete

Back to top

Delete account, user that deletes an account must be the owner itself

DELETE /accounts/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
id string

uid of account

Examples

Example usage:

curl "https://yourdomain.com/accounts/<account-uid>" \
  -X DELETE \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
uid String

accout's (u)id

email String
mobileNo String
isDisabled boolean
isEmailVerified boolean
isServiceAccount boolean
isFirstLogin boolean
isPatient boolean

[virtual] - not saved in db. computed from medical-patients associated with this account

isDoctor boolean

[virtual] - not saved in db. computed from personal-details (has PRCLicense)

isDoctorVerified boolean

[virtual] - not saved in db. computed from personal-details

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "uid": "account-1-uid",
  "email": "email@domain.com",
  "isDisabled": false,
  "isEmailVerified": false,
  "isFirstLogin": false,
  "isPatient": false,
  "isDoctor": false,
  "isDoctorVerified": false
}

Account - Find

Back to top

Fetch the list of accounts registered in the database

GET /accounts

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Examples

Example usage:

curl "https://yourdomain.com/accounts" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
accounts object[]

array of account profiles

accounts.uid String

account's id

accounts.email String
accounts.isDisabled boolean
accounts.isEmailVerified boolean
accounts.isFirstLogin boolean
accounts.isPatient boolean
accounts.isDoctor boolean
accounts.isDoctorVerified boolean

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
[
  {
    "uid": "account-1-uid",
    "email": "email@domain.com",
    "isDisabled": false,
    "isEmailVerified": false,
    "isFirstLogin": false,
    "isPatient": false,
    "isDoctor": false,
    "isDoctorVerified": false
  },
  {
    "uid": "account-2-uid",
    "email": "email2@domain.com",
    "isDisabled": false,
    "isEmailVerified": false,
    "isFirstLogin": false,
    "isPatient": false,
    "isDoctor": false,
    "isDoctorVerified": false
  },
]

Account - Get

Back to top

Get a specific account

GET /accounts/:id

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
id string

uid of account

Examples

Example usage:

curl "https://yourdomain.com/accounts/<account-uid>" \
  -X GET \
  -H "Authorization: Bearer <your-api-token>"

Success response

Success response - Success 200

Name Type Description
uid String

accout's (u)id

email String
mobileNo String
isDisabled boolean
isEmailVerified boolean
isServiceAccount boolean
isFirstLogin boolean
isPatient boolean

[virtual] - not saved in db. computed from medical-patients associated with this account

isDoctor boolean

[virtual] - not saved in db. computed from personal-details (has PRCLicense)

isDoctorVerified boolean

[virtual] - not saved in db. computed from personal-details

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "uid": "account-1-uid",
  "email": "email@domain.com",
  "isDisabled": false,
  "isEmailVerified": false,
  "isFirstLogin": false,
  "isPatient": false,
  "isDoctor": false,
  "isDoctorVerified": false
}

Account - Post

Back to top

Create/Register an account

POST /accounts

Headers - Header

Name Type Description
Authorization string

key to place the API token to using the grant 'Bearer'

Header examples

Authorization-Example

{
  "Authorization": "Bearer <your-api-token>"
}

Parameters - Parameter

Name Type Description
email string

desired account's email. must be unique

password string

desired account's password

personalDetails object

account's personal details

personalDetails.email String
personalDetails.picURL String

url of the uploaded photo

personalDetails.name object
personalDetails.name.prefix String
personalDetails.name.firstName String
personalDetails.name.middleName String
personalDetails.name.lastName String
personalDetails.name.suffix String
personalDetails.maidenName object
personalDetails.maidenName.prefix String
personalDetails.maidenName.firstName String
personalDetails.maidenName.middleName String
personalDetails.maidenName.lastName String
personalDetails.maidenName.suffix String
personalDetails.address object
personalDetails.address.street1 String
personalDetails.address.street2 String
personalDetails.address.city String
personalDetails.address.province String
personalDetails.address.country String
personalDetails.dateOfBirth Number

timestamp of the date of birth

personalDetails.sex String

male

female</p>
personalDetails.maritalStatus String

single

married widow widower</p>
personalDetails.nationality String
personalDetails.religion String
personalDetails.bloodType String
personalDetails.height Number
personalDetails.weight Number
personalDetails.deceased Number

timestamp of the date of death

personalDetails.mobileNo String
personalDetails.homeNo String
personalDetails.workNo String
personalDetails.emergencyNo String
personalDetails.emergencyContactName String
personalDetails.emergencyContactRelationship String
personalDetails.emergencyContactMobileNo String
personalDetails.company String
personalDetails.companyPosition String
personalDetails.companyAddress String
personalDetails.fathersName String
personalDetails.fathersMobileNo String
personalDetails.fathersReligion String
personalDetails.fathersNationality String
personalDetails.mothersName String
personalDetails.mothersMobileNo String
personalDetails.mothersReligion String
personalDetails.educations object[]
personalDetails.educations.degree String
personalDetails.educations.school String
personalDetails.educations.from Number

year

personalDetails.educations.to Number

year

personalDetails.doc_verified Boolean
personalDetails.doc_practicingSince number

unix timestamp

personalDetails.doc_PRCLicenseNo string
personalDetails.doc_PRCLicenseExp string
personalDetails.doc_PTRNumber string
personalDetails.doc_S2Number string
personalDetails.doc_professions string[]
personalDetails.doc_specialties string[]

Examples

Example usage:

curl "https://yourdomain.com/accounts" \
  -X POST \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer <your-api-token>" \
  -d '{
    "email": "email@domain.com",
    "password": "strong password",
    "personalDetails": {
      "name": {
        "firstName": "Jane",
        "lastName": "Doe"
      },
      "sex": "female"
    }
  }'

Parameters examples

json - Request-Example

{
  "email": "email@domain.com",
  "password": "strong password",
  "personalDetails": {
    "name": {
      "firstName": "Jane",
      "lastName": "Doe"
    },
    "sex": "female"
  }
}

Success response

Success response - Success 200

Name Type Description
uid String

accout's (u)id

email String
mobileNo String
isDisabled boolean
isEmailVerified boolean
isServiceAccount boolean
isFirstLogin boolean
isPatient boolean

[virtual] - not saved in db. computed from medical-patients associated with this account

isDoctor boolean

[virtual] - not saved in db. computed from personal-details (has PRCLicense)

isDoctorVerified boolean

[virtual] - not saved in db. computed from personal-details

Success response example

Success response example - Success-Response:

HTTP/1.1 200 OK
{
  "uid": "account-1-uid",
  "email": "email@domain.com",
  "isDisabled": false,
  "isEmailVerified": false,
  "isFirstLogin": false,
  "isPatient": false,
  "isDoctor": false,
  "isDoctorVerified": false
}

results matching ""

    No results matching ""