curl --request POST \
--url https://api.example.com/api/historial \
--header 'Content-Type: application/json' \
--data '
{
"cita_id": 123,
"notas": "<string>"
}
'{
"historial": {
"historial.id": 123,
"historial.cita_id": 123,
"historial.notas": "<string>",
"historial.created_at": "<string>"
},
"400 Bad Request": {},
"401 Unauthorized": {},
"403 Forbidden": {},
"500 Internal Server Error": {}
}Register a new medical history entry for an appointment
curl --request POST \
--url https://api.example.com/api/historial \
--header 'Content-Type: application/json' \
--data '
{
"cita_id": 123,
"notas": "<string>"
}
'{
"historial": {
"historial.id": 123,
"historial.cita_id": 123,
"historial.notas": "<string>",
"historial.created_at": "<string>"
},
"400 Bad Request": {},
"401 Unauthorized": {},
"403 Forbidden": {},
"500 Internal Server Error": {}
}admin or asistente can access this endpoint.Authorization: Bearer <token>
{
"message": "cita_id es obligatorio"
}
{
"message": "Token requerido"
}
{
"message": "Acceso denegado"
}
{
"message": "Error al crear historial"
}
curl -X POST https://api.example.com/api/historial \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <token>" \
-d '{
"cita_id": 123,
"notas": "Paciente presenta mejoría después del tratamiento. Se recomienda seguimiento en 2 semanas."
}'
{
"historial": {
"id": 56,
"cita_id": 123,
"notas": "Paciente presenta mejoría después del tratamiento. Se recomienda seguimiento en 2 semanas.",
"created_at": "2026-03-05T16:30:00.000Z"
}
}
cita_id should reference an existing appointment in the systemnotas field is optional and can be null