Skip to main content
Updates one or more fields of an existing health profile.

Endpoint

PATCH /salud/:id

Authentication

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

Path Parameters

id
number
required
The unique identifier of the health profile to update

Request Body

All fields are optional. Only include fields you want to update.
esAptoFisico
boolean
Whether the beneficiario is physically fit
padecEnfermedad
boolean
Whether the beneficiario has a medical condition
nombreEnfermedad
string
Name of the medical condition
consumeSustancias
boolean
Whether the beneficiario consumes substances
tipoSustancias
string
Type of substances consumed
afiliadoServicioSalud
string
Health service affiliation
necesitaLentes
boolean
Whether the beneficiario needs glasses
observacionesMedicas
string
Additional medical observations

Response

Returns the updated health profile object.
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 (automatically updated)

Example Request

curl -X PATCH http://localhost:3000/salud/1 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "padecEnfermedad": true,
    "nombreEnfermedad": "Hipertensión",
    "observacionesMedicas": "Requiere monitoreo de presión arterial"
  }'

Example Response

{
  "id": 1,
  "beneficiarioId": 1,
  "esAptoFisico": true,
  "padecEnfermedad": true,
  "nombreEnfermedad": "Hipertensión",
  "consumeSustancias": false,
  "tipoSustancias": null,
  "afiliadoServicioSalud": "IMSS",
  "necesitaLentes": false,
  "observacionesMedicas": "Requiere monitoreo de presión arterial",
  "fechaActualizacion": "2026-03-05T15:45:00.000Z"
}

Error Responses

Not Found

{
  "statusCode": 404,
  "message": "Health profile not found"
}
The fechaActualizacion field is automatically updated whenever the health profile is modified.

Build docs developers (and LLMs) love