Referencia del API · tag health
Servicios de salud
Para IPS: catálogo y agenda, citas en nombre del paciente, facturación de salud (DIAN, RIPS, glosas, recaudo) y carné de vacunación.
Esta página se genera desde el contrato (data/gateway-v1.json): cada operación muestra su verbo,
ruta, parámetros, cuerpo, respuestas, si lleva Idempotency-Key y el método equivalente en los cinco SDK.
Para el flujo de punta a punta con ejemplos completos, ve a la guía de implementación.
Operaciones del tag health #
Descripción en el contrato: Health services for IPS / health-enabled entities: appointment catalog, availability, booking on behalf of a patient (identified by document), cancel / reschedule / attendance, health invoices (DIAN / radication status, XML, RIPS, glosas) with payer collections, and the patient’s vaccination card. Clinical records go through the separate FHIR B2B channel.
| Método | Ruta | Operación | Scope | Idem. |
|---|---|---|---|---|
| GET | /v1/gateway/health-services/appointments/ | Appointments of a patient | appointments:read | — |
| POST | /v1/gateway/health-services/appointments/ | Book an appointment for a patient | appointments:write | recomendada |
| GET | /v1/gateway/health-services/appointments/{appointment_id}/ | Appointment detail | appointments:read | — |
| POST | /v1/gateway/health-services/appointments/{appointment_id}/cancel/ | Cancel an appointment (releases the slot) | appointments:write | recomendada |
| POST | /v1/gateway/health-services/appointments/{appointment_id}/reschedule/ | Reschedule to another slot | appointments:write | recomendada |
| POST | /v1/gateway/health-services/appointments/{appointment_id}/status/ | Record attendance (completed / no_show) | appointments:write | recomendada |
| GET | /v1/gateway/health-services/availability/ | Free appointment slots | appointments:read | — |
| GET | /v1/gateway/health-services/billing/glosas/ | Glosas (read only) | health_billing:read | — |
| GET | /v1/gateway/health-services/billing/invoices/ | Health invoices with DIAN / radication status | health_billing:read | — |
| GET | /v1/gateway/health-services/billing/invoices/{invoice_id}/ | Invoice detail (lines, payments, glosas, radications) | health_billing:read | — |
| POST | /v1/gateway/health-services/billing/invoices/{invoice_id}/payments/ | Register a payer (EPS) payment on an invoice | health_billing:collect | recomendada |
| GET | /v1/gateway/health-services/billing/invoices/{invoice_id}/rips/ | RIPS JSON of the invoice | health_billing:read | — |
| GET | /v1/gateway/health-services/billing/invoices/{invoice_id}/xml/ | Electronic invoice XML (wrapped in JSON) | health_billing:read | — |
| GET | /v1/gateway/health-services/catalog/ | Booking catalog (specialties, services, sites, doctors) | appointments:read | — |
| GET | /v1/gateway/health-services/vaccination/card/ | Patient vaccination card / schedule | vaccination:read | — |
Appointments of a patient #
GET/v1/gateway/health-services/appointments/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
document obligatorio | query | string | Patient document (holder or family beneficiary). Ej.: 1032456789 |
status | query | string | Comma-separated statuses. |
when | query | string | upcoming | past | all. |
page | query | integer | Page (from 1). |
page_size | query | integer | Items per page (max 100). |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Paginated appointments. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.appointments.list()client.health.appointments.list()$client->health->appointments->list()await client.Health.Appointments.ListAsync()client.Health.Appointments.List(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/appointments/?document=1032456789" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Book an appointment for a patient #
POST/v1/gateway/health-services/appointments/
slot_id for the patient identified by document. Unknown patient: send new_patient to quick-register them. Emits appointment.booked.Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
Idempotency-Key | cabecera | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. Ej.: horizonte-2026-06-26-credit-000123 |
Cuerpo de la petición
Tipo de contenido: application/json · obligatorio
| Campo | Tipo | Descripción |
|---|---|---|
appointment_type | string | Valores: first_time, follow_up, control, emergency. |
channel | string | Valores: recepcion, telefono. |
consultation_type | string | Valores: presencial, telemedicina. |
document obligatorio | string | Ej.: "1032456789" |
new_patient | object | |
notes | string | |
reason | string | |
slot_id obligatorio | string |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Processed; the engine result is in data. | TransactionEnvelope
application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.appointments.book()client.health.appointments.book()$client->health->appointments->book()await client.Health.Appointments.BookAsync()client.Health.Appointments.Book(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/appointments/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"document": "1032456789",
"slot_id": "<slot_id>"
}'Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Appointment detail #
GET/v1/gateway/health-services/appointments/{appointment_id}/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
appointment_id obligatorio | ruta | string | Appointment id (UUID) or appointment code. Ej.: CITA-2026-000123 |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Appointment. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.appointments.get()client.health.appointments.get()$client->health->appointments->get()await client.Health.Appointments.GetAsync()client.Health.Appointments.Get(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/appointments/CITA-2026-000123/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Cancel an appointment (releases the slot) #
POST/v1/gateway/health-services/appointments/{appointment_id}/cancel/
on_behalf_of_patient: true applies the patient rules (2-hour notice). Emits appointment.cancelled.Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
appointment_id obligatorio | ruta | string | Appointment id (UUID) or appointment code. Ej.: CITA-2026-000123 |
Idempotency-Key | cabecera | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. Ej.: horizonte-2026-06-26-credit-000123 |
Cuerpo de la petición
Tipo de contenido: application/json · obligatorio
| Campo | Tipo | Descripción |
|---|---|---|
on_behalf_of_patient | boolean | |
reason obligatorio | string |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Processed; the engine result is in data. | TransactionEnvelope
application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.appointments.cancel()client.health.appointments.cancel()$client->health->appointments->cancel()await client.Health.Appointments.CancelAsync()client.Health.Appointments.Cancel(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/appointments/CITA-2026-000123/cancel/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"reason": "<reason>"
}'Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Reschedule to another slot #
POST/v1/gateway/health-services/appointments/{appointment_id}/reschedule/
appointment.rescheduled.Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
appointment_id obligatorio | ruta | string | Appointment id (UUID) or appointment code. Ej.: CITA-2026-000123 |
Idempotency-Key | cabecera | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. Ej.: horizonte-2026-06-26-credit-000123 |
Cuerpo de la petición
Tipo de contenido: application/json · obligatorio
| Campo | Tipo | Descripción |
|---|---|---|
new_slot_id obligatorio | string |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Processed; the engine result is in data. | TransactionEnvelope
application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.appointments.reschedule()client.health.appointments.reschedule()$client->health->appointments->reschedule()await client.Health.Appointments.RescheduleAsync()client.Health.Appointments.Reschedule(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/appointments/CITA-2026-000123/reschedule/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"new_slot_id": "<new_slot_id>"
}'Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Record attendance (completed / no_show) #
POST/v1/gateway/health-services/appointments/{appointment_id}/status/
appointment.status_changed.Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
appointment_id obligatorio | ruta | string | Appointment id (UUID) or appointment code. Ej.: CITA-2026-000123 |
Idempotency-Key | cabecera | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. Ej.: horizonte-2026-06-26-credit-000123 |
Cuerpo de la petición
Tipo de contenido: application/json · obligatorio
| Campo | Tipo | Descripción |
|---|---|---|
reason | string | |
status obligatorio | string | Valores: completed, no_show. |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Processed; the engine result is in data. | TransactionEnvelope
application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.appointments.set_attendance()client.health.appointments.setAttendance()$client->health->appointments->setAttendance()await client.Health.Appointments.SetAttendanceAsync()client.Health.Appointments.SetAttendance(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/appointments/CITA-2026-000123/status/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"status": "completed"
}'Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Free appointment slots #
GET/v1/gateway/health-services/availability/
date for one day, or start_date/end_date/asap for a range (no dates: next 30 days).Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
date | query | string (date) | One day (YYYY-MM-DD). |
start_date | query | string (date) | From (YYYY-MM-DD). |
end_date | query | string (date) | To (YYYY-MM-DD). |
asap | query | boolean | Earliest slots in the next 90 days. |
doctor_id | query | string | Doctor id. |
location_id | query | string | Site id. |
specialty_id | query | string | Specialty id. |
service_id | query | string | Service type id. |
page | query | integer | Page (from 1). |
page_size | query | integer | Items per page (max 100). |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Paginated slots. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.availability()client.health.availability()$client->health->availability()await client.Health.AvailabilityAsync()client.Health.Availability(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/availability/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Glosas (read only) #
GET/v1/gateway/health-services/billing/glosas/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
invoice | query | string | Invoice id. |
status | query | string | Comma-separated statuses. |
page | query | integer | Page (from 1). |
page_size | query | integer | Items per page (max 100). |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Paginated glosas. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.billing.list_glosas()client.health.billing.listGlosas()$client->health->billing->listGlosas()await client.Health.Billing.ListGlosasAsync()client.Health.Billing.ListGlosas(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/billing/glosas/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Health invoices with DIAN / radication status #
GET/v1/gateway/health-services/billing/invoices/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
status | query | string | Comma-separated statuses (e.g. CUV_OK,RADICADA). |
payer | query | string | Payer id. |
q | query | string | Number, reference or CUV. |
document | query | string | Patient document. |
date_from | query | string (date) | Created from (YYYY-MM-DD). |
date_to | query | string (date) | Created to (YYYY-MM-DD). |
page | query | integer | Page (from 1). |
page_size | query | integer | Items per page (max 100). |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Paginated invoices. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.billing.list_invoices()client.health.billing.listInvoices()$client->health->billing->listInvoices()await client.Health.Billing.ListInvoicesAsync()client.Health.Billing.ListInvoices(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/billing/invoices/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Invoice detail (lines, payments, glosas, radications) #
GET/v1/gateway/health-services/billing/invoices/{invoice_id}/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
invoice_id obligatorio | ruta | string | Health invoice id. Ej.: 3f2b8c1e-0000-4a1b-9c2d-000000000001 |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Invoice. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.billing.get_invoice()client.health.billing.getInvoice()$client->health->billing->getInvoice()await client.Health.Billing.GetInvoiceAsync()client.Health.Billing.GetInvoice(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/billing/invoices/3f2b8c1e-0000-4a1b-9c2d-000000000001/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Register a payer (EPS) payment on an invoice #
POST/v1/gateway/health-services/billing/invoices/{invoice_id}/payments/
Idempotency-Key (or by method + reference). Never above the non-disputed balance. Emits health_billing.payment.registered.Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
invoice_id obligatorio | ruta | string | Health invoice id. Ej.: 3f2b8c1e-0000-4a1b-9c2d-000000000001 |
Idempotency-Key | cabecera | string | Client-generated key that makes a write safely retryable. Replaying the same key returns the original result with idempotent_replay: true; a replay while the original is still in flight returns 409. Ej.: horizonte-2026-06-26-credit-000123 |
Cuerpo de la petición
Tipo de contenido: application/json · obligatorio
| Campo | Tipo | Descripción |
|---|---|---|
amount obligatorio | string | Ej.: "53500.00" |
method obligatorio | string | Valores: TRANSFERENCIA, CONSIGNACION, GIRO_DIRECTO, RETENCION. |
paid_at | string (date) | |
reference obligatorio | string |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Processed; the engine result is in data. | TransactionEnvelope
application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.billing.register_payment()client.health.billing.registerPayment()$client->health->billing->registerPayment()await client.Health.Billing.RegisterPaymentAsync()client.Health.Billing.RegisterPayment(ctx, …)curl -X POST "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/billing/invoices/3f2b8c1e-0000-4a1b-9c2d-000000000001/payments/" \
-H "X-API-Key: $COMPENSE_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"amount": "53500.00",
"method": "TRANSFERENCIA",
"reference": "<reference>"
}'Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
RIPS JSON of the invoice #
GET/v1/gateway/health-services/billing/invoices/{invoice_id}/rips/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
invoice_id obligatorio | ruta | string | Health invoice id. Ej.: 3f2b8c1e-0000-4a1b-9c2d-000000000001 |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | RIPS. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.billing.get_invoice_rips()client.health.billing.getInvoiceRips()$client->health->billing->getInvoiceRips()await client.Health.Billing.GetInvoiceRipsAsync()client.Health.Billing.GetInvoiceRIPS(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/billing/invoices/3f2b8c1e-0000-4a1b-9c2d-000000000001/rips/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Electronic invoice XML (wrapped in JSON) #
GET/v1/gateway/health-services/billing/invoices/{invoice_id}/xml/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
invoice_id obligatorio | ruta | string | Health invoice id. Ej.: 3f2b8c1e-0000-4a1b-9c2d-000000000001 |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | XML document. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.billing.get_invoice_xml()client.health.billing.getInvoiceXml()$client->health->billing->getInvoiceXml()await client.Health.Billing.GetInvoiceXmlAsync()client.Health.Billing.GetInvoiceXML(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/billing/invoices/3f2b8c1e-0000-4a1b-9c2d-000000000001/xml/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Booking catalog (specialties, services, sites, doctors) #
GET/v1/gateway/health-services/catalog/
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Catalog. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.catalog()client.health.catalog()$client->health->catalog()await client.Health.CatalogAsync()client.Health.Catalog(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/catalog/" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.
Patient vaccination card / schedule #
GET/v1/gateway/health-services/vaccination/card/
Parámetros
| Nombre | En | Tipo | Descripción |
|---|---|---|---|
document obligatorio | query | string | Patient document. Ej.: 1032456789 |
Respuestas
| Código | Descripción | Cuerpo |
|---|---|---|
| 200 | Vaccination card. | object application/json |
Errores posibles (400, 401, 403, 404, 409, 422, 429, 500, 502, 504) — application/problem+json
| 400 | Malformed request. | about:blank |
| 401 | Missing or invalid API key. | about:blank |
| 403 | The key is valid but lacks the required scope, or the source IP is not allow-listed. | about:blank |
| 404 | The requested resource does not exist. | about:blank |
| 409 | Idempotency conflict — same key, original still processing. | https://errors.compense.co/gateway/idempotency-conflict |
| 422 | Request body failed validation. | https://errors.compense.co/gateway/validation |
| 429 | Per-key rate limit or monthly quota exceeded; see Retry-After. | https://errors.compense.co/gateway/rate-limited |
| 500 | Unexpected gateway error; quote the trace_id to support. | about:blank |
| 502 | The processing engine returned an error. | https://errors.compense.co/gateway/upstream-error |
| 504 | The processing engine did not respond in time. | https://errors.compense.co/gateway/upstream-error |
Ver Errores problem+json para la excepción equivalente en cada SDK.
Ejemplo
client.health.vaccination.card()client.health.vaccination.card()$client->health->vaccination->card()await client.Health.Vaccination.CardAsync()client.Health.Vaccination.Card(ctx, …)curl "https://sandbox.dev.compense.co/gw/v1/gateway/health-services/vaccination/card/?document=1032456789" \
-H "X-API-Key: $COMPENSE_API_KEY"Los métodos de cada SDK salen de su suite de paridad con el contrato. El cURL va contra el sandbox; los valores <campo> son marcadores.