VitrinaAPI

Insurance reimbursements

The reimbursement request to the insurer per atención, with its documents and states (to send, sent, paid, rejected), the insurer's payments and their reconciliation with the requests they settle, partial included. Insurer money is never counted twice: it is not a Caja payment or an espejo de ingresos row.

Beta
This may change at any time, with a changelog entry and a notice to recent callers — see versioning.

Download the full API pública projection: openapi.json.

MethodPathWhat it does
GET/clinic/insurer-paymentsList insurer payments
POST/clinic/insurer-paymentsRecord an insurer payment and reconcile it
GET/clinic/insurer-payments/{id}Read an insurer payment
POST/clinic/insurer-payments/{id}/allocationsSettle one more request with a payment
POST/clinic/insurer-payments/{id}/allocations/{allocationId}/releaseRelease an allocation
POST/clinic/insurer-payments/{id}/voidVoid an insurer payment
GET/clinic/reimbursementsList reimbursement requests
POST/clinic/reimbursementsOpen a reimbursement request
GET/clinic/reimbursements/{id}Read a reimbursement request
PATCH/clinic/reimbursements/{id}Edit a reimbursement request
POST/clinic/reimbursements/{id}/documentsAttach a document to a request
DELETE/clinic/reimbursements/{id}/documents/{documentId}Remove a document from a request
POST/clinic/reimbursements/{id}/transitionSend, reject or take back a request

GET /clinic/insurer-payments

List insurer payments

Newest first, each with allocated_clp and unallocated_clp. unallocated=true keeps those with money left to assign. insurers lists the insurers the clinic has plans for. Requires clinic_money:read.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
insurerquerystringnomáx. 120
payeequerypatient \clinicno
unallocatedquerytrue \falseno
pagequeryintegerno≥ 1, por defecto 1
limitqueryintegerno≥ 1, ≤ 200, por defecto 50
curl https://api.vitrinadev.com/api/v1/clinic/insurer-payments \
  -H "Authorization: Bearer $VITRINA_KEY"

Example response (200)

{
  "data": {
    "items": [
      {
        "id": "a0e57121-0000-4000-8000-000000000b01",
        "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
        "insurer": "Consorcio",
        "payee": "clinic",
        "amount_clp": 28000,
        "received_on": "2026-10-10",
        "reference": "TRF-99231",
        "recorded_as_payment": false,
        "note": null,
        "voided_at": null,
        "void_reason": null,
        "allocated_clp": 28000,
        "created_at": "2026-10-10T14:00:00.000Z",
        "unallocated_clp": 0
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 50,
    "insurers": [
      "Consorcio"
    ]
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/insurer-payments

Record an insurer payment and reconcile it

The money an insurer paid, to the clinic or to the patient (payee). allocations settles requests in the same call, partial amounts included; the rest stays unallocated for later. A payment only settles sent requests of the same insurer and payee, never above what a request claimed or the payment holds (409). recorded_as_payment defaults to true when the practice system (Dentalink) authors that day’s money, else false; set it true when the clinic already keyed these pesos into Caja or Dentalink. A payment that matches a pago already recorded for the patient answers with warnings, never a refusal. This money never enters the ledger, Caja or the espejo. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

Body

FieldTypeRequiredConstraints
insurerstringyesmín. 1, máx. 120
payeepatient \clinicyes
amount_clpintegeryes≥ 1, ≤ 1000000000
received_onstringyespatrón ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
referencestring | null—máx. 80
recorded_as_paymentboolean—
notestring | null—máx. 500
allocationsobject[]—
curl -X POST https://api.vitrinadev.com/api/v1/clinic/insurer-payments \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "insurer": "Consorcio",
    "payee": "clinic",
    "amount_clp": 28000,
    "received_on": "2026-10-10",
    "reference": "TRF-99231",
    "allocations": [
      {
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "amount_clp": 28000
      }
    ]
  }'

Example response (201)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000b01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "insurer": "Consorcio",
    "payee": "clinic",
    "amount_clp": 28000,
    "received_on": "2026-10-10",
    "reference": "TRF-99231",
    "recorded_as_payment": false,
    "note": null,
    "voided_at": null,
    "void_reason": null,
    "allocated_clp": 28000,
    "created_at": "2026-10-10T14:00:00.000Z",
    "unallocated_clp": 0,
    "allocations": [
      {
        "id": "a0e57121-0000-4000-8000-000000000d01",
        "payment_id": "a0e57121-0000-4000-8000-000000000b01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "amount_clp": 28000,
        "closes_short": false,
        "created_at": "2026-10-10T14:00:00.000Z",
        "released_at": null,
        "release_reason": null,
        "patient_name": "Paciente de ejemplo",
        "service_date": "2026-10-08",
        "payment_received_on": "2026-10-10",
        "payment_reference": "TRF-99231",
        "payment_voided": false
      }
    ],
    "warnings": []
  }
}

Answers: 201 · 400 · 401 · 403 · 404 · 409 · 429

GET /clinic/insurer-payments/{id}

Read an insurer payment

With its allocations (live and released). Requires clinic_money:read.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes
curl https://api.vitrinadev.com/api/v1/clinic/insurer-payments/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000b01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "insurer": "Consorcio",
    "payee": "clinic",
    "amount_clp": 28000,
    "received_on": "2026-10-10",
    "reference": "TRF-99231",
    "recorded_as_payment": false,
    "note": null,
    "voided_at": null,
    "void_reason": null,
    "allocated_clp": 28000,
    "created_at": "2026-10-10T14:00:00.000Z",
    "unallocated_clp": 0,
    "allocations": [
      {
        "id": "a0e57121-0000-4000-8000-000000000d01",
        "payment_id": "a0e57121-0000-4000-8000-000000000b01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "amount_clp": 28000,
        "closes_short": false,
        "created_at": "2026-10-10T14:00:00.000Z",
        "released_at": null,
        "release_reason": null,
        "patient_name": "Paciente de ejemplo",
        "service_date": "2026-10-08",
        "payment_received_on": "2026-10-10",
        "payment_reference": "TRF-99231",
        "payment_voided": false
      }
    ],
    "warnings": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/insurer-payments/{id}/allocations

Settle one more request with a payment

Spends amount_clp of the payment on a sent request. When the sum reaches what was claimed the request becomes paid; closes_short closes it paid for less. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes

Body

FieldTypeRequiredConstraints
request_iduuidyes
amount_clpintegeryes≥ 1, ≤ 1000000000
closes_shortboolean—
curl -X POST https://api.vitrinadev.com/api/v1/clinic/insurer-payments/<id>/allocations \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_id": "a0e57121-0000-4000-8000-000000000a01",
    "amount_clp": 28000
  }'

Example response (201)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000b01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "insurer": "Consorcio",
    "payee": "clinic",
    "amount_clp": 28000,
    "received_on": "2026-10-10",
    "reference": "TRF-99231",
    "recorded_as_payment": false,
    "note": null,
    "voided_at": null,
    "void_reason": null,
    "allocated_clp": 28000,
    "created_at": "2026-10-10T14:00:00.000Z",
    "unallocated_clp": 0,
    "allocations": [
      {
        "id": "a0e57121-0000-4000-8000-000000000d01",
        "payment_id": "a0e57121-0000-4000-8000-000000000b01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "amount_clp": 28000,
        "closes_short": false,
        "created_at": "2026-10-10T14:00:00.000Z",
        "released_at": null,
        "release_reason": null,
        "patient_name": "Paciente de ejemplo",
        "service_date": "2026-10-08",
        "payment_received_on": "2026-10-10",
        "payment_reference": "TRF-99231",
        "payment_voided": false
      }
    ],
    "warnings": []
  }
}

Answers: 201 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/insurer-payments/{id}/allocations/{allocationId}/release

Release an allocation

Frees the pesos for another request and reopens a paid request as sent. The allocation stays on record as released, with its reason. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes
allocationIdpathuuidyes

Body

FieldTypeRequiredConstraints
reasonstringyesmín. 1, máx. 300
curl -X POST https://api.vitrinadev.com/api/v1/clinic/insurer-payments/<id>/allocations/<id>/release \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Asignado al paciente equivocado"
  }'

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000b01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "insurer": "Consorcio",
    "payee": "clinic",
    "amount_clp": 28000,
    "received_on": "2026-10-10",
    "reference": "TRF-99231",
    "recorded_as_payment": false,
    "note": null,
    "voided_at": null,
    "void_reason": null,
    "allocated_clp": 0,
    "created_at": "2026-10-10T14:00:00.000Z",
    "unallocated_clp": 28000,
    "allocations": [],
    "warnings": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/insurer-payments/{id}/void

Void an insurer payment

A mistake is a voided payment, never a deletion: its allocations are released and the requests they had paid reopen. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes

Body

FieldTypeRequiredConstraints
reasonstringyesmín. 1, máx. 300
curl -X POST https://api.vitrinadev.com/api/v1/clinic/insurer-payments/<id>/void \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "reason": "Transferencia devuelta por el banco"
  }'

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000b01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "insurer": "Consorcio",
    "payee": "clinic",
    "amount_clp": 28000,
    "received_on": "2026-10-10",
    "reference": "TRF-99231",
    "recorded_as_payment": false,
    "note": null,
    "voided_at": "2026-10-11T10:00:00.000Z",
    "void_reason": "Transferencia devuelta por el banco",
    "allocated_clp": 0,
    "created_at": "2026-10-10T14:00:00.000Z",
    "unallocated_clp": 0,
    "allocations": [
      {
        "id": "a0e57121-0000-4000-8000-000000000d01",
        "payment_id": "a0e57121-0000-4000-8000-000000000b01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "amount_clp": 28000,
        "closes_short": false,
        "created_at": "2026-10-10T14:00:00.000Z",
        "released_at": null,
        "release_reason": null,
        "patient_name": "Paciente de ejemplo",
        "service_date": "2026-10-08",
        "payment_received_on": "2026-10-10",
        "payment_reference": "TRF-99231",
        "payment_voided": false
      }
    ],
    "warnings": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

GET /clinic/reimbursements

List reimbursement requests

Open requests (to_send, sent) first, the oldest atención first. Filter by status (comma-separated), insurer, plan_id, patient_id, budget_id or payee. summary counts every state under the non-state filters and totals what the insurers still owe (pending_clp), per insurer. Each item carries reimbursed_clp (derived), outstanding_clp, shortfall_clp and settlement. Requires clinic_money:read.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
statusquerystringnomáx. 60
insurerquerystringnomáx. 120
plan_idqueryuuidno
patient_idqueryuuidno
budget_idqueryuuidno
payeequerypatient \clinicno
pagequeryintegerno≥ 1, por defecto 1
limitqueryintegerno≥ 1, ≤ 200, por defecto 50
curl https://api.vitrinadev.com/api/v1/clinic/reimbursements \
  -H "Authorization: Bearer $VITRINA_KEY"

Example response (200)

{
  "data": {
    "items": [
      {
        "id": "a0e57121-0000-4000-8000-000000000a01",
        "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
        "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
        "patient_name": "Paciente de ejemplo",
        "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
        "insurer": "Consorcio",
        "plan_name": "Salud Plus",
        "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
        "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
        "budget_folio": "E-12",
        "appointment_id": null,
        "encounter_id": null,
        "service_date": "2026-10-08",
        "concept": "Limpieza dental",
        "payee": "clinic",
        "status": "sent",
        "claimed_clp": 28000,
        "reimbursed_clp": 0,
        "closed_short": false,
        "insurer_reference": null,
        "sent_on": "2026-10-09",
        "rejected_on": null,
        "rejection_reason": null,
        "settled_on": null,
        "note": null,
        "document_count": 2,
        "created_at": "2026-10-09T13:00:00.000Z",
        "updated_at": "2026-10-09T13:00:00.000Z",
        "outstanding_clp": 28000,
        "shortfall_clp": 0,
        "settlement": "none",
        "age_days": 2
      }
    ],
    "total": 1,
    "page": 1,
    "limit": 50,
    "summary": {
      "by_status": {
        "to_send": {
          "count": 0,
          "claimed_clp": 0,
          "reimbursed_clp": 0
        },
        "sent": {
          "count": 1,
          "claimed_clp": 28000,
          "reimbursed_clp": 0
        },
        "paid": {
          "count": 0,
          "claimed_clp": 0,
          "reimbursed_clp": 0
        },
        "rejected": {
          "count": 0,
          "claimed_clp": 0,
          "reimbursed_clp": 0
        }
      },
      "pending_count": 1,
      "pending_clp": 28000,
      "by_insurer": [
        {
          "insurer": "Consorcio",
          "pending_count": 1,
          "pending_clp": 28000
        }
      ]
    }
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/reimbursements

Open a reimbursement request

For one atención of a patient, under their primary seguro (or patient_insurance_id). claimed_clp may be omitted when budget_id is sent: it then takes the estimated cobertura of the presupuesto. payee is who the insurer pays: patient (default) or clinic. Starts to_send. 400 when the patient has no seguro. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

Body

FieldTypeRequiredConstraints
patient_iduuidyes
patient_insurance_idstring | null—
budget_idstring | null—
appointment_idstring | null—
encounter_idstring | null—
service_datestring | null—patrón ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
conceptstring | null—máx. 200
payeepatient \clinic—
claimed_clpinteger | null—≥ 1, ≤ 1000000000
insurer_referencestring | null—máx. 80
notestring | null—máx. 1000
curl -X POST https://api.vitrinadev.com/api/v1/clinic/reimbursements \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "payee": "clinic",
    "concept": "Limpieza dental"
  }'

Example response (201)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000a01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "patient_name": "Paciente de ejemplo",
    "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
    "insurer": "Consorcio",
    "plan_name": "Salud Plus",
    "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "budget_folio": "E-12",
    "appointment_id": null,
    "encounter_id": null,
    "service_date": "2026-10-08",
    "concept": "Limpieza dental",
    "payee": "clinic",
    "status": "to_send",
    "claimed_clp": 28000,
    "reimbursed_clp": 0,
    "closed_short": false,
    "insurer_reference": null,
    "sent_on": null,
    "rejected_on": null,
    "rejection_reason": null,
    "settled_on": null,
    "note": null,
    "document_count": 2,
    "created_at": "2026-10-09T13:00:00.000Z",
    "updated_at": "2026-10-09T13:00:00.000Z",
    "outstanding_clp": 28000,
    "shortfall_clp": 0,
    "settlement": "none",
    "age_days": 2,
    "documents": [
      {
        "id": "a0e57121-0000-4000-8000-000000000c01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "kind": "boleta",
        "title": "Boleta 4431",
        "clinic_document_id": null,
        "created_at": "2026-10-09T13:05:00.000Z"
      }
    ],
    "checklist": [
      {
        "kind": "boleta",
        "attached": true
      },
      {
        "kind": "bono",
        "attached": false
      },
      {
        "kind": "programa",
        "attached": false
      }
    ],
    "allocations": []
  }
}

Answers: 201 · 400 · 401 · 403 · 404 · 409 · 429

GET /clinic/reimbursements/{id}

Read a reimbursement request

With its documents, the checklist of boleta / bono / programa and its allocations (live and released). Requires clinic_money:read.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes
curl https://api.vitrinadev.com/api/v1/clinic/reimbursements/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000a01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "patient_name": "Paciente de ejemplo",
    "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
    "insurer": "Consorcio",
    "plan_name": "Salud Plus",
    "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "budget_folio": "E-12",
    "appointment_id": null,
    "encounter_id": null,
    "service_date": "2026-10-08",
    "concept": "Limpieza dental",
    "payee": "clinic",
    "status": "sent",
    "claimed_clp": 28000,
    "reimbursed_clp": 0,
    "closed_short": false,
    "insurer_reference": null,
    "sent_on": "2026-10-09",
    "rejected_on": null,
    "rejection_reason": null,
    "settled_on": null,
    "note": null,
    "document_count": 2,
    "created_at": "2026-10-09T13:00:00.000Z",
    "updated_at": "2026-10-09T13:00:00.000Z",
    "outstanding_clp": 28000,
    "shortfall_clp": 0,
    "settlement": "none",
    "age_days": 2,
    "documents": [
      {
        "id": "a0e57121-0000-4000-8000-000000000c01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "kind": "boleta",
        "title": "Boleta 4431",
        "clinic_document_id": null,
        "created_at": "2026-10-09T13:05:00.000Z"
      }
    ],
    "checklist": [
      {
        "kind": "boleta",
        "attached": true
      },
      {
        "kind": "bono",
        "attached": false
      },
      {
        "kind": "programa",
        "attached": false
      }
    ],
    "allocations": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

PATCH /clinic/reimbursements/{id}

Edit a reimbursement request

Amount, payee, atención day, concept, insurer reference, note. The amount cannot go below what is already reimbursed and the payee cannot change once payments are allocated (409). A paid or rejected request only takes notes. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes

Body

FieldTypeRequiredConstraints
claimed_clpinteger—≥ 1, ≤ 1000000000
payeepatient \clinic—
service_datestring—patrón ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
conceptstring | null—máx. 200
insurer_referencestring | null—máx. 80
notestring | null—máx. 1000
curl -X PATCH https://api.vitrinadev.com/api/v1/clinic/reimbursements/<id> \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "claimed_clp": 30000
  }'

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000a01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "patient_name": "Paciente de ejemplo",
    "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
    "insurer": "Consorcio",
    "plan_name": "Salud Plus",
    "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "budget_folio": "E-12",
    "appointment_id": null,
    "encounter_id": null,
    "service_date": "2026-10-08",
    "concept": "Limpieza dental",
    "payee": "clinic",
    "status": "sent",
    "claimed_clp": 30000,
    "reimbursed_clp": 0,
    "closed_short": false,
    "insurer_reference": null,
    "sent_on": "2026-10-09",
    "rejected_on": null,
    "rejection_reason": null,
    "settled_on": null,
    "note": null,
    "document_count": 2,
    "created_at": "2026-10-09T13:00:00.000Z",
    "updated_at": "2026-10-09T13:00:00.000Z",
    "outstanding_clp": 30000,
    "shortfall_clp": 0,
    "settlement": "none",
    "age_days": 2,
    "documents": [
      {
        "id": "a0e57121-0000-4000-8000-000000000c01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "kind": "boleta",
        "title": "Boleta 4431",
        "clinic_document_id": null,
        "created_at": "2026-10-09T13:05:00.000Z"
      }
    ],
    "checklist": [
      {
        "kind": "boleta",
        "attached": true
      },
      {
        "kind": "bono",
        "attached": false
      },
      {
        "kind": "programa",
        "attached": false
      }
    ],
    "allocations": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/reimbursements/{id}/documents

Attach a document to a request

kind is boleta, bono, programa or otro. clinic_document_id optionally points at a file already on the patient’s ficha; without it the row is the checklist entry of a paper kept elsewhere. Returns the request. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes

Body

FieldTypeRequiredConstraints
kindboleta \bono \programa \
titlestring | null—máx. 160
clinic_document_idstring | null—
curl -X POST https://api.vitrinadev.com/api/v1/clinic/reimbursements/<id>/documents \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "boleta",
    "title": "Boleta 4431"
  }'

Example response (201)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000a01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "patient_name": "Paciente de ejemplo",
    "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
    "insurer": "Consorcio",
    "plan_name": "Salud Plus",
    "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "budget_folio": "E-12",
    "appointment_id": null,
    "encounter_id": null,
    "service_date": "2026-10-08",
    "concept": "Limpieza dental",
    "payee": "clinic",
    "status": "sent",
    "claimed_clp": 28000,
    "reimbursed_clp": 0,
    "closed_short": false,
    "insurer_reference": null,
    "sent_on": "2026-10-09",
    "rejected_on": null,
    "rejection_reason": null,
    "settled_on": null,
    "note": null,
    "document_count": 2,
    "created_at": "2026-10-09T13:00:00.000Z",
    "updated_at": "2026-10-09T13:00:00.000Z",
    "outstanding_clp": 28000,
    "shortfall_clp": 0,
    "settlement": "none",
    "age_days": 2,
    "documents": [
      {
        "id": "a0e57121-0000-4000-8000-000000000c01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "kind": "boleta",
        "title": "Boleta 4431",
        "clinic_document_id": null,
        "created_at": "2026-10-09T13:05:00.000Z"
      }
    ],
    "checklist": [
      {
        "kind": "boleta",
        "attached": true
      },
      {
        "kind": "bono",
        "attached": false
      },
      {
        "kind": "programa",
        "attached": false
      }
    ],
    "allocations": []
  }
}

Answers: 201 · 400 · 401 · 403 · 404 · 409 · 429

DELETE /clinic/reimbursements/{id}/documents/{documentId}

Remove a document from a request

Removes the checklist row, not the file on the ficha. Returns the request. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes
documentIdpathuuidyes
curl -X DELETE https://api.vitrinadev.com/api/v1/clinic/reimbursements/<id>/documents/<id> \
  -H "Authorization: Bearer $VITRINA_KEY"

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000a01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "patient_name": "Paciente de ejemplo",
    "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
    "insurer": "Consorcio",
    "plan_name": "Salud Plus",
    "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "budget_folio": "E-12",
    "appointment_id": null,
    "encounter_id": null,
    "service_date": "2026-10-08",
    "concept": "Limpieza dental",
    "payee": "clinic",
    "status": "sent",
    "claimed_clp": 28000,
    "reimbursed_clp": 0,
    "closed_short": false,
    "insurer_reference": null,
    "sent_on": "2026-10-09",
    "rejected_on": null,
    "rejection_reason": null,
    "settled_on": null,
    "note": null,
    "document_count": 0,
    "created_at": "2026-10-09T13:00:00.000Z",
    "updated_at": "2026-10-09T13:00:00.000Z",
    "outstanding_clp": 28000,
    "shortfall_clp": 0,
    "settlement": "none",
    "age_days": 2,
    "documents": [],
    "checklist": [
      {
        "kind": "boleta",
        "attached": true
      },
      {
        "kind": "bono",
        "attached": false
      },
      {
        "kind": "programa",
        "attached": false
      }
    ],
    "allocations": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

POST /clinic/reimbursements/{id}/transition

Send, reject or take back a request

to: sent (from to_send or rejected, with the day it went out), to: rejected (from sent, needs reason), to: to_send (take it back). 409 on any other move and while payments are allocated: paid is reached only by allocating an insurer payment. Requires clinic_money:write.

Connected apps: every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, "M.F. · #1001" — unless the clinic allowed patient names, with RUT, phone and email masked in free text and meta.patient_privacy saying so. Clinical alerts (flags) are withheld in both modes, and a non-JSON body (an export, a file) is refused with 403 CONNECTED_APP_SENSITIVE_DATA.

ParameterInTypeRequiredConstraints
idpathuuidyes

Body

FieldTypeRequiredConstraints
toto_send \sent \rejected
onstring | null—patrón ^\d{4}-(0[1-9]|1[0-2])-(0[1-9]|[12]\d|3[01])$
reasonstring | null—mín. 1, máx. 500
curl -X POST https://api.vitrinadev.com/api/v1/clinic/reimbursements/<id>/transition \
  -H "Authorization: Bearer $VITRINA_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "sent",
    "on": "2026-10-09"
  }'

Example response (200)

{
  "data": {
    "id": "a0e57121-0000-4000-8000-000000000a01",
    "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
    "clinic_patient_id": "b1b0b8de-0000-4000-8000-000000000001",
    "patient_name": "Paciente de ejemplo",
    "plan_id": "c0e57121-0000-4000-8000-0000000007ab",
    "insurer": "Consorcio",
    "plan_name": "Salud Plus",
    "patient_insurance_id": "c0e57121-0000-4000-8000-0000000007ad",
    "budget_id": "e0e57121-0000-4000-8000-0000000009ab",
    "budget_folio": "E-12",
    "appointment_id": null,
    "encounter_id": null,
    "service_date": "2026-10-08",
    "concept": "Limpieza dental",
    "payee": "clinic",
    "status": "sent",
    "claimed_clp": 28000,
    "reimbursed_clp": 0,
    "closed_short": false,
    "insurer_reference": null,
    "sent_on": "2026-10-09",
    "rejected_on": null,
    "rejection_reason": null,
    "settled_on": null,
    "note": null,
    "document_count": 2,
    "created_at": "2026-10-09T13:00:00.000Z",
    "updated_at": "2026-10-09T13:00:00.000Z",
    "outstanding_clp": 28000,
    "shortfall_clp": 0,
    "settlement": "none",
    "age_days": 2,
    "documents": [
      {
        "id": "a0e57121-0000-4000-8000-000000000c01",
        "request_id": "a0e57121-0000-4000-8000-000000000a01",
        "kind": "boleta",
        "title": "Boleta 4431",
        "clinic_document_id": null,
        "created_at": "2026-10-09T13:05:00.000Z"
      }
    ],
    "checklist": [
      {
        "kind": "boleta",
        "attached": true
      },
      {
        "kind": "bono",
        "attached": false
      },
      {
        "kind": "programa",
        "attached": false
      }
    ],
    "allocations": []
  }
}

Answers: 200 · 400 · 401 · 403 · 404 · 409 · 429

On this page