Consultar un paciente por identificador
GET
/patients/{patientId}Retorna el paciente solamente cuando pertenece a la organizacion y empresa derivadas del service principal. Un identificador inexistente o de otro tenant produce la misma respuesta segura de recurso no encontrado.
curl --request GET \
--url '${BASE_URL}/patients/20000000-0000-4000-8000-000000000001' \
--header 'Authorization: Bearer ${ACCESS_TOKEN}' \
--header 'X-Correlation-Id: 10000000-0000-4000-8000-000000000003'Request
Headers y parametros
| Nombre | Ubicacion | Requerido | Descripcion |
|---|---|---|---|
patientId | path | Si | Identificador opaco del paciente dentro del tenant autenticado. |
X-Correlation-Id | header | No | UUID generado por el consumidor para trazabilidad; el servidor genera uno si se omite. |
Responses
200Paciente visible dentro del tenant autenticado.
Content-Type: application/json
| Campo | Tipo | Requerido | Descripcion |
|---|---|---|---|
documentNumber | string | Si | Se retorna solo a clientes expresamente autorizados por scope. |
documentType | string | Si | - |
email | string (email) | No | - |
fullName | string | Si | - |
id | string (uuid) | Si | - |
phone | string | Si | - |
status | string | Si | ACTIVE, INACTIVE, DECEASED |
updatedAt | string (date-time) | Si | - |
version | integer | Si | - |
Ejemplo
{
"documentNumber": "900000001",
"documentType": "CC",
"email": "paciente@example.invalid",
"fullName": "Paciente Ejemplo",
"id": "20000000-0000-4000-8000-000000000001",
"phone": "3000000000",
"status": "ACTIVE",
"updatedAt": "2026-07-27T15:00:00.000Z",
"version": 1
}401Token ausente, invalido, vencido o con audience incorrecta.
Content-Type: application/problem+json
| Campo | Tipo | Requerido | Descripcion |
|---|---|---|---|
code | string | Si | - |
correlationId | string (uuid) | Si | - |
detail | string | No | Explicacion segura sin PII ni secretos. |
errors | object[] | No | - |
instance | string (uri-reference) | No | - |
status | integer | Si | - |
title | string | Si | - |
type | string (uri) | Si | URI estable que identifica la clase de problema. |
Ejemplo
{
"code": "INVALID_ACCESS_TOKEN",
"correlationId": "10000000-0000-4000-8000-000000000001",
"status": 401,
"title": "Autenticacion requerida",
"type": "https://magnosoft.com.co/problems/unauthorized"
}403Service principal autenticado sin el scope requerido.
Content-Type: application/problem+json
| Campo | Tipo | Requerido | Descripcion |
|---|---|---|---|
code | string | Si | - |
correlationId | string (uuid) | Si | - |
detail | string | No | Explicacion segura sin PII ni secretos. |
errors | object[] | No | - |
instance | string (uri-reference) | No | - |
status | integer | Si | - |
title | string | Si | - |
type | string (uri) | Si | URI estable que identifica la clase de problema. |
Ejemplo
{
"code": "INSUFFICIENT_SCOPE",
"correlationId": "10000000-0000-4000-8000-000000000001",
"status": 403,
"title": "Permiso insuficiente",
"type": "https://magnosoft.com.co/problems/forbidden"
}404Recurso inexistente o no visible dentro del tenant autenticado.
Content-Type: application/problem+json
| Campo | Tipo | Requerido | Descripcion |
|---|---|---|---|
code | string | Si | - |
correlationId | string (uuid) | Si | - |
detail | string | No | Explicacion segura sin PII ni secretos. |
errors | object[] | No | - |
instance | string (uri-reference) | No | - |
status | integer | Si | - |
title | string | Si | - |
type | string (uri) | Si | URI estable que identifica la clase de problema. |
Ejemplo
{
"code": "RESOURCE_NOT_FOUND",
"correlationId": "10000000-0000-4000-8000-000000000001",
"status": 404,
"title": "Recurso no encontrado",
"type": "https://magnosoft.com.co/problems/not-found"
}429Limite de solicitudes excedido para el service principal.
Content-Type: application/problem+json
| Campo | Tipo | Requerido | Descripcion |
|---|---|---|---|
code | string | Si | - |
correlationId | string (uuid) | Si | - |
detail | string | No | Explicacion segura sin PII ni secretos. |
errors | object[] | No | - |
instance | string (uri-reference) | No | - |
status | integer | Si | - |
title | string | Si | - |
type | string (uri) | Si | URI estable que identifica la clase de problema. |
Ejemplo
{
"code": "RATE_LIMIT_EXCEEDED",
"correlationId": "10000000-0000-4000-8000-000000000001",
"status": 429,
"title": "Demasiadas solicitudes",
"type": "https://magnosoft.com.co/problems/rate-limit"
}502Falla segura al comunicarse con el servicio interno autoritativo.
Content-Type: application/problem+json
| Campo | Tipo | Requerido | Descripcion |
|---|---|---|---|
code | string | Si | - |
correlationId | string (uuid) | Si | - |
detail | string | No | Explicacion segura sin PII ni secretos. |
errors | object[] | No | - |
instance | string (uri-reference) | No | - |
status | integer | Si | - |
title | string | Si | - |
type | string (uri) | Si | URI estable que identifica la clase de problema. |
Ejemplo
{
"code": "UPSTREAM_FAILURE",
"correlationId": "10000000-0000-4000-8000-000000000001",
"detail": "Downstream service unavailable",
"status": 502,
"title": "UPSTREAM FAILURE",
"type": "https://magnosoft.com.co/problems/upstream-failure"
}