Skip to main content
Updates the health profile associated with a specific beneficiario.

Endpoint

PATCH /salud/beneficiario/:beneficiarioId

Authentication

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

Path Parameters

beneficiarioId
number
required
The unique identifier of the beneficiario whose health profile you want to update

Request Body

You can update any combination of the following fields. All fields are optional.
esAptoFisico
boolean
Physical fitness status
padecEnfermedad
boolean
Whether the beneficiario has a medical condition
nombreEnfermedad
string
Name of the medical condition (if padecEnfermedad is true)
consumeSustancias
boolean
Whether the beneficiario consumes substances
tipoSustancias
string
Type of substances consumed (if consumeSustancias is true)
afiliadoServicioSalud
string
Health service affiliation (e.g., “IMSS”, “ISSSTE”, “Seguro Popular”)
necesitaLentes
boolean
Whether the beneficiario requires glasses
observacionesMedicas
string
Additional medical observations or notes

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

Example Request

curl -X PATCH http://localhost:3000/salud/beneficiario/1 \
  -H "Authorization: Bearer YOUR_JWT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "esAptoFisico": false,
    "padecEnfermedad": true,
    "nombreEnfermedad": "Diabetes tipo 2",
    "observacionesMedicas": "Requiere seguimiento médico mensual"
  }'

Example Response

{
  "id": 1,
  "beneficiarioId": 1,
  "esAptoFisico": false,
  "padecEnfermedad": true,
  "nombreEnfermedad": "Diabetes tipo 2",
  "consumeSustancias": false,
  "tipoSustancias": null,
  "afiliadoServicioSalud": "IMSS",
  "necesitaLentes": false,
  "observacionesMedicas": "Requiere seguimiento médico mensual",
  "fechaActualizacion": "2026-03-05T14:45:00.000Z"
}

Error Responses

Not Found

{
  "statusCode": 404,
  "message": "Health profile not found for this beneficiario"
}

Validation Error

{
  "statusCode": 400,
  "message": [
    "esAptoFisico must be a boolean value"
  ],
  "error": "Bad Request"
}
This endpoint is useful when you know the beneficiario ID and want to update their health information directly without first retrieving the health profile ID.
To retrieve the health profile for a specific beneficiario, use the Get Salud by Beneficiario endpoint.

Build docs developers (and LLMs) love