Clinician
Patient
Upsert Patient

Create Or Update Patient For A Customer

Create or update a patient profile for a customer. The API allows storing personal details, contact information, and address for a patient. If a patient profile already exists for the customer, it will be updated with the new information.

Overview

  • Method: POST
  • Path: /clinician/patient/upsert-patient
  • Tags: clinician

Use Cases

  • Register a new patient under a customer account.
  • Update existing patient information to ensure accurate records.
  • Maintain structured patient data for medical or service-related purposes.

Parameters

No parameters required.

Request Body

  • Content Type: application/json
  • Required: Yes

Fields

FieldTypeRequiredDetails
patientstringNo
firstNamestringYes
lastNamestringYes
dateOfBirthstringYes
genderobjectNo
phonestringYes
emailstringNoformat: email
addressstringYes
address2stringNo
citystringYes
statestringYes
postalCodestringYes
countrystringYes

Responses

200

Successful response

Content Type: application/json

{
  "customer": "string",
  "email": "string",
  "first_name": "string",
  "last_name": "string",
  "billing_address_id": "string",
  "phone": "string",
  "has_account": true,
  "created_at": "2024-01-01T00:00:00.000Z",
  "updated_at": "2024-01-01T00:00:00.000Z",
  "deleted_at": "2024-01-01T00:00:00.000Z",
  "metadata": {
    "key": {}
  },
  "patient": "string",
  "firstName": "string",
  "lastName": "string",
  "dateOfBirth": "string",
  "gender": "string",
  "address": "string",
  "address2": "string",
  "city": "string",
  "state": "string",
  "postalCode": "string",
  "country": "string"
}

400

Bad Request

Content Type: application/json

{
  "error": "string",
  "details": [
    {}
  ]
}

401

Unauthorized

404

Not Found

500

Internal Server Error

Example Usage

curl -X POST \
  https://api.pillexa.com/clinician/patient/upsert-patient \
  -H "Content-Type: application/json" \
  -d '{"example": "data"}'