curl -X POST "https://api.nevatal.com/api/v1/patients" \
-H "Authorization: Bearer nvtl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"firstName": "María",
"lastName": "García",
"phone": "+573001234567",
"email": "maria@example.com",
"documentType": "CC",
"documentNumber": "1234567890",
"dateOfBirth": "1990-05-15",
"gender": "female"
}'
{
"id": "pat_abc123",
"firstName": "María",
"lastName": "García",
"email": "maria@example.com",
"phone": "+573001234567",
"documentType": "CC",
"documentNumber": "1234567890",
"dateOfBirth": "1990-05-15",
"gender": "female",
"status": "active",
"createdAt": "2025-03-15T10:30:00Z"
}
{
"success": false,
"error": "Ya existe un paciente con ese número de teléfono en esta clínica.",
"code": "CONFLICT_ERROR",
"correlationId": "req-1a2b3c",
"details": { "field": "phone" }
}
Patients
Create Patient
Register a new patient in your clinic
POST
/
api
/
v1
/
patients
curl -X POST "https://api.nevatal.com/api/v1/patients" \
-H "Authorization: Bearer nvtl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"firstName": "María",
"lastName": "García",
"phone": "+573001234567",
"email": "maria@example.com",
"documentType": "CC",
"documentNumber": "1234567890",
"dateOfBirth": "1990-05-15",
"gender": "female"
}'
{
"id": "pat_abc123",
"firstName": "María",
"lastName": "García",
"email": "maria@example.com",
"phone": "+573001234567",
"documentType": "CC",
"documentNumber": "1234567890",
"dateOfBirth": "1990-05-15",
"gender": "female",
"status": "active",
"createdAt": "2025-03-15T10:30:00Z"
}
{
"success": false,
"error": "Ya existe un paciente con ese número de teléfono en esta clínica.",
"code": "CONFLICT_ERROR",
"correlationId": "req-1a2b3c",
"details": { "field": "phone" }
}
Body Parameters
string
required
Patient’s first name
string
required
Patient’s last name
string
Email address
string
required
Phone number with country code (e.g.,
+573001234567)string
required
Document type:
CC (Cédula), CE (Cédula de Extranjería), TI (Tarjeta de Identidad), PA (Pasaporte), RC (Registro Civil)string
required
Document number (unique within the clinic)
string
Date of birth in
YYYY-MM-DD formatstring
Patient gender:
male, female, otherobject
Duplicate patients
A409 with code CONFLICT_ERROR means another patient in the clinic already holds the same
identity. details.field names the colliding field, using the patient form-schema field name:
details.field | Meaning |
|---|---|
documentNumber | Same document type and number |
phone | Same phone (adults only; minors may share a guardian’s phone) |
error is the localized message, ready to display. The colliding value is never echoed back.
curl -X POST "https://api.nevatal.com/api/v1/patients" \
-H "Authorization: Bearer nvtl_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"firstName": "María",
"lastName": "García",
"phone": "+573001234567",
"email": "maria@example.com",
"documentType": "CC",
"documentNumber": "1234567890",
"dateOfBirth": "1990-05-15",
"gender": "female"
}'
{
"id": "pat_abc123",
"firstName": "María",
"lastName": "García",
"email": "maria@example.com",
"phone": "+573001234567",
"documentType": "CC",
"documentNumber": "1234567890",
"dateOfBirth": "1990-05-15",
"gender": "female",
"status": "active",
"createdAt": "2025-03-15T10:30:00Z"
}
{
"success": false,
"error": "Ya existe un paciente con ese número de teléfono en esta clínica.",
"code": "CONFLICT_ERROR",
"correlationId": "req-1a2b3c",
"details": { "field": "phone" }
}

