API Reference

Manage Patients Profiles

This guide explains how to use the Care Portals Patient API to retrieve and manage a patient's profile information. You will learn how to do the following:

  • Retrieve Profile Data
  • Create a Patient
  • Update a Patient's profile

The following sections provide a detailed walkthrough of each action.

Pre-requisites

Before you begin, ensure you have the following:

  • Patient JSON Web Token (JWT): An authenticated patient is required to access subscription information. All requests in this guide must include the patient's JWT in the Authorization header.

Retrieve Profile Data

To retrieve the complete account details for an authenticated patient, you can use the Retrieve Patient Account Data endpoint. This GET request provides a comprehensive view of the patient's profile, including their personal details, address, medications, consultations, and upcoming appointments.

📘

Patient Token

You must include the patient's JWT in the Authorization header to successfully authenticate the request, and get the data of the account associated to the token. See the Authentication Guide for more details.

curl -X GET 'https://patient-api.portals.care/users/account' \
-H 'Authorization: Bearer <patient_token>' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://demo.portals.care'
{
  "profile": {
    "dob": "1992-11-11",
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "+11231231231",
    "gender": "male"
  },
  "address": {
    "default": {
      "province": "AB",
      "provinceCode": "AB",
      "address1": "",
      "address2": "",
      "city": "",
      "countryCode": "CA",
      "postalCode": ""
    },
    "other": []
  },
  "prescriptions": [],
  "consultations": [
    {
      "_id": "6883854c896c9d812d759ea1",
      "type": "wlusmonthly",
      "status": "new",
      "dateCreated": "2025-07-25T13:23:24.766Z"
    }
  ],
  "appointments": [],
  "availableCredit": 0
}

The API returns a JSON object containing all the requested account data.

Create a Patient

The Create a Patient endpoint allows you to register a new patient account in the system. This endpoint is crucial for onboarding new users and collecting their initial profile information. To register a patient, you must send a POST request with all the required user data in the request body.

curl -X POST 'https://patient-api.portals.care/users' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/plain, */*' \
-H 'Origin: https://demo.portals.care' \
--data-raw '{
  "firstName": "John",
  "lastName": "Doe",
  "phone": "1234567890",
  "email": "[email protected]",
  "password": "SecurePass@123",
  "dob": "1990-05-15",
  "gender": "male",
  "acceptMarketing": true,
  "provinceCode": "ON",
  "referrer": ""
}'
{
  "organization": "clinic_demo",
  "uname": "[email protected]#clinic_demo",
  "email": "[email protected]",
  "phone": "+11234567890",
  "firstName": "John",
  "lastName": "Doe",
  "hash": "",
  "salt": "",
  "gender": "male",
  "dob": "1990-05-15",
  "addresses": [],
  "defaultAddress": {
    "province": "ON",
    "provinceCode": "ON",
    "address1": "",
    "address2": "",
    "city": "",
    "countryCode": "CA",
    "postalCode": ""
  },
  "referrer": "",
  "identifiers": [],
  "notificationsCount": 0,
  "watchlist": [],
  "usedCoupons": [],
  "source": "signup",
  "assignedQuestionnaires": [],
  "providers": [],
  "groups": [],
  "isInsuranceAvailable": false,
  "acceptMarketing": true,
  "_id": "68b8b73f56e0f97f736903df",
  "createdAt": "2025-01-15T10:30:00.000Z",
  "updatedAt": "2025-01-15T10:30:00.000Z",
  "__v": 0
}

Upon successful registration, the API will create a new patient profile and respond with the complete patient object. The response body includes the patient's unique identifier (_id), the assigned organization, and all the profile data provided during registration, as well as default values for other fields.

Update a Patient's profile

To update a patient's core profile information, such as their name, date of birth, or phone number, use the Update Patient Profile endpoint. This PUT request allows you to modify the patient's record by sending the updated data in the request body.

📘

Patient Token

You must include the patient's JWT in the Authorization header to successfully authenticate the request, and update the profile associated to the token. See the Authentication Guide for more details.

curl -X PUT 'https://patient-api.portals.care/users/profile' \
-H 'Authorization: Bearer <patient_token>' \
--header 'Content-Type: application/json' \
--data-raw '{ 
  "firstName": "John", 
  "lastName": "Doe", 
  "dob": "1990-05-15", 
  "phone": "1234567890" 
}'
{
  "profile": {
    "dob": "1990-05-15",
    "firstName": "John",
    "lastName": "Doe",
    "email": "[email protected]",
    "phone": "+11234567890",
    "gender": "male"
  },
  "address": {
    "default": {
      "province": "ON",
      "provinceCode": "ON",
      "address1": "123 Main St",
      "address2": "Apt 4B",
      "city": "Toronto",
      "countryCode": "CA",
      "postalCode": "M5V 2T6"
    },
    "other": []
  },
  "prescriptions": [],
  "consultations": [],
  "appointments": [],
  "availableCredit": 0
}

Upon a successful update, the API returns the updated profile details.

Manage Addresses

To retrieve a list of all addresses associated with an authenticated patient, use the Retrieve Addresses endpoint. This GET request is essential for displaying a patient's saved addresses for purposes like shipping or billing.

📘

Patient Token

You must include the patient's JWT in the Authorization header to successfully authenticate the request, and retrieve the addresses associated to the token. See the Authentication Guide for more details.

curl -X GET 'https://patient-api.portals.care/users/adresses' \
-H 'Authorization: Bearer <patient_token>' \
--header 'Content-Type: application/json' \
[
  {
    "company": null,
    "address1": "123 Main St",
    "address2": "Apt 4B",
    "city": "Toronto",
    "provinceCode": "ON",
    "countryCode": "CA",
    "postalCode": "M5V 2T6"
  },
  {
    "company": null,
    "address1": "456 Side Ave",
    "address2": null,
    "city": "Ottawa",
    "provinceCode": "ON",
    "countryCode": "CA",
    "postalCode": "K1A 0B1"
  }
]
📘

Update Addresses

To update the addresses send a PUT request to the same endpoint with the updated address in the request body.