Skip to main content
Creates a new health profile record for a beneficiario.

Endpoint

POST /salud

Authentication

This endpoint requires a valid JWT token.
Authorization: Bearer YOUR_JWT_TOKEN

Request Body

beneficiarioId
number
required
ID of the beneficiario this health profile belongs to (must be unique)
esAptoFisico
boolean
Whether the beneficiario is physically fit (default: true)
padecEnfermedad
boolean
Whether the beneficiario has a medical condition (default: false)
nombreEnfermedad
string
Name of the medical condition (if applicable)
consumeSustancias
boolean
Whether the beneficiario consumes substances (default: false)
tipoSustancias
string
Type of substances consumed (if applicable)
afiliadoServicioSalud
string
Health service affiliation (e.g., IMSS, ISSSTE)
necesitaLentes
boolean
Whether the beneficiario needs glasses (default: false)
observacionesMedicas
string
Additional medical observations or notes

Response

id
number
Unique identifier for the health profile
beneficiarioId
number
ID of the associated beneficiario
esAptoFisico
boolean
Physical fitness status
padecEnfermedad
boolean
Medical condition status
nombreEnfermedad
string
Name of medical condition
consumeSustancias
boolean
Substance consumption status
tipoSustancias
string
Type of substances
afiliadoServicioSalud
string
Health service affiliation
necesitaLentes
boolean
Glasses requirement
observacionesMedicas
string
Medical observations
fechaActualizacion
string
Last update timestamp

Example Request

curl -X POST http://localhost:3000/salud \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "beneficiarioId": 1,
    "esAptoFisico": true,
    "padecEnfermedad": false,
    "consumeSustancias": false,
    "afiliadoServicioSalud": "IMSS",
    "necesitaLentes": false
  }'

Example Response

{
  "id": 1,
  "beneficiarioId": 1,
  "esAptoFisico": true,
  "padecEnfermedad": false,
  "nombreEnfermedad": null,
  "consumeSustancias": false,
  "tipoSustancias": null,
  "afiliadoServicioSalud": "IMSS",
  "necesitaLentes": false,
  "observacionesMedicas": null,
  "fechaActualizacion": "2026-03-05T10:30:00.000Z"
}
Each beneficiario can only have one health profile. The beneficiarioId must be unique.
Make sure the beneficiario exists before creating a health profile for them.

Build docs developers (and LLMs) love