Solicitudes de crédito
El expediente que persigue una carpeta bancaria: registrar, marcar enviada, registrar la respuesta del banco y retirar.
Descarga la proyección completa de la API pública: openapi.json.
Vender una unidad explica este recurso en prosa, con ejemplos ejecutables.
| Método | Ruta | Qué hace |
|---|---|---|
GET | /credit-applications | The chase board |
POST | /credit-applications | Record a dossier |
GET | /credit-applications/{id} | Fetch one file |
POST | /credit-applications/{id}/contact | "We called the bank about this file" (ERP S11-4, BR-1053) |
POST | /credit-applications/{id}/decision | Record the financiera’s answer |
POST | /credit-applications/{id}/submission | Record that the carpeta went out |
POST | /credit-applications/{id}/withdrawal | Pull the file (BR-1040’s NOT_TAKEN) |
GET | /credit-applications/ageing | The chase board with its clock resolved (ERP S11-4) |
GET /credit-applications
The chase board
Filterable by the DERIVED state (never a submitted=true-style flag over the raw facts), vehicle_id, buyer_contact_id, institution_id and the recording PERIOD (created_from / created_to, independent and INCLUSIVE DEALERSHIP calendar days — America/Santiago, not UTC; a created_from after created_to is a 400, not an empty page). There is deliberately no free-text search and no sort parameter. Each row carries the lender’s name, the car’s label and patente, the borrower’s name and RUT, and — when the file is taken — the live credit’s state and disbursement instant. ⚠ TWO FIELD GATES, both ABSENT-never-null: fee_clp / financed_total_clp need dealership_economics:read (the house’s commission), and buyer_rut needs contacts:read (it IS contact.tax_id, gated exactly as the contacts family gates it). An absent key is a statement about the READER, never about the row.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
state | query | recorded \ | submitted \ | approved \ |
vehicle_id | query | uuid | no | |
buyer_contact_id | query | uuid | no | |
institution_id | query | uuid | no | |
created_from | query | string | no | patrón ^\d{4}-\d{2}-\d{2}$ |
created_to | query | string | no | patrón ^\d{4}-\d{2}-\d{2}$ |
limit | query | integer | no | ≥ 1, ≤ 200 |
curl https://api.vitrinadev.com/api/v1/credit-applications \
-H "Authorization: Bearer $VITRINA_KEY"Ejemplo de respuesta (200)
{
"data": [
{
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "submitted",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
],
"meta": {
"total": 1
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /credit-applications
Record a dossier
Allocates the folio F-n. No fact beyond the three links and the requested terms is settable at creation — no submitted_at, no outcome, no state. Recording that the carpeta went out is its own act.
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
vehicle_id | uuid | sí | |
buyer_contact_id | uuid | sí | |
institution_id | uuid | sí | |
requested_amount_clp | integer | sí | ≥ 1, ≤ 999999999999 |
vehicle_price_clp | integer | null | — | ≥ 1, ≤ 999999999999 |
declared_income_clp | integer | null | — | ≥ 1, ≤ 999999999999 |
fee_clp | integer | null | — | ≥ 0, ≤ 999999999999 |
term_months | integer | null | — | ≥ 1, ≤ 600 |
curl -X POST https://api.vitrinadev.com/api/v1/credit-applications \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"term_months": 48
}'Ejemplo de respuesta (201)
{
"data": {
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": null,
"submitted_by": null,
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "recorded",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
}Responde: 201 · 400 · 401 · 403 · 404 · 409 · 429
GET /credit-applications/{id}
Fetch one file
Accepts the UUID or the folio (F-12). Same enriched shape as the list, including the same two field gates: fee_clp / financed_total_clp absent without dealership_economics:read, buyer_rut absent without contacts:read.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | any | sí |
curl https://api.vitrinadev.com/api/v1/credit-applications/<id> \
-H "Authorization: Bearer $VITRINA_KEY"Ejemplo de respuesta (200)
{
"data": {
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "submitted",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /credit-applications/{id}/contact
"We called the bank about this file" (ERP S11-4, BR-1053)
The ONE act that resets the ageing clock. Repeatable, unlike submission, decision and withdrawal, which each happen once. Empty body.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | any | sí |
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|
curl -X POST https://api.vitrinadev.com/api/v1/credit-applications/<id>/contact \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{}'Ejemplo de respuesta (200)
{
"data": {
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": "2026-09-19T15:30:00.000Z",
"last_contact_by": "11111111-0000-4000-8000-000000000001",
"chased_at": null,
"state": "submitted",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /credit-applications/{id}/decision
Record the financiera’s answer
Records the lender’s verdict — outcome is the only required field, since BR-1021’s other states are not verdicts (recorded and submitted are the absence of one, and taken is derived from the sale note rather than decided here). decision_reason is OPTIONAL even on a rejection, deliberately: a bank that gave no reason is a real case, and forcing the field would fabricate a "sin motivo" signal rather than capture a real one. approved_amount_clp only makes sense with outcome: "approved".
Only legal on a submitted file — a 409 otherwise, since a decision needs a carpeta the lender has actually seen. There is no second decision: the outcome, once recorded, is terminal.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | any | sí |
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
outcome | approved \ | rejected | sí |
decided_at | string | null | — | date-time |
decision_reason | string | null | — | máx. 500 |
approved_amount_clp | integer | null | — | ≥ 1, ≤ 999999999999 |
curl -X POST https://api.vitrinadev.com/api/v1/credit-applications/<id>/decision \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"outcome": "approved",
"decision_reason": "ingresos y antigüedad laboral cumplen la política",
"approved_amount_clp": 9200000
}'Ejemplo de respuesta (200)
{
"data": {
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": "2026-09-16T10:00:00.000Z",
"decided_by": "11111111-0000-4000-8000-000000000001",
"outcome": "approved",
"decision_reason": "ingresos y antigüedad laboral cumplen la política",
"approved_amount_clp": 9200000,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "approved",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /credit-applications/{id}/submission
Record that the carpeta went out
Records BR-1024’s SENT as a fact and moves the file from recorded to submitted. submitted_at is the CALLER’S and OPTIONAL — the ordinary case is recording a carpeta that already left, on a day the ejecutivo knows, not the instant this endpoint is called; omit it and the server stamps now(). The actor is the authenticated principal, never a body field. A file that is not recorded refuses with a 409 — this is a compare-and-swap on submitted_at is null, not a read-then-write, so two concurrent submissions resolve to one 200 and one 409.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | any | sí |
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
submitted_at | string | null | — | date-time |
curl -X POST https://api.vitrinadev.com/api/v1/credit-applications/<id>/submission \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"submitted_at": "2026-09-10T14:00:00.000Z"
}'Ejemplo de respuesta (200)
{
"data": {
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "submitted",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
POST /credit-applications/{id}/withdrawal
Pull the file (BR-1040’s NOT_TAKEN)
The HOUSE’S OWN act on its OWN record — the dealership stops chasing the file, whatever the lender said or did not say. There is deliberately no withdrawn_at in the body: the instant is server-stamped now(), the same as the decision body’s actor rule, because this is not a fact reported from somebody else’s clock. withdrawn_reason is REQUIRED and must contain visible text.
The withdrawal is TERMINAL — no further submission, decision or contact note may be recorded against it afterwards, so a second call is a 409 and the first actor and reason stand.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
id | path | any | sí |
Cuerpo
| Campo | Tipo | Obligatorio | Restricciones |
|---|---|---|---|
withdrawn_reason | string | null | — | máx. 500 |
curl -X POST https://api.vitrinadev.com/api/v1/credit-applications/<id>/withdrawal \
-H "Authorization: Bearer $VITRINA_KEY" \
-H "Content-Type: application/json" \
-d '{
"withdrawn_reason": "el cliente obtuvo mejores condiciones en otra financiera"
}'Ejemplo de respuesta (200)
{
"data": {
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": "2026-09-18T09:00:00.000Z",
"withdrawn_by": "11111111-0000-4000-8000-000000000001",
"withdrawn_reason": "el cliente obtuvo mejores condiciones en otra financiera",
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "withdrawn",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9"
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429
GET /credit-applications/ageing
The chase board with its clock resolved (ERP S11-4)
Mounted before /:id — declaration order matters, or this literal segment would be swallowed by the id route. Read-scoped: nothing here changes a row. There is no threshold_days parameter — the SLA window lives on the financial institution, per lender, not as a caller override.
| Parámetro | En | Tipo | Obligatorio | Restricciones |
|---|---|---|---|---|
bucket | query | reciente \ | atrasado \ | vencido |
waiting_on | query | dealership \ | institution \ | customer |
limit | query | integer | no | ≥ 1, ≤ 200 |
curl https://api.vitrinadev.com/api/v1/credit-applications/ageing \
-H "Authorization: Bearer $VITRINA_KEY"Ejemplo de respuesta (200)
{
"data": [
{
"id": "d9d9d9d9-0000-4000-8000-000000000001",
"tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
"display_id": "F-12",
"display_seq": 12,
"vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
"buyer_contact_id": "22222222-0000-4000-8000-000000000002",
"institution_id": "dadadada-0000-4000-8000-000000000001",
"requested_amount_clp": 9500000,
"vehicle_price_clp": 11900000,
"declared_income_clp": 1200000,
"fee_clp": null,
"term_months": 48,
"financed_total_clp": null,
"submitted_at": "2026-09-10T14:00:00.000Z",
"submitted_by": "11111111-0000-4000-8000-000000000001",
"decided_at": null,
"decided_by": null,
"outcome": null,
"decision_reason": null,
"approved_amount_clp": null,
"withdrawn_at": null,
"withdrawn_by": null,
"withdrawn_reason": null,
"last_contact_at": null,
"last_contact_by": null,
"chased_at": null,
"state": "submitted",
"created_at": "2026-09-08T11:00:00.000Z",
"updated_at": "2026-09-10T14:00:00.000Z",
"taken": false,
"taken_sale_note_id": null,
"taken_sale_note_folio": null,
"institution_name": "Banco Estado",
"taken_credit_state": null,
"taken_disbursed_at": null,
"vehicle_label": "Toyota Corolla 2023",
"vehicle_plate": "RJKL48",
"buyer_name": "María José Soto",
"buyer_rut": "12.345.678-9",
"response_sla_days": 5,
"days_since_last_contact": 9,
"overdue": true
}
],
"meta": {
"total": 1
}
}Responde: 200 · 400 · 401 · 403 · 404 · 409 · 429