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
| Field | Type | Required | Details |
|---|---|---|---|
| patient | string | No | |
| firstName | string | Yes | |
| lastName | string | Yes | |
| dateOfBirth | string | Yes | |
| gender | object | No | |
| phone | string | Yes | |
string | No | format: email | |
| address | string | Yes | |
| address2 | string | No | |
| city | string | Yes | |
| state | string | Yes | |
| postalCode | string | Yes | |
| country | string | Yes |
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"}'