@vitrina/api 14.67.0 → 14.71.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 +929 -209
- package/dist/index.d.ts +929 -209
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -17902,7 +17902,7 @@ interface paths {
|
|
|
17902
17902
|
/** Format: uuid */
|
|
17903
17903
|
responsible_user_id?: string | null;
|
|
17904
17904
|
/**
|
|
17905
|
-
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
17905
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `veekls`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
17906
17906
|
* @example [
|
|
17907
17907
|
* "chileautos",
|
|
17908
17908
|
* "mercadolibre"
|
|
@@ -18554,7 +18554,7 @@ interface paths {
|
|
|
18554
18554
|
/** Format: uuid */
|
|
18555
18555
|
responsible_user_id?: string | null;
|
|
18556
18556
|
/**
|
|
18557
|
-
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
18557
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `linze`, `mercadolibre`, `veekls`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
18558
18558
|
* @example [
|
|
18559
18559
|
* "chileautos",
|
|
18560
18560
|
* "mercadolibre"
|
|
@@ -18743,7 +18743,7 @@ interface paths {
|
|
|
18743
18743
|
post?: never;
|
|
18744
18744
|
/**
|
|
18745
18745
|
* Delete a vehicle
|
|
18746
|
-
* @description Soft-delete: the row and its history remain, `deleted_at` is stamped, and it drops out of every default list and out of the public stock API.
|
|
18746
|
+
* @description Soft-delete: the row and its history remain, `deleted_at` is stamped, and it drops out of every default list and out of the public stock API. Before the soft-delete it schedules the close of every live ad on every connected portal (the same retry-backed pipeline as `POST /vehicles/{id}/close-ads`). A vehicle a negocio holds (`reservado`, `vendido`, or carrying a live nota de venta) cannot be deleted: 409 with `details.code: "vehicle_held_by_negocio"`. Deleting an already deleted vehicle is a 204 no-op.
|
|
18747
18747
|
*/
|
|
18748
18748
|
delete: {
|
|
18749
18749
|
parameters: {
|
|
@@ -21719,10 +21719,21 @@ interface paths {
|
|
|
21719
21719
|
};
|
|
21720
21720
|
/** Format: uuid */
|
|
21721
21721
|
pipeline_id?: string;
|
|
21722
|
+
/** Format: uuid */
|
|
21723
|
+
stage_id?: string;
|
|
21722
21724
|
value_amount?: number;
|
|
21723
21725
|
value_currency?: string;
|
|
21724
21726
|
item_label?: string;
|
|
21725
21727
|
source_ref?: string;
|
|
21728
|
+
fields?: {
|
|
21729
|
+
label: string;
|
|
21730
|
+
value: string;
|
|
21731
|
+
}[];
|
|
21732
|
+
form_title?: string;
|
|
21733
|
+
highlight?: {
|
|
21734
|
+
label: string;
|
|
21735
|
+
value: string;
|
|
21736
|
+
};
|
|
21726
21737
|
/** @enum {string} */
|
|
21727
21738
|
intent?: "buy" | "sell" | "financing" | "trade_in";
|
|
21728
21739
|
hp_website?: string;
|
|
@@ -43470,6 +43481,21 @@ interface paths {
|
|
|
43470
43481
|
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
43471
43482
|
* "hold_expires_on": "2026-09-25",
|
|
43472
43483
|
* "keep_advertised": true,
|
|
43484
|
+
* "transfer_cost_clp": 217740,
|
|
43485
|
+
* "transfer_cost_lines": [
|
|
43486
|
+
* {
|
|
43487
|
+
* "kind": "transferencia_municipal",
|
|
43488
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
43489
|
+
* "amount_clp": 178500,
|
|
43490
|
+
* "fee_effective_from": "1979-12-29"
|
|
43491
|
+
* },
|
|
43492
|
+
* {
|
|
43493
|
+
* "kind": "arancel_registro_civil",
|
|
43494
|
+
* "label": "Inscripción en el Registro Civil",
|
|
43495
|
+
* "amount_clp": 39240,
|
|
43496
|
+
* "fee_effective_from": "2026-04-01"
|
|
43497
|
+
* }
|
|
43498
|
+
* ],
|
|
43473
43499
|
* "status": "activa",
|
|
43474
43500
|
* "abono_disposition": null,
|
|
43475
43501
|
* "abono_disposition_reason": null,
|
|
@@ -43552,178 +43578,840 @@ interface paths {
|
|
|
43552
43578
|
};
|
|
43553
43579
|
};
|
|
43554
43580
|
put?: never;
|
|
43555
|
-
/**
|
|
43556
|
-
* Take a reservation
|
|
43557
|
-
* @description Takes a hold on a unit — the ONLY thing on this wave that locks inventory (a cotización creates no hold). Born `activa`; there is no draft state and no `status` field to supply.
|
|
43558
|
-
*
|
|
43559
|
-
* `vehicle_id` and `holder_contact_id` are required and must belong to the calling workspace; a foreign id and a nonexistent one answer identically (404), deliberately, because a difference between them is an existence oracle.
|
|
43560
|
-
*
|
|
43561
|
-
* `hold_expires_on` is REQUIRED and has no default (BR-241, corrected): unlike a cotización, a reserva locks the unit and can take a non-refundable deposit, so every hold states its own term rather than inheriting a silent policy number. `agreed_price_clp`, omitted, copies the vehicle's current asking price (BR-242) — that is a real default, not zero. `keep_advertised`, omitted, keeps the column default `true` (the marketplace ads stay live); an explicit `false` is the per-reserva opt-out that retracts them through the existing cierre queue, and it is set-once — there is no endpoint to change it on a standing hold.
|
|
43562
|
-
*
|
|
43563
|
-
* **Exactly one ACTIVE hold per unit.** A second `take` on a unit that already has one is a **409**, enforced by a partial unique index so a race loses too. Unknown body keys are a **400**. Answers 201.
|
|
43564
|
-
*/
|
|
43565
|
-
post: {
|
|
43566
|
-
parameters: {
|
|
43567
|
-
query?: never;
|
|
43568
|
-
header?: {
|
|
43569
|
-
/** @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. */
|
|
43570
|
-
"Idempotency-Key"?: string;
|
|
43571
|
-
};
|
|
43572
|
-
path?: never;
|
|
43573
|
-
cookie?: never;
|
|
43574
|
-
};
|
|
43575
|
-
requestBody?: {
|
|
43576
|
-
content: {
|
|
43577
|
-
/**
|
|
43578
|
-
* @example {
|
|
43579
|
-
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
43580
|
-
* "holder_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
43581
|
-
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
43582
|
-
* "agreed_price_clp": 11900000,
|
|
43583
|
-
* "hold_expires_on": "2026-09-25",
|
|
43584
|
-
* "keep_advertised": true
|
|
43585
|
-
* }
|
|
43586
|
-
*/
|
|
43587
|
-
"application/json": {
|
|
43588
|
-
/** Format: uuid */
|
|
43589
|
-
vehicle_id: string;
|
|
43590
|
-
/** Format: uuid */
|
|
43591
|
-
holder_contact_id: string;
|
|
43592
|
-
/** Format: uuid */
|
|
43593
|
-
salesperson_id?: string | null;
|
|
43594
|
-
agreed_price_clp?: number | null;
|
|
43595
|
-
/** Format: date-time */
|
|
43596
|
-
taken_at?: string | null;
|
|
43597
|
-
hold_expires_on: string;
|
|
43598
|
-
keep_advertised?: boolean;
|
|
43599
|
-
|
|
43600
|
-
|
|
43601
|
-
|
|
43602
|
-
|
|
43603
|
-
|
|
43604
|
-
|
|
43605
|
-
|
|
43606
|
-
[
|
|
43607
|
-
|
|
43608
|
-
|
|
43609
|
-
|
|
43610
|
-
|
|
43611
|
-
|
|
43612
|
-
|
|
43613
|
-
|
|
43614
|
-
|
|
43615
|
-
|
|
43616
|
-
|
|
43617
|
-
|
|
43618
|
-
|
|
43619
|
-
*
|
|
43620
|
-
*
|
|
43621
|
-
* "
|
|
43622
|
-
* "
|
|
43623
|
-
* "
|
|
43624
|
-
* "
|
|
43625
|
-
* "
|
|
43626
|
-
* "
|
|
43627
|
-
* "
|
|
43628
|
-
* "
|
|
43629
|
-
* "
|
|
43630
|
-
* "
|
|
43631
|
-
* "
|
|
43632
|
-
* "
|
|
43633
|
-
* "
|
|
43634
|
-
*
|
|
43635
|
-
*
|
|
43636
|
-
|
|
43637
|
-
|
|
43638
|
-
|
|
43639
|
-
|
|
43640
|
-
|
|
43641
|
-
|
|
43642
|
-
|
|
43643
|
-
|
|
43644
|
-
|
|
43645
|
-
|
|
43646
|
-
|
|
43647
|
-
|
|
43648
|
-
|
|
43649
|
-
|
|
43650
|
-
|
|
43651
|
-
|
|
43652
|
-
|
|
43653
|
-
|
|
43654
|
-
|
|
43655
|
-
|
|
43656
|
-
|
|
43657
|
-
|
|
43658
|
-
|
|
43659
|
-
|
|
43660
|
-
|
|
43661
|
-
|
|
43662
|
-
|
|
43663
|
-
|
|
43664
|
-
};
|
|
43665
|
-
|
|
43666
|
-
|
|
43667
|
-
|
|
43668
|
-
|
|
43669
|
-
|
|
43670
|
-
|
|
43671
|
-
|
|
43672
|
-
|
|
43673
|
-
};
|
|
43674
|
-
|
|
43675
|
-
|
|
43676
|
-
|
|
43677
|
-
|
|
43678
|
-
|
|
43679
|
-
|
|
43680
|
-
|
|
43681
|
-
|
|
43682
|
-
};
|
|
43683
|
-
|
|
43684
|
-
|
|
43685
|
-
|
|
43686
|
-
|
|
43687
|
-
|
|
43688
|
-
|
|
43689
|
-
|
|
43690
|
-
|
|
43691
|
-
};
|
|
43692
|
-
|
|
43693
|
-
|
|
43694
|
-
|
|
43695
|
-
|
|
43696
|
-
|
|
43697
|
-
|
|
43581
|
+
/**
|
|
43582
|
+
* Take a reservation
|
|
43583
|
+
* @description Takes a hold on a unit — the ONLY thing on this wave that locks inventory (a cotización creates no hold). Born `activa`; there is no draft state and no `status` field to supply.
|
|
43584
|
+
*
|
|
43585
|
+
* `vehicle_id` and `holder_contact_id` are required and must belong to the calling workspace; a foreign id and a nonexistent one answer identically (404), deliberately, because a difference between them is an existence oracle.
|
|
43586
|
+
*
|
|
43587
|
+
* `hold_expires_on` is REQUIRED and has no default (BR-241, corrected): unlike a cotización, a reserva locks the unit and can take a non-refundable deposit, so every hold states its own term rather than inheriting a silent policy number. `agreed_price_clp`, omitted, copies the vehicle's current asking price (BR-242) — that is a real default, not zero. `keep_advertised`, omitted, keeps the column default `true` (the marketplace ads stay live); an explicit `false` is the per-reserva opt-out that retracts them through the existing cierre queue, and it is set-once — there is no endpoint to change it on a standing hold.
|
|
43588
|
+
*
|
|
43589
|
+
* **Exactly one ACTIVE hold per unit.** A second `take` on a unit that already has one is a **409**, enforced by a partial unique index so a race loses too. Unknown body keys are a **400**. Answers 201.
|
|
43590
|
+
*/
|
|
43591
|
+
post: {
|
|
43592
|
+
parameters: {
|
|
43593
|
+
query?: never;
|
|
43594
|
+
header?: {
|
|
43595
|
+
/** @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. */
|
|
43596
|
+
"Idempotency-Key"?: string;
|
|
43597
|
+
};
|
|
43598
|
+
path?: never;
|
|
43599
|
+
cookie?: never;
|
|
43600
|
+
};
|
|
43601
|
+
requestBody?: {
|
|
43602
|
+
content: {
|
|
43603
|
+
/**
|
|
43604
|
+
* @example {
|
|
43605
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
43606
|
+
* "holder_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
43607
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
43608
|
+
* "agreed_price_clp": 11900000,
|
|
43609
|
+
* "hold_expires_on": "2026-09-25",
|
|
43610
|
+
* "keep_advertised": true
|
|
43611
|
+
* }
|
|
43612
|
+
*/
|
|
43613
|
+
"application/json": {
|
|
43614
|
+
/** Format: uuid */
|
|
43615
|
+
vehicle_id: string;
|
|
43616
|
+
/** Format: uuid */
|
|
43617
|
+
holder_contact_id: string;
|
|
43618
|
+
/** Format: uuid */
|
|
43619
|
+
salesperson_id?: string | null;
|
|
43620
|
+
agreed_price_clp?: number | null;
|
|
43621
|
+
/** Format: date-time */
|
|
43622
|
+
taken_at?: string | null;
|
|
43623
|
+
hold_expires_on: string;
|
|
43624
|
+
keep_advertised?: boolean;
|
|
43625
|
+
transfer_cost_clp?: number | null;
|
|
43626
|
+
transfer_cost_lines?: {
|
|
43627
|
+
/** @enum {string} */
|
|
43628
|
+
kind: "transferencia_municipal" | "arancel_registro_civil" | "notarial" | "inscripcion" | "soap" | "tag";
|
|
43629
|
+
label: string;
|
|
43630
|
+
amount_clp: number;
|
|
43631
|
+
fee_effective_from?: string | null;
|
|
43632
|
+
}[] | null;
|
|
43633
|
+
abono_expected_clp?: number | null;
|
|
43634
|
+
};
|
|
43635
|
+
};
|
|
43636
|
+
};
|
|
43637
|
+
responses: {
|
|
43638
|
+
/** @description The reservation */
|
|
43639
|
+
201: {
|
|
43640
|
+
headers: {
|
|
43641
|
+
[name: string]: unknown;
|
|
43642
|
+
};
|
|
43643
|
+
content: {
|
|
43644
|
+
/**
|
|
43645
|
+
* @example {
|
|
43646
|
+
* "data": {
|
|
43647
|
+
* "id": "d3d3d3d3-0000-4000-8000-000000000001",
|
|
43648
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
43649
|
+
* "display_id": "R-18",
|
|
43650
|
+
* "display_seq": 18,
|
|
43651
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
43652
|
+
* "holder_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
43653
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
43654
|
+
* "agreed_price_clp": 11900000,
|
|
43655
|
+
* "abono_expected_clp": 300000,
|
|
43656
|
+
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
43657
|
+
* "hold_expires_on": "2026-09-25",
|
|
43658
|
+
* "keep_advertised": true,
|
|
43659
|
+
* "transfer_cost_clp": 217740,
|
|
43660
|
+
* "transfer_cost_lines": [
|
|
43661
|
+
* {
|
|
43662
|
+
* "kind": "transferencia_municipal",
|
|
43663
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
43664
|
+
* "amount_clp": 178500,
|
|
43665
|
+
* "fee_effective_from": "1979-12-29"
|
|
43666
|
+
* },
|
|
43667
|
+
* {
|
|
43668
|
+
* "kind": "arancel_registro_civil",
|
|
43669
|
+
* "label": "Inscripción en el Registro Civil",
|
|
43670
|
+
* "amount_clp": 39240,
|
|
43671
|
+
* "fee_effective_from": "2026-04-01"
|
|
43672
|
+
* }
|
|
43673
|
+
* ],
|
|
43674
|
+
* "status": "activa",
|
|
43675
|
+
* "abono_disposition": null,
|
|
43676
|
+
* "abono_disposition_reason": null,
|
|
43677
|
+
* "abono_disposition_at": null,
|
|
43678
|
+
* "abono_disposition_by": null,
|
|
43679
|
+
* "voided_at": null,
|
|
43680
|
+
* "void_reason": null,
|
|
43681
|
+
* "voided_by": null,
|
|
43682
|
+
* "created_at": "2026-09-18T16:40:00.000Z",
|
|
43683
|
+
* "updated_at": "2026-09-18T16:40:00.000Z"
|
|
43684
|
+
* }
|
|
43685
|
+
* }
|
|
43686
|
+
*/
|
|
43687
|
+
"application/json": {
|
|
43688
|
+
data?: unknown;
|
|
43689
|
+
};
|
|
43690
|
+
};
|
|
43691
|
+
};
|
|
43692
|
+
/** @description Validation error */
|
|
43693
|
+
400: {
|
|
43694
|
+
headers: {
|
|
43695
|
+
[name: string]: unknown;
|
|
43696
|
+
};
|
|
43697
|
+
content: {
|
|
43698
|
+
"application/json": components["schemas"]["Error"];
|
|
43699
|
+
};
|
|
43700
|
+
};
|
|
43701
|
+
/** @description Unauthorized */
|
|
43702
|
+
401: {
|
|
43703
|
+
headers: {
|
|
43704
|
+
[name: string]: unknown;
|
|
43705
|
+
};
|
|
43706
|
+
content: {
|
|
43707
|
+
"application/json": components["schemas"]["Error"];
|
|
43708
|
+
};
|
|
43709
|
+
};
|
|
43710
|
+
/** @description Forbidden */
|
|
43711
|
+
403: {
|
|
43712
|
+
headers: {
|
|
43713
|
+
[name: string]: unknown;
|
|
43714
|
+
};
|
|
43715
|
+
content: {
|
|
43716
|
+
"application/json": components["schemas"]["Error"];
|
|
43717
|
+
};
|
|
43718
|
+
};
|
|
43719
|
+
/** @description Not found */
|
|
43720
|
+
404: {
|
|
43721
|
+
headers: {
|
|
43722
|
+
[name: string]: unknown;
|
|
43723
|
+
};
|
|
43724
|
+
content: {
|
|
43725
|
+
"application/json": components["schemas"]["Error"];
|
|
43726
|
+
};
|
|
43727
|
+
};
|
|
43728
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
43729
|
+
409: {
|
|
43730
|
+
headers: {
|
|
43731
|
+
[name: string]: unknown;
|
|
43732
|
+
};
|
|
43733
|
+
content: {
|
|
43734
|
+
"application/json": components["schemas"]["Error"];
|
|
43735
|
+
};
|
|
43736
|
+
};
|
|
43737
|
+
/** @description Rate limited */
|
|
43738
|
+
429: {
|
|
43739
|
+
headers: {
|
|
43740
|
+
[name: string]: unknown;
|
|
43741
|
+
};
|
|
43742
|
+
content: {
|
|
43743
|
+
"application/json": components["schemas"]["Error"];
|
|
43744
|
+
};
|
|
43745
|
+
};
|
|
43746
|
+
};
|
|
43747
|
+
};
|
|
43748
|
+
delete?: never;
|
|
43749
|
+
options?: never;
|
|
43750
|
+
head?: never;
|
|
43751
|
+
patch?: never;
|
|
43752
|
+
trace?: never;
|
|
43753
|
+
};
|
|
43754
|
+
"/reservations/{id}": {
|
|
43755
|
+
parameters: {
|
|
43756
|
+
query?: never;
|
|
43757
|
+
header?: never;
|
|
43758
|
+
path?: never;
|
|
43759
|
+
cookie?: never;
|
|
43760
|
+
};
|
|
43761
|
+
/**
|
|
43762
|
+
* Fetch one reservation, with its payments and totals
|
|
43763
|
+
* @description Accepts the UUID or the folio (`R-12`).
|
|
43764
|
+
*/
|
|
43765
|
+
get: {
|
|
43766
|
+
parameters: {
|
|
43767
|
+
query?: never;
|
|
43768
|
+
header?: never;
|
|
43769
|
+
path: {
|
|
43770
|
+
id: string;
|
|
43771
|
+
};
|
|
43772
|
+
cookie?: never;
|
|
43773
|
+
};
|
|
43774
|
+
requestBody?: never;
|
|
43775
|
+
responses: {
|
|
43776
|
+
/** @description The reservation, its payments and totals */
|
|
43777
|
+
200: {
|
|
43778
|
+
headers: {
|
|
43779
|
+
[name: string]: unknown;
|
|
43780
|
+
};
|
|
43781
|
+
content: {
|
|
43782
|
+
/**
|
|
43783
|
+
* @example {
|
|
43784
|
+
* "data": {
|
|
43785
|
+
* "id": "d3d3d3d3-0000-4000-8000-000000000001",
|
|
43786
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
43787
|
+
* "display_id": "R-18",
|
|
43788
|
+
* "display_seq": 18,
|
|
43789
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
43790
|
+
* "holder_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
43791
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
43792
|
+
* "agreed_price_clp": 11900000,
|
|
43793
|
+
* "abono_expected_clp": 300000,
|
|
43794
|
+
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
43795
|
+
* "hold_expires_on": "2026-09-25",
|
|
43796
|
+
* "keep_advertised": true,
|
|
43797
|
+
* "transfer_cost_clp": 217740,
|
|
43798
|
+
* "transfer_cost_lines": [
|
|
43799
|
+
* {
|
|
43800
|
+
* "kind": "transferencia_municipal",
|
|
43801
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
43802
|
+
* "amount_clp": 178500,
|
|
43803
|
+
* "fee_effective_from": "1979-12-29"
|
|
43804
|
+
* },
|
|
43805
|
+
* {
|
|
43806
|
+
* "kind": "arancel_registro_civil",
|
|
43807
|
+
* "label": "Inscripción en el Registro Civil",
|
|
43808
|
+
* "amount_clp": 39240,
|
|
43809
|
+
* "fee_effective_from": "2026-04-01"
|
|
43810
|
+
* }
|
|
43811
|
+
* ],
|
|
43812
|
+
* "status": "activa",
|
|
43813
|
+
* "abono_disposition": null,
|
|
43814
|
+
* "abono_disposition_reason": null,
|
|
43815
|
+
* "abono_disposition_at": null,
|
|
43816
|
+
* "abono_disposition_by": null,
|
|
43817
|
+
* "voided_at": null,
|
|
43818
|
+
* "void_reason": null,
|
|
43819
|
+
* "voided_by": null,
|
|
43820
|
+
* "created_at": "2026-09-18T16:40:00.000Z",
|
|
43821
|
+
* "updated_at": "2026-09-18T16:40:00.000Z",
|
|
43822
|
+
* "payments": [
|
|
43823
|
+
* {
|
|
43824
|
+
* "id": "d6d6d6d6-0000-4000-8000-000000000001",
|
|
43825
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
43826
|
+
* "reservation_id": "d3d3d3d3-0000-4000-8000-000000000001",
|
|
43827
|
+
* "sale_note_id": null,
|
|
43828
|
+
* "carried_from_reservation_id": null,
|
|
43829
|
+
* "instrument": "transferencia",
|
|
43830
|
+
* "amount_clp": 300000,
|
|
43831
|
+
* "paid_on": "2026-09-18",
|
|
43832
|
+
* "bank": "Banco Estado",
|
|
43833
|
+
* "account_number": null,
|
|
43834
|
+
* "document_number": null,
|
|
43835
|
+
* "note": "abono al tomar la reserva",
|
|
43836
|
+
* "card_fee_bps": null,
|
|
43837
|
+
* "card_surcharge_clp": null,
|
|
43838
|
+
* "card_surcharge_source": null,
|
|
43839
|
+
* "created_at": "2026-09-18T16:41:02.000Z"
|
|
43840
|
+
* }
|
|
43841
|
+
* ],
|
|
43842
|
+
* "totals": {
|
|
43843
|
+
* "total_a_pagar_clp": 300000,
|
|
43844
|
+
* "total_pagos_clp": 300000,
|
|
43845
|
+
* "saldo_clp": 0,
|
|
43846
|
+
* "recargo_tarjeta_clp": 0,
|
|
43847
|
+
* "total_a_cobrar_clp": 300000,
|
|
43848
|
+
* "payment_count": 1,
|
|
43849
|
+
* "complete": true,
|
|
43850
|
+
* "gaps": []
|
|
43851
|
+
* },
|
|
43852
|
+
* "converted_to_sale_note": null,
|
|
43853
|
+
* "holder": {
|
|
43854
|
+
* "id": "22222222-0000-4000-8000-000000000002",
|
|
43855
|
+
* "name": "Ana Pérez Soto",
|
|
43856
|
+
* "tax_id": "19312475-5",
|
|
43857
|
+
* "email": "ana.perez@example.com",
|
|
43858
|
+
* "phone": "+56987654321",
|
|
43859
|
+
* "address_street": "Av. Ejemplo",
|
|
43860
|
+
* "address_number": "1234",
|
|
43861
|
+
* "address_unit": "Depto 56",
|
|
43862
|
+
* "comuna_code": "13123",
|
|
43863
|
+
* "comuna_name": "Providencia"
|
|
43864
|
+
* },
|
|
43865
|
+
* "sends": [
|
|
43866
|
+
* {
|
|
43867
|
+
* "channel": "email",
|
|
43868
|
+
* "to": "ana.perez@example.com",
|
|
43869
|
+
* "sent_at": "2026-09-18T16:45:10.000Z",
|
|
43870
|
+
* "by": "11111111-0000-4000-8000-000000000001"
|
|
43871
|
+
* }
|
|
43872
|
+
* ]
|
|
43873
|
+
* }
|
|
43874
|
+
* }
|
|
43875
|
+
*/
|
|
43876
|
+
"application/json": {
|
|
43877
|
+
data?: unknown;
|
|
43878
|
+
meta?: {
|
|
43879
|
+
[key: string]: unknown;
|
|
43880
|
+
};
|
|
43881
|
+
};
|
|
43882
|
+
};
|
|
43883
|
+
};
|
|
43884
|
+
/** @description Validation error */
|
|
43885
|
+
400: {
|
|
43886
|
+
headers: {
|
|
43887
|
+
[name: string]: unknown;
|
|
43888
|
+
};
|
|
43889
|
+
content: {
|
|
43890
|
+
"application/json": components["schemas"]["Error"];
|
|
43891
|
+
};
|
|
43892
|
+
};
|
|
43893
|
+
/** @description Unauthorized */
|
|
43894
|
+
401: {
|
|
43895
|
+
headers: {
|
|
43896
|
+
[name: string]: unknown;
|
|
43897
|
+
};
|
|
43898
|
+
content: {
|
|
43899
|
+
"application/json": components["schemas"]["Error"];
|
|
43900
|
+
};
|
|
43901
|
+
};
|
|
43902
|
+
/** @description Forbidden */
|
|
43903
|
+
403: {
|
|
43904
|
+
headers: {
|
|
43905
|
+
[name: string]: unknown;
|
|
43906
|
+
};
|
|
43907
|
+
content: {
|
|
43908
|
+
"application/json": components["schemas"]["Error"];
|
|
43909
|
+
};
|
|
43910
|
+
};
|
|
43911
|
+
/** @description Not found */
|
|
43912
|
+
404: {
|
|
43913
|
+
headers: {
|
|
43914
|
+
[name: string]: unknown;
|
|
43915
|
+
};
|
|
43916
|
+
content: {
|
|
43917
|
+
"application/json": components["schemas"]["Error"];
|
|
43918
|
+
};
|
|
43919
|
+
};
|
|
43920
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
43921
|
+
409: {
|
|
43922
|
+
headers: {
|
|
43923
|
+
[name: string]: unknown;
|
|
43924
|
+
};
|
|
43925
|
+
content: {
|
|
43926
|
+
"application/json": components["schemas"]["Error"];
|
|
43927
|
+
};
|
|
43928
|
+
};
|
|
43929
|
+
/** @description Rate limited */
|
|
43930
|
+
429: {
|
|
43931
|
+
headers: {
|
|
43932
|
+
[name: string]: unknown;
|
|
43933
|
+
};
|
|
43934
|
+
content: {
|
|
43935
|
+
"application/json": components["schemas"]["Error"];
|
|
43936
|
+
};
|
|
43937
|
+
};
|
|
43938
|
+
};
|
|
43939
|
+
};
|
|
43940
|
+
put?: never;
|
|
43941
|
+
post?: never;
|
|
43942
|
+
delete?: never;
|
|
43943
|
+
options?: never;
|
|
43944
|
+
head?: never;
|
|
43945
|
+
/**
|
|
43946
|
+
* Edit a live reservation
|
|
43947
|
+
* @description Changes what a LIVE hold may change after it was taken: the transfer cost (`transfer_cost_clp` alone = a manual amount and clears the breakdown), the term (`hold_expires_on`, never a past day — it also moves the seña’s deadline), the advertising decision (`keep_advertised`, through the existing cierre queue) and the salesperson. Never the price, the holder or the unit. **409** once the hold is not `activa`. Unknown keys are a 400. Answers the same shape as `GET /reservations/{id}`.
|
|
43948
|
+
*/
|
|
43949
|
+
patch: {
|
|
43950
|
+
parameters: {
|
|
43951
|
+
query?: never;
|
|
43952
|
+
header?: never;
|
|
43953
|
+
path: {
|
|
43954
|
+
id: string;
|
|
43955
|
+
};
|
|
43956
|
+
cookie?: never;
|
|
43957
|
+
};
|
|
43958
|
+
requestBody?: {
|
|
43959
|
+
content: {
|
|
43960
|
+
/**
|
|
43961
|
+
* @example {
|
|
43962
|
+
* "transfer_cost_clp": 250000,
|
|
43963
|
+
* "transfer_cost_lines": null,
|
|
43964
|
+
* "hold_expires_on": "2026-09-30"
|
|
43965
|
+
* }
|
|
43966
|
+
*/
|
|
43967
|
+
"application/json": {
|
|
43968
|
+
transfer_cost_clp?: number | null;
|
|
43969
|
+
transfer_cost_lines?: {
|
|
43970
|
+
/** @enum {string} */
|
|
43971
|
+
kind: "transferencia_municipal" | "arancel_registro_civil" | "notarial" | "inscripcion" | "soap" | "tag";
|
|
43972
|
+
label: string;
|
|
43973
|
+
amount_clp: number;
|
|
43974
|
+
fee_effective_from?: string | null;
|
|
43975
|
+
}[] | null;
|
|
43976
|
+
hold_expires_on?: string;
|
|
43977
|
+
keep_advertised?: boolean;
|
|
43978
|
+
/** Format: uuid */
|
|
43979
|
+
salesperson_id?: string | null;
|
|
43980
|
+
};
|
|
43981
|
+
};
|
|
43982
|
+
};
|
|
43983
|
+
responses: {
|
|
43984
|
+
/** @description The reservation, its payments, holder and sends */
|
|
43985
|
+
200: {
|
|
43986
|
+
headers: {
|
|
43987
|
+
[name: string]: unknown;
|
|
43988
|
+
};
|
|
43989
|
+
content: {
|
|
43990
|
+
/**
|
|
43991
|
+
* @example {
|
|
43992
|
+
* "data": {
|
|
43993
|
+
* "id": "d3d3d3d3-0000-4000-8000-000000000001",
|
|
43994
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
43995
|
+
* "display_id": "R-18",
|
|
43996
|
+
* "display_seq": 18,
|
|
43997
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
43998
|
+
* "holder_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
43999
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
44000
|
+
* "agreed_price_clp": 11900000,
|
|
44001
|
+
* "abono_expected_clp": 300000,
|
|
44002
|
+
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
44003
|
+
* "hold_expires_on": "2026-09-25",
|
|
44004
|
+
* "keep_advertised": true,
|
|
44005
|
+
* "transfer_cost_clp": 217740,
|
|
44006
|
+
* "transfer_cost_lines": [
|
|
44007
|
+
* {
|
|
44008
|
+
* "kind": "transferencia_municipal",
|
|
44009
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
44010
|
+
* "amount_clp": 178500,
|
|
44011
|
+
* "fee_effective_from": "1979-12-29"
|
|
44012
|
+
* },
|
|
44013
|
+
* {
|
|
44014
|
+
* "kind": "arancel_registro_civil",
|
|
44015
|
+
* "label": "Inscripción en el Registro Civil",
|
|
44016
|
+
* "amount_clp": 39240,
|
|
44017
|
+
* "fee_effective_from": "2026-04-01"
|
|
44018
|
+
* }
|
|
44019
|
+
* ],
|
|
44020
|
+
* "status": "activa",
|
|
44021
|
+
* "abono_disposition": null,
|
|
44022
|
+
* "abono_disposition_reason": null,
|
|
44023
|
+
* "abono_disposition_at": null,
|
|
44024
|
+
* "abono_disposition_by": null,
|
|
44025
|
+
* "voided_at": null,
|
|
44026
|
+
* "void_reason": null,
|
|
44027
|
+
* "voided_by": null,
|
|
44028
|
+
* "created_at": "2026-09-18T16:40:00.000Z",
|
|
44029
|
+
* "updated_at": "2026-09-18T16:40:00.000Z",
|
|
44030
|
+
* "payments": [
|
|
44031
|
+
* {
|
|
44032
|
+
* "id": "d6d6d6d6-0000-4000-8000-000000000001",
|
|
44033
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
44034
|
+
* "reservation_id": "d3d3d3d3-0000-4000-8000-000000000001",
|
|
44035
|
+
* "sale_note_id": null,
|
|
44036
|
+
* "carried_from_reservation_id": null,
|
|
44037
|
+
* "instrument": "transferencia",
|
|
44038
|
+
* "amount_clp": 300000,
|
|
44039
|
+
* "paid_on": "2026-09-18",
|
|
44040
|
+
* "bank": "Banco Estado",
|
|
44041
|
+
* "account_number": null,
|
|
44042
|
+
* "document_number": null,
|
|
44043
|
+
* "note": "abono al tomar la reserva",
|
|
44044
|
+
* "card_fee_bps": null,
|
|
44045
|
+
* "card_surcharge_clp": null,
|
|
44046
|
+
* "card_surcharge_source": null,
|
|
44047
|
+
* "created_at": "2026-09-18T16:41:02.000Z"
|
|
44048
|
+
* }
|
|
44049
|
+
* ],
|
|
44050
|
+
* "totals": {
|
|
44051
|
+
* "total_a_pagar_clp": 300000,
|
|
44052
|
+
* "total_pagos_clp": 300000,
|
|
44053
|
+
* "saldo_clp": 0,
|
|
44054
|
+
* "recargo_tarjeta_clp": 0,
|
|
44055
|
+
* "total_a_cobrar_clp": 300000,
|
|
44056
|
+
* "payment_count": 1,
|
|
44057
|
+
* "complete": true,
|
|
44058
|
+
* "gaps": []
|
|
44059
|
+
* },
|
|
44060
|
+
* "converted_to_sale_note": null,
|
|
44061
|
+
* "holder": {
|
|
44062
|
+
* "id": "22222222-0000-4000-8000-000000000002",
|
|
44063
|
+
* "name": "Ana Pérez Soto",
|
|
44064
|
+
* "tax_id": "19312475-5",
|
|
44065
|
+
* "email": "ana.perez@example.com",
|
|
44066
|
+
* "phone": "+56987654321",
|
|
44067
|
+
* "address_street": "Av. Ejemplo",
|
|
44068
|
+
* "address_number": "1234",
|
|
44069
|
+
* "address_unit": "Depto 56",
|
|
44070
|
+
* "comuna_code": "13123",
|
|
44071
|
+
* "comuna_name": "Providencia"
|
|
44072
|
+
* },
|
|
44073
|
+
* "sends": [
|
|
44074
|
+
* {
|
|
44075
|
+
* "channel": "email",
|
|
44076
|
+
* "to": "ana.perez@example.com",
|
|
44077
|
+
* "sent_at": "2026-09-18T16:45:10.000Z",
|
|
44078
|
+
* "by": "11111111-0000-4000-8000-000000000001"
|
|
44079
|
+
* }
|
|
44080
|
+
* ]
|
|
44081
|
+
* }
|
|
44082
|
+
* }
|
|
44083
|
+
*/
|
|
44084
|
+
"application/json": {
|
|
44085
|
+
data?: unknown;
|
|
44086
|
+
meta?: {
|
|
44087
|
+
[key: string]: unknown;
|
|
44088
|
+
};
|
|
44089
|
+
};
|
|
44090
|
+
};
|
|
44091
|
+
};
|
|
44092
|
+
/** @description Validation error */
|
|
44093
|
+
400: {
|
|
44094
|
+
headers: {
|
|
44095
|
+
[name: string]: unknown;
|
|
44096
|
+
};
|
|
44097
|
+
content: {
|
|
44098
|
+
"application/json": components["schemas"]["Error"];
|
|
44099
|
+
};
|
|
44100
|
+
};
|
|
44101
|
+
/** @description Unauthorized */
|
|
44102
|
+
401: {
|
|
44103
|
+
headers: {
|
|
44104
|
+
[name: string]: unknown;
|
|
44105
|
+
};
|
|
44106
|
+
content: {
|
|
44107
|
+
"application/json": components["schemas"]["Error"];
|
|
44108
|
+
};
|
|
44109
|
+
};
|
|
44110
|
+
/** @description Forbidden */
|
|
44111
|
+
403: {
|
|
44112
|
+
headers: {
|
|
44113
|
+
[name: string]: unknown;
|
|
44114
|
+
};
|
|
44115
|
+
content: {
|
|
44116
|
+
"application/json": components["schemas"]["Error"];
|
|
44117
|
+
};
|
|
44118
|
+
};
|
|
44119
|
+
/** @description Not found */
|
|
44120
|
+
404: {
|
|
44121
|
+
headers: {
|
|
44122
|
+
[name: string]: unknown;
|
|
44123
|
+
};
|
|
44124
|
+
content: {
|
|
44125
|
+
"application/json": components["schemas"]["Error"];
|
|
44126
|
+
};
|
|
44127
|
+
};
|
|
44128
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
44129
|
+
409: {
|
|
44130
|
+
headers: {
|
|
44131
|
+
[name: string]: unknown;
|
|
44132
|
+
};
|
|
44133
|
+
content: {
|
|
44134
|
+
"application/json": components["schemas"]["Error"];
|
|
44135
|
+
};
|
|
44136
|
+
};
|
|
44137
|
+
/** @description Rate limited */
|
|
44138
|
+
429: {
|
|
44139
|
+
headers: {
|
|
44140
|
+
[name: string]: unknown;
|
|
44141
|
+
};
|
|
44142
|
+
content: {
|
|
44143
|
+
"application/json": components["schemas"]["Error"];
|
|
44144
|
+
};
|
|
44145
|
+
};
|
|
44146
|
+
};
|
|
44147
|
+
};
|
|
44148
|
+
trace?: never;
|
|
44149
|
+
};
|
|
44150
|
+
"/reservations/transfer-cost-estimate": {
|
|
44151
|
+
parameters: {
|
|
44152
|
+
query?: never;
|
|
44153
|
+
header?: never;
|
|
44154
|
+
path?: never;
|
|
44155
|
+
cookie?: never;
|
|
44156
|
+
};
|
|
44157
|
+
/**
|
|
44158
|
+
* Estimate the transfer cost of a reserva
|
|
44159
|
+
* @description What the buyer would pay for the transfer of this unit at this price, today: the 1,5 % impuesto de transferencia (base = max(precio, tasación fiscal); the agreed price when the SII has no tasación for the model) plus the Registro Civil arancel in force. Computed by the statutory add-on machinery (`fee_schedule`), never a second fee table. Notaría is not included (no platform figure exists); `basis` says so. `agreed_price_clp` omitted = the vehicle’s asking price. Read-only.
|
|
44160
|
+
*/
|
|
44161
|
+
get: {
|
|
44162
|
+
parameters: {
|
|
44163
|
+
query: {
|
|
44164
|
+
vehicle_id: string;
|
|
44165
|
+
agreed_price_clp?: number | null;
|
|
44166
|
+
};
|
|
44167
|
+
header?: never;
|
|
44168
|
+
path?: never;
|
|
44169
|
+
cookie?: never;
|
|
44170
|
+
};
|
|
44171
|
+
requestBody?: never;
|
|
44172
|
+
responses: {
|
|
44173
|
+
/** @description The estimate: total, lines and a Spanish basis sentence */
|
|
44174
|
+
200: {
|
|
44175
|
+
headers: {
|
|
44176
|
+
[name: string]: unknown;
|
|
44177
|
+
};
|
|
44178
|
+
content: {
|
|
44179
|
+
/**
|
|
44180
|
+
* @example {
|
|
44181
|
+
* "data": {
|
|
44182
|
+
* "total_clp": 217740,
|
|
44183
|
+
* "lines": [
|
|
44184
|
+
* {
|
|
44185
|
+
* "kind": "transferencia_municipal",
|
|
44186
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
44187
|
+
* "amount_clp": 178500,
|
|
44188
|
+
* "fee_effective_from": "1979-12-29"
|
|
44189
|
+
* },
|
|
44190
|
+
* {
|
|
44191
|
+
* "kind": "arancel_registro_civil",
|
|
44192
|
+
* "label": "Inscripción en el Registro Civil",
|
|
44193
|
+
* "amount_clp": 39240,
|
|
44194
|
+
* "fee_effective_from": "2026-04-01"
|
|
44195
|
+
* }
|
|
44196
|
+
* ],
|
|
44197
|
+
* "basis": "Estimado: 1,5 % sobre el mayor valor entre el precio acordado y la tasación fiscal + arancel vigente del Registro Civil. No incluye notaría; ajusta el monto si corresponde.",
|
|
44198
|
+
* "agreed_price_clp": 11900000
|
|
44199
|
+
* }
|
|
44200
|
+
* }
|
|
44201
|
+
*/
|
|
44202
|
+
"application/json": {
|
|
44203
|
+
data?: unknown;
|
|
44204
|
+
meta?: {
|
|
44205
|
+
[key: string]: unknown;
|
|
44206
|
+
};
|
|
44207
|
+
};
|
|
44208
|
+
};
|
|
44209
|
+
};
|
|
44210
|
+
/** @description Validation error */
|
|
44211
|
+
400: {
|
|
44212
|
+
headers: {
|
|
44213
|
+
[name: string]: unknown;
|
|
44214
|
+
};
|
|
44215
|
+
content: {
|
|
44216
|
+
"application/json": components["schemas"]["Error"];
|
|
44217
|
+
};
|
|
44218
|
+
};
|
|
44219
|
+
/** @description Unauthorized */
|
|
44220
|
+
401: {
|
|
44221
|
+
headers: {
|
|
44222
|
+
[name: string]: unknown;
|
|
44223
|
+
};
|
|
44224
|
+
content: {
|
|
44225
|
+
"application/json": components["schemas"]["Error"];
|
|
44226
|
+
};
|
|
44227
|
+
};
|
|
44228
|
+
/** @description Forbidden */
|
|
44229
|
+
403: {
|
|
44230
|
+
headers: {
|
|
44231
|
+
[name: string]: unknown;
|
|
44232
|
+
};
|
|
44233
|
+
content: {
|
|
44234
|
+
"application/json": components["schemas"]["Error"];
|
|
44235
|
+
};
|
|
44236
|
+
};
|
|
44237
|
+
/** @description Not found */
|
|
44238
|
+
404: {
|
|
44239
|
+
headers: {
|
|
44240
|
+
[name: string]: unknown;
|
|
44241
|
+
};
|
|
44242
|
+
content: {
|
|
44243
|
+
"application/json": components["schemas"]["Error"];
|
|
44244
|
+
};
|
|
44245
|
+
};
|
|
44246
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
44247
|
+
409: {
|
|
44248
|
+
headers: {
|
|
44249
|
+
[name: string]: unknown;
|
|
44250
|
+
};
|
|
44251
|
+
content: {
|
|
44252
|
+
"application/json": components["schemas"]["Error"];
|
|
44253
|
+
};
|
|
44254
|
+
};
|
|
44255
|
+
/** @description Rate limited */
|
|
44256
|
+
429: {
|
|
44257
|
+
headers: {
|
|
44258
|
+
[name: string]: unknown;
|
|
44259
|
+
};
|
|
44260
|
+
content: {
|
|
44261
|
+
"application/json": components["schemas"]["Error"];
|
|
44262
|
+
};
|
|
44263
|
+
};
|
|
44264
|
+
};
|
|
44265
|
+
};
|
|
44266
|
+
put?: never;
|
|
44267
|
+
post?: never;
|
|
44268
|
+
delete?: never;
|
|
44269
|
+
options?: never;
|
|
44270
|
+
head?: never;
|
|
44271
|
+
patch?: never;
|
|
44272
|
+
trace?: never;
|
|
44273
|
+
};
|
|
44274
|
+
"/reservations/{id}/pdf": {
|
|
44275
|
+
parameters: {
|
|
44276
|
+
query?: never;
|
|
44277
|
+
header?: never;
|
|
44278
|
+
path?: never;
|
|
44279
|
+
cookie?: never;
|
|
44280
|
+
};
|
|
44281
|
+
/**
|
|
44282
|
+
* Print the comprobante de reserva (PDF)
|
|
44283
|
+
* @description The workspace’s `reservation` template (else the platform starter) filled with the hold: folio, dates, dealership, holder (name, RUT, email, phone, address), unit, agreed price, abonos, saldo and transfer cost with its breakdown, signatures. RUT and domicilio print only for a caller that also holds `contacts:read` («—» otherwise). Never a 409: a fact not on record prints «—». Inline by default; `?download=1` answers as an attachment. Filename `reserva-<PATENTE>-<marca-modelo>.pdf` (e.g. `reserva-JLGJ43-mini-countryman-s.pdf`); the folio stands in for a missing plate, and `reserva-<folio>.pdf` when nothing is known.
|
|
44284
|
+
*/
|
|
44285
|
+
get: {
|
|
44286
|
+
parameters: {
|
|
44287
|
+
query?: {
|
|
44288
|
+
download?: "0" | "1" | "true" | "false";
|
|
44289
|
+
};
|
|
44290
|
+
header?: never;
|
|
44291
|
+
path: {
|
|
44292
|
+
id: string;
|
|
44293
|
+
};
|
|
44294
|
+
cookie?: never;
|
|
44295
|
+
};
|
|
44296
|
+
requestBody?: never;
|
|
44297
|
+
responses: {
|
|
44298
|
+
/** @description The PDF */
|
|
44299
|
+
200: {
|
|
44300
|
+
headers: {
|
|
44301
|
+
[name: string]: unknown;
|
|
44302
|
+
};
|
|
44303
|
+
content: {
|
|
44304
|
+
"application/pdf": string;
|
|
44305
|
+
};
|
|
44306
|
+
};
|
|
44307
|
+
/** @description Validation error */
|
|
44308
|
+
400: {
|
|
44309
|
+
headers: {
|
|
44310
|
+
[name: string]: unknown;
|
|
44311
|
+
};
|
|
44312
|
+
content: {
|
|
44313
|
+
"application/json": components["schemas"]["Error"];
|
|
44314
|
+
};
|
|
44315
|
+
};
|
|
44316
|
+
/** @description Unauthorized */
|
|
44317
|
+
401: {
|
|
44318
|
+
headers: {
|
|
44319
|
+
[name: string]: unknown;
|
|
44320
|
+
};
|
|
44321
|
+
content: {
|
|
44322
|
+
"application/json": components["schemas"]["Error"];
|
|
44323
|
+
};
|
|
44324
|
+
};
|
|
44325
|
+
/** @description Forbidden */
|
|
44326
|
+
403: {
|
|
44327
|
+
headers: {
|
|
44328
|
+
[name: string]: unknown;
|
|
44329
|
+
};
|
|
44330
|
+
content: {
|
|
44331
|
+
"application/json": components["schemas"]["Error"];
|
|
44332
|
+
};
|
|
44333
|
+
};
|
|
44334
|
+
/** @description Not found */
|
|
44335
|
+
404: {
|
|
44336
|
+
headers: {
|
|
44337
|
+
[name: string]: unknown;
|
|
44338
|
+
};
|
|
44339
|
+
content: {
|
|
44340
|
+
"application/json": components["schemas"]["Error"];
|
|
44341
|
+
};
|
|
44342
|
+
};
|
|
44343
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
44344
|
+
409: {
|
|
44345
|
+
headers: {
|
|
44346
|
+
[name: string]: unknown;
|
|
44347
|
+
};
|
|
44348
|
+
content: {
|
|
44349
|
+
"application/json": components["schemas"]["Error"];
|
|
44350
|
+
};
|
|
44351
|
+
};
|
|
44352
|
+
/** @description Rate limited */
|
|
44353
|
+
429: {
|
|
44354
|
+
headers: {
|
|
44355
|
+
[name: string]: unknown;
|
|
44356
|
+
};
|
|
44357
|
+
content: {
|
|
44358
|
+
"application/json": components["schemas"]["Error"];
|
|
44359
|
+
};
|
|
44360
|
+
};
|
|
44361
|
+
};
|
|
44362
|
+
};
|
|
44363
|
+
put?: never;
|
|
44364
|
+
post?: never;
|
|
43698
44365
|
delete?: never;
|
|
43699
44366
|
options?: never;
|
|
43700
44367
|
head?: never;
|
|
43701
44368
|
patch?: never;
|
|
43702
44369
|
trace?: never;
|
|
43703
44370
|
};
|
|
43704
|
-
"/reservations/{id}": {
|
|
44371
|
+
"/reservations/{id}/send": {
|
|
43705
44372
|
parameters: {
|
|
43706
44373
|
query?: never;
|
|
43707
44374
|
header?: never;
|
|
43708
44375
|
path?: never;
|
|
43709
44376
|
cookie?: never;
|
|
43710
44377
|
};
|
|
44378
|
+
get?: never;
|
|
44379
|
+
put?: never;
|
|
43711
44380
|
/**
|
|
43712
|
-
*
|
|
43713
|
-
* @description
|
|
44381
|
+
* Send the comprobante de reserva to the customer
|
|
44382
|
+
* @description Renders the current comprobante and sends it — always a person’s explicit act, never retried. `email`: the PDF attached, to the holder’s email or `to`. `whatsapp` (also needs `messages:send`): the PDF as a document in the holder’s WhatsApp conversation; **409** with `details.reason` = `whatsapp_window_closed` outside the 24 h window, `no_whatsapp_thread`, `no_phone`; `no_email` for email; Needs `contacts:read` too (the comprobante carries the holder’s RUT and address). `delivery_unconfirmed` when the provider errored (check the conversation before sending again). Each send is recorded and listed in `GET /reservations/{id}` → `sends`.
|
|
43714
44383
|
*/
|
|
43715
|
-
|
|
44384
|
+
post: {
|
|
43716
44385
|
parameters: {
|
|
43717
44386
|
query?: never;
|
|
43718
|
-
header?:
|
|
44387
|
+
header?: {
|
|
44388
|
+
/** @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. */
|
|
44389
|
+
"Idempotency-Key"?: string;
|
|
44390
|
+
};
|
|
43719
44391
|
path: {
|
|
43720
44392
|
id: string;
|
|
43721
44393
|
};
|
|
43722
44394
|
cookie?: never;
|
|
43723
44395
|
};
|
|
43724
|
-
requestBody?:
|
|
44396
|
+
requestBody?: {
|
|
44397
|
+
content: {
|
|
44398
|
+
/**
|
|
44399
|
+
* @example {
|
|
44400
|
+
* "channel": "email"
|
|
44401
|
+
* }
|
|
44402
|
+
*/
|
|
44403
|
+
"application/json": {
|
|
44404
|
+
/** @enum {string} */
|
|
44405
|
+
channel: "email" | "whatsapp";
|
|
44406
|
+
to?: string;
|
|
44407
|
+
message?: string;
|
|
44408
|
+
/** @description Advertencia de envío codes to go ahead over — every code from a 409 `OUTBOUND_WARNING` response's `reasons`, e.g. `["quiet_hours"]`. Recorded in the audit log and the outbound ledger. Has no effect on a Bloqueo (422 `OUTBOUND_BLOCKED`). */
|
|
44409
|
+
acknowledge?: string[];
|
|
44410
|
+
};
|
|
44411
|
+
};
|
|
44412
|
+
};
|
|
43725
44413
|
responses: {
|
|
43726
|
-
/** @description
|
|
44414
|
+
/** @description What was sent, to whom and when */
|
|
43727
44415
|
200: {
|
|
43728
44416
|
headers: {
|
|
43729
44417
|
[name: string]: unknown;
|
|
@@ -43732,59 +44420,10 @@ interface paths {
|
|
|
43732
44420
|
/**
|
|
43733
44421
|
* @example {
|
|
43734
44422
|
* "data": {
|
|
43735
|
-
* "
|
|
43736
|
-
* "
|
|
43737
|
-
* "
|
|
43738
|
-
* "
|
|
43739
|
-
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
43740
|
-
* "holder_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
43741
|
-
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
43742
|
-
* "agreed_price_clp": 11900000,
|
|
43743
|
-
* "abono_expected_clp": 300000,
|
|
43744
|
-
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
43745
|
-
* "hold_expires_on": "2026-09-25",
|
|
43746
|
-
* "keep_advertised": true,
|
|
43747
|
-
* "status": "activa",
|
|
43748
|
-
* "abono_disposition": null,
|
|
43749
|
-
* "abono_disposition_reason": null,
|
|
43750
|
-
* "abono_disposition_at": null,
|
|
43751
|
-
* "abono_disposition_by": null,
|
|
43752
|
-
* "voided_at": null,
|
|
43753
|
-
* "void_reason": null,
|
|
43754
|
-
* "voided_by": null,
|
|
43755
|
-
* "created_at": "2026-09-18T16:40:00.000Z",
|
|
43756
|
-
* "updated_at": "2026-09-18T16:40:00.000Z",
|
|
43757
|
-
* "payments": [
|
|
43758
|
-
* {
|
|
43759
|
-
* "id": "d6d6d6d6-0000-4000-8000-000000000001",
|
|
43760
|
-
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
43761
|
-
* "reservation_id": "d3d3d3d3-0000-4000-8000-000000000001",
|
|
43762
|
-
* "sale_note_id": null,
|
|
43763
|
-
* "carried_from_reservation_id": null,
|
|
43764
|
-
* "instrument": "transferencia",
|
|
43765
|
-
* "amount_clp": 300000,
|
|
43766
|
-
* "paid_on": "2026-09-18",
|
|
43767
|
-
* "bank": "Banco Estado",
|
|
43768
|
-
* "account_number": null,
|
|
43769
|
-
* "document_number": null,
|
|
43770
|
-
* "note": "abono al tomar la reserva",
|
|
43771
|
-
* "card_fee_bps": null,
|
|
43772
|
-
* "card_surcharge_clp": null,
|
|
43773
|
-
* "card_surcharge_source": null,
|
|
43774
|
-
* "created_at": "2026-09-18T16:41:02.000Z"
|
|
43775
|
-
* }
|
|
43776
|
-
* ],
|
|
43777
|
-
* "totals": {
|
|
43778
|
-
* "total_a_pagar_clp": 300000,
|
|
43779
|
-
* "total_pagos_clp": 300000,
|
|
43780
|
-
* "saldo_clp": 0,
|
|
43781
|
-
* "recargo_tarjeta_clp": 0,
|
|
43782
|
-
* "total_a_cobrar_clp": 300000,
|
|
43783
|
-
* "payment_count": 1,
|
|
43784
|
-
* "complete": true,
|
|
43785
|
-
* "gaps": []
|
|
43786
|
-
* },
|
|
43787
|
-
* "converted_to_sale_note": null
|
|
44423
|
+
* "channel": "email",
|
|
44424
|
+
* "to": "ana.perez@example.com",
|
|
44425
|
+
* "sent_at": "2026-09-18T16:45:10.000Z",
|
|
44426
|
+
* "message_id": null
|
|
43788
44427
|
* }
|
|
43789
44428
|
* }
|
|
43790
44429
|
*/
|
|
@@ -43852,8 +44491,6 @@ interface paths {
|
|
|
43852
44491
|
};
|
|
43853
44492
|
};
|
|
43854
44493
|
};
|
|
43855
|
-
put?: never;
|
|
43856
|
-
post?: never;
|
|
43857
44494
|
delete?: never;
|
|
43858
44495
|
options?: never;
|
|
43859
44496
|
head?: never;
|
|
@@ -43919,6 +44556,21 @@ interface paths {
|
|
|
43919
44556
|
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
43920
44557
|
* "hold_expires_on": "2026-09-25",
|
|
43921
44558
|
* "keep_advertised": true,
|
|
44559
|
+
* "transfer_cost_clp": 217740,
|
|
44560
|
+
* "transfer_cost_lines": [
|
|
44561
|
+
* {
|
|
44562
|
+
* "kind": "transferencia_municipal",
|
|
44563
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
44564
|
+
* "amount_clp": 178500,
|
|
44565
|
+
* "fee_effective_from": "1979-12-29"
|
|
44566
|
+
* },
|
|
44567
|
+
* {
|
|
44568
|
+
* "kind": "arancel_registro_civil",
|
|
44569
|
+
* "label": "Inscripción en el Registro Civil",
|
|
44570
|
+
* "amount_clp": 39240,
|
|
44571
|
+
* "fee_effective_from": "2026-04-01"
|
|
44572
|
+
* }
|
|
44573
|
+
* ],
|
|
43922
44574
|
* "status": "anulada",
|
|
43923
44575
|
* "abono_disposition": null,
|
|
43924
44576
|
* "abono_disposition_reason": null,
|
|
@@ -44065,6 +44717,21 @@ interface paths {
|
|
|
44065
44717
|
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
44066
44718
|
* "hold_expires_on": "2026-09-25",
|
|
44067
44719
|
* "keep_advertised": true,
|
|
44720
|
+
* "transfer_cost_clp": 217740,
|
|
44721
|
+
* "transfer_cost_lines": [
|
|
44722
|
+
* {
|
|
44723
|
+
* "kind": "transferencia_municipal",
|
|
44724
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
44725
|
+
* "amount_clp": 178500,
|
|
44726
|
+
* "fee_effective_from": "1979-12-29"
|
|
44727
|
+
* },
|
|
44728
|
+
* {
|
|
44729
|
+
* "kind": "arancel_registro_civil",
|
|
44730
|
+
* "label": "Inscripción en el Registro Civil",
|
|
44731
|
+
* "amount_clp": 39240,
|
|
44732
|
+
* "fee_effective_from": "2026-04-01"
|
|
44733
|
+
* }
|
|
44734
|
+
* ],
|
|
44068
44735
|
* "status": "anulada",
|
|
44069
44736
|
* "abono_disposition": "devuelto",
|
|
44070
44737
|
* "abono_disposition_reason": "el cliente desistió; se devolvió el abono",
|
|
@@ -44192,6 +44859,7 @@ interface paths {
|
|
|
44192
44859
|
/** Format: date-time */
|
|
44193
44860
|
issued_at?: string | null;
|
|
44194
44861
|
lead_id?: string | null;
|
|
44862
|
+
carry_transfer_cost?: boolean;
|
|
44195
44863
|
};
|
|
44196
44864
|
};
|
|
44197
44865
|
};
|
|
@@ -44218,6 +44886,21 @@ interface paths {
|
|
|
44218
44886
|
* "taken_at": "2026-09-18T16:40:00.000Z",
|
|
44219
44887
|
* "hold_expires_on": "2026-09-25",
|
|
44220
44888
|
* "keep_advertised": true,
|
|
44889
|
+
* "transfer_cost_clp": 217740,
|
|
44890
|
+
* "transfer_cost_lines": [
|
|
44891
|
+
* {
|
|
44892
|
+
* "kind": "transferencia_municipal",
|
|
44893
|
+
* "label": "Impuesto a la transferencia (1,5 %)",
|
|
44894
|
+
* "amount_clp": 178500,
|
|
44895
|
+
* "fee_effective_from": "1979-12-29"
|
|
44896
|
+
* },
|
|
44897
|
+
* {
|
|
44898
|
+
* "kind": "arancel_registro_civil",
|
|
44899
|
+
* "label": "Inscripción en el Registro Civil",
|
|
44900
|
+
* "amount_clp": 39240,
|
|
44901
|
+
* "fee_effective_from": "2026-04-01"
|
|
44902
|
+
* }
|
|
44903
|
+
* ],
|
|
44221
44904
|
* "status": "completada",
|
|
44222
44905
|
* "abono_disposition": "aplicado",
|
|
44223
44906
|
* "abono_disposition_reason": null,
|
|
@@ -87371,6 +88054,8 @@ interface paths {
|
|
|
87371
88054
|
*
|
|
87372
88055
|
* **`reason` is not stored, but it IS shown**: the text is appended to that customer notice, and nowhere else. Nothing persists it on the appointment, so put the internal explanation in a note on the lead or conversation if it needs to survive — and write `reason` as something the customer may read.
|
|
87373
88056
|
*
|
|
88057
|
+
* **`postpone: true`** is the same cancellation for a customer who cannot make it with no new date yet: everything above happens, and the appointment is ALSO recorded as postponed — `metadata.postponed` = `{ at, reason, by }`, the one place `reason` is stored. The lead stays open (a cancelled visit steps it back to qualified, never to lost).
|
|
88058
|
+
*
|
|
87374
88059
|
* An appointment imported FROM Google is not deleted upstream — the calendar owns those, so the cancellation is local and the event stays on the customer’s calendar.
|
|
87375
88060
|
*/
|
|
87376
88061
|
post: {
|
|
@@ -87394,6 +88079,7 @@ interface paths {
|
|
|
87394
88079
|
*/
|
|
87395
88080
|
"application/json": {
|
|
87396
88081
|
reason?: string;
|
|
88082
|
+
postpone?: boolean;
|
|
87397
88083
|
};
|
|
87398
88084
|
};
|
|
87399
88085
|
};
|
|
@@ -119919,6 +120605,8 @@ interface paths {
|
|
|
119919
120605
|
* `handoff_urgent: boolean` (#2969) is a plain `conversation` column, not a per-route annotation: true while an open/pending AI-handoff thread's customer is still waiting on us and Jev read their newest pending message as urgent (a clinic post-treatment complication, or an explicit same-day deadline) — kept in sync by the same classification that also tightens the re-notify cadence, and present on every conversation read, list included, because the inbox shows the flag on the conversation ROW too, not only its header.
|
|
119920
120606
|
*
|
|
119921
120607
|
* Carries `ad_origin` exactly as `GET /conversations` rows do.
|
|
120608
|
+
*
|
|
120609
|
+
* `reply_via` (THIS ROUTE ONLY): non-null on a conversation that cannot carry a reply (a website form or a Yapo lead) — the WhatsApp thread to answer in, or `conversation_id: null` when the contact has none open yet.
|
|
119922
120610
|
*/
|
|
119923
120611
|
get: {
|
|
119924
120612
|
parameters: {
|
|
@@ -120081,6 +120769,7 @@ interface paths {
|
|
|
120081
120769
|
data: {
|
|
120082
120770
|
ad_origin: components["schemas"]["AdOrigin"];
|
|
120083
120771
|
campaign_origin?: components["schemas"]["ConversationCampaignOrigin"];
|
|
120772
|
+
reply_via?: components["schemas"]["ConversationReplyVia"];
|
|
120084
120773
|
};
|
|
120085
120774
|
meta?: {
|
|
120086
120775
|
[key: string]: unknown;
|
|
@@ -120930,6 +121619,8 @@ interface paths {
|
|
|
120930
121619
|
*
|
|
120931
121620
|
* **Instagram and Messenger reply window.** A reply from a signed-in member may go out up to 7 days after the customer's last message: past the standard 24 hours it is sent with Meta's `HUMAN_AGENT` tag. Past 7 days — or when the customer never wrote — it is refused with 422 `MESSAGING_WINDOW_CLOSED` and nothing is stored. Every other caller (API key, personal token, connected app) keeps the 24-hour window.
|
|
120932
121621
|
*
|
|
121622
|
+
* **Read-only channels.** A website form (`website`) or Yapo lead conversation has no reply rail: the send is refused with 409 `CHANNEL_READ_ONLY` (`details.channel`) and nothing is stored or queued. The same holds for templates, attachments, location, Flows and voice notes. Answer on WhatsApp — see `reply_via` on `GET /conversations/{id}`.
|
|
121623
|
+
*
|
|
120933
121624
|
* Requires `messages:send` in addition to `conversations:write`. Sent by an API key, a personal token or a connected app, it goes through the política de envíos first — 422 `OUTBOUND_BLOCKED`, 409 `OUTBOUND_WARNING` (resend with `acknowledge`) or, for a connected app past its fan-out limit, 202 `pending_approval`. A member in the UI is not checked.
|
|
120934
121625
|
*/
|
|
120935
121626
|
post: {
|
|
@@ -177928,7 +178619,7 @@ interface paths {
|
|
|
177928
178619
|
* Create an order
|
|
177929
178620
|
* @description A native order for a contact. **Prices come from the catalog**: each line names a `variant_id` (or the `product_id` of a product without variants) and a quantity, and its unit price is the variant’s price, else the product’s, frozen on the line. There is no price field. A line on an inactive item, an item without a CLP price, or more units than the store would sell (tracked stock, policy `deny`) is refused with 422 / 409 naming the line.
|
|
177930
178621
|
*
|
|
177931
|
-
* With `status: pending_payment` (the default) the payment opens in the same write: one obligation group of kind `order` (`obligation_group_id`) with one `product` obligation per line, so `POST /orders/{id}/payment-link` (or «Enviar link de pago» with `group_id`) charges it on Mercado Pago. When that payment settles the order becomes `paid` and its native stock is decremented once. The lead (`lead_id`, else the conversation’s open lead) moves to «Carrito
|
|
178622
|
+
* With `status: pending_payment` (the default) the payment opens in the same write: one obligation group of kind `order` (`obligation_group_id`) with one `product` obligation per line, so `POST /orders/{id}/payment-link` (or «Enviar link de pago» with `group_id`) charges it on Mercado Pago. When that payment settles the order becomes `paid` and its native stock is decremented once. The lead (`lead_id`, else the conversation’s open lead) moves to «Carrito» on an `ecommerce_orders` board. Fires `order.created`. Requires `orders:write`.
|
|
177932
178623
|
*/
|
|
177933
178624
|
post: {
|
|
177934
178625
|
parameters: {
|
|
@@ -203411,6 +204102,19 @@ interface components {
|
|
|
203411
204102
|
/** @description The newest message in the thread is that send — «Enviada · sin respuesta». */
|
|
203412
204103
|
awaiting_reply: boolean;
|
|
203413
204104
|
} | null;
|
|
204105
|
+
/** @description Non-null ONLY when this conversation cannot carry a reply (a website form, `website`, or a Yapo lead, `yapo`): every send on it answers 409 `CHANNEL_READ_ONLY`, and this names the WhatsApp thread to use instead. Absent on every channel that can reply. */
|
|
204106
|
+
ConversationReplyVia: {
|
|
204107
|
+
/** @enum {string} */
|
|
204108
|
+
channel: "whatsapp";
|
|
204109
|
+
/**
|
|
204110
|
+
* Format: uuid
|
|
204111
|
+
* @description The contact's most recent open WhatsApp conversation in this workspace — answer there. `null`: none yet; open one with `POST /conversations/whatsapp` and send a template through `POST /conversations/{id}/templates`.
|
|
204112
|
+
*/
|
|
204113
|
+
conversation_id: string | null;
|
|
204114
|
+
/** Format: uuid */
|
|
204115
|
+
contact_id: string | null;
|
|
204116
|
+
contact_phone: string | null;
|
|
204117
|
+
} | null;
|
|
203414
204118
|
MessageAttachment: {
|
|
203415
204119
|
/** @description Position in `media_urls`. */
|
|
203416
204120
|
index: number;
|
|
@@ -203426,6 +204130,18 @@ interface components {
|
|
|
203426
204130
|
*/
|
|
203427
204131
|
playback_mime: "audio/mp4" | "audio/mpeg" | "audio/aac" | null;
|
|
203428
204132
|
};
|
|
204133
|
+
MessageForm: {
|
|
204134
|
+
title?: string;
|
|
204135
|
+
/** @description The headline figure, e.g. «Cotización» · «hasta $500.000». */
|
|
204136
|
+
highlight?: {
|
|
204137
|
+
label: string;
|
|
204138
|
+
value: string;
|
|
204139
|
+
};
|
|
204140
|
+
fields: {
|
|
204141
|
+
label: string;
|
|
204142
|
+
value: string;
|
|
204143
|
+
}[];
|
|
204144
|
+
};
|
|
203429
204145
|
Message: {
|
|
203430
204146
|
id: string;
|
|
203431
204147
|
conversation_id: string;
|
|
@@ -203442,6 +204158,10 @@ interface components {
|
|
|
203442
204158
|
media_urls?: string[] | null;
|
|
203443
204159
|
/** @description One entry per `media_urls` entry, same order — see MessageAttachment. */
|
|
203444
204160
|
attachments?: components["schemas"]["MessageAttachment"][];
|
|
204161
|
+
/** @description Channel-specific extras. `form` is set on the first message of a website-form conversation (see MessageForm). */
|
|
204162
|
+
metadata?: {
|
|
204163
|
+
form?: components["schemas"]["MessageForm"];
|
|
204164
|
+
} | null;
|
|
203445
204165
|
created_at: string;
|
|
203446
204166
|
};
|
|
203447
204167
|
PendingApproval: {
|