@vitrina/api 11.102.0 → 12.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.cts +1342 -319
- package/dist/index.d.ts +1342 -319
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -142,10 +142,8 @@ interface paths {
|
|
|
142
142
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
143
143
|
* "status": "active",
|
|
144
144
|
* "is_default": true,
|
|
145
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
146
145
|
* "temperature": null,
|
|
147
146
|
* "default_max_steps": 5,
|
|
148
|
-
* "reasoning_effort": "high",
|
|
149
147
|
* "autonomy_level": "supervised",
|
|
150
148
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
151
149
|
* "knowledge_tags": [
|
|
@@ -157,7 +155,6 @@ interface paths {
|
|
|
157
155
|
* "allowed_url_prefixes": [],
|
|
158
156
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000007",
|
|
159
157
|
* "draft_system_prompt": null,
|
|
160
|
-
* "draft_model": null,
|
|
161
158
|
* "draft_temperature": null,
|
|
162
159
|
* "draft_max_steps": null,
|
|
163
160
|
* "draft_tool_wiring": null,
|
|
@@ -182,10 +179,8 @@ interface paths {
|
|
|
182
179
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
183
180
|
* "status": "active",
|
|
184
181
|
* "is_default": false,
|
|
185
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
186
182
|
* "temperature": null,
|
|
187
183
|
* "default_max_steps": 5,
|
|
188
|
-
* "reasoning_effort": "high",
|
|
189
184
|
* "autonomy_level": "supervised",
|
|
190
185
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
191
186
|
* "knowledge_tags": [
|
|
@@ -197,7 +192,6 @@ interface paths {
|
|
|
197
192
|
* "allowed_url_prefixes": [],
|
|
198
193
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000007",
|
|
199
194
|
* "draft_system_prompt": null,
|
|
200
|
-
* "draft_model": null,
|
|
201
195
|
* "draft_temperature": null,
|
|
202
196
|
* "draft_max_steps": null,
|
|
203
197
|
* "draft_tool_wiring": null,
|
|
@@ -309,7 +303,6 @@ interface paths {
|
|
|
309
303
|
name: string;
|
|
310
304
|
/** @default */
|
|
311
305
|
description?: string;
|
|
312
|
-
model?: string;
|
|
313
306
|
};
|
|
314
307
|
};
|
|
315
308
|
};
|
|
@@ -329,10 +322,8 @@ interface paths {
|
|
|
329
322
|
* "description": "Coordina servicio técnico y repuestos.",
|
|
330
323
|
* "status": "active",
|
|
331
324
|
* "is_default": false,
|
|
332
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
333
325
|
* "temperature": null,
|
|
334
326
|
* "default_max_steps": 5,
|
|
335
|
-
* "reasoning_effort": "high",
|
|
336
327
|
* "autonomy_level": "supervised",
|
|
337
328
|
* "system_prompt": "",
|
|
338
329
|
* "knowledge_tags": [],
|
|
@@ -341,7 +332,6 @@ interface paths {
|
|
|
341
332
|
* "allowed_url_prefixes": [],
|
|
342
333
|
* "published_version_id": null,
|
|
343
334
|
* "draft_system_prompt": null,
|
|
344
|
-
* "draft_model": null,
|
|
345
335
|
* "draft_temperature": null,
|
|
346
336
|
* "draft_max_steps": null,
|
|
347
337
|
* "draft_tool_wiring": null,
|
|
@@ -458,10 +448,8 @@ interface paths {
|
|
|
458
448
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
459
449
|
* "status": "active",
|
|
460
450
|
* "is_default": true,
|
|
461
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
462
451
|
* "temperature": null,
|
|
463
452
|
* "default_max_steps": 5,
|
|
464
|
-
* "reasoning_effort": "high",
|
|
465
453
|
* "autonomy_level": "supervised",
|
|
466
454
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
467
455
|
* "knowledge_tags": [
|
|
@@ -473,7 +461,6 @@ interface paths {
|
|
|
473
461
|
* "allowed_url_prefixes": [],
|
|
474
462
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000007",
|
|
475
463
|
* "draft_system_prompt": null,
|
|
476
|
-
* "draft_model": null,
|
|
477
464
|
* "draft_temperature": null,
|
|
478
465
|
* "draft_max_steps": null,
|
|
479
466
|
* "draft_tool_wiring": null,
|
|
@@ -574,7 +561,6 @@ interface paths {
|
|
|
574
561
|
"application/json": {
|
|
575
562
|
name?: string;
|
|
576
563
|
description?: string;
|
|
577
|
-
model?: string;
|
|
578
564
|
followups_enabled?: boolean;
|
|
579
565
|
allowed_url_prefixes?: string[];
|
|
580
566
|
};
|
|
@@ -596,10 +582,8 @@ interface paths {
|
|
|
596
582
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
597
583
|
* "status": "active",
|
|
598
584
|
* "is_default": true,
|
|
599
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
600
585
|
* "temperature": null,
|
|
601
586
|
* "default_max_steps": 5,
|
|
602
|
-
* "reasoning_effort": "high",
|
|
603
587
|
* "autonomy_level": "supervised",
|
|
604
588
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
605
589
|
* "knowledge_tags": [
|
|
@@ -611,7 +595,6 @@ interface paths {
|
|
|
611
595
|
* "allowed_url_prefixes": [],
|
|
612
596
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000007",
|
|
613
597
|
* "draft_system_prompt": null,
|
|
614
|
-
* "draft_model": null,
|
|
615
598
|
* "draft_temperature": null,
|
|
616
599
|
* "draft_max_steps": null,
|
|
617
600
|
* "draft_tool_wiring": null,
|
|
@@ -1271,10 +1254,8 @@ interface paths {
|
|
|
1271
1254
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
1272
1255
|
* "status": "active",
|
|
1273
1256
|
* "is_default": false,
|
|
1274
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
1275
1257
|
* "temperature": null,
|
|
1276
1258
|
* "default_max_steps": 5,
|
|
1277
|
-
* "reasoning_effort": "high",
|
|
1278
1259
|
* "autonomy_level": "supervised",
|
|
1279
1260
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
1280
1261
|
* "knowledge_tags": [
|
|
@@ -1286,7 +1267,6 @@ interface paths {
|
|
|
1286
1267
|
* "allowed_url_prefixes": [],
|
|
1287
1268
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000007",
|
|
1288
1269
|
* "draft_system_prompt": null,
|
|
1289
|
-
* "draft_model": null,
|
|
1290
1270
|
* "draft_temperature": null,
|
|
1291
1271
|
* "draft_max_steps": null,
|
|
1292
1272
|
* "draft_tool_wiring": null,
|
|
@@ -1427,7 +1407,6 @@ interface paths {
|
|
|
1427
1407
|
comment_dm_criteria: string | null;
|
|
1428
1408
|
knowledge_tags: string[];
|
|
1429
1409
|
function_ids: string[];
|
|
1430
|
-
model: string | null;
|
|
1431
1410
|
temperature: number | null;
|
|
1432
1411
|
default_max_steps: number | null;
|
|
1433
1412
|
tool_snapshot: {
|
|
@@ -1611,7 +1590,6 @@ interface paths {
|
|
|
1611
1590
|
comment_dm_criteria: string | null;
|
|
1612
1591
|
knowledge_tags: string[];
|
|
1613
1592
|
function_ids: string[];
|
|
1614
|
-
model: string | null;
|
|
1615
1593
|
temperature: number | null;
|
|
1616
1594
|
default_max_steps: number | null;
|
|
1617
1595
|
tool_snapshot: {
|
|
@@ -1802,7 +1780,6 @@ interface paths {
|
|
|
1802
1780
|
comment_dm_criteria: string | null;
|
|
1803
1781
|
knowledge_tags: string[];
|
|
1804
1782
|
function_ids: string[];
|
|
1805
|
-
model: string | null;
|
|
1806
1783
|
temperature: number | null;
|
|
1807
1784
|
default_max_steps: number | null;
|
|
1808
1785
|
tool_snapshot: {
|
|
@@ -2055,10 +2032,7 @@ interface paths {
|
|
|
2055
2032
|
voice_instructions?: string;
|
|
2056
2033
|
comment_dm_criteria?: string;
|
|
2057
2034
|
knowledge_tags?: string[];
|
|
2058
|
-
model?: string;
|
|
2059
2035
|
temperature?: number | null;
|
|
2060
|
-
/** @enum {string|null} */
|
|
2061
|
-
reasoning_effort?: "max" | "xhigh" | "high" | "medium" | "low" | "minimal" | "none" | null;
|
|
2062
2036
|
max_steps?: number;
|
|
2063
2037
|
tool_wiring?: {
|
|
2064
2038
|
/** Format: uuid */
|
|
@@ -2453,10 +2427,8 @@ interface paths {
|
|
|
2453
2427
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
2454
2428
|
* "status": "active",
|
|
2455
2429
|
* "is_default": true,
|
|
2456
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
2457
2430
|
* "temperature": null,
|
|
2458
2431
|
* "default_max_steps": 5,
|
|
2459
|
-
* "reasoning_effort": "high",
|
|
2460
2432
|
* "autonomy_level": "supervised",
|
|
2461
2433
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
2462
2434
|
* "knowledge_tags": [
|
|
@@ -2468,7 +2440,6 @@ interface paths {
|
|
|
2468
2440
|
* "allowed_url_prefixes": [],
|
|
2469
2441
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000008",
|
|
2470
2442
|
* "draft_system_prompt": null,
|
|
2471
|
-
* "draft_model": null,
|
|
2472
2443
|
* "draft_temperature": null,
|
|
2473
2444
|
* "draft_max_steps": null,
|
|
2474
2445
|
* "draft_tool_wiring": null,
|
|
@@ -34767,6 +34738,115 @@ interface paths {
|
|
|
34767
34738
|
patch?: never;
|
|
34768
34739
|
trace?: never;
|
|
34769
34740
|
};
|
|
34741
|
+
"/billing/invoices/{id}/transfer-claim": {
|
|
34742
|
+
parameters: {
|
|
34743
|
+
query?: never;
|
|
34744
|
+
header?: never;
|
|
34745
|
+
path?: never;
|
|
34746
|
+
cookie?: never;
|
|
34747
|
+
};
|
|
34748
|
+
get?: never;
|
|
34749
|
+
put?: never;
|
|
34750
|
+
/**
|
|
34751
|
+
* «Ya pagué por transferencia»: pause automatic charging of a cobro
|
|
34752
|
+
* @description The owner says this cobro was already paid by bank transfer (for example without its reference, which the reconciliation cannot match). While the claim is pending nothing charges the cobro automatically — not the scheduled charge, not a retry — and it does not advance in collections; the Vitrina team verifies the transfer and either records the payment or resumes the charge with a fresh heads-up. Idempotent (`created: false` when already pending). 409 when the cobro is no longer open (paid, voided, or a charge is in flight). Requires `billing:write`.
|
|
34753
|
+
*/
|
|
34754
|
+
post: {
|
|
34755
|
+
parameters: {
|
|
34756
|
+
query?: never;
|
|
34757
|
+
header?: {
|
|
34758
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
34759
|
+
"Idempotency-Key"?: string;
|
|
34760
|
+
};
|
|
34761
|
+
path: {
|
|
34762
|
+
id: string;
|
|
34763
|
+
};
|
|
34764
|
+
cookie?: never;
|
|
34765
|
+
};
|
|
34766
|
+
requestBody?: never;
|
|
34767
|
+
responses: {
|
|
34768
|
+
/** @description The claim */
|
|
34769
|
+
200: {
|
|
34770
|
+
headers: {
|
|
34771
|
+
[name: string]: unknown;
|
|
34772
|
+
};
|
|
34773
|
+
content: {
|
|
34774
|
+
/**
|
|
34775
|
+
* @example {
|
|
34776
|
+
* "data": {
|
|
34777
|
+
* "created": true,
|
|
34778
|
+
* "claimedAt": "2026-10-14T13:20:00.000Z",
|
|
34779
|
+
* "number": "VT-2026-0002"
|
|
34780
|
+
* }
|
|
34781
|
+
* }
|
|
34782
|
+
*/
|
|
34783
|
+
"application/json": {
|
|
34784
|
+
data: components["schemas"]["TransferClaimResult"];
|
|
34785
|
+
};
|
|
34786
|
+
};
|
|
34787
|
+
};
|
|
34788
|
+
/** @description Validation error */
|
|
34789
|
+
400: {
|
|
34790
|
+
headers: {
|
|
34791
|
+
[name: string]: unknown;
|
|
34792
|
+
};
|
|
34793
|
+
content: {
|
|
34794
|
+
"application/json": components["schemas"]["Error"];
|
|
34795
|
+
};
|
|
34796
|
+
};
|
|
34797
|
+
/** @description Unauthorized */
|
|
34798
|
+
401: {
|
|
34799
|
+
headers: {
|
|
34800
|
+
[name: string]: unknown;
|
|
34801
|
+
};
|
|
34802
|
+
content: {
|
|
34803
|
+
"application/json": components["schemas"]["Error"];
|
|
34804
|
+
};
|
|
34805
|
+
};
|
|
34806
|
+
/** @description Forbidden */
|
|
34807
|
+
403: {
|
|
34808
|
+
headers: {
|
|
34809
|
+
[name: string]: unknown;
|
|
34810
|
+
};
|
|
34811
|
+
content: {
|
|
34812
|
+
"application/json": components["schemas"]["Error"];
|
|
34813
|
+
};
|
|
34814
|
+
};
|
|
34815
|
+
/** @description Not found */
|
|
34816
|
+
404: {
|
|
34817
|
+
headers: {
|
|
34818
|
+
[name: string]: unknown;
|
|
34819
|
+
};
|
|
34820
|
+
content: {
|
|
34821
|
+
"application/json": components["schemas"]["Error"];
|
|
34822
|
+
};
|
|
34823
|
+
};
|
|
34824
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
34825
|
+
409: {
|
|
34826
|
+
headers: {
|
|
34827
|
+
[name: string]: unknown;
|
|
34828
|
+
};
|
|
34829
|
+
content: {
|
|
34830
|
+
"application/json": components["schemas"]["Error"];
|
|
34831
|
+
};
|
|
34832
|
+
};
|
|
34833
|
+
/** @description Rate limited */
|
|
34834
|
+
429: {
|
|
34835
|
+
headers: {
|
|
34836
|
+
[name: string]: unknown;
|
|
34837
|
+
};
|
|
34838
|
+
content: {
|
|
34839
|
+
"application/json": components["schemas"]["Error"];
|
|
34840
|
+
};
|
|
34841
|
+
};
|
|
34842
|
+
};
|
|
34843
|
+
};
|
|
34844
|
+
delete?: never;
|
|
34845
|
+
options?: never;
|
|
34846
|
+
head?: never;
|
|
34847
|
+
patch?: never;
|
|
34848
|
+
trace?: never;
|
|
34849
|
+
};
|
|
34770
34850
|
"/billing/payment-method/setup": {
|
|
34771
34851
|
parameters: {
|
|
34772
34852
|
query?: never;
|
|
@@ -52165,7 +52245,7 @@ interface paths {
|
|
|
52165
52245
|
patch?: never;
|
|
52166
52246
|
trace?: never;
|
|
52167
52247
|
};
|
|
52168
|
-
"/payment-
|
|
52248
|
+
"/clinic/payment-registrations": {
|
|
52169
52249
|
parameters: {
|
|
52170
52250
|
query?: never;
|
|
52171
52251
|
header?: never;
|
|
@@ -52173,8 +52253,167 @@ interface paths {
|
|
|
52173
52253
|
cookie?: never;
|
|
52174
52254
|
};
|
|
52175
52255
|
/**
|
|
52176
|
-
*
|
|
52177
|
-
* @description
|
|
52256
|
+
* Mercado Pago payments to register in the practice system
|
|
52257
|
+
* @description The reception tasks: each Mercado Pago payment of a clinic whose Dentalink / Medilink / Reservo authors its money, pre-filled (patient and RUT, amount, medio, MP number, date, what it paid) and, once the mirror brings the pago in, its match. `status=pending` (default) = `open` + `ambiguous` (an ambiguous task lists its `candidates`). `payments:read`.
|
|
52258
|
+
*/
|
|
52259
|
+
get: {
|
|
52260
|
+
parameters: {
|
|
52261
|
+
query?: {
|
|
52262
|
+
/** @description `pending` = open + ambiguous (default); `closed` = matched, dismissed or cancelled. */
|
|
52263
|
+
status?: "pending" | "matched" | "closed" | "all";
|
|
52264
|
+
contact_id?: string;
|
|
52265
|
+
limit?: number;
|
|
52266
|
+
offset?: number | null;
|
|
52267
|
+
};
|
|
52268
|
+
header?: never;
|
|
52269
|
+
path?: never;
|
|
52270
|
+
cookie?: never;
|
|
52271
|
+
};
|
|
52272
|
+
requestBody?: never;
|
|
52273
|
+
responses: {
|
|
52274
|
+
/** @description The tasks, newest payment first */
|
|
52275
|
+
200: {
|
|
52276
|
+
headers: {
|
|
52277
|
+
[name: string]: unknown;
|
|
52278
|
+
};
|
|
52279
|
+
content: {
|
|
52280
|
+
/**
|
|
52281
|
+
* @example {
|
|
52282
|
+
* "data": [
|
|
52283
|
+
* {
|
|
52284
|
+
* "id": "0199c3a0-1111-7000-8000-000000000001",
|
|
52285
|
+
* "status": "matched",
|
|
52286
|
+
* "vendor": "dentalink",
|
|
52287
|
+
* "vendor_label": "Dentalink",
|
|
52288
|
+
* "provider": "mercadopago",
|
|
52289
|
+
* "provider_reference": "182050716739",
|
|
52290
|
+
* "provider_payment_url": "https://www.mercadopago.cl/activities?q=182050716739",
|
|
52291
|
+
* "customer_payment_id": "0199c3a0-2222-7000-8000-000000000002",
|
|
52292
|
+
* "contact_id": "0199c3a0-3333-7000-8000-000000000003",
|
|
52293
|
+
* "amount_clp": 30000,
|
|
52294
|
+
* "paid_on": "2026-10-05",
|
|
52295
|
+
* "patient": {
|
|
52296
|
+
* "id": "0199c3a0-4444-7000-8000-000000000004",
|
|
52297
|
+
* "name": "Ana Pérez",
|
|
52298
|
+
* "rut": "11.111.111-1"
|
|
52299
|
+
* },
|
|
52300
|
+
* "concept": {
|
|
52301
|
+
* "kind": "appointment_deposit",
|
|
52302
|
+
* "label": "Abono cita",
|
|
52303
|
+
* "appointment_starts_at": "2026-10-09T13:00:00.000Z"
|
|
52304
|
+
* },
|
|
52305
|
+
* "medio": {
|
|
52306
|
+
* "code": "30",
|
|
52307
|
+
* "label": "Mercado Pago"
|
|
52308
|
+
* },
|
|
52309
|
+
* "matched": {
|
|
52310
|
+
* "mirror_payment_id": "0199c3a0-5555-7000-8000-000000000005",
|
|
52311
|
+
* "vendor_reference": "88123",
|
|
52312
|
+
* "received_on": "2026-10-05",
|
|
52313
|
+
* "amount_clp": 30000,
|
|
52314
|
+
* "medio": "Mercado Pago",
|
|
52315
|
+
* "voided": false,
|
|
52316
|
+
* "by": "auto_unique",
|
|
52317
|
+
* "at": "2026-10-05T18:20:00.000Z"
|
|
52318
|
+
* },
|
|
52319
|
+
* "candidates": [],
|
|
52320
|
+
* "dismissed_reason": null,
|
|
52321
|
+
* "overdue": false,
|
|
52322
|
+
* "reminded_at": null,
|
|
52323
|
+
* "created_at": "2026-10-05T14:02:11.000Z"
|
|
52324
|
+
* }
|
|
52325
|
+
* ],
|
|
52326
|
+
* "meta": {
|
|
52327
|
+
* "total": 1,
|
|
52328
|
+
* "limit": 50,
|
|
52329
|
+
* "offset": 0
|
|
52330
|
+
* }
|
|
52331
|
+
* }
|
|
52332
|
+
*/
|
|
52333
|
+
"application/json": {
|
|
52334
|
+
data: components["schemas"]["PaymentRegistration"][];
|
|
52335
|
+
meta: {
|
|
52336
|
+
total: number;
|
|
52337
|
+
limit: number;
|
|
52338
|
+
offset: number;
|
|
52339
|
+
};
|
|
52340
|
+
};
|
|
52341
|
+
};
|
|
52342
|
+
};
|
|
52343
|
+
/** @description Validation error */
|
|
52344
|
+
400: {
|
|
52345
|
+
headers: {
|
|
52346
|
+
[name: string]: unknown;
|
|
52347
|
+
};
|
|
52348
|
+
content: {
|
|
52349
|
+
"application/json": components["schemas"]["Error"];
|
|
52350
|
+
};
|
|
52351
|
+
};
|
|
52352
|
+
/** @description Unauthorized */
|
|
52353
|
+
401: {
|
|
52354
|
+
headers: {
|
|
52355
|
+
[name: string]: unknown;
|
|
52356
|
+
};
|
|
52357
|
+
content: {
|
|
52358
|
+
"application/json": components["schemas"]["Error"];
|
|
52359
|
+
};
|
|
52360
|
+
};
|
|
52361
|
+
/** @description Forbidden */
|
|
52362
|
+
403: {
|
|
52363
|
+
headers: {
|
|
52364
|
+
[name: string]: unknown;
|
|
52365
|
+
};
|
|
52366
|
+
content: {
|
|
52367
|
+
"application/json": components["schemas"]["Error"];
|
|
52368
|
+
};
|
|
52369
|
+
};
|
|
52370
|
+
/** @description Not found */
|
|
52371
|
+
404: {
|
|
52372
|
+
headers: {
|
|
52373
|
+
[name: string]: unknown;
|
|
52374
|
+
};
|
|
52375
|
+
content: {
|
|
52376
|
+
"application/json": components["schemas"]["Error"];
|
|
52377
|
+
};
|
|
52378
|
+
};
|
|
52379
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
52380
|
+
409: {
|
|
52381
|
+
headers: {
|
|
52382
|
+
[name: string]: unknown;
|
|
52383
|
+
};
|
|
52384
|
+
content: {
|
|
52385
|
+
"application/json": components["schemas"]["Error"];
|
|
52386
|
+
};
|
|
52387
|
+
};
|
|
52388
|
+
/** @description Rate limited */
|
|
52389
|
+
429: {
|
|
52390
|
+
headers: {
|
|
52391
|
+
[name: string]: unknown;
|
|
52392
|
+
};
|
|
52393
|
+
content: {
|
|
52394
|
+
"application/json": components["schemas"]["Error"];
|
|
52395
|
+
};
|
|
52396
|
+
};
|
|
52397
|
+
};
|
|
52398
|
+
};
|
|
52399
|
+
put?: never;
|
|
52400
|
+
post?: never;
|
|
52401
|
+
delete?: never;
|
|
52402
|
+
options?: never;
|
|
52403
|
+
head?: never;
|
|
52404
|
+
patch?: never;
|
|
52405
|
+
trace?: never;
|
|
52406
|
+
};
|
|
52407
|
+
"/clinic/payment-registrations/settings": {
|
|
52408
|
+
parameters: {
|
|
52409
|
+
query?: never;
|
|
52410
|
+
header?: never;
|
|
52411
|
+
path?: never;
|
|
52412
|
+
cookie?: never;
|
|
52413
|
+
};
|
|
52414
|
+
/**
|
|
52415
|
+
* Which vendor medio stands for Mercado Pago
|
|
52416
|
+
* @description The practice system, its medios (the synced `medio_pago` catalog for Dentalink / Medilink, the fixed list for Reservo), the one chosen as Mercado Pago, a name-based suggestion, and after how many business days an unregistered payment reminds reception (default 2). `payments:read`.
|
|
52178
52417
|
*/
|
|
52179
52418
|
get: {
|
|
52180
52419
|
parameters: {
|
|
@@ -52185,7 +52424,7 @@ interface paths {
|
|
|
52185
52424
|
};
|
|
52186
52425
|
requestBody?: never;
|
|
52187
52426
|
responses: {
|
|
52188
|
-
/** @description
|
|
52427
|
+
/** @description The settings */
|
|
52189
52428
|
200: {
|
|
52190
52429
|
headers: {
|
|
52191
52430
|
[name: string]: unknown;
|
|
@@ -52194,43 +52433,28 @@ interface paths {
|
|
|
52194
52433
|
/**
|
|
52195
52434
|
* @example {
|
|
52196
52435
|
* "data": {
|
|
52197
|
-
* "
|
|
52198
|
-
*
|
|
52199
|
-
*
|
|
52200
|
-
*
|
|
52201
|
-
*
|
|
52436
|
+
* "vendor": "dentalink",
|
|
52437
|
+
* "vendor_label": "Dentalink",
|
|
52438
|
+
* "mercadopago_medio": null,
|
|
52439
|
+
* "suggested_medio": "30",
|
|
52440
|
+
* "medios": [
|
|
52441
|
+
* {
|
|
52442
|
+
* "code": "2",
|
|
52443
|
+
* "label": "Tarjeta de débito",
|
|
52444
|
+
* "active": true
|
|
52202
52445
|
* },
|
|
52203
|
-
*
|
|
52204
|
-
* "
|
|
52205
|
-
* "
|
|
52206
|
-
* "
|
|
52446
|
+
* {
|
|
52447
|
+
* "code": "30",
|
|
52448
|
+
* "label": "Mercado Pago",
|
|
52449
|
+
* "active": true
|
|
52207
52450
|
* }
|
|
52208
|
-
*
|
|
52209
|
-
* "
|
|
52210
|
-
* "min_clp": null
|
|
52211
|
-
* },
|
|
52212
|
-
* "budgets": {
|
|
52213
|
-
* "accept_charge": "full"
|
|
52214
|
-
* },
|
|
52215
|
-
* "mercadopago": {
|
|
52216
|
-
* "connected": true,
|
|
52217
|
-
* "mp_user_id": "1234567890",
|
|
52218
|
-
* "mp_nickname": "AUTOMOTORAEJEMPLO",
|
|
52219
|
-
* "environment": "production",
|
|
52220
|
-
* "connected_at": "2026-10-08T14:00:00.000Z",
|
|
52221
|
-
* "last_sync_at": "2026-10-08T15:00:00.000Z",
|
|
52222
|
-
* "last_sync_status": "ok",
|
|
52223
|
-
* "last_sync_error": null,
|
|
52224
|
-
* "configured": true
|
|
52225
|
-
* }
|
|
52451
|
+
* ],
|
|
52452
|
+
* "reminder_business_days": 2
|
|
52226
52453
|
* }
|
|
52227
52454
|
* }
|
|
52228
52455
|
*/
|
|
52229
52456
|
"application/json": {
|
|
52230
|
-
data
|
|
52231
|
-
meta?: {
|
|
52232
|
-
[key: string]: unknown;
|
|
52233
|
-
};
|
|
52457
|
+
data: components["schemas"]["PaymentRegistrationSettings"];
|
|
52234
52458
|
};
|
|
52235
52459
|
};
|
|
52236
52460
|
};
|
|
@@ -52290,25 +52514,9 @@ interface paths {
|
|
|
52290
52514
|
};
|
|
52291
52515
|
};
|
|
52292
52516
|
};
|
|
52293
|
-
put?: never;
|
|
52294
|
-
post?: never;
|
|
52295
|
-
delete?: never;
|
|
52296
|
-
options?: never;
|
|
52297
|
-
head?: never;
|
|
52298
|
-
patch?: never;
|
|
52299
|
-
trace?: never;
|
|
52300
|
-
};
|
|
52301
|
-
"/payment-settings/charging": {
|
|
52302
|
-
parameters: {
|
|
52303
|
-
query?: never;
|
|
52304
|
-
header?: never;
|
|
52305
|
-
path?: never;
|
|
52306
|
-
cookie?: never;
|
|
52307
|
-
};
|
|
52308
|
-
get?: never;
|
|
52309
52517
|
/**
|
|
52310
|
-
*
|
|
52311
|
-
* @description
|
|
52518
|
+
* Choose the Mercado Pago medio / the reminder delay
|
|
52519
|
+
* @description Sets the vendor medio that stands for Mercado Pago (it must be one of the clinic's medios; 400 `unknown_medio`) and/or the reminder delay in business days (1–15). Re-runs the matcher: a chosen medio can settle an ambiguous task. `clinic_admin:write`.
|
|
52312
52520
|
*/
|
|
52313
52521
|
put: {
|
|
52314
52522
|
parameters: {
|
|
@@ -52321,26 +52529,19 @@ interface paths {
|
|
|
52321
52529
|
content: {
|
|
52322
52530
|
/**
|
|
52323
52531
|
* @example {
|
|
52324
|
-
* "
|
|
52325
|
-
* "
|
|
52532
|
+
* "mercadopago_medio": "30",
|
|
52533
|
+
* "reminder_business_days": 2
|
|
52326
52534
|
* }
|
|
52327
52535
|
*/
|
|
52328
52536
|
"application/json": {
|
|
52329
|
-
/**
|
|
52330
|
-
|
|
52331
|
-
|
|
52332
|
-
*/
|
|
52333
|
-
reservation?: "mp_first" | "transfer_first" | "mp_only" | "transfer_only" | null;
|
|
52334
|
-
/**
|
|
52335
|
-
* @description `mp_first` = Mercado Pago link first, transfer as the alternative; `transfer_first` = transfer first, link only if the customer asks; `mp_only` / `transfer_only` = only that method. A mode that needs Mercado Pago without a connection falls back to the transfer; an `*_only` mode with nothing to offer tells the customer the team will send the details.
|
|
52336
|
-
* @enum {string|null}
|
|
52337
|
-
*/
|
|
52338
|
-
final?: "mp_first" | "transfer_first" | "mp_only" | "transfer_only" | null;
|
|
52537
|
+
/** @description The vendor medio that stands for Mercado Pago; null clears it. */
|
|
52538
|
+
mercadopago_medio?: string | null;
|
|
52539
|
+
reminder_business_days?: number;
|
|
52339
52540
|
};
|
|
52340
52541
|
};
|
|
52341
52542
|
};
|
|
52342
52543
|
responses: {
|
|
52343
|
-
/** @description The
|
|
52544
|
+
/** @description The settings */
|
|
52344
52545
|
200: {
|
|
52345
52546
|
headers: {
|
|
52346
52547
|
[name: string]: unknown;
|
|
@@ -52349,24 +52550,28 @@ interface paths {
|
|
|
52349
52550
|
/**
|
|
52350
52551
|
* @example {
|
|
52351
52552
|
* "data": {
|
|
52352
|
-
* "
|
|
52353
|
-
*
|
|
52354
|
-
*
|
|
52355
|
-
*
|
|
52356
|
-
*
|
|
52357
|
-
*
|
|
52358
|
-
*
|
|
52359
|
-
*
|
|
52360
|
-
*
|
|
52361
|
-
*
|
|
52553
|
+
* "vendor": "dentalink",
|
|
52554
|
+
* "vendor_label": "Dentalink",
|
|
52555
|
+
* "mercadopago_medio": null,
|
|
52556
|
+
* "suggested_medio": "30",
|
|
52557
|
+
* "medios": [
|
|
52558
|
+
* {
|
|
52559
|
+
* "code": "2",
|
|
52560
|
+
* "label": "Tarjeta de débito",
|
|
52561
|
+
* "active": true
|
|
52562
|
+
* },
|
|
52563
|
+
* {
|
|
52564
|
+
* "code": "30",
|
|
52565
|
+
* "label": "Mercado Pago",
|
|
52566
|
+
* "active": true
|
|
52567
|
+
* }
|
|
52568
|
+
* ],
|
|
52569
|
+
* "reminder_business_days": 2
|
|
52362
52570
|
* }
|
|
52363
52571
|
* }
|
|
52364
52572
|
*/
|
|
52365
52573
|
"application/json": {
|
|
52366
|
-
data
|
|
52367
|
-
meta?: {
|
|
52368
|
-
[key: string]: unknown;
|
|
52369
|
-
};
|
|
52574
|
+
data: components["schemas"]["PaymentRegistrationSettings"];
|
|
52370
52575
|
};
|
|
52371
52576
|
};
|
|
52372
52577
|
};
|
|
@@ -52433,43 +52638,29 @@ interface paths {
|
|
|
52433
52638
|
patch?: never;
|
|
52434
52639
|
trace?: never;
|
|
52435
52640
|
};
|
|
52436
|
-
"/payment-
|
|
52641
|
+
"/clinic/payment-registrations/{id}": {
|
|
52437
52642
|
parameters: {
|
|
52438
52643
|
query?: never;
|
|
52439
52644
|
header?: never;
|
|
52440
52645
|
path?: never;
|
|
52441
52646
|
cookie?: never;
|
|
52442
52647
|
};
|
|
52443
|
-
get?: never;
|
|
52444
52648
|
/**
|
|
52445
|
-
*
|
|
52446
|
-
* @description
|
|
52649
|
+
* One Mercado Pago payment registration task
|
|
52650
|
+
* @description One task, as the list returns it. `payments:read`.
|
|
52447
52651
|
*/
|
|
52448
|
-
|
|
52652
|
+
get: {
|
|
52449
52653
|
parameters: {
|
|
52450
52654
|
query?: never;
|
|
52451
52655
|
header?: never;
|
|
52452
|
-
path
|
|
52453
|
-
|
|
52454
|
-
};
|
|
52455
|
-
requestBody?: {
|
|
52456
|
-
content: {
|
|
52457
|
-
/**
|
|
52458
|
-
* @example {
|
|
52459
|
-
* "min_clp": 200000
|
|
52460
|
-
* }
|
|
52461
|
-
*/
|
|
52462
|
-
"application/json": {
|
|
52463
|
-
/**
|
|
52464
|
-
* @description Whole CLP from which a final charge (balance, budget, pack) may be paid in installments. `null` turns installments off. Reservations and deposits are always one payment.
|
|
52465
|
-
* @example 200000
|
|
52466
|
-
*/
|
|
52467
|
-
min_clp: number | null;
|
|
52468
|
-
};
|
|
52656
|
+
path: {
|
|
52657
|
+
id: string;
|
|
52469
52658
|
};
|
|
52659
|
+
cookie?: never;
|
|
52470
52660
|
};
|
|
52661
|
+
requestBody?: never;
|
|
52471
52662
|
responses: {
|
|
52472
|
-
/** @description The
|
|
52663
|
+
/** @description The task */
|
|
52473
52664
|
200: {
|
|
52474
52665
|
headers: {
|
|
52475
52666
|
[name: string]: unknown;
|
|
@@ -52478,15 +52669,51 @@ interface paths {
|
|
|
52478
52669
|
/**
|
|
52479
52670
|
* @example {
|
|
52480
52671
|
* "data": {
|
|
52481
|
-
* "
|
|
52672
|
+
* "id": "0199c3a0-1111-7000-8000-000000000001",
|
|
52673
|
+
* "status": "matched",
|
|
52674
|
+
* "vendor": "dentalink",
|
|
52675
|
+
* "vendor_label": "Dentalink",
|
|
52676
|
+
* "provider": "mercadopago",
|
|
52677
|
+
* "provider_reference": "182050716739",
|
|
52678
|
+
* "provider_payment_url": "https://www.mercadopago.cl/activities?q=182050716739",
|
|
52679
|
+
* "customer_payment_id": "0199c3a0-2222-7000-8000-000000000002",
|
|
52680
|
+
* "contact_id": "0199c3a0-3333-7000-8000-000000000003",
|
|
52681
|
+
* "amount_clp": 30000,
|
|
52682
|
+
* "paid_on": "2026-10-05",
|
|
52683
|
+
* "patient": {
|
|
52684
|
+
* "id": "0199c3a0-4444-7000-8000-000000000004",
|
|
52685
|
+
* "name": "Ana Pérez",
|
|
52686
|
+
* "rut": "11.111.111-1"
|
|
52687
|
+
* },
|
|
52688
|
+
* "concept": {
|
|
52689
|
+
* "kind": "appointment_deposit",
|
|
52690
|
+
* "label": "Abono cita",
|
|
52691
|
+
* "appointment_starts_at": "2026-10-09T13:00:00.000Z"
|
|
52692
|
+
* },
|
|
52693
|
+
* "medio": {
|
|
52694
|
+
* "code": "30",
|
|
52695
|
+
* "label": "Mercado Pago"
|
|
52696
|
+
* },
|
|
52697
|
+
* "matched": {
|
|
52698
|
+
* "mirror_payment_id": "0199c3a0-5555-7000-8000-000000000005",
|
|
52699
|
+
* "vendor_reference": "88123",
|
|
52700
|
+
* "received_on": "2026-10-05",
|
|
52701
|
+
* "amount_clp": 30000,
|
|
52702
|
+
* "medio": "Mercado Pago",
|
|
52703
|
+
* "voided": false,
|
|
52704
|
+
* "by": "auto_unique",
|
|
52705
|
+
* "at": "2026-10-05T18:20:00.000Z"
|
|
52706
|
+
* },
|
|
52707
|
+
* "candidates": [],
|
|
52708
|
+
* "dismissed_reason": null,
|
|
52709
|
+
* "overdue": false,
|
|
52710
|
+
* "reminded_at": null,
|
|
52711
|
+
* "created_at": "2026-10-05T14:02:11.000Z"
|
|
52482
52712
|
* }
|
|
52483
52713
|
* }
|
|
52484
52714
|
*/
|
|
52485
52715
|
"application/json": {
|
|
52486
|
-
data
|
|
52487
|
-
meta?: {
|
|
52488
|
-
[key: string]: unknown;
|
|
52489
|
-
};
|
|
52716
|
+
data: components["schemas"]["PaymentRegistration"];
|
|
52490
52717
|
};
|
|
52491
52718
|
};
|
|
52492
52719
|
};
|
|
@@ -52546,6 +52773,7 @@ interface paths {
|
|
|
52546
52773
|
};
|
|
52547
52774
|
};
|
|
52548
52775
|
};
|
|
52776
|
+
put?: never;
|
|
52549
52777
|
post?: never;
|
|
52550
52778
|
delete?: never;
|
|
52551
52779
|
options?: never;
|
|
@@ -52553,7 +52781,7 @@ interface paths {
|
|
|
52553
52781
|
patch?: never;
|
|
52554
52782
|
trace?: never;
|
|
52555
52783
|
};
|
|
52556
|
-
"/payment-
|
|
52784
|
+
"/clinic/payment-registrations/{id}/confirm": {
|
|
52557
52785
|
parameters: {
|
|
52558
52786
|
query?: never;
|
|
52559
52787
|
header?: never;
|
|
@@ -52561,36 +52789,41 @@ interface paths {
|
|
|
52561
52789
|
cookie?: never;
|
|
52562
52790
|
};
|
|
52563
52791
|
get?: never;
|
|
52792
|
+
put?: never;
|
|
52564
52793
|
/**
|
|
52565
|
-
*
|
|
52566
|
-
* @description
|
|
52794
|
+
* Confirm which vendor pago records this payment
|
|
52795
|
+
* @description Staff match: the pago must be the same patient's, the same amount and inside the window (400 `not_a_candidate`), and not already record another payment (409 `candidate_taken`). 409 `registration_not_pending` once the task is closed. Closes the task and its notification. `payments:write`.
|
|
52567
52796
|
*/
|
|
52568
|
-
|
|
52797
|
+
post: {
|
|
52569
52798
|
parameters: {
|
|
52570
52799
|
query?: never;
|
|
52571
|
-
header?:
|
|
52572
|
-
|
|
52800
|
+
header?: {
|
|
52801
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
52802
|
+
"Idempotency-Key"?: string;
|
|
52803
|
+
};
|
|
52804
|
+
path: {
|
|
52805
|
+
id: string;
|
|
52806
|
+
};
|
|
52573
52807
|
cookie?: never;
|
|
52574
52808
|
};
|
|
52575
52809
|
requestBody?: {
|
|
52576
52810
|
content: {
|
|
52577
52811
|
/**
|
|
52578
52812
|
* @example {
|
|
52579
|
-
* "
|
|
52813
|
+
* "mirror_payment_id": "0199c3a0-5555-7000-8000-000000000005"
|
|
52580
52814
|
* }
|
|
52581
52815
|
*/
|
|
52582
52816
|
"application/json": {
|
|
52583
52817
|
/**
|
|
52584
|
-
*
|
|
52585
|
-
* @
|
|
52586
|
-
* @enum {string}
|
|
52818
|
+
* Format: uuid
|
|
52819
|
+
* @description The vendor pago (a `clinic_mirror_payment` id) that records this payment.
|
|
52587
52820
|
*/
|
|
52588
|
-
|
|
52821
|
+
mirror_payment_id: string;
|
|
52589
52822
|
};
|
|
52590
52823
|
};
|
|
52591
52824
|
};
|
|
52592
52825
|
responses: {
|
|
52593
|
-
/** @description The
|
|
52826
|
+
/** @description The matched task */
|
|
52594
52827
|
200: {
|
|
52595
52828
|
headers: {
|
|
52596
52829
|
[name: string]: unknown;
|
|
@@ -52599,15 +52832,51 @@ interface paths {
|
|
|
52599
52832
|
/**
|
|
52600
52833
|
* @example {
|
|
52601
52834
|
* "data": {
|
|
52602
|
-
* "
|
|
52835
|
+
* "id": "0199c3a0-1111-7000-8000-000000000001",
|
|
52836
|
+
* "status": "matched",
|
|
52837
|
+
* "vendor": "dentalink",
|
|
52838
|
+
* "vendor_label": "Dentalink",
|
|
52839
|
+
* "provider": "mercadopago",
|
|
52840
|
+
* "provider_reference": "182050716739",
|
|
52841
|
+
* "provider_payment_url": "https://www.mercadopago.cl/activities?q=182050716739",
|
|
52842
|
+
* "customer_payment_id": "0199c3a0-2222-7000-8000-000000000002",
|
|
52843
|
+
* "contact_id": "0199c3a0-3333-7000-8000-000000000003",
|
|
52844
|
+
* "amount_clp": 30000,
|
|
52845
|
+
* "paid_on": "2026-10-05",
|
|
52846
|
+
* "patient": {
|
|
52847
|
+
* "id": "0199c3a0-4444-7000-8000-000000000004",
|
|
52848
|
+
* "name": "Ana Pérez",
|
|
52849
|
+
* "rut": "11.111.111-1"
|
|
52850
|
+
* },
|
|
52851
|
+
* "concept": {
|
|
52852
|
+
* "kind": "appointment_deposit",
|
|
52853
|
+
* "label": "Abono cita",
|
|
52854
|
+
* "appointment_starts_at": "2026-10-09T13:00:00.000Z"
|
|
52855
|
+
* },
|
|
52856
|
+
* "medio": {
|
|
52857
|
+
* "code": "30",
|
|
52858
|
+
* "label": "Mercado Pago"
|
|
52859
|
+
* },
|
|
52860
|
+
* "matched": {
|
|
52861
|
+
* "mirror_payment_id": "0199c3a0-5555-7000-8000-000000000005",
|
|
52862
|
+
* "vendor_reference": "88123",
|
|
52863
|
+
* "received_on": "2026-10-05",
|
|
52864
|
+
* "amount_clp": 30000,
|
|
52865
|
+
* "medio": "Mercado Pago",
|
|
52866
|
+
* "voided": false,
|
|
52867
|
+
* "by": "auto_unique",
|
|
52868
|
+
* "at": "2026-10-05T18:20:00.000Z"
|
|
52869
|
+
* },
|
|
52870
|
+
* "candidates": [],
|
|
52871
|
+
* "dismissed_reason": null,
|
|
52872
|
+
* "overdue": false,
|
|
52873
|
+
* "reminded_at": null,
|
|
52874
|
+
* "created_at": "2026-10-05T14:02:11.000Z"
|
|
52603
52875
|
* }
|
|
52604
52876
|
* }
|
|
52605
52877
|
*/
|
|
52606
52878
|
"application/json": {
|
|
52607
|
-
data
|
|
52608
|
-
meta?: {
|
|
52609
|
-
[key: string]: unknown;
|
|
52610
|
-
};
|
|
52879
|
+
data: components["schemas"]["PaymentRegistration"];
|
|
52611
52880
|
};
|
|
52612
52881
|
};
|
|
52613
52882
|
};
|
|
@@ -52667,34 +52936,55 @@ interface paths {
|
|
|
52667
52936
|
};
|
|
52668
52937
|
};
|
|
52669
52938
|
};
|
|
52670
|
-
post?: never;
|
|
52671
52939
|
delete?: never;
|
|
52672
52940
|
options?: never;
|
|
52673
52941
|
head?: never;
|
|
52674
52942
|
patch?: never;
|
|
52675
52943
|
trace?: never;
|
|
52676
52944
|
};
|
|
52677
|
-
"/payment-
|
|
52945
|
+
"/clinic/payment-registrations/{id}/dismiss": {
|
|
52678
52946
|
parameters: {
|
|
52679
52947
|
query?: never;
|
|
52680
52948
|
header?: never;
|
|
52681
52949
|
path?: never;
|
|
52682
52950
|
cookie?: never;
|
|
52683
52951
|
};
|
|
52952
|
+
get?: never;
|
|
52953
|
+
put?: never;
|
|
52684
52954
|
/**
|
|
52685
|
-
*
|
|
52686
|
-
* @description
|
|
52955
|
+
* Close a registration task without a match
|
|
52956
|
+
* @description `registered_elsewhere` (reception registered it in a way Vitrina cannot match) or `not_needed`. 409 `registration_not_pending` once the task is closed. `payments:write`.
|
|
52687
52957
|
*/
|
|
52688
|
-
|
|
52958
|
+
post: {
|
|
52689
52959
|
parameters: {
|
|
52690
52960
|
query?: never;
|
|
52691
|
-
header?:
|
|
52692
|
-
|
|
52961
|
+
header?: {
|
|
52962
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
52963
|
+
"Idempotency-Key"?: string;
|
|
52964
|
+
};
|
|
52965
|
+
path: {
|
|
52966
|
+
id: string;
|
|
52967
|
+
};
|
|
52693
52968
|
cookie?: never;
|
|
52694
52969
|
};
|
|
52695
|
-
requestBody?:
|
|
52970
|
+
requestBody?: {
|
|
52971
|
+
content: {
|
|
52972
|
+
/**
|
|
52973
|
+
* @example {
|
|
52974
|
+
* "reason": "registered_elsewhere"
|
|
52975
|
+
* }
|
|
52976
|
+
*/
|
|
52977
|
+
"application/json": {
|
|
52978
|
+
/**
|
|
52979
|
+
* @description `registered_elsewhere` = reception registered it in a way Vitrina cannot match (another amount, a split); `not_needed` = it does not belong in the practice system.
|
|
52980
|
+
* @enum {string}
|
|
52981
|
+
*/
|
|
52982
|
+
reason: "registered_elsewhere" | "not_needed";
|
|
52983
|
+
};
|
|
52984
|
+
};
|
|
52985
|
+
};
|
|
52696
52986
|
responses: {
|
|
52697
|
-
/** @description The
|
|
52987
|
+
/** @description The closed task */
|
|
52698
52988
|
200: {
|
|
52699
52989
|
headers: {
|
|
52700
52990
|
[name: string]: unknown;
|
|
@@ -52703,22 +52993,51 @@ interface paths {
|
|
|
52703
52993
|
/**
|
|
52704
52994
|
* @example {
|
|
52705
52995
|
* "data": {
|
|
52706
|
-
* "
|
|
52707
|
-
* "
|
|
52708
|
-
* "
|
|
52709
|
-
* "
|
|
52710
|
-
* "
|
|
52711
|
-
* "
|
|
52712
|
-
* "
|
|
52713
|
-
* "
|
|
52996
|
+
* "id": "0199c3a0-1111-7000-8000-000000000001",
|
|
52997
|
+
* "status": "matched",
|
|
52998
|
+
* "vendor": "dentalink",
|
|
52999
|
+
* "vendor_label": "Dentalink",
|
|
53000
|
+
* "provider": "mercadopago",
|
|
53001
|
+
* "provider_reference": "182050716739",
|
|
53002
|
+
* "provider_payment_url": "https://www.mercadopago.cl/activities?q=182050716739",
|
|
53003
|
+
* "customer_payment_id": "0199c3a0-2222-7000-8000-000000000002",
|
|
53004
|
+
* "contact_id": "0199c3a0-3333-7000-8000-000000000003",
|
|
53005
|
+
* "amount_clp": 30000,
|
|
53006
|
+
* "paid_on": "2026-10-05",
|
|
53007
|
+
* "patient": {
|
|
53008
|
+
* "id": "0199c3a0-4444-7000-8000-000000000004",
|
|
53009
|
+
* "name": "Ana Pérez",
|
|
53010
|
+
* "rut": "11.111.111-1"
|
|
53011
|
+
* },
|
|
53012
|
+
* "concept": {
|
|
53013
|
+
* "kind": "appointment_deposit",
|
|
53014
|
+
* "label": "Abono cita",
|
|
53015
|
+
* "appointment_starts_at": "2026-10-09T13:00:00.000Z"
|
|
53016
|
+
* },
|
|
53017
|
+
* "medio": {
|
|
53018
|
+
* "code": "30",
|
|
53019
|
+
* "label": "Mercado Pago"
|
|
53020
|
+
* },
|
|
53021
|
+
* "matched": {
|
|
53022
|
+
* "mirror_payment_id": "0199c3a0-5555-7000-8000-000000000005",
|
|
53023
|
+
* "vendor_reference": "88123",
|
|
53024
|
+
* "received_on": "2026-10-05",
|
|
53025
|
+
* "amount_clp": 30000,
|
|
53026
|
+
* "medio": "Mercado Pago",
|
|
53027
|
+
* "voided": false,
|
|
53028
|
+
* "by": "auto_unique",
|
|
53029
|
+
* "at": "2026-10-05T18:20:00.000Z"
|
|
53030
|
+
* },
|
|
53031
|
+
* "candidates": [],
|
|
53032
|
+
* "dismissed_reason": null,
|
|
53033
|
+
* "overdue": false,
|
|
53034
|
+
* "reminded_at": null,
|
|
53035
|
+
* "created_at": "2026-10-05T14:02:11.000Z"
|
|
52714
53036
|
* }
|
|
52715
53037
|
* }
|
|
52716
53038
|
*/
|
|
52717
53039
|
"application/json": {
|
|
52718
|
-
data
|
|
52719
|
-
meta?: {
|
|
52720
|
-
[key: string]: unknown;
|
|
52721
|
-
};
|
|
53040
|
+
data: components["schemas"]["PaymentRegistration"];
|
|
52722
53041
|
};
|
|
52723
53042
|
};
|
|
52724
53043
|
};
|
|
@@ -52778,42 +53097,33 @@ interface paths {
|
|
|
52778
53097
|
};
|
|
52779
53098
|
};
|
|
52780
53099
|
};
|
|
52781
|
-
put?: never;
|
|
52782
|
-
post?: never;
|
|
52783
53100
|
delete?: never;
|
|
52784
53101
|
options?: never;
|
|
52785
53102
|
head?: never;
|
|
52786
53103
|
patch?: never;
|
|
52787
53104
|
trace?: never;
|
|
52788
53105
|
};
|
|
52789
|
-
"/payment-settings
|
|
53106
|
+
"/payment-settings": {
|
|
52790
53107
|
parameters: {
|
|
52791
53108
|
query?: never;
|
|
52792
53109
|
header?: never;
|
|
52793
53110
|
path?: never;
|
|
52794
53111
|
cookie?: never;
|
|
52795
53112
|
};
|
|
52796
|
-
get?: never;
|
|
52797
|
-
put?: never;
|
|
52798
53113
|
/**
|
|
52799
|
-
*
|
|
52800
|
-
* @description
|
|
53114
|
+
* How this business charges, and its Mercado Pago connection
|
|
53115
|
+
* @description `charging.reservation` (refundable reservations: booking deposits, vehicle reservation deposits) and `charging.final` (balances, budgets, packs, services), each with the effective `mode`, whether it is the workspace's choice or the vertical default (`source`), and the `default_mode`. Defaults: healthcare `mp_first` for both; automotive `transfer_first` for reservations (a Mercado Pago refund does not return the commission) and `mp_first` for final payments; any other vertical `mp_first`. `mercadopago` is the connection status plus `configured` (the environment can connect at all). `installments.min_clp`: from which amount a final-charge link offers cuotas (`null` = off). `budgets.accept_charge`: what a presupuesto's «aceptar y pagar» charges (`full` | `first_installment`). Requires `tenant_bank_accounts:read` (or `clinic_money:read`).
|
|
52801
53116
|
*/
|
|
52802
|
-
|
|
53117
|
+
get: {
|
|
52803
53118
|
parameters: {
|
|
52804
|
-
query?:
|
|
52805
|
-
|
|
52806
|
-
};
|
|
52807
|
-
header?: {
|
|
52808
|
-
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
52809
|
-
"Idempotency-Key"?: string;
|
|
52810
|
-
};
|
|
53119
|
+
query?: never;
|
|
53120
|
+
header?: never;
|
|
52811
53121
|
path?: never;
|
|
52812
53122
|
cookie?: never;
|
|
52813
53123
|
};
|
|
52814
53124
|
requestBody?: never;
|
|
52815
53125
|
responses: {
|
|
52816
|
-
/** @description
|
|
53126
|
+
/** @description Charging preference and connection */
|
|
52817
53127
|
200: {
|
|
52818
53128
|
headers: {
|
|
52819
53129
|
[name: string]: unknown;
|
|
@@ -52822,7 +53132,35 @@ interface paths {
|
|
|
52822
53132
|
/**
|
|
52823
53133
|
* @example {
|
|
52824
53134
|
* "data": {
|
|
52825
|
-
* "
|
|
53135
|
+
* "charging": {
|
|
53136
|
+
* "reservation": {
|
|
53137
|
+
* "mode": "transfer_first",
|
|
53138
|
+
* "source": "default",
|
|
53139
|
+
* "default_mode": "transfer_first"
|
|
53140
|
+
* },
|
|
53141
|
+
* "final": {
|
|
53142
|
+
* "mode": "mp_first",
|
|
53143
|
+
* "source": "tenant",
|
|
53144
|
+
* "default_mode": "mp_first"
|
|
53145
|
+
* }
|
|
53146
|
+
* },
|
|
53147
|
+
* "installments": {
|
|
53148
|
+
* "min_clp": null
|
|
53149
|
+
* },
|
|
53150
|
+
* "budgets": {
|
|
53151
|
+
* "accept_charge": "full"
|
|
53152
|
+
* },
|
|
53153
|
+
* "mercadopago": {
|
|
53154
|
+
* "connected": true,
|
|
53155
|
+
* "mp_user_id": "1234567890",
|
|
53156
|
+
* "mp_nickname": "AUTOMOTORAEJEMPLO",
|
|
53157
|
+
* "environment": "production",
|
|
53158
|
+
* "connected_at": "2026-10-08T14:00:00.000Z",
|
|
53159
|
+
* "last_sync_at": "2026-10-08T15:00:00.000Z",
|
|
53160
|
+
* "last_sync_status": "ok",
|
|
53161
|
+
* "last_sync_error": null,
|
|
53162
|
+
* "configured": true
|
|
53163
|
+
* }
|
|
52826
53164
|
* }
|
|
52827
53165
|
* }
|
|
52828
53166
|
*/
|
|
@@ -52890,13 +53228,15 @@ interface paths {
|
|
|
52890
53228
|
};
|
|
52891
53229
|
};
|
|
52892
53230
|
};
|
|
53231
|
+
put?: never;
|
|
53232
|
+
post?: never;
|
|
52893
53233
|
delete?: never;
|
|
52894
53234
|
options?: never;
|
|
52895
53235
|
head?: never;
|
|
52896
53236
|
patch?: never;
|
|
52897
53237
|
trace?: never;
|
|
52898
53238
|
};
|
|
52899
|
-
"/payment-settings/
|
|
53239
|
+
"/payment-settings/charging": {
|
|
52900
53240
|
parameters: {
|
|
52901
53241
|
query?: never;
|
|
52902
53242
|
header?: never;
|
|
@@ -52904,29 +53244,69 @@ interface paths {
|
|
|
52904
53244
|
cookie?: never;
|
|
52905
53245
|
};
|
|
52906
53246
|
get?: never;
|
|
52907
|
-
put?: never;
|
|
52908
53247
|
/**
|
|
52909
|
-
*
|
|
52910
|
-
* @description
|
|
53248
|
+
* Set how this business charges, per charge type
|
|
53249
|
+
* @description Pass `reservation` and/or `final`; `null` resets that type to the vertical default, an omitted type is left as it is. Every payment block (the agent booking tools, the hosted booking page) follows it. Returns the resolved preference. Requires `tenant_bank_accounts:write` (or `clinic_money:write`).
|
|
52911
53250
|
*/
|
|
52912
|
-
|
|
53251
|
+
put: {
|
|
52913
53252
|
parameters: {
|
|
52914
53253
|
query?: never;
|
|
52915
|
-
header?:
|
|
52916
|
-
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
52917
|
-
"Idempotency-Key"?: string;
|
|
52918
|
-
};
|
|
53254
|
+
header?: never;
|
|
52919
53255
|
path?: never;
|
|
52920
53256
|
cookie?: never;
|
|
52921
53257
|
};
|
|
52922
|
-
requestBody?:
|
|
53258
|
+
requestBody?: {
|
|
53259
|
+
content: {
|
|
53260
|
+
/**
|
|
53261
|
+
* @example {
|
|
53262
|
+
* "reservation": "transfer_first",
|
|
53263
|
+
* "final": null
|
|
53264
|
+
* }
|
|
53265
|
+
*/
|
|
53266
|
+
"application/json": {
|
|
53267
|
+
/**
|
|
53268
|
+
* @description `mp_first` = Mercado Pago link first, transfer as the alternative; `transfer_first` = transfer first, link only if the customer asks; `mp_only` / `transfer_only` = only that method. A mode that needs Mercado Pago without a connection falls back to the transfer; an `*_only` mode with nothing to offer tells the customer the team will send the details.
|
|
53269
|
+
* @enum {string|null}
|
|
53270
|
+
*/
|
|
53271
|
+
reservation?: "mp_first" | "transfer_first" | "mp_only" | "transfer_only" | null;
|
|
53272
|
+
/**
|
|
53273
|
+
* @description `mp_first` = Mercado Pago link first, transfer as the alternative; `transfer_first` = transfer first, link only if the customer asks; `mp_only` / `transfer_only` = only that method. A mode that needs Mercado Pago without a connection falls back to the transfer; an `*_only` mode with nothing to offer tells the customer the team will send the details.
|
|
53274
|
+
* @enum {string|null}
|
|
53275
|
+
*/
|
|
53276
|
+
final?: "mp_first" | "transfer_first" | "mp_only" | "transfer_only" | null;
|
|
53277
|
+
};
|
|
53278
|
+
};
|
|
53279
|
+
};
|
|
52923
53280
|
responses: {
|
|
52924
|
-
/** @description
|
|
52925
|
-
|
|
53281
|
+
/** @description The resolved charging preference */
|
|
53282
|
+
200: {
|
|
52926
53283
|
headers: {
|
|
52927
53284
|
[name: string]: unknown;
|
|
52928
53285
|
};
|
|
52929
|
-
content
|
|
53286
|
+
content: {
|
|
53287
|
+
/**
|
|
53288
|
+
* @example {
|
|
53289
|
+
* "data": {
|
|
53290
|
+
* "reservation": {
|
|
53291
|
+
* "mode": "transfer_first",
|
|
53292
|
+
* "source": "default",
|
|
53293
|
+
* "default_mode": "transfer_first"
|
|
53294
|
+
* },
|
|
53295
|
+
* "final": {
|
|
53296
|
+
* "mode": "mp_first",
|
|
53297
|
+
* "source": "tenant",
|
|
53298
|
+
* "default_mode": "mp_first"
|
|
53299
|
+
* }
|
|
53300
|
+
* }
|
|
53301
|
+
* }
|
|
53302
|
+
*/
|
|
53303
|
+
"application/json": {
|
|
53304
|
+
data?: unknown;
|
|
53305
|
+
meta?: {
|
|
53306
|
+
[key: string]: unknown;
|
|
53307
|
+
};
|
|
53308
|
+
};
|
|
53309
|
+
};
|
|
52930
53310
|
};
|
|
52931
53311
|
/** @description Validation error */
|
|
52932
53312
|
400: {
|
|
@@ -52984,13 +53364,14 @@ interface paths {
|
|
|
52984
53364
|
};
|
|
52985
53365
|
};
|
|
52986
53366
|
};
|
|
53367
|
+
post?: never;
|
|
52987
53368
|
delete?: never;
|
|
52988
53369
|
options?: never;
|
|
52989
53370
|
head?: never;
|
|
52990
53371
|
patch?: never;
|
|
52991
53372
|
trace?: never;
|
|
52992
53373
|
};
|
|
52993
|
-
"/payment-settings/
|
|
53374
|
+
"/payment-settings/installments": {
|
|
52994
53375
|
parameters: {
|
|
52995
53376
|
query?: never;
|
|
52996
53377
|
header?: never;
|
|
@@ -52998,25 +53379,36 @@ interface paths {
|
|
|
52998
53379
|
cookie?: never;
|
|
52999
53380
|
};
|
|
53000
53381
|
get?: never;
|
|
53001
|
-
put?: never;
|
|
53002
53382
|
/**
|
|
53003
|
-
*
|
|
53004
|
-
* @description
|
|
53383
|
+
* Set from which amount a payment link offers installments
|
|
53384
|
+
* @description From `min_clp` CLP up, a Mercado Pago link for a FINAL charge (balance, budget, pack) offers installments («cuotas»); `null` turns them off (the default). Reservations and deposits are always one payment. Returns the saved threshold. Requires `tenant_bank_accounts:write` (or `clinic_money:write`).
|
|
53005
53385
|
*/
|
|
53006
|
-
|
|
53386
|
+
put: {
|
|
53007
53387
|
parameters: {
|
|
53008
53388
|
query?: never;
|
|
53009
|
-
header?:
|
|
53010
|
-
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
53011
|
-
"Idempotency-Key"?: string;
|
|
53012
|
-
};
|
|
53389
|
+
header?: never;
|
|
53013
53390
|
path?: never;
|
|
53014
53391
|
cookie?: never;
|
|
53015
53392
|
};
|
|
53016
|
-
requestBody?:
|
|
53393
|
+
requestBody?: {
|
|
53394
|
+
content: {
|
|
53395
|
+
/**
|
|
53396
|
+
* @example {
|
|
53397
|
+
* "min_clp": 200000
|
|
53398
|
+
* }
|
|
53399
|
+
*/
|
|
53400
|
+
"application/json": {
|
|
53401
|
+
/**
|
|
53402
|
+
* @description Whole CLP from which a final charge (balance, budget, pack) may be paid in installments. `null` turns installments off. Reservations and deposits are always one payment.
|
|
53403
|
+
* @example 200000
|
|
53404
|
+
*/
|
|
53405
|
+
min_clp: number | null;
|
|
53406
|
+
};
|
|
53407
|
+
};
|
|
53408
|
+
};
|
|
53017
53409
|
responses: {
|
|
53018
|
-
/** @description
|
|
53019
|
-
|
|
53410
|
+
/** @description The saved threshold */
|
|
53411
|
+
200: {
|
|
53020
53412
|
headers: {
|
|
53021
53413
|
[name: string]: unknown;
|
|
53022
53414
|
};
|
|
@@ -53024,7 +53416,7 @@ interface paths {
|
|
|
53024
53416
|
/**
|
|
53025
53417
|
* @example {
|
|
53026
53418
|
* "data": {
|
|
53027
|
-
* "
|
|
53419
|
+
* "min_clp": 200000
|
|
53028
53420
|
* }
|
|
53029
53421
|
* }
|
|
53030
53422
|
*/
|
|
@@ -53092,35 +53484,51 @@ interface paths {
|
|
|
53092
53484
|
};
|
|
53093
53485
|
};
|
|
53094
53486
|
};
|
|
53487
|
+
post?: never;
|
|
53095
53488
|
delete?: never;
|
|
53096
53489
|
options?: never;
|
|
53097
53490
|
head?: never;
|
|
53098
53491
|
patch?: never;
|
|
53099
53492
|
trace?: never;
|
|
53100
53493
|
};
|
|
53101
|
-
"/
|
|
53494
|
+
"/payment-settings/budgets": {
|
|
53102
53495
|
parameters: {
|
|
53103
53496
|
query?: never;
|
|
53104
53497
|
header?: never;
|
|
53105
53498
|
path?: never;
|
|
53106
53499
|
cookie?: never;
|
|
53107
53500
|
};
|
|
53501
|
+
get?: never;
|
|
53108
53502
|
/**
|
|
53109
|
-
*
|
|
53110
|
-
* @description
|
|
53111
|
-
*
|
|
53112
|
-
* **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`.
|
|
53503
|
+
* Set what «aceptar y pagar» charges for a presupuesto
|
|
53504
|
+
* @description When the charging preference offers a Mercado Pago link for final charges, the public presupuesto page offers «aceptar y pagar». `accept_charge` decides its amount: `full` (default) or `first_installment` (the accepted amount divided by the presupuesto's `installments`). Returns the saved choice. Requires `tenant_bank_accounts:write` (or `clinic_money:write`).
|
|
53113
53505
|
*/
|
|
53114
|
-
|
|
53506
|
+
put: {
|
|
53115
53507
|
parameters: {
|
|
53116
53508
|
query?: never;
|
|
53117
53509
|
header?: never;
|
|
53118
53510
|
path?: never;
|
|
53119
53511
|
cookie?: never;
|
|
53120
53512
|
};
|
|
53121
|
-
requestBody?:
|
|
53513
|
+
requestBody?: {
|
|
53514
|
+
content: {
|
|
53515
|
+
/**
|
|
53516
|
+
* @example {
|
|
53517
|
+
* "accept_charge": "first_installment"
|
|
53518
|
+
* }
|
|
53519
|
+
*/
|
|
53520
|
+
"application/json": {
|
|
53521
|
+
/**
|
|
53522
|
+
* @description What the patient pays when they accept a presupuesto from its link: `full` (the whole amount being accepted, the default) or `first_installment` (that amount divided by the presupuesto's `installments`; the whole amount when it has none).
|
|
53523
|
+
* @example first_installment
|
|
53524
|
+
* @enum {string}
|
|
53525
|
+
*/
|
|
53526
|
+
accept_charge: "full" | "first_installment";
|
|
53527
|
+
};
|
|
53528
|
+
};
|
|
53529
|
+
};
|
|
53122
53530
|
responses: {
|
|
53123
|
-
/** @description The
|
|
53531
|
+
/** @description The saved choice */
|
|
53124
53532
|
200: {
|
|
53125
53533
|
headers: {
|
|
53126
53534
|
[name: string]: unknown;
|
|
@@ -53129,26 +53537,15 @@ interface paths {
|
|
|
53129
53537
|
/**
|
|
53130
53538
|
* @example {
|
|
53131
53539
|
* "data": {
|
|
53132
|
-
* "
|
|
53133
|
-
* "available": true,
|
|
53134
|
-
* "billed": false
|
|
53135
|
-
* },
|
|
53136
|
-
* "fintoc": {
|
|
53137
|
-
* "configured": true,
|
|
53138
|
-
* "entitled": true,
|
|
53139
|
-
* "feature": "bank_feed_fintoc",
|
|
53140
|
-
* "price_clp_per_bank_month": null,
|
|
53141
|
-
* "connected_banks": 1
|
|
53142
|
-
* },
|
|
53143
|
-
* "bci_api_market": {
|
|
53144
|
-
* "configured": false,
|
|
53145
|
-
* "reason": "BCI API Market production access is pending partner approval."
|
|
53146
|
-
* }
|
|
53540
|
+
* "accept_charge": "first_installment"
|
|
53147
53541
|
* }
|
|
53148
53542
|
* }
|
|
53149
53543
|
*/
|
|
53150
53544
|
"application/json": {
|
|
53151
|
-
data
|
|
53545
|
+
data?: unknown;
|
|
53546
|
+
meta?: {
|
|
53547
|
+
[key: string]: unknown;
|
|
53548
|
+
};
|
|
53152
53549
|
};
|
|
53153
53550
|
};
|
|
53154
53551
|
};
|
|
@@ -53208,7 +53605,6 @@ interface paths {
|
|
|
53208
53605
|
};
|
|
53209
53606
|
};
|
|
53210
53607
|
};
|
|
53211
|
-
put?: never;
|
|
53212
53608
|
post?: never;
|
|
53213
53609
|
delete?: never;
|
|
53214
53610
|
options?: never;
|
|
@@ -53216,7 +53612,7 @@ interface paths {
|
|
|
53216
53612
|
patch?: never;
|
|
53217
53613
|
trace?: never;
|
|
53218
53614
|
};
|
|
53219
|
-
"/
|
|
53615
|
+
"/payment-settings/mercadopago/status": {
|
|
53220
53616
|
parameters: {
|
|
53221
53617
|
query?: never;
|
|
53222
53618
|
header?: never;
|
|
@@ -53224,10 +53620,8 @@ interface paths {
|
|
|
53224
53620
|
cookie?: never;
|
|
53225
53621
|
};
|
|
53226
53622
|
/**
|
|
53227
|
-
*
|
|
53228
|
-
* @description
|
|
53229
|
-
*
|
|
53230
|
-
* **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`.
|
|
53623
|
+
* Mercado Pago connection status
|
|
53624
|
+
* @description Connected as … / last sync / last sync error, or `connected: false`. Requires `tenant_bank_accounts:read` (or `clinic_money:read`).
|
|
53231
53625
|
*/
|
|
53232
53626
|
get: {
|
|
53233
53627
|
parameters: {
|
|
@@ -53238,7 +53632,7 @@ interface paths {
|
|
|
53238
53632
|
};
|
|
53239
53633
|
requestBody?: never;
|
|
53240
53634
|
responses: {
|
|
53241
|
-
/** @description The
|
|
53635
|
+
/** @description The connection status */
|
|
53242
53636
|
200: {
|
|
53243
53637
|
headers: {
|
|
53244
53638
|
[name: string]: unknown;
|
|
@@ -53246,31 +53640,23 @@ interface paths {
|
|
|
53246
53640
|
content: {
|
|
53247
53641
|
/**
|
|
53248
53642
|
* @example {
|
|
53249
|
-
* "data":
|
|
53250
|
-
*
|
|
53251
|
-
*
|
|
53252
|
-
*
|
|
53253
|
-
*
|
|
53254
|
-
*
|
|
53255
|
-
*
|
|
53256
|
-
*
|
|
53257
|
-
*
|
|
53258
|
-
*
|
|
53259
|
-
* }
|
|
53260
|
-
* ],
|
|
53261
|
-
* "enabled": true,
|
|
53262
|
-
* "connected_at": "2026-09-20T14:02:11.000Z",
|
|
53263
|
-
* "disconnected_at": null,
|
|
53264
|
-
* "last_sync_at": "2026-09-22T09:00:04.000Z",
|
|
53265
|
-
* "last_sync_status": "ok",
|
|
53266
|
-
* "last_sync_error": null,
|
|
53267
|
-
* "sync_cursor": "2026-09-22"
|
|
53268
|
-
* }
|
|
53269
|
-
* ]
|
|
53643
|
+
* "data": {
|
|
53644
|
+
* "connected": true,
|
|
53645
|
+
* "mp_user_id": "1234567890",
|
|
53646
|
+
* "mp_nickname": "AUTOMOTORAEJEMPLO",
|
|
53647
|
+
* "environment": "production",
|
|
53648
|
+
* "connected_at": "2026-10-08T14:00:00.000Z",
|
|
53649
|
+
* "last_sync_at": "2026-10-08T15:00:00.000Z",
|
|
53650
|
+
* "last_sync_status": "ok",
|
|
53651
|
+
* "last_sync_error": null
|
|
53652
|
+
* }
|
|
53270
53653
|
* }
|
|
53271
53654
|
*/
|
|
53272
53655
|
"application/json": {
|
|
53273
|
-
data
|
|
53656
|
+
data?: unknown;
|
|
53657
|
+
meta?: {
|
|
53658
|
+
[key: string]: unknown;
|
|
53659
|
+
};
|
|
53274
53660
|
};
|
|
53275
53661
|
};
|
|
53276
53662
|
};
|
|
@@ -53338,7 +53724,7 @@ interface paths {
|
|
|
53338
53724
|
patch?: never;
|
|
53339
53725
|
trace?: never;
|
|
53340
53726
|
};
|
|
53341
|
-
"/
|
|
53727
|
+
"/payment-settings/mercadopago/connect": {
|
|
53342
53728
|
parameters: {
|
|
53343
53729
|
query?: never;
|
|
53344
53730
|
header?: never;
|
|
@@ -53348,14 +53734,14 @@ interface paths {
|
|
|
53348
53734
|
get?: never;
|
|
53349
53735
|
put?: never;
|
|
53350
53736
|
/**
|
|
53351
|
-
*
|
|
53352
|
-
* @description
|
|
53353
|
-
*
|
|
53354
|
-
* **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`.
|
|
53737
|
+
* Start the Mercado Pago OAuth consent flow
|
|
53738
|
+
* @description Returns the consent URL for a person to open. Connects the business's OWN Mercado Pago account, never Vitrina's. `return_to` is where the browser lands after the callback. Requires `tenant_bank_accounts:write` (or `clinic_money:write`).
|
|
53355
53739
|
*/
|
|
53356
53740
|
post: {
|
|
53357
53741
|
parameters: {
|
|
53358
|
-
query?:
|
|
53742
|
+
query?: {
|
|
53743
|
+
return_to?: string;
|
|
53744
|
+
};
|
|
53359
53745
|
header?: {
|
|
53360
53746
|
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
53361
53747
|
"Idempotency-Key"?: string;
|
|
@@ -53363,19 +53749,10 @@ interface paths {
|
|
|
53363
53749
|
path?: never;
|
|
53364
53750
|
cookie?: never;
|
|
53365
53751
|
};
|
|
53366
|
-
requestBody?:
|
|
53367
|
-
content: {
|
|
53368
|
-
/**
|
|
53369
|
-
* @example {
|
|
53370
|
-
* "exchange_token": "exch_7f3a9b2c1d"
|
|
53371
|
-
* }
|
|
53372
|
-
*/
|
|
53373
|
-
"application/json": components["schemas"]["BankFeedFintocConnectBody"];
|
|
53374
|
-
};
|
|
53375
|
-
};
|
|
53752
|
+
requestBody?: never;
|
|
53376
53753
|
responses: {
|
|
53377
|
-
/** @description The
|
|
53378
|
-
|
|
53754
|
+
/** @description The consent URL */
|
|
53755
|
+
200: {
|
|
53379
53756
|
headers: {
|
|
53380
53757
|
[name: string]: unknown;
|
|
53381
53758
|
};
|
|
@@ -53383,28 +53760,15 @@ interface paths {
|
|
|
53383
53760
|
/**
|
|
53384
53761
|
* @example {
|
|
53385
53762
|
* "data": {
|
|
53386
|
-
* "
|
|
53387
|
-
* "provider": "fintoc",
|
|
53388
|
-
* "institution_name": "Banco de Chile",
|
|
53389
|
-
* "holder_name": "Clínica Ejemplo SpA",
|
|
53390
|
-
* "accounts": [
|
|
53391
|
-
* {
|
|
53392
|
-
* "id": "acc_9Xz2Lm",
|
|
53393
|
-
* "number_masked": "••••4821"
|
|
53394
|
-
* }
|
|
53395
|
-
* ],
|
|
53396
|
-
* "enabled": true,
|
|
53397
|
-
* "connected_at": "2026-09-20T14:02:11.000Z",
|
|
53398
|
-
* "disconnected_at": null,
|
|
53399
|
-
* "last_sync_at": "2026-09-22T09:00:04.000Z",
|
|
53400
|
-
* "last_sync_status": "ok",
|
|
53401
|
-
* "last_sync_error": null,
|
|
53402
|
-
* "sync_cursor": "2026-09-22"
|
|
53763
|
+
* "url": "https://auth.mercadopago.cl/authorization?client_id=4688094843266502&response_type=code&platform_id=mp&state=…"
|
|
53403
53764
|
* }
|
|
53404
53765
|
* }
|
|
53405
53766
|
*/
|
|
53406
53767
|
"application/json": {
|
|
53407
|
-
data
|
|
53768
|
+
data?: unknown;
|
|
53769
|
+
meta?: {
|
|
53770
|
+
[key: string]: unknown;
|
|
53771
|
+
};
|
|
53408
53772
|
};
|
|
53409
53773
|
};
|
|
53410
53774
|
};
|
|
@@ -53470,7 +53834,7 @@ interface paths {
|
|
|
53470
53834
|
patch?: never;
|
|
53471
53835
|
trace?: never;
|
|
53472
53836
|
};
|
|
53473
|
-
"/
|
|
53837
|
+
"/payment-settings/mercadopago/disconnect": {
|
|
53474
53838
|
parameters: {
|
|
53475
53839
|
query?: never;
|
|
53476
53840
|
header?: never;
|
|
@@ -53480,10 +53844,8 @@ interface paths {
|
|
|
53480
53844
|
get?: never;
|
|
53481
53845
|
put?: never;
|
|
53482
53846
|
/**
|
|
53483
|
-
*
|
|
53484
|
-
* @description
|
|
53485
|
-
*
|
|
53486
|
-
* **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`.
|
|
53847
|
+
* Disconnect the Mercado Pago account
|
|
53848
|
+
* @description Reversible: the connection survives disabled and a later reconnect re-enables it. Payment blocks fall back to the transfer. Requires `tenant_bank_accounts:write` (or `clinic_money:write`).
|
|
53487
53849
|
*/
|
|
53488
53850
|
post: {
|
|
53489
53851
|
parameters: {
|
|
@@ -53492,9 +53854,101 @@ interface paths {
|
|
|
53492
53854
|
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
53493
53855
|
"Idempotency-Key"?: string;
|
|
53494
53856
|
};
|
|
53495
|
-
path
|
|
53496
|
-
|
|
53857
|
+
path?: never;
|
|
53858
|
+
cookie?: never;
|
|
53859
|
+
};
|
|
53860
|
+
requestBody?: never;
|
|
53861
|
+
responses: {
|
|
53862
|
+
/** @description Disconnected */
|
|
53863
|
+
204: {
|
|
53864
|
+
headers: {
|
|
53865
|
+
[name: string]: unknown;
|
|
53866
|
+
};
|
|
53867
|
+
content?: never;
|
|
53868
|
+
};
|
|
53869
|
+
/** @description Validation error */
|
|
53870
|
+
400: {
|
|
53871
|
+
headers: {
|
|
53872
|
+
[name: string]: unknown;
|
|
53873
|
+
};
|
|
53874
|
+
content: {
|
|
53875
|
+
"application/json": components["schemas"]["Error"];
|
|
53876
|
+
};
|
|
53877
|
+
};
|
|
53878
|
+
/** @description Unauthorized */
|
|
53879
|
+
401: {
|
|
53880
|
+
headers: {
|
|
53881
|
+
[name: string]: unknown;
|
|
53882
|
+
};
|
|
53883
|
+
content: {
|
|
53884
|
+
"application/json": components["schemas"]["Error"];
|
|
53885
|
+
};
|
|
53886
|
+
};
|
|
53887
|
+
/** @description Forbidden */
|
|
53888
|
+
403: {
|
|
53889
|
+
headers: {
|
|
53890
|
+
[name: string]: unknown;
|
|
53891
|
+
};
|
|
53892
|
+
content: {
|
|
53893
|
+
"application/json": components["schemas"]["Error"];
|
|
53894
|
+
};
|
|
53895
|
+
};
|
|
53896
|
+
/** @description Not found */
|
|
53897
|
+
404: {
|
|
53898
|
+
headers: {
|
|
53899
|
+
[name: string]: unknown;
|
|
53900
|
+
};
|
|
53901
|
+
content: {
|
|
53902
|
+
"application/json": components["schemas"]["Error"];
|
|
53903
|
+
};
|
|
53904
|
+
};
|
|
53905
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
53906
|
+
409: {
|
|
53907
|
+
headers: {
|
|
53908
|
+
[name: string]: unknown;
|
|
53909
|
+
};
|
|
53910
|
+
content: {
|
|
53911
|
+
"application/json": components["schemas"]["Error"];
|
|
53912
|
+
};
|
|
53913
|
+
};
|
|
53914
|
+
/** @description Rate limited */
|
|
53915
|
+
429: {
|
|
53916
|
+
headers: {
|
|
53917
|
+
[name: string]: unknown;
|
|
53918
|
+
};
|
|
53919
|
+
content: {
|
|
53920
|
+
"application/json": components["schemas"]["Error"];
|
|
53921
|
+
};
|
|
53497
53922
|
};
|
|
53923
|
+
};
|
|
53924
|
+
};
|
|
53925
|
+
delete?: never;
|
|
53926
|
+
options?: never;
|
|
53927
|
+
head?: never;
|
|
53928
|
+
patch?: never;
|
|
53929
|
+
trace?: never;
|
|
53930
|
+
};
|
|
53931
|
+
"/payment-settings/mercadopago/sync": {
|
|
53932
|
+
parameters: {
|
|
53933
|
+
query?: never;
|
|
53934
|
+
header?: never;
|
|
53935
|
+
path?: never;
|
|
53936
|
+
cookie?: never;
|
|
53937
|
+
};
|
|
53938
|
+
get?: never;
|
|
53939
|
+
put?: never;
|
|
53940
|
+
/**
|
|
53941
|
+
* Sincronizar ahora — enqueue an incremental pull
|
|
53942
|
+
* @description Enqueues the same job the daily tick uses; dedups with an in-flight sync. 400 when nothing is connected. Requires `tenant_bank_accounts:write` (or `clinic_money:write`).
|
|
53943
|
+
*/
|
|
53944
|
+
post: {
|
|
53945
|
+
parameters: {
|
|
53946
|
+
query?: never;
|
|
53947
|
+
header?: {
|
|
53948
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
53949
|
+
"Idempotency-Key"?: string;
|
|
53950
|
+
};
|
|
53951
|
+
path?: never;
|
|
53498
53952
|
cookie?: never;
|
|
53499
53953
|
};
|
|
53500
53954
|
requestBody?: never;
|
|
@@ -53513,8 +53967,492 @@ interface paths {
|
|
|
53513
53967
|
* }
|
|
53514
53968
|
*/
|
|
53515
53969
|
"application/json": {
|
|
53516
|
-
data
|
|
53517
|
-
|
|
53970
|
+
data?: unknown;
|
|
53971
|
+
meta?: {
|
|
53972
|
+
[key: string]: unknown;
|
|
53973
|
+
};
|
|
53974
|
+
};
|
|
53975
|
+
};
|
|
53976
|
+
};
|
|
53977
|
+
/** @description Validation error */
|
|
53978
|
+
400: {
|
|
53979
|
+
headers: {
|
|
53980
|
+
[name: string]: unknown;
|
|
53981
|
+
};
|
|
53982
|
+
content: {
|
|
53983
|
+
"application/json": components["schemas"]["Error"];
|
|
53984
|
+
};
|
|
53985
|
+
};
|
|
53986
|
+
/** @description Unauthorized */
|
|
53987
|
+
401: {
|
|
53988
|
+
headers: {
|
|
53989
|
+
[name: string]: unknown;
|
|
53990
|
+
};
|
|
53991
|
+
content: {
|
|
53992
|
+
"application/json": components["schemas"]["Error"];
|
|
53993
|
+
};
|
|
53994
|
+
};
|
|
53995
|
+
/** @description Forbidden */
|
|
53996
|
+
403: {
|
|
53997
|
+
headers: {
|
|
53998
|
+
[name: string]: unknown;
|
|
53999
|
+
};
|
|
54000
|
+
content: {
|
|
54001
|
+
"application/json": components["schemas"]["Error"];
|
|
54002
|
+
};
|
|
54003
|
+
};
|
|
54004
|
+
/** @description Not found */
|
|
54005
|
+
404: {
|
|
54006
|
+
headers: {
|
|
54007
|
+
[name: string]: unknown;
|
|
54008
|
+
};
|
|
54009
|
+
content: {
|
|
54010
|
+
"application/json": components["schemas"]["Error"];
|
|
54011
|
+
};
|
|
54012
|
+
};
|
|
54013
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
54014
|
+
409: {
|
|
54015
|
+
headers: {
|
|
54016
|
+
[name: string]: unknown;
|
|
54017
|
+
};
|
|
54018
|
+
content: {
|
|
54019
|
+
"application/json": components["schemas"]["Error"];
|
|
54020
|
+
};
|
|
54021
|
+
};
|
|
54022
|
+
/** @description Rate limited */
|
|
54023
|
+
429: {
|
|
54024
|
+
headers: {
|
|
54025
|
+
[name: string]: unknown;
|
|
54026
|
+
};
|
|
54027
|
+
content: {
|
|
54028
|
+
"application/json": components["schemas"]["Error"];
|
|
54029
|
+
};
|
|
54030
|
+
};
|
|
54031
|
+
};
|
|
54032
|
+
};
|
|
54033
|
+
delete?: never;
|
|
54034
|
+
options?: never;
|
|
54035
|
+
head?: never;
|
|
54036
|
+
patch?: never;
|
|
54037
|
+
trace?: never;
|
|
54038
|
+
};
|
|
54039
|
+
"/clinic/bank-feed/sources": {
|
|
54040
|
+
parameters: {
|
|
54041
|
+
query?: never;
|
|
54042
|
+
header?: never;
|
|
54043
|
+
path?: never;
|
|
54044
|
+
cookie?: never;
|
|
54045
|
+
};
|
|
54046
|
+
/**
|
|
54047
|
+
* Bank feed sources available to this clinic
|
|
54048
|
+
* @description The e-mail rail (free, always on), Fintoc (optional add-on `bank_feed_fintoc`, billed per connected bank per month at the provider's list price — `price_clp_per_bank_month` is null until it is set) and BCI API Market (not configured until the partner approval lands). Requires `clinic_money:read`.
|
|
54049
|
+
*
|
|
54050
|
+
* **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`.
|
|
54051
|
+
*/
|
|
54052
|
+
get: {
|
|
54053
|
+
parameters: {
|
|
54054
|
+
query?: never;
|
|
54055
|
+
header?: never;
|
|
54056
|
+
path?: never;
|
|
54057
|
+
cookie?: never;
|
|
54058
|
+
};
|
|
54059
|
+
requestBody?: never;
|
|
54060
|
+
responses: {
|
|
54061
|
+
/** @description The sources */
|
|
54062
|
+
200: {
|
|
54063
|
+
headers: {
|
|
54064
|
+
[name: string]: unknown;
|
|
54065
|
+
};
|
|
54066
|
+
content: {
|
|
54067
|
+
/**
|
|
54068
|
+
* @example {
|
|
54069
|
+
* "data": {
|
|
54070
|
+
* "email": {
|
|
54071
|
+
* "available": true,
|
|
54072
|
+
* "billed": false
|
|
54073
|
+
* },
|
|
54074
|
+
* "fintoc": {
|
|
54075
|
+
* "configured": true,
|
|
54076
|
+
* "entitled": true,
|
|
54077
|
+
* "feature": "bank_feed_fintoc",
|
|
54078
|
+
* "price_clp_per_bank_month": null,
|
|
54079
|
+
* "connected_banks": 1
|
|
54080
|
+
* },
|
|
54081
|
+
* "bci_api_market": {
|
|
54082
|
+
* "configured": false,
|
|
54083
|
+
* "reason": "BCI API Market production access is pending partner approval."
|
|
54084
|
+
* }
|
|
54085
|
+
* }
|
|
54086
|
+
* }
|
|
54087
|
+
*/
|
|
54088
|
+
"application/json": {
|
|
54089
|
+
data: components["schemas"]["BankFeedSources"];
|
|
54090
|
+
};
|
|
54091
|
+
};
|
|
54092
|
+
};
|
|
54093
|
+
/** @description Validation error */
|
|
54094
|
+
400: {
|
|
54095
|
+
headers: {
|
|
54096
|
+
[name: string]: unknown;
|
|
54097
|
+
};
|
|
54098
|
+
content: {
|
|
54099
|
+
"application/json": components["schemas"]["Error"];
|
|
54100
|
+
};
|
|
54101
|
+
};
|
|
54102
|
+
/** @description Unauthorized */
|
|
54103
|
+
401: {
|
|
54104
|
+
headers: {
|
|
54105
|
+
[name: string]: unknown;
|
|
54106
|
+
};
|
|
54107
|
+
content: {
|
|
54108
|
+
"application/json": components["schemas"]["Error"];
|
|
54109
|
+
};
|
|
54110
|
+
};
|
|
54111
|
+
/** @description Forbidden */
|
|
54112
|
+
403: {
|
|
54113
|
+
headers: {
|
|
54114
|
+
[name: string]: unknown;
|
|
54115
|
+
};
|
|
54116
|
+
content: {
|
|
54117
|
+
"application/json": components["schemas"]["Error"];
|
|
54118
|
+
};
|
|
54119
|
+
};
|
|
54120
|
+
/** @description Not found */
|
|
54121
|
+
404: {
|
|
54122
|
+
headers: {
|
|
54123
|
+
[name: string]: unknown;
|
|
54124
|
+
};
|
|
54125
|
+
content: {
|
|
54126
|
+
"application/json": components["schemas"]["Error"];
|
|
54127
|
+
};
|
|
54128
|
+
};
|
|
54129
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
54130
|
+
409: {
|
|
54131
|
+
headers: {
|
|
54132
|
+
[name: string]: unknown;
|
|
54133
|
+
};
|
|
54134
|
+
content: {
|
|
54135
|
+
"application/json": components["schemas"]["Error"];
|
|
54136
|
+
};
|
|
54137
|
+
};
|
|
54138
|
+
/** @description Rate limited */
|
|
54139
|
+
429: {
|
|
54140
|
+
headers: {
|
|
54141
|
+
[name: string]: unknown;
|
|
54142
|
+
};
|
|
54143
|
+
content: {
|
|
54144
|
+
"application/json": components["schemas"]["Error"];
|
|
54145
|
+
};
|
|
54146
|
+
};
|
|
54147
|
+
};
|
|
54148
|
+
};
|
|
54149
|
+
put?: never;
|
|
54150
|
+
post?: never;
|
|
54151
|
+
delete?: never;
|
|
54152
|
+
options?: never;
|
|
54153
|
+
head?: never;
|
|
54154
|
+
patch?: never;
|
|
54155
|
+
trace?: never;
|
|
54156
|
+
};
|
|
54157
|
+
"/clinic/bank-feed/connections": {
|
|
54158
|
+
parameters: {
|
|
54159
|
+
query?: never;
|
|
54160
|
+
header?: never;
|
|
54161
|
+
path?: never;
|
|
54162
|
+
cookie?: never;
|
|
54163
|
+
};
|
|
54164
|
+
/**
|
|
54165
|
+
* Connected bank links
|
|
54166
|
+
* @description Every bank link this clinic connected through an API source, enabled or not, with masked account numbers and the last sync result. Requires `clinic_money:read`.
|
|
54167
|
+
*
|
|
54168
|
+
* **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`.
|
|
54169
|
+
*/
|
|
54170
|
+
get: {
|
|
54171
|
+
parameters: {
|
|
54172
|
+
query?: never;
|
|
54173
|
+
header?: never;
|
|
54174
|
+
path?: never;
|
|
54175
|
+
cookie?: never;
|
|
54176
|
+
};
|
|
54177
|
+
requestBody?: never;
|
|
54178
|
+
responses: {
|
|
54179
|
+
/** @description The connections */
|
|
54180
|
+
200: {
|
|
54181
|
+
headers: {
|
|
54182
|
+
[name: string]: unknown;
|
|
54183
|
+
};
|
|
54184
|
+
content: {
|
|
54185
|
+
/**
|
|
54186
|
+
* @example {
|
|
54187
|
+
* "data": [
|
|
54188
|
+
* {
|
|
54189
|
+
* "id": "bf0bf0bf-0000-4000-8000-000000000001",
|
|
54190
|
+
* "provider": "fintoc",
|
|
54191
|
+
* "institution_name": "Banco de Chile",
|
|
54192
|
+
* "holder_name": "Clínica Ejemplo SpA",
|
|
54193
|
+
* "accounts": [
|
|
54194
|
+
* {
|
|
54195
|
+
* "id": "acc_9Xz2Lm",
|
|
54196
|
+
* "number_masked": "••••4821"
|
|
54197
|
+
* }
|
|
54198
|
+
* ],
|
|
54199
|
+
* "enabled": true,
|
|
54200
|
+
* "connected_at": "2026-09-20T14:02:11.000Z",
|
|
54201
|
+
* "disconnected_at": null,
|
|
54202
|
+
* "last_sync_at": "2026-09-22T09:00:04.000Z",
|
|
54203
|
+
* "last_sync_status": "ok",
|
|
54204
|
+
* "last_sync_error": null,
|
|
54205
|
+
* "sync_cursor": "2026-09-22"
|
|
54206
|
+
* }
|
|
54207
|
+
* ]
|
|
54208
|
+
* }
|
|
54209
|
+
*/
|
|
54210
|
+
"application/json": {
|
|
54211
|
+
data: components["schemas"]["BankFeedConnection"][];
|
|
54212
|
+
};
|
|
54213
|
+
};
|
|
54214
|
+
};
|
|
54215
|
+
/** @description Validation error */
|
|
54216
|
+
400: {
|
|
54217
|
+
headers: {
|
|
54218
|
+
[name: string]: unknown;
|
|
54219
|
+
};
|
|
54220
|
+
content: {
|
|
54221
|
+
"application/json": components["schemas"]["Error"];
|
|
54222
|
+
};
|
|
54223
|
+
};
|
|
54224
|
+
/** @description Unauthorized */
|
|
54225
|
+
401: {
|
|
54226
|
+
headers: {
|
|
54227
|
+
[name: string]: unknown;
|
|
54228
|
+
};
|
|
54229
|
+
content: {
|
|
54230
|
+
"application/json": components["schemas"]["Error"];
|
|
54231
|
+
};
|
|
54232
|
+
};
|
|
54233
|
+
/** @description Forbidden */
|
|
54234
|
+
403: {
|
|
54235
|
+
headers: {
|
|
54236
|
+
[name: string]: unknown;
|
|
54237
|
+
};
|
|
54238
|
+
content: {
|
|
54239
|
+
"application/json": components["schemas"]["Error"];
|
|
54240
|
+
};
|
|
54241
|
+
};
|
|
54242
|
+
/** @description Not found */
|
|
54243
|
+
404: {
|
|
54244
|
+
headers: {
|
|
54245
|
+
[name: string]: unknown;
|
|
54246
|
+
};
|
|
54247
|
+
content: {
|
|
54248
|
+
"application/json": components["schemas"]["Error"];
|
|
54249
|
+
};
|
|
54250
|
+
};
|
|
54251
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
54252
|
+
409: {
|
|
54253
|
+
headers: {
|
|
54254
|
+
[name: string]: unknown;
|
|
54255
|
+
};
|
|
54256
|
+
content: {
|
|
54257
|
+
"application/json": components["schemas"]["Error"];
|
|
54258
|
+
};
|
|
54259
|
+
};
|
|
54260
|
+
/** @description Rate limited */
|
|
54261
|
+
429: {
|
|
54262
|
+
headers: {
|
|
54263
|
+
[name: string]: unknown;
|
|
54264
|
+
};
|
|
54265
|
+
content: {
|
|
54266
|
+
"application/json": components["schemas"]["Error"];
|
|
54267
|
+
};
|
|
54268
|
+
};
|
|
54269
|
+
};
|
|
54270
|
+
};
|
|
54271
|
+
put?: never;
|
|
54272
|
+
post?: never;
|
|
54273
|
+
delete?: never;
|
|
54274
|
+
options?: never;
|
|
54275
|
+
head?: never;
|
|
54276
|
+
patch?: never;
|
|
54277
|
+
trace?: never;
|
|
54278
|
+
};
|
|
54279
|
+
"/clinic/bank-feed/fintoc/connect": {
|
|
54280
|
+
parameters: {
|
|
54281
|
+
query?: never;
|
|
54282
|
+
header?: never;
|
|
54283
|
+
path?: never;
|
|
54284
|
+
cookie?: never;
|
|
54285
|
+
};
|
|
54286
|
+
get?: never;
|
|
54287
|
+
put?: never;
|
|
54288
|
+
/**
|
|
54289
|
+
* Connect a bank through Fintoc
|
|
54290
|
+
* @description Send the `exchange_token` Fintoc's widget returns (or a `link_token`). The server swaps it for the long-lived link token, stores it encrypted, and queues the first pull. Requires the `bank_feed_fintoc` add-on — without it the answer is `402 ENTITLEMENT_NOT_ACTIVE` (the upsell). Reconnecting the same bank updates its connection. Requires `clinic_money:write`.
|
|
54291
|
+
*
|
|
54292
|
+
* **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`.
|
|
54293
|
+
*/
|
|
54294
|
+
post: {
|
|
54295
|
+
parameters: {
|
|
54296
|
+
query?: never;
|
|
54297
|
+
header?: {
|
|
54298
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
54299
|
+
"Idempotency-Key"?: string;
|
|
54300
|
+
};
|
|
54301
|
+
path?: never;
|
|
54302
|
+
cookie?: never;
|
|
54303
|
+
};
|
|
54304
|
+
requestBody?: {
|
|
54305
|
+
content: {
|
|
54306
|
+
/**
|
|
54307
|
+
* @example {
|
|
54308
|
+
* "exchange_token": "exch_7f3a9b2c1d"
|
|
54309
|
+
* }
|
|
54310
|
+
*/
|
|
54311
|
+
"application/json": components["schemas"]["BankFeedFintocConnectBody"];
|
|
54312
|
+
};
|
|
54313
|
+
};
|
|
54314
|
+
responses: {
|
|
54315
|
+
/** @description The connection */
|
|
54316
|
+
201: {
|
|
54317
|
+
headers: {
|
|
54318
|
+
[name: string]: unknown;
|
|
54319
|
+
};
|
|
54320
|
+
content: {
|
|
54321
|
+
/**
|
|
54322
|
+
* @example {
|
|
54323
|
+
* "data": {
|
|
54324
|
+
* "id": "bf0bf0bf-0000-4000-8000-000000000001",
|
|
54325
|
+
* "provider": "fintoc",
|
|
54326
|
+
* "institution_name": "Banco de Chile",
|
|
54327
|
+
* "holder_name": "Clínica Ejemplo SpA",
|
|
54328
|
+
* "accounts": [
|
|
54329
|
+
* {
|
|
54330
|
+
* "id": "acc_9Xz2Lm",
|
|
54331
|
+
* "number_masked": "••••4821"
|
|
54332
|
+
* }
|
|
54333
|
+
* ],
|
|
54334
|
+
* "enabled": true,
|
|
54335
|
+
* "connected_at": "2026-09-20T14:02:11.000Z",
|
|
54336
|
+
* "disconnected_at": null,
|
|
54337
|
+
* "last_sync_at": "2026-09-22T09:00:04.000Z",
|
|
54338
|
+
* "last_sync_status": "ok",
|
|
54339
|
+
* "last_sync_error": null,
|
|
54340
|
+
* "sync_cursor": "2026-09-22"
|
|
54341
|
+
* }
|
|
54342
|
+
* }
|
|
54343
|
+
*/
|
|
54344
|
+
"application/json": {
|
|
54345
|
+
data: components["schemas"]["BankFeedConnection"];
|
|
54346
|
+
};
|
|
54347
|
+
};
|
|
54348
|
+
};
|
|
54349
|
+
/** @description Validation error */
|
|
54350
|
+
400: {
|
|
54351
|
+
headers: {
|
|
54352
|
+
[name: string]: unknown;
|
|
54353
|
+
};
|
|
54354
|
+
content: {
|
|
54355
|
+
"application/json": components["schemas"]["Error"];
|
|
54356
|
+
};
|
|
54357
|
+
};
|
|
54358
|
+
/** @description Unauthorized */
|
|
54359
|
+
401: {
|
|
54360
|
+
headers: {
|
|
54361
|
+
[name: string]: unknown;
|
|
54362
|
+
};
|
|
54363
|
+
content: {
|
|
54364
|
+
"application/json": components["schemas"]["Error"];
|
|
54365
|
+
};
|
|
54366
|
+
};
|
|
54367
|
+
/** @description Forbidden */
|
|
54368
|
+
403: {
|
|
54369
|
+
headers: {
|
|
54370
|
+
[name: string]: unknown;
|
|
54371
|
+
};
|
|
54372
|
+
content: {
|
|
54373
|
+
"application/json": components["schemas"]["Error"];
|
|
54374
|
+
};
|
|
54375
|
+
};
|
|
54376
|
+
/** @description Not found */
|
|
54377
|
+
404: {
|
|
54378
|
+
headers: {
|
|
54379
|
+
[name: string]: unknown;
|
|
54380
|
+
};
|
|
54381
|
+
content: {
|
|
54382
|
+
"application/json": components["schemas"]["Error"];
|
|
54383
|
+
};
|
|
54384
|
+
};
|
|
54385
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
54386
|
+
409: {
|
|
54387
|
+
headers: {
|
|
54388
|
+
[name: string]: unknown;
|
|
54389
|
+
};
|
|
54390
|
+
content: {
|
|
54391
|
+
"application/json": components["schemas"]["Error"];
|
|
54392
|
+
};
|
|
54393
|
+
};
|
|
54394
|
+
/** @description Rate limited */
|
|
54395
|
+
429: {
|
|
54396
|
+
headers: {
|
|
54397
|
+
[name: string]: unknown;
|
|
54398
|
+
};
|
|
54399
|
+
content: {
|
|
54400
|
+
"application/json": components["schemas"]["Error"];
|
|
54401
|
+
};
|
|
54402
|
+
};
|
|
54403
|
+
};
|
|
54404
|
+
};
|
|
54405
|
+
delete?: never;
|
|
54406
|
+
options?: never;
|
|
54407
|
+
head?: never;
|
|
54408
|
+
patch?: never;
|
|
54409
|
+
trace?: never;
|
|
54410
|
+
};
|
|
54411
|
+
"/clinic/bank-feed/connections/{id}/sync": {
|
|
54412
|
+
parameters: {
|
|
54413
|
+
query?: never;
|
|
54414
|
+
header?: never;
|
|
54415
|
+
path?: never;
|
|
54416
|
+
cookie?: never;
|
|
54417
|
+
};
|
|
54418
|
+
get?: never;
|
|
54419
|
+
put?: never;
|
|
54420
|
+
/**
|
|
54421
|
+
* Sincronizar ahora — enqueue a pull of one bank link
|
|
54422
|
+
* @description Enqueues the SAME job the daily tick uses; the stable per-connection jobId dedups with an in-flight sync. Requires `clinic_money:write`.
|
|
54423
|
+
*
|
|
54424
|
+
* **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`.
|
|
54425
|
+
*/
|
|
54426
|
+
post: {
|
|
54427
|
+
parameters: {
|
|
54428
|
+
query?: never;
|
|
54429
|
+
header?: {
|
|
54430
|
+
/** @description Replay-safe retries: resending the SAME key with the SAME body returns the original response (`X-Idempotent-Replay: 1`) instead of creating a second copy — safe to send whenever a response might not have arrived. The same key with a DIFFERENT body answers `409 IDEMPOTENCY_KEY_CONFLICT`; use a fresh key per operation. */
|
|
54431
|
+
"Idempotency-Key"?: string;
|
|
54432
|
+
};
|
|
54433
|
+
path: {
|
|
54434
|
+
id: string;
|
|
54435
|
+
};
|
|
54436
|
+
cookie?: never;
|
|
54437
|
+
};
|
|
54438
|
+
requestBody?: never;
|
|
54439
|
+
responses: {
|
|
54440
|
+
/** @description Enqueued */
|
|
54441
|
+
202: {
|
|
54442
|
+
headers: {
|
|
54443
|
+
[name: string]: unknown;
|
|
54444
|
+
};
|
|
54445
|
+
content: {
|
|
54446
|
+
/**
|
|
54447
|
+
* @example {
|
|
54448
|
+
* "data": {
|
|
54449
|
+
* "enqueued": true
|
|
54450
|
+
* }
|
|
54451
|
+
* }
|
|
54452
|
+
*/
|
|
54453
|
+
"application/json": {
|
|
54454
|
+
data: {
|
|
54455
|
+
enqueued: boolean;
|
|
53518
54456
|
};
|
|
53519
54457
|
};
|
|
53520
54458
|
};
|
|
@@ -65717,10 +66655,8 @@ interface paths {
|
|
|
65717
66655
|
* "description": "Responde preguntas de stock y agenda visitas a sucursal.",
|
|
65718
66656
|
* "status": "active",
|
|
65719
66657
|
* "is_default": true,
|
|
65720
|
-
* "model": "xiaomi/mimo-v2.6-flash",
|
|
65721
66658
|
* "temperature": null,
|
|
65722
66659
|
* "default_max_steps": 5,
|
|
65723
|
-
* "reasoning_effort": "high",
|
|
65724
66660
|
* "autonomy_level": "supervised",
|
|
65725
66661
|
* "system_prompt": "Eres un asistente de ventas. Responde de forma breve y cercana.",
|
|
65726
66662
|
* "knowledge_tags": [
|
|
@@ -65732,7 +66668,6 @@ interface paths {
|
|
|
65732
66668
|
* "allowed_url_prefixes": [],
|
|
65733
66669
|
* "published_version_id": "a3a3a3a3-1000-4000-8000-000000000008",
|
|
65734
66670
|
* "draft_system_prompt": null,
|
|
65735
|
-
* "draft_model": null,
|
|
65736
66671
|
* "draft_temperature": null,
|
|
65737
66672
|
* "draft_max_steps": null,
|
|
65738
66673
|
* "draft_tool_wiring": null,
|
|
@@ -146274,6 +147209,8 @@ interface components {
|
|
|
146274
147209
|
active_fraction?: number;
|
|
146275
147210
|
/** @description An add-on granted free: shown at 0 («Incluido sin costo»). */
|
|
146276
147211
|
complimentary?: boolean;
|
|
147212
|
+
/** @description A peso-priced flat add-on (`flatClpMonth`): its monthly list price in whole CLP, neto. Display only; the line bills `uf_subtotal`. */
|
|
147213
|
+
clp_month?: number;
|
|
146277
147214
|
}[];
|
|
146278
147215
|
totals: {
|
|
146279
147216
|
subtotal_uf: number;
|
|
@@ -146302,6 +147239,8 @@ interface components {
|
|
|
146302
147239
|
active_fraction?: number;
|
|
146303
147240
|
/** @description An add-on granted free: shown at 0 («Incluido sin costo»). */
|
|
146304
147241
|
complimentary?: boolean;
|
|
147242
|
+
/** @description A peso-priced flat add-on (`flatClpMonth`): its monthly list price in whole CLP, neto. Display only; the line bills `uf_subtotal`. */
|
|
147243
|
+
clp_month?: number;
|
|
146305
147244
|
}[];
|
|
146306
147245
|
totals: {
|
|
146307
147246
|
subtotal_uf: number;
|
|
@@ -146475,6 +147414,8 @@ interface components {
|
|
|
146475
147414
|
active_fraction?: number;
|
|
146476
147415
|
/** @description An add-on granted free: shown at 0 («Incluido sin costo»). */
|
|
146477
147416
|
complimentary?: boolean;
|
|
147417
|
+
/** @description A peso-priced flat add-on (`flatClpMonth`): its monthly list price in whole CLP, neto. Display only; the line bills `uf_subtotal`. */
|
|
147418
|
+
clp_month?: number;
|
|
146478
147419
|
}[];
|
|
146479
147420
|
}[];
|
|
146480
147421
|
};
|
|
@@ -147083,6 +148024,12 @@ interface components {
|
|
|
147083
148024
|
exp_year?: number;
|
|
147084
148025
|
};
|
|
147085
148026
|
};
|
|
148027
|
+
TransferClaimResult: {
|
|
148028
|
+
/** @description False when a claim was already pending (idempotent). */
|
|
148029
|
+
created: boolean;
|
|
148030
|
+
claimedAt: string;
|
|
148031
|
+
number: string;
|
|
148032
|
+
};
|
|
147086
148033
|
/** @example 2026-01 */
|
|
147087
148034
|
OverheadPeriod: string;
|
|
147088
148035
|
/** @description A Mercado Pago checkout payment: its payment id, a link to it and its status. Null for every other movement. */
|
|
@@ -147353,6 +148300,82 @@ interface components {
|
|
|
147353
148300
|
min_count: number;
|
|
147354
148301
|
} | null;
|
|
147355
148302
|
};
|
|
148303
|
+
PaymentRegistration: {
|
|
148304
|
+
/** Format: uuid */
|
|
148305
|
+
id: string;
|
|
148306
|
+
/** @enum {string} */
|
|
148307
|
+
status: "open" | "ambiguous" | "matched" | "dismissed" | "cancelled";
|
|
148308
|
+
/** @enum {string} */
|
|
148309
|
+
vendor: "dentalink" | "medilink" | "reservo";
|
|
148310
|
+
vendor_label: string;
|
|
148311
|
+
/** @enum {string} */
|
|
148312
|
+
provider: "mercadopago";
|
|
148313
|
+
/** @description The Mercado Pago payment number. */
|
|
148314
|
+
provider_reference: string;
|
|
148315
|
+
provider_payment_url: string;
|
|
148316
|
+
/** Format: uuid */
|
|
148317
|
+
customer_payment_id: string;
|
|
148318
|
+
/** Format: uuid */
|
|
148319
|
+
contact_id: string | null;
|
|
148320
|
+
amount_clp: number;
|
|
148321
|
+
paid_on: string;
|
|
148322
|
+
patient: {
|
|
148323
|
+
/** Format: uuid */
|
|
148324
|
+
id: string;
|
|
148325
|
+
name: string;
|
|
148326
|
+
rut: string | null;
|
|
148327
|
+
} | null;
|
|
148328
|
+
concept: {
|
|
148329
|
+
kind: string;
|
|
148330
|
+
label: string;
|
|
148331
|
+
appointment_starts_at: string | null;
|
|
148332
|
+
} | null;
|
|
148333
|
+
medio: {
|
|
148334
|
+
code: string | null;
|
|
148335
|
+
label: string;
|
|
148336
|
+
};
|
|
148337
|
+
matched: {
|
|
148338
|
+
/** Format: uuid */
|
|
148339
|
+
mirror_payment_id: string;
|
|
148340
|
+
/** @description The practice system's own pago number. */
|
|
148341
|
+
vendor_reference: string;
|
|
148342
|
+
received_on: string | null;
|
|
148343
|
+
amount_clp: number;
|
|
148344
|
+
medio: string | null;
|
|
148345
|
+
voided: boolean;
|
|
148346
|
+
/** @enum {string} */
|
|
148347
|
+
by: "auto_unique" | "auto_medio" | "auto_reference" | "staff";
|
|
148348
|
+
at: string;
|
|
148349
|
+
} | null;
|
|
148350
|
+
candidates: {
|
|
148351
|
+
/** Format: uuid */
|
|
148352
|
+
mirror_payment_id: string;
|
|
148353
|
+
/** @description The practice system's own pago number. */
|
|
148354
|
+
vendor_reference: string;
|
|
148355
|
+
received_on: string | null;
|
|
148356
|
+
amount_clp: number;
|
|
148357
|
+
medio: string | null;
|
|
148358
|
+
voided: boolean;
|
|
148359
|
+
}[];
|
|
148360
|
+
/** @enum {string|null} */
|
|
148361
|
+
dismissed_reason: "registered_elsewhere" | "not_needed" | null;
|
|
148362
|
+
overdue: boolean;
|
|
148363
|
+
reminded_at: string | null;
|
|
148364
|
+
created_at: string;
|
|
148365
|
+
};
|
|
148366
|
+
PaymentRegistrationSettings: {
|
|
148367
|
+
/** @enum {string|null} */
|
|
148368
|
+
vendor: "dentalink" | "medilink" | "reservo" | null;
|
|
148369
|
+
vendor_label: string | null;
|
|
148370
|
+
mercadopago_medio: string | null;
|
|
148371
|
+
suggested_medio: string | null;
|
|
148372
|
+
medios: {
|
|
148373
|
+
code: string;
|
|
148374
|
+
label: string;
|
|
148375
|
+
active: boolean;
|
|
148376
|
+
}[];
|
|
148377
|
+
reminder_business_days: number;
|
|
148378
|
+
};
|
|
147356
148379
|
BankFeedSources: {
|
|
147357
148380
|
email: {
|
|
147358
148381
|
/** @enum {boolean} */
|