Skip to main content
POST
/
pacientes
curl -X POST https://api.vidaplus.com/pacientes/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nome": "João Silva",
    "email": "[email protected]",
    "senha": "senha_secreta",
    "telefone": "11999999999",
    "cpf": "12345678901",
    "data_nascimento": "1990-01-01",
    "endereco": "Rua das Flores",
    "complemento": "Apto 101",
    "numero": 123,
    "bairro": "Centro",
    "cidade": "São Paulo",
    "estado": "SP",
    "cep": "01001000",
    "tipo": "PACIENTE",
    "is_active": true,
    "is_superuser": false
  }'
{
  "id": 1,
  "nome": "João Silva",
  "email": "[email protected]",
  "telefone": "11999999999",
  "cpf": "12345678901",
  "data_nascimento": "1990-01-01",
  "endereco": "Rua das Flores",
  "complemento": "Apto 101",
  "numero": 123,
  "bairro": "Centro",
  "cidade": "São Paulo",
  "estado": "SP",
  "cep": "01001000",
  "tipo": "PACIENTE",
  "is_active": true,
  "is_superuser": false
}

Authentication

This endpoint requires authentication with a Bearer token.
Authorization
string
required
Bearer token for authentication

Permissions

Only superuser administrators can create patient accounts. Regular users will receive a 403 Forbidden error.

Request Body

nome
string
required
Patient’s full nameExample: João Silva
email
string
required
Patient’s email address (must be unique)Example: [email protected]
senha
string
required
Patient’s password (will be hashed before storage)Example: senha_secreta
telefone
string
required
Patient’s phone numberExample: 11999999999
cpf
string
required
Patient’s CPF (Brazilian ID number, must be unique)Example: 12345678901
data_nascimento
string
required
Patient’s date of birth in ISO format (YYYY-MM-DD)Example: 1990-01-01
endereco
string
required
Street addressExample: Rua das Flores
numero
integer
required
Street numberExample: 123
complemento
string
Address complement (optional)Example: Apto 101
bairro
string
required
NeighborhoodExample: Centro
cidade
string
required
CityExample: São Paulo
estado
string
required
State (2-letter code)Example: SP
cep
string
required
Postal codeExample: 01001000
tipo
string
required
User type (should be “PACIENTE” for patients)Example: PACIENTE
is_active
boolean
required
Whether the patient account is activeDefault: true
is_superuser
boolean
required
Whether the patient has superuser privilegesDefault: false

Response

id
integer
Unique identifier for the patient
nome
string
Patient’s full name
email
string
Patient’s email address
telefone
string
Patient’s phone number
cpf
string
Patient’s CPF
data_nascimento
string
Patient’s date of birth
endereco
string
Street address
numero
integer
Street number
complemento
string
Address complement
bairro
string
Neighborhood
cidade
string
City
estado
string
State
cep
string
Postal code
tipo
string
User type
is_active
boolean
Account active status
is_superuser
boolean
Superuser status
curl -X POST https://api.vidaplus.com/pacientes/ \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "nome": "João Silva",
    "email": "[email protected]",
    "senha": "senha_secreta",
    "telefone": "11999999999",
    "cpf": "12345678901",
    "data_nascimento": "1990-01-01",
    "endereco": "Rua das Flores",
    "complemento": "Apto 101",
    "numero": 123,
    "bairro": "Centro",
    "cidade": "São Paulo",
    "estado": "SP",
    "cep": "01001000",
    "tipo": "PACIENTE",
    "is_active": true,
    "is_superuser": false
  }'
{
  "id": 1,
  "nome": "João Silva",
  "email": "[email protected]",
  "telefone": "11999999999",
  "cpf": "12345678901",
  "data_nascimento": "1990-01-01",
  "endereco": "Rua das Flores",
  "complemento": "Apto 101",
  "numero": 123,
  "bairro": "Centro",
  "cidade": "São Paulo",
  "estado": "SP",
  "cep": "01001000",
  "tipo": "PACIENTE",
  "is_active": true,
  "is_superuser": false
}

Error Codes

201
Created
Patient successfully created
403
Forbidden
User does not have administrator permissions
409
Conflict
Email or CPF already exists in the system

Build docs developers (and LLMs) love