@vitrina/api 17.47.0 → 17.49.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 +1410 -354
- package/dist/index.d.ts +1410 -354
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -39468,6 +39468,968 @@ interface paths {
|
|
|
39468
39468
|
patch?: never;
|
|
39469
39469
|
trace?: never;
|
|
39470
39470
|
};
|
|
39471
|
+
"/sale-notes/{id}/payments/{paymentId}/remove": {
|
|
39472
|
+
parameters: {
|
|
39473
|
+
query?: never;
|
|
39474
|
+
header?: never;
|
|
39475
|
+
path?: never;
|
|
39476
|
+
cookie?: never;
|
|
39477
|
+
};
|
|
39478
|
+
get?: never;
|
|
39479
|
+
put?: never;
|
|
39480
|
+
/**
|
|
39481
|
+
* Remove a payment from a nota de venta (issued or approved)
|
|
39482
|
+
* @description Removes one payment applied to a nota de venta that is ISSUED or APPROVED and not voided (app#7319). `reason` is required (one line, ≤ 300). What happens depends on what the money is, so no money fact becomes false:
|
|
39483
|
+
*
|
|
39484
|
+
* * a payment the staff typed (`provenance: manual`) is **reversed**: the row is kept and marked reversed (actor, instant, reason, the same reversal as `POST /payments/{id}/reverse`) and every live allocation of it is released. It stops counting on the note and on the reserva it was carried from;
|
|
39485
|
+
* * a payment the bank or a gateway proved (`provenance: verified`) is **released** from this note only: the money did arrive, so it stays as the buyer’s credit (Pagos, «por asignar») to apply elsewhere or refund.
|
|
39486
|
+
*
|
|
39487
|
+
* In the same transaction a `history` entry is written (`kind: payment`, `changes.payment: { from: { payment_id, instrument, amount_clp, on_note_clp, paid_on, provenance }, to: null }`, `changes.removal: { from: null, to: { effect, reason } }`); a compraventa printed before it reads `compraventa_outdated: true`. Adding a payment is `POST /document-payments` with `sale_note_id`; it writes the mirror entry (`changes.payment: { from: null, to: {…} }`). To change an amount, remove and add again. The receivable is not re-stated (what the buyer owes does not change); `totals`, saldo and `funding` follow.
|
|
39488
|
+
*
|
|
39489
|
+
* Responds with the same read as `GET /sale-notes/{id}` plus `payment_removal: { payment_id, effect: reversed | released, amount_clp, on_note_clp, reason, reservation_deposit, change_id }`. `reservation_deposit` names the reserva a carried payment came from and what the removal did to its seña: `no_longer_counted` (reversed) or `still_counted` (released); `null` otherwise.
|
|
39490
|
+
*
|
|
39491
|
+
* **404** when the payment is not applied to this note. **409** `details.blocked_reason` = `sale_note_voided`; `payment_already_removed`; `payment_shared` (a typed payment also applied to another debt of the buyer that is not this sale or its reserva: release it from the note in Pagos instead, or take it off the other debt first; `details.obligation_ids`). Requires `document_payments:write`.
|
|
39492
|
+
*/
|
|
39493
|
+
post: {
|
|
39494
|
+
parameters: {
|
|
39495
|
+
query?: never;
|
|
39496
|
+
header?: {
|
|
39497
|
+
/** @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. */
|
|
39498
|
+
"Idempotency-Key"?: string;
|
|
39499
|
+
};
|
|
39500
|
+
path: {
|
|
39501
|
+
id: string;
|
|
39502
|
+
paymentId: string;
|
|
39503
|
+
};
|
|
39504
|
+
cookie?: never;
|
|
39505
|
+
};
|
|
39506
|
+
requestBody?: {
|
|
39507
|
+
content: {
|
|
39508
|
+
/**
|
|
39509
|
+
* @example {
|
|
39510
|
+
* "reason": "Se registró dos veces"
|
|
39511
|
+
* }
|
|
39512
|
+
*/
|
|
39513
|
+
"application/json": components["schemas"]["RemoveSaleNotePaymentBody"];
|
|
39514
|
+
};
|
|
39515
|
+
};
|
|
39516
|
+
responses: {
|
|
39517
|
+
/** @description The nota de venta, as GET /sale-notes/{id} reads it, plus the removal */
|
|
39518
|
+
200: {
|
|
39519
|
+
headers: {
|
|
39520
|
+
[name: string]: unknown;
|
|
39521
|
+
};
|
|
39522
|
+
content: {
|
|
39523
|
+
/**
|
|
39524
|
+
* @example {
|
|
39525
|
+
* "data": {
|
|
39526
|
+
* "id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39527
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39528
|
+
* "display_id": "V-118",
|
|
39529
|
+
* "display_seq": 118,
|
|
39530
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000002",
|
|
39531
|
+
* "buyer_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
39532
|
+
* "lead_id": null,
|
|
39533
|
+
* "converted_from_reservation_id": null,
|
|
39534
|
+
* "seller_of_record": "automotora",
|
|
39535
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
39536
|
+
* "net_clp": 11900000,
|
|
39537
|
+
* "list_price_clp": 12490000,
|
|
39538
|
+
* "discount_clp": 590000,
|
|
39539
|
+
* "tax_clp": 1900000,
|
|
39540
|
+
* "tax_treatment": "afecto",
|
|
39541
|
+
* "status": "issued",
|
|
39542
|
+
* "issued_at": "2026-09-19T13:00:00.000Z",
|
|
39543
|
+
* "emitted_by": "11111111-0000-4000-8000-000000000001",
|
|
39544
|
+
* "approved_by": null,
|
|
39545
|
+
* "approved_at": null,
|
|
39546
|
+
* "voided_at": null,
|
|
39547
|
+
* "void_reason": null,
|
|
39548
|
+
* "voided_by": null,
|
|
39549
|
+
* "created_at": "2026-09-19T13:00:00.000Z",
|
|
39550
|
+
* "updated_at": "2026-09-19T13:00:00.000Z",
|
|
39551
|
+
* "receivable_obligation_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd184",
|
|
39552
|
+
* "print_missing_fields": [
|
|
39553
|
+
* {
|
|
39554
|
+
* "variable": "COMPRADOR_DOMICILIO",
|
|
39555
|
+
* "label": "Domicilio del comprador",
|
|
39556
|
+
* "fix": "buyer_contact",
|
|
39557
|
+
* "contact_id": "01a1ad2b-a52a-7b04-abf8-389e20e8217a"
|
|
39558
|
+
* }
|
|
39559
|
+
* ],
|
|
39560
|
+
* "payments": [
|
|
39561
|
+
* {
|
|
39562
|
+
* "id": "d6d6d6d6-0000-4000-8000-000000000002",
|
|
39563
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39564
|
+
* "reservation_id": null,
|
|
39565
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39566
|
+
* "carried_from_reservation_id": null,
|
|
39567
|
+
* "instrument": "transferencia",
|
|
39568
|
+
* "amount_clp": 13800000,
|
|
39569
|
+
* "paid_on": "2026-09-19",
|
|
39570
|
+
* "bank": "Banco de Chile",
|
|
39571
|
+
* "account_number": null,
|
|
39572
|
+
* "document_number": null,
|
|
39573
|
+
* "note": null,
|
|
39574
|
+
* "card_fee_bps": null,
|
|
39575
|
+
* "card_surcharge_clp": null,
|
|
39576
|
+
* "card_surcharge_source": null,
|
|
39577
|
+
* "created_at": "2026-09-19T13:05:00.000Z"
|
|
39578
|
+
* }
|
|
39579
|
+
* ],
|
|
39580
|
+
* "totals": {
|
|
39581
|
+
* "total_a_pagar_clp": 13800000,
|
|
39582
|
+
* "total_pagos_clp": 13800000,
|
|
39583
|
+
* "saldo_clp": 0,
|
|
39584
|
+
* "recargo_tarjeta_clp": 0,
|
|
39585
|
+
* "total_a_cobrar_clp": 13800000,
|
|
39586
|
+
* "payment_count": 1,
|
|
39587
|
+
* "complete": true,
|
|
39588
|
+
* "gaps": []
|
|
39589
|
+
* },
|
|
39590
|
+
* "funding": {
|
|
39591
|
+
* "standing": "funded",
|
|
39592
|
+
* "balanced": true,
|
|
39593
|
+
* "terms": {
|
|
39594
|
+
* "price_clp": 13800000,
|
|
39595
|
+
* "add_on_charges_clp": 0,
|
|
39596
|
+
* "payments_clp": 13800000,
|
|
39597
|
+
* "retoma_clp": 0,
|
|
39598
|
+
* "credit_clp": 0
|
|
39599
|
+
* },
|
|
39600
|
+
* "total_a_pagar_clp": 13800000,
|
|
39601
|
+
* "total_consideration_clp": 13800000,
|
|
39602
|
+
* "saldo_clp": 0,
|
|
39603
|
+
* "gap_clp": null,
|
|
39604
|
+
* "saldo_a_favor_del_cliente_clp": null,
|
|
39605
|
+
* "payment_count": 1,
|
|
39606
|
+
* "complete": true,
|
|
39607
|
+
* "gaps": []
|
|
39608
|
+
* },
|
|
39609
|
+
* "trade_ins": [],
|
|
39610
|
+
* "credit": null,
|
|
39611
|
+
* "timeline": [
|
|
39612
|
+
* {
|
|
39613
|
+
* "step": "emitted",
|
|
39614
|
+
* "at": "2026-09-19T13:00:00.000Z",
|
|
39615
|
+
* "actor": {
|
|
39616
|
+
* "id": "11111111-0000-4000-8000-000000000001",
|
|
39617
|
+
* "name": "Martina Reyes",
|
|
39618
|
+
* "kind": "member"
|
|
39619
|
+
* }
|
|
39620
|
+
* }
|
|
39621
|
+
* ],
|
|
39622
|
+
* "payment_removal": {
|
|
39623
|
+
* "payment_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1b1",
|
|
39624
|
+
* "effect": "reversed",
|
|
39625
|
+
* "amount_clp": 500000,
|
|
39626
|
+
* "on_note_clp": 500000,
|
|
39627
|
+
* "reason": "Se registró dos veces",
|
|
39628
|
+
* "reservation_deposit": null,
|
|
39629
|
+
* "change_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1b2"
|
|
39630
|
+
* }
|
|
39631
|
+
* }
|
|
39632
|
+
* }
|
|
39633
|
+
*/
|
|
39634
|
+
"application/json": {
|
|
39635
|
+
data: components["schemas"]["SaleNotePaymentRemoved"];
|
|
39636
|
+
meta?: {
|
|
39637
|
+
[key: string]: unknown;
|
|
39638
|
+
};
|
|
39639
|
+
};
|
|
39640
|
+
};
|
|
39641
|
+
};
|
|
39642
|
+
/** @description Validation error */
|
|
39643
|
+
400: {
|
|
39644
|
+
headers: {
|
|
39645
|
+
[name: string]: unknown;
|
|
39646
|
+
};
|
|
39647
|
+
content: {
|
|
39648
|
+
"application/json": components["schemas"]["Error"];
|
|
39649
|
+
};
|
|
39650
|
+
};
|
|
39651
|
+
/** @description Unauthorized */
|
|
39652
|
+
401: {
|
|
39653
|
+
headers: {
|
|
39654
|
+
[name: string]: unknown;
|
|
39655
|
+
};
|
|
39656
|
+
content: {
|
|
39657
|
+
"application/json": components["schemas"]["Error"];
|
|
39658
|
+
};
|
|
39659
|
+
};
|
|
39660
|
+
/** @description Forbidden */
|
|
39661
|
+
403: {
|
|
39662
|
+
headers: {
|
|
39663
|
+
[name: string]: unknown;
|
|
39664
|
+
};
|
|
39665
|
+
content: {
|
|
39666
|
+
"application/json": components["schemas"]["Error"];
|
|
39667
|
+
};
|
|
39668
|
+
};
|
|
39669
|
+
/** @description Not found */
|
|
39670
|
+
404: {
|
|
39671
|
+
headers: {
|
|
39672
|
+
[name: string]: unknown;
|
|
39673
|
+
};
|
|
39674
|
+
content: {
|
|
39675
|
+
"application/json": components["schemas"]["Error"];
|
|
39676
|
+
};
|
|
39677
|
+
};
|
|
39678
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
39679
|
+
409: {
|
|
39680
|
+
headers: {
|
|
39681
|
+
[name: string]: unknown;
|
|
39682
|
+
};
|
|
39683
|
+
content: {
|
|
39684
|
+
"application/json": components["schemas"]["Error"];
|
|
39685
|
+
};
|
|
39686
|
+
};
|
|
39687
|
+
/** @description Rate limited */
|
|
39688
|
+
429: {
|
|
39689
|
+
headers: {
|
|
39690
|
+
[name: string]: unknown;
|
|
39691
|
+
};
|
|
39692
|
+
content: {
|
|
39693
|
+
"application/json": components["schemas"]["Error"];
|
|
39694
|
+
};
|
|
39695
|
+
};
|
|
39696
|
+
};
|
|
39697
|
+
};
|
|
39698
|
+
delete?: never;
|
|
39699
|
+
options?: never;
|
|
39700
|
+
head?: never;
|
|
39701
|
+
patch?: never;
|
|
39702
|
+
trace?: never;
|
|
39703
|
+
};
|
|
39704
|
+
"/sale-notes/{id}/add-ons/{lineId}": {
|
|
39705
|
+
parameters: {
|
|
39706
|
+
query?: never;
|
|
39707
|
+
header?: never;
|
|
39708
|
+
path?: never;
|
|
39709
|
+
cookie?: never;
|
|
39710
|
+
};
|
|
39711
|
+
get?: never;
|
|
39712
|
+
put?: never;
|
|
39713
|
+
post?: never;
|
|
39714
|
+
/**
|
|
39715
|
+
* Remove an add-on from an issued or approved nota de venta
|
|
39716
|
+
* @description Removes one add-on line (app#7318) from a nota de venta that is ISSUED or APPROVED and not voided. Only an add-on line can be removed; the vehicle line cannot be reached. In one transaction the receivable is re-stated and a `history` entry is written (`kind: add_on`, `changes.add_on: { from: <the line>, to: null }`); a compraventa printed before it reads `compraventa_outdated: true`. Responds with the same read as `GET /sale-notes/{id}`.
|
|
39717
|
+
*
|
|
39718
|
+
* **404** when `lineId` is not an add-on line of this note; **409** `details.blocked_reason` = `sale_note_voided`. Requires `sale_notes:write`.
|
|
39719
|
+
*/
|
|
39720
|
+
delete: {
|
|
39721
|
+
parameters: {
|
|
39722
|
+
query?: never;
|
|
39723
|
+
header?: never;
|
|
39724
|
+
path: {
|
|
39725
|
+
id: string;
|
|
39726
|
+
lineId: string;
|
|
39727
|
+
};
|
|
39728
|
+
cookie?: never;
|
|
39729
|
+
};
|
|
39730
|
+
requestBody?: never;
|
|
39731
|
+
responses: {
|
|
39732
|
+
/** @description The nota de venta, as GET /sale-notes/{id} reads it */
|
|
39733
|
+
200: {
|
|
39734
|
+
headers: {
|
|
39735
|
+
[name: string]: unknown;
|
|
39736
|
+
};
|
|
39737
|
+
content: {
|
|
39738
|
+
/**
|
|
39739
|
+
* @example {
|
|
39740
|
+
* "data": {
|
|
39741
|
+
* "id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39742
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39743
|
+
* "display_id": "V-118",
|
|
39744
|
+
* "display_seq": 118,
|
|
39745
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000002",
|
|
39746
|
+
* "buyer_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
39747
|
+
* "lead_id": null,
|
|
39748
|
+
* "converted_from_reservation_id": null,
|
|
39749
|
+
* "seller_of_record": "automotora",
|
|
39750
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
39751
|
+
* "net_clp": 11900000,
|
|
39752
|
+
* "list_price_clp": 12490000,
|
|
39753
|
+
* "discount_clp": 590000,
|
|
39754
|
+
* "tax_clp": 1900000,
|
|
39755
|
+
* "tax_treatment": "afecto",
|
|
39756
|
+
* "status": "issued",
|
|
39757
|
+
* "issued_at": "2026-09-19T13:00:00.000Z",
|
|
39758
|
+
* "emitted_by": "11111111-0000-4000-8000-000000000001",
|
|
39759
|
+
* "approved_by": null,
|
|
39760
|
+
* "approved_at": null,
|
|
39761
|
+
* "voided_at": null,
|
|
39762
|
+
* "void_reason": null,
|
|
39763
|
+
* "voided_by": null,
|
|
39764
|
+
* "created_at": "2026-09-19T13:00:00.000Z",
|
|
39765
|
+
* "updated_at": "2026-09-19T13:00:00.000Z",
|
|
39766
|
+
* "receivable_obligation_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd184",
|
|
39767
|
+
* "print_missing_fields": [
|
|
39768
|
+
* {
|
|
39769
|
+
* "variable": "COMPRADOR_DOMICILIO",
|
|
39770
|
+
* "label": "Domicilio del comprador",
|
|
39771
|
+
* "fix": "buyer_contact",
|
|
39772
|
+
* "contact_id": "01a1ad2b-a52a-7b04-abf8-389e20e8217a"
|
|
39773
|
+
* }
|
|
39774
|
+
* ],
|
|
39775
|
+
* "payments": [
|
|
39776
|
+
* {
|
|
39777
|
+
* "id": "d6d6d6d6-0000-4000-8000-000000000002",
|
|
39778
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39779
|
+
* "reservation_id": null,
|
|
39780
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39781
|
+
* "carried_from_reservation_id": null,
|
|
39782
|
+
* "instrument": "transferencia",
|
|
39783
|
+
* "amount_clp": 13800000,
|
|
39784
|
+
* "paid_on": "2026-09-19",
|
|
39785
|
+
* "bank": "Banco de Chile",
|
|
39786
|
+
* "account_number": null,
|
|
39787
|
+
* "document_number": null,
|
|
39788
|
+
* "note": null,
|
|
39789
|
+
* "card_fee_bps": null,
|
|
39790
|
+
* "card_surcharge_clp": null,
|
|
39791
|
+
* "card_surcharge_source": null,
|
|
39792
|
+
* "created_at": "2026-09-19T13:05:00.000Z"
|
|
39793
|
+
* }
|
|
39794
|
+
* ],
|
|
39795
|
+
* "totals": {
|
|
39796
|
+
* "total_a_pagar_clp": 13800000,
|
|
39797
|
+
* "total_pagos_clp": 13800000,
|
|
39798
|
+
* "saldo_clp": 0,
|
|
39799
|
+
* "recargo_tarjeta_clp": 0,
|
|
39800
|
+
* "total_a_cobrar_clp": 13800000,
|
|
39801
|
+
* "payment_count": 1,
|
|
39802
|
+
* "complete": true,
|
|
39803
|
+
* "gaps": []
|
|
39804
|
+
* },
|
|
39805
|
+
* "funding": {
|
|
39806
|
+
* "standing": "funded",
|
|
39807
|
+
* "balanced": true,
|
|
39808
|
+
* "terms": {
|
|
39809
|
+
* "price_clp": 13800000,
|
|
39810
|
+
* "add_on_charges_clp": 0,
|
|
39811
|
+
* "payments_clp": 13800000,
|
|
39812
|
+
* "retoma_clp": 0,
|
|
39813
|
+
* "credit_clp": 0
|
|
39814
|
+
* },
|
|
39815
|
+
* "total_a_pagar_clp": 13800000,
|
|
39816
|
+
* "total_consideration_clp": 13800000,
|
|
39817
|
+
* "saldo_clp": 0,
|
|
39818
|
+
* "gap_clp": null,
|
|
39819
|
+
* "saldo_a_favor_del_cliente_clp": null,
|
|
39820
|
+
* "payment_count": 1,
|
|
39821
|
+
* "complete": true,
|
|
39822
|
+
* "gaps": []
|
|
39823
|
+
* },
|
|
39824
|
+
* "trade_ins": [],
|
|
39825
|
+
* "credit": null,
|
|
39826
|
+
* "timeline": [
|
|
39827
|
+
* {
|
|
39828
|
+
* "step": "emitted",
|
|
39829
|
+
* "at": "2026-09-19T13:00:00.000Z",
|
|
39830
|
+
* "actor": {
|
|
39831
|
+
* "id": "11111111-0000-4000-8000-000000000001",
|
|
39832
|
+
* "name": "Martina Reyes",
|
|
39833
|
+
* "kind": "member"
|
|
39834
|
+
* }
|
|
39835
|
+
* }
|
|
39836
|
+
* ],
|
|
39837
|
+
* "transfer_tax": {
|
|
39838
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a7",
|
|
39839
|
+
* "charge_clp": 120000,
|
|
39840
|
+
* "source": "calculated",
|
|
39841
|
+
* "at_current_price_clp": 135000,
|
|
39842
|
+
* "gaps": [],
|
|
39843
|
+
* "recalculation_offered": true
|
|
39844
|
+
* },
|
|
39845
|
+
* "history": [
|
|
39846
|
+
* {
|
|
39847
|
+
* "id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a8",
|
|
39848
|
+
* "kind": "add_on",
|
|
39849
|
+
* "changes": {
|
|
39850
|
+
* "add_on": {
|
|
39851
|
+
* "from": {
|
|
39852
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a9",
|
|
39853
|
+
* "kind": "otro",
|
|
39854
|
+
* "description": "Garantía extendida",
|
|
39855
|
+
* "charge_clp": 119000,
|
|
39856
|
+
* "tax_treatment": "afecto"
|
|
39857
|
+
* },
|
|
39858
|
+
* "to": {
|
|
39859
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a9",
|
|
39860
|
+
* "kind": "otro",
|
|
39861
|
+
* "description": "Garantía extendida 24 meses",
|
|
39862
|
+
* "charge_clp": 150000,
|
|
39863
|
+
* "tax_treatment": "afecto"
|
|
39864
|
+
* }
|
|
39865
|
+
* }
|
|
39866
|
+
* },
|
|
39867
|
+
* "at": "2026-11-15T13:20:00.000Z",
|
|
39868
|
+
* "actor": null,
|
|
39869
|
+
* "on_approved_note": true,
|
|
39870
|
+
* "price_approval_id": null,
|
|
39871
|
+
* "authorised_by": null
|
|
39872
|
+
* }
|
|
39873
|
+
* ],
|
|
39874
|
+
* "compraventa_outdated": false,
|
|
39875
|
+
* "pending_price_change": null
|
|
39876
|
+
* }
|
|
39877
|
+
* }
|
|
39878
|
+
*/
|
|
39879
|
+
"application/json": {
|
|
39880
|
+
data: components["schemas"]["SaleNoteRead"];
|
|
39881
|
+
meta?: {
|
|
39882
|
+
[key: string]: unknown;
|
|
39883
|
+
};
|
|
39884
|
+
};
|
|
39885
|
+
};
|
|
39886
|
+
};
|
|
39887
|
+
/** @description Validation error */
|
|
39888
|
+
400: {
|
|
39889
|
+
headers: {
|
|
39890
|
+
[name: string]: unknown;
|
|
39891
|
+
};
|
|
39892
|
+
content: {
|
|
39893
|
+
"application/json": components["schemas"]["Error"];
|
|
39894
|
+
};
|
|
39895
|
+
};
|
|
39896
|
+
/** @description Unauthorized */
|
|
39897
|
+
401: {
|
|
39898
|
+
headers: {
|
|
39899
|
+
[name: string]: unknown;
|
|
39900
|
+
};
|
|
39901
|
+
content: {
|
|
39902
|
+
"application/json": components["schemas"]["Error"];
|
|
39903
|
+
};
|
|
39904
|
+
};
|
|
39905
|
+
/** @description Forbidden */
|
|
39906
|
+
403: {
|
|
39907
|
+
headers: {
|
|
39908
|
+
[name: string]: unknown;
|
|
39909
|
+
};
|
|
39910
|
+
content: {
|
|
39911
|
+
"application/json": components["schemas"]["Error"];
|
|
39912
|
+
};
|
|
39913
|
+
};
|
|
39914
|
+
/** @description Not found */
|
|
39915
|
+
404: {
|
|
39916
|
+
headers: {
|
|
39917
|
+
[name: string]: unknown;
|
|
39918
|
+
};
|
|
39919
|
+
content: {
|
|
39920
|
+
"application/json": components["schemas"]["Error"];
|
|
39921
|
+
};
|
|
39922
|
+
};
|
|
39923
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
39924
|
+
409: {
|
|
39925
|
+
headers: {
|
|
39926
|
+
[name: string]: unknown;
|
|
39927
|
+
};
|
|
39928
|
+
content: {
|
|
39929
|
+
"application/json": components["schemas"]["Error"];
|
|
39930
|
+
};
|
|
39931
|
+
};
|
|
39932
|
+
/** @description Rate limited */
|
|
39933
|
+
429: {
|
|
39934
|
+
headers: {
|
|
39935
|
+
[name: string]: unknown;
|
|
39936
|
+
};
|
|
39937
|
+
content: {
|
|
39938
|
+
"application/json": components["schemas"]["Error"];
|
|
39939
|
+
};
|
|
39940
|
+
};
|
|
39941
|
+
};
|
|
39942
|
+
};
|
|
39943
|
+
options?: never;
|
|
39944
|
+
head?: never;
|
|
39945
|
+
/**
|
|
39946
|
+
* Change an add-on on an issued or approved nota de venta
|
|
39947
|
+
* @description Changes one add-on line (app#7318) on a nota de venta that is ISSUED or APPROVED and not voided: `description`, `charge_clp` (what the buyer pays for it, IVA included on an afecto «Otro») and, on an «Otro» line only, `tax_treatment` (`afecto` | `exento`). All optional, at least one; unknown keys are a 400. The line keeps its id, position, framing, beneficiary and fee citation; on a `reembolso_mandato` line the cost follows the amount. A statutory line’s treatment follows its framing: sending a different one is a **400** on `tax_treatment`. In one transaction the buyer’s receivable is re-stated (total a pagar, saldo and funding standing follow) and a `history` entry is written (`kind: add_on`, `changes.add_on: { from, to }`, each a snapshot `{ line_id, kind, description, charge_clp, tax_treatment }`); a compraventa printed before it reads `compraventa_outdated: true`. The vehicle’s price does not move, so no price approval is involved. Sending what the line already says is a no-op (no history). Responds with the same read as `GET /sale-notes/{id}`.
|
|
39948
|
+
*
|
|
39949
|
+
* **404** when `lineId` is not an add-on line of this note; **409** `details.blocked_reason` = `sale_note_voided`. Requires `sale_notes:write`.
|
|
39950
|
+
*/
|
|
39951
|
+
patch: {
|
|
39952
|
+
parameters: {
|
|
39953
|
+
query?: never;
|
|
39954
|
+
header?: never;
|
|
39955
|
+
path: {
|
|
39956
|
+
id: string;
|
|
39957
|
+
lineId: string;
|
|
39958
|
+
};
|
|
39959
|
+
cookie?: never;
|
|
39960
|
+
};
|
|
39961
|
+
requestBody?: {
|
|
39962
|
+
content: {
|
|
39963
|
+
/**
|
|
39964
|
+
* @example {
|
|
39965
|
+
* "description": "Garantía extendida 24 meses",
|
|
39966
|
+
* "charge_clp": 150000
|
|
39967
|
+
* }
|
|
39968
|
+
*/
|
|
39969
|
+
"application/json": components["schemas"]["ChangeSaleNoteAddOnBody"];
|
|
39970
|
+
};
|
|
39971
|
+
};
|
|
39972
|
+
responses: {
|
|
39973
|
+
/** @description The nota de venta, as GET /sale-notes/{id} reads it */
|
|
39974
|
+
200: {
|
|
39975
|
+
headers: {
|
|
39976
|
+
[name: string]: unknown;
|
|
39977
|
+
};
|
|
39978
|
+
content: {
|
|
39979
|
+
/**
|
|
39980
|
+
* @example {
|
|
39981
|
+
* "data": {
|
|
39982
|
+
* "id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
39983
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
39984
|
+
* "display_id": "V-118",
|
|
39985
|
+
* "display_seq": 118,
|
|
39986
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000002",
|
|
39987
|
+
* "buyer_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
39988
|
+
* "lead_id": null,
|
|
39989
|
+
* "converted_from_reservation_id": null,
|
|
39990
|
+
* "seller_of_record": "automotora",
|
|
39991
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
39992
|
+
* "net_clp": 11900000,
|
|
39993
|
+
* "list_price_clp": 12490000,
|
|
39994
|
+
* "discount_clp": 590000,
|
|
39995
|
+
* "tax_clp": 1900000,
|
|
39996
|
+
* "tax_treatment": "afecto",
|
|
39997
|
+
* "status": "issued",
|
|
39998
|
+
* "issued_at": "2026-09-19T13:00:00.000Z",
|
|
39999
|
+
* "emitted_by": "11111111-0000-4000-8000-000000000001",
|
|
40000
|
+
* "approved_by": null,
|
|
40001
|
+
* "approved_at": null,
|
|
40002
|
+
* "voided_at": null,
|
|
40003
|
+
* "void_reason": null,
|
|
40004
|
+
* "voided_by": null,
|
|
40005
|
+
* "created_at": "2026-09-19T13:00:00.000Z",
|
|
40006
|
+
* "updated_at": "2026-09-19T13:00:00.000Z",
|
|
40007
|
+
* "receivable_obligation_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd184",
|
|
40008
|
+
* "print_missing_fields": [
|
|
40009
|
+
* {
|
|
40010
|
+
* "variable": "COMPRADOR_DOMICILIO",
|
|
40011
|
+
* "label": "Domicilio del comprador",
|
|
40012
|
+
* "fix": "buyer_contact",
|
|
40013
|
+
* "contact_id": "01a1ad2b-a52a-7b04-abf8-389e20e8217a"
|
|
40014
|
+
* }
|
|
40015
|
+
* ],
|
|
40016
|
+
* "payments": [
|
|
40017
|
+
* {
|
|
40018
|
+
* "id": "d6d6d6d6-0000-4000-8000-000000000002",
|
|
40019
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
40020
|
+
* "reservation_id": null,
|
|
40021
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
40022
|
+
* "carried_from_reservation_id": null,
|
|
40023
|
+
* "instrument": "transferencia",
|
|
40024
|
+
* "amount_clp": 13800000,
|
|
40025
|
+
* "paid_on": "2026-09-19",
|
|
40026
|
+
* "bank": "Banco de Chile",
|
|
40027
|
+
* "account_number": null,
|
|
40028
|
+
* "document_number": null,
|
|
40029
|
+
* "note": null,
|
|
40030
|
+
* "card_fee_bps": null,
|
|
40031
|
+
* "card_surcharge_clp": null,
|
|
40032
|
+
* "card_surcharge_source": null,
|
|
40033
|
+
* "created_at": "2026-09-19T13:05:00.000Z"
|
|
40034
|
+
* }
|
|
40035
|
+
* ],
|
|
40036
|
+
* "totals": {
|
|
40037
|
+
* "total_a_pagar_clp": 13800000,
|
|
40038
|
+
* "total_pagos_clp": 13800000,
|
|
40039
|
+
* "saldo_clp": 0,
|
|
40040
|
+
* "recargo_tarjeta_clp": 0,
|
|
40041
|
+
* "total_a_cobrar_clp": 13800000,
|
|
40042
|
+
* "payment_count": 1,
|
|
40043
|
+
* "complete": true,
|
|
40044
|
+
* "gaps": []
|
|
40045
|
+
* },
|
|
40046
|
+
* "funding": {
|
|
40047
|
+
* "standing": "funded",
|
|
40048
|
+
* "balanced": true,
|
|
40049
|
+
* "terms": {
|
|
40050
|
+
* "price_clp": 13800000,
|
|
40051
|
+
* "add_on_charges_clp": 0,
|
|
40052
|
+
* "payments_clp": 13800000,
|
|
40053
|
+
* "retoma_clp": 0,
|
|
40054
|
+
* "credit_clp": 0
|
|
40055
|
+
* },
|
|
40056
|
+
* "total_a_pagar_clp": 13800000,
|
|
40057
|
+
* "total_consideration_clp": 13800000,
|
|
40058
|
+
* "saldo_clp": 0,
|
|
40059
|
+
* "gap_clp": null,
|
|
40060
|
+
* "saldo_a_favor_del_cliente_clp": null,
|
|
40061
|
+
* "payment_count": 1,
|
|
40062
|
+
* "complete": true,
|
|
40063
|
+
* "gaps": []
|
|
40064
|
+
* },
|
|
40065
|
+
* "trade_ins": [],
|
|
40066
|
+
* "credit": null,
|
|
40067
|
+
* "timeline": [
|
|
40068
|
+
* {
|
|
40069
|
+
* "step": "emitted",
|
|
40070
|
+
* "at": "2026-09-19T13:00:00.000Z",
|
|
40071
|
+
* "actor": {
|
|
40072
|
+
* "id": "11111111-0000-4000-8000-000000000001",
|
|
40073
|
+
* "name": "Martina Reyes",
|
|
40074
|
+
* "kind": "member"
|
|
40075
|
+
* }
|
|
40076
|
+
* }
|
|
40077
|
+
* ],
|
|
40078
|
+
* "transfer_tax": {
|
|
40079
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a7",
|
|
40080
|
+
* "charge_clp": 120000,
|
|
40081
|
+
* "source": "calculated",
|
|
40082
|
+
* "at_current_price_clp": 135000,
|
|
40083
|
+
* "gaps": [],
|
|
40084
|
+
* "recalculation_offered": true
|
|
40085
|
+
* },
|
|
40086
|
+
* "history": [
|
|
40087
|
+
* {
|
|
40088
|
+
* "id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a8",
|
|
40089
|
+
* "kind": "add_on",
|
|
40090
|
+
* "changes": {
|
|
40091
|
+
* "add_on": {
|
|
40092
|
+
* "from": {
|
|
40093
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a9",
|
|
40094
|
+
* "kind": "otro",
|
|
40095
|
+
* "description": "Garantía extendida",
|
|
40096
|
+
* "charge_clp": 119000,
|
|
40097
|
+
* "tax_treatment": "afecto"
|
|
40098
|
+
* },
|
|
40099
|
+
* "to": {
|
|
40100
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a9",
|
|
40101
|
+
* "kind": "otro",
|
|
40102
|
+
* "description": "Garantía extendida 24 meses",
|
|
40103
|
+
* "charge_clp": 150000,
|
|
40104
|
+
* "tax_treatment": "afecto"
|
|
40105
|
+
* }
|
|
40106
|
+
* }
|
|
40107
|
+
* },
|
|
40108
|
+
* "at": "2026-11-15T13:20:00.000Z",
|
|
40109
|
+
* "actor": null,
|
|
40110
|
+
* "on_approved_note": true,
|
|
40111
|
+
* "price_approval_id": null,
|
|
40112
|
+
* "authorised_by": null
|
|
40113
|
+
* }
|
|
40114
|
+
* ],
|
|
40115
|
+
* "compraventa_outdated": false,
|
|
40116
|
+
* "pending_price_change": null
|
|
40117
|
+
* }
|
|
40118
|
+
* }
|
|
40119
|
+
*/
|
|
40120
|
+
"application/json": {
|
|
40121
|
+
data: components["schemas"]["SaleNoteRead"];
|
|
40122
|
+
meta?: {
|
|
40123
|
+
[key: string]: unknown;
|
|
40124
|
+
};
|
|
40125
|
+
};
|
|
40126
|
+
};
|
|
40127
|
+
};
|
|
40128
|
+
/** @description Validation error */
|
|
40129
|
+
400: {
|
|
40130
|
+
headers: {
|
|
40131
|
+
[name: string]: unknown;
|
|
40132
|
+
};
|
|
40133
|
+
content: {
|
|
40134
|
+
"application/json": components["schemas"]["Error"];
|
|
40135
|
+
};
|
|
40136
|
+
};
|
|
40137
|
+
/** @description Unauthorized */
|
|
40138
|
+
401: {
|
|
40139
|
+
headers: {
|
|
40140
|
+
[name: string]: unknown;
|
|
40141
|
+
};
|
|
40142
|
+
content: {
|
|
40143
|
+
"application/json": components["schemas"]["Error"];
|
|
40144
|
+
};
|
|
40145
|
+
};
|
|
40146
|
+
/** @description Forbidden */
|
|
40147
|
+
403: {
|
|
40148
|
+
headers: {
|
|
40149
|
+
[name: string]: unknown;
|
|
40150
|
+
};
|
|
40151
|
+
content: {
|
|
40152
|
+
"application/json": components["schemas"]["Error"];
|
|
40153
|
+
};
|
|
40154
|
+
};
|
|
40155
|
+
/** @description Not found */
|
|
40156
|
+
404: {
|
|
40157
|
+
headers: {
|
|
40158
|
+
[name: string]: unknown;
|
|
40159
|
+
};
|
|
40160
|
+
content: {
|
|
40161
|
+
"application/json": components["schemas"]["Error"];
|
|
40162
|
+
};
|
|
40163
|
+
};
|
|
40164
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
40165
|
+
409: {
|
|
40166
|
+
headers: {
|
|
40167
|
+
[name: string]: unknown;
|
|
40168
|
+
};
|
|
40169
|
+
content: {
|
|
40170
|
+
"application/json": components["schemas"]["Error"];
|
|
40171
|
+
};
|
|
40172
|
+
};
|
|
40173
|
+
/** @description Rate limited */
|
|
40174
|
+
429: {
|
|
40175
|
+
headers: {
|
|
40176
|
+
[name: string]: unknown;
|
|
40177
|
+
};
|
|
40178
|
+
content: {
|
|
40179
|
+
"application/json": components["schemas"]["Error"];
|
|
40180
|
+
};
|
|
40181
|
+
};
|
|
40182
|
+
};
|
|
40183
|
+
};
|
|
40184
|
+
trace?: never;
|
|
40185
|
+
};
|
|
40186
|
+
"/sale-notes/{id}/add-ons/{lineId}/recalculate": {
|
|
40187
|
+
parameters: {
|
|
40188
|
+
query?: never;
|
|
40189
|
+
header?: never;
|
|
40190
|
+
path?: never;
|
|
40191
|
+
cookie?: never;
|
|
40192
|
+
};
|
|
40193
|
+
get?: never;
|
|
40194
|
+
put?: never;
|
|
40195
|
+
/**
|
|
40196
|
+
* Recalculate the transfer tax at the note’s current price
|
|
40197
|
+
* @description Rewrites a `transferencia_municipal` line (app#7318) with the transfer tax computed at the note’s CURRENT price (the same computation as `POST /transfer-tax/preview`, as of the note’s issue day, with permiso de circulación) and the citation of the rate row it used; a reembolso’s cost follows. Only ever on this explicit request: after a price correction `GET /sale-notes/{id}` reads `transfer_tax: { line_id, charge_clp, source: calculated | typed, at_current_price_clp, gaps, recalculation_offered }`, and `recalculation_offered` is `true` only for a CALCULATED line whose amount differs from the current price’s. A typed line is never offered one, but may still be recalculated on request. Re-states the receivable and writes a `history` entry (`kind: add_on`, the `to` snapshot carries `recalculated: true`); a no-op when the amount already matches. Responds with the same read as `GET /sale-notes/{id}`.
|
|
40198
|
+
*
|
|
40199
|
+
* **400** when the line is not the transfer tax; **404** when `lineId` is not an add-on line of this note; **409** `details.blocked_reason` = `transfer_tax_incomplete` (with `details.gaps`) when it cannot be computed, or `sale_note_voided`. Requires `sale_notes:write`.
|
|
40200
|
+
*/
|
|
40201
|
+
post: {
|
|
40202
|
+
parameters: {
|
|
40203
|
+
query?: never;
|
|
40204
|
+
header?: {
|
|
40205
|
+
/** @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. */
|
|
40206
|
+
"Idempotency-Key"?: string;
|
|
40207
|
+
};
|
|
40208
|
+
path: {
|
|
40209
|
+
id: string;
|
|
40210
|
+
lineId: string;
|
|
40211
|
+
};
|
|
40212
|
+
cookie?: never;
|
|
40213
|
+
};
|
|
40214
|
+
requestBody?: never;
|
|
40215
|
+
responses: {
|
|
40216
|
+
/** @description The nota de venta, as GET /sale-notes/{id} reads it */
|
|
40217
|
+
200: {
|
|
40218
|
+
headers: {
|
|
40219
|
+
[name: string]: unknown;
|
|
40220
|
+
};
|
|
40221
|
+
content: {
|
|
40222
|
+
/**
|
|
40223
|
+
* @example {
|
|
40224
|
+
* "data": {
|
|
40225
|
+
* "id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
40226
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
40227
|
+
* "display_id": "V-118",
|
|
40228
|
+
* "display_seq": 118,
|
|
40229
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000002",
|
|
40230
|
+
* "buyer_contact_id": "22222222-0000-4000-8000-000000000002",
|
|
40231
|
+
* "lead_id": null,
|
|
40232
|
+
* "converted_from_reservation_id": null,
|
|
40233
|
+
* "seller_of_record": "automotora",
|
|
40234
|
+
* "salesperson_id": "11111111-0000-4000-8000-000000000001",
|
|
40235
|
+
* "net_clp": 11900000,
|
|
40236
|
+
* "list_price_clp": 12490000,
|
|
40237
|
+
* "discount_clp": 590000,
|
|
40238
|
+
* "tax_clp": 1900000,
|
|
40239
|
+
* "tax_treatment": "afecto",
|
|
40240
|
+
* "status": "issued",
|
|
40241
|
+
* "issued_at": "2026-09-19T13:00:00.000Z",
|
|
40242
|
+
* "emitted_by": "11111111-0000-4000-8000-000000000001",
|
|
40243
|
+
* "approved_by": null,
|
|
40244
|
+
* "approved_at": null,
|
|
40245
|
+
* "voided_at": null,
|
|
40246
|
+
* "void_reason": null,
|
|
40247
|
+
* "voided_by": null,
|
|
40248
|
+
* "created_at": "2026-09-19T13:00:00.000Z",
|
|
40249
|
+
* "updated_at": "2026-09-19T13:00:00.000Z",
|
|
40250
|
+
* "receivable_obligation_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd184",
|
|
40251
|
+
* "print_missing_fields": [
|
|
40252
|
+
* {
|
|
40253
|
+
* "variable": "COMPRADOR_DOMICILIO",
|
|
40254
|
+
* "label": "Domicilio del comprador",
|
|
40255
|
+
* "fix": "buyer_contact",
|
|
40256
|
+
* "contact_id": "01a1ad2b-a52a-7b04-abf8-389e20e8217a"
|
|
40257
|
+
* }
|
|
40258
|
+
* ],
|
|
40259
|
+
* "payments": [
|
|
40260
|
+
* {
|
|
40261
|
+
* "id": "d6d6d6d6-0000-4000-8000-000000000002",
|
|
40262
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
40263
|
+
* "reservation_id": null,
|
|
40264
|
+
* "sale_note_id": "d4d4d4d4-0000-4000-8000-000000000001",
|
|
40265
|
+
* "carried_from_reservation_id": null,
|
|
40266
|
+
* "instrument": "transferencia",
|
|
40267
|
+
* "amount_clp": 13800000,
|
|
40268
|
+
* "paid_on": "2026-09-19",
|
|
40269
|
+
* "bank": "Banco de Chile",
|
|
40270
|
+
* "account_number": null,
|
|
40271
|
+
* "document_number": null,
|
|
40272
|
+
* "note": null,
|
|
40273
|
+
* "card_fee_bps": null,
|
|
40274
|
+
* "card_surcharge_clp": null,
|
|
40275
|
+
* "card_surcharge_source": null,
|
|
40276
|
+
* "created_at": "2026-09-19T13:05:00.000Z"
|
|
40277
|
+
* }
|
|
40278
|
+
* ],
|
|
40279
|
+
* "totals": {
|
|
40280
|
+
* "total_a_pagar_clp": 13800000,
|
|
40281
|
+
* "total_pagos_clp": 13800000,
|
|
40282
|
+
* "saldo_clp": 0,
|
|
40283
|
+
* "recargo_tarjeta_clp": 0,
|
|
40284
|
+
* "total_a_cobrar_clp": 13800000,
|
|
40285
|
+
* "payment_count": 1,
|
|
40286
|
+
* "complete": true,
|
|
40287
|
+
* "gaps": []
|
|
40288
|
+
* },
|
|
40289
|
+
* "funding": {
|
|
40290
|
+
* "standing": "funded",
|
|
40291
|
+
* "balanced": true,
|
|
40292
|
+
* "terms": {
|
|
40293
|
+
* "price_clp": 13800000,
|
|
40294
|
+
* "add_on_charges_clp": 0,
|
|
40295
|
+
* "payments_clp": 13800000,
|
|
40296
|
+
* "retoma_clp": 0,
|
|
40297
|
+
* "credit_clp": 0
|
|
40298
|
+
* },
|
|
40299
|
+
* "total_a_pagar_clp": 13800000,
|
|
40300
|
+
* "total_consideration_clp": 13800000,
|
|
40301
|
+
* "saldo_clp": 0,
|
|
40302
|
+
* "gap_clp": null,
|
|
40303
|
+
* "saldo_a_favor_del_cliente_clp": null,
|
|
40304
|
+
* "payment_count": 1,
|
|
40305
|
+
* "complete": true,
|
|
40306
|
+
* "gaps": []
|
|
40307
|
+
* },
|
|
40308
|
+
* "trade_ins": [],
|
|
40309
|
+
* "credit": null,
|
|
40310
|
+
* "timeline": [
|
|
40311
|
+
* {
|
|
40312
|
+
* "step": "emitted",
|
|
40313
|
+
* "at": "2026-09-19T13:00:00.000Z",
|
|
40314
|
+
* "actor": {
|
|
40315
|
+
* "id": "11111111-0000-4000-8000-000000000001",
|
|
40316
|
+
* "name": "Martina Reyes",
|
|
40317
|
+
* "kind": "member"
|
|
40318
|
+
* }
|
|
40319
|
+
* }
|
|
40320
|
+
* ],
|
|
40321
|
+
* "transfer_tax": {
|
|
40322
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a7",
|
|
40323
|
+
* "charge_clp": 120000,
|
|
40324
|
+
* "source": "calculated",
|
|
40325
|
+
* "at_current_price_clp": 135000,
|
|
40326
|
+
* "gaps": [],
|
|
40327
|
+
* "recalculation_offered": true
|
|
40328
|
+
* },
|
|
40329
|
+
* "history": [
|
|
40330
|
+
* {
|
|
40331
|
+
* "id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a8",
|
|
40332
|
+
* "kind": "add_on",
|
|
40333
|
+
* "changes": {
|
|
40334
|
+
* "add_on": {
|
|
40335
|
+
* "from": {
|
|
40336
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a9",
|
|
40337
|
+
* "kind": "otro",
|
|
40338
|
+
* "description": "Garantía extendida",
|
|
40339
|
+
* "charge_clp": 119000,
|
|
40340
|
+
* "tax_treatment": "afecto"
|
|
40341
|
+
* },
|
|
40342
|
+
* "to": {
|
|
40343
|
+
* "line_id": "01a1c1df-a6ea-779f-9310-bdbb2eadd1a9",
|
|
40344
|
+
* "kind": "otro",
|
|
40345
|
+
* "description": "Garantía extendida 24 meses",
|
|
40346
|
+
* "charge_clp": 150000,
|
|
40347
|
+
* "tax_treatment": "afecto"
|
|
40348
|
+
* }
|
|
40349
|
+
* }
|
|
40350
|
+
* },
|
|
40351
|
+
* "at": "2026-11-15T13:20:00.000Z",
|
|
40352
|
+
* "actor": null,
|
|
40353
|
+
* "on_approved_note": true,
|
|
40354
|
+
* "price_approval_id": null,
|
|
40355
|
+
* "authorised_by": null
|
|
40356
|
+
* }
|
|
40357
|
+
* ],
|
|
40358
|
+
* "compraventa_outdated": false,
|
|
40359
|
+
* "pending_price_change": null
|
|
40360
|
+
* }
|
|
40361
|
+
* }
|
|
40362
|
+
*/
|
|
40363
|
+
"application/json": {
|
|
40364
|
+
data: components["schemas"]["SaleNoteRead"];
|
|
40365
|
+
meta?: {
|
|
40366
|
+
[key: string]: unknown;
|
|
40367
|
+
};
|
|
40368
|
+
};
|
|
40369
|
+
};
|
|
40370
|
+
};
|
|
40371
|
+
/** @description Validation error */
|
|
40372
|
+
400: {
|
|
40373
|
+
headers: {
|
|
40374
|
+
[name: string]: unknown;
|
|
40375
|
+
};
|
|
40376
|
+
content: {
|
|
40377
|
+
"application/json": components["schemas"]["Error"];
|
|
40378
|
+
};
|
|
40379
|
+
};
|
|
40380
|
+
/** @description Unauthorized */
|
|
40381
|
+
401: {
|
|
40382
|
+
headers: {
|
|
40383
|
+
[name: string]: unknown;
|
|
40384
|
+
};
|
|
40385
|
+
content: {
|
|
40386
|
+
"application/json": components["schemas"]["Error"];
|
|
40387
|
+
};
|
|
40388
|
+
};
|
|
40389
|
+
/** @description Forbidden */
|
|
40390
|
+
403: {
|
|
40391
|
+
headers: {
|
|
40392
|
+
[name: string]: unknown;
|
|
40393
|
+
};
|
|
40394
|
+
content: {
|
|
40395
|
+
"application/json": components["schemas"]["Error"];
|
|
40396
|
+
};
|
|
40397
|
+
};
|
|
40398
|
+
/** @description Not found */
|
|
40399
|
+
404: {
|
|
40400
|
+
headers: {
|
|
40401
|
+
[name: string]: unknown;
|
|
40402
|
+
};
|
|
40403
|
+
content: {
|
|
40404
|
+
"application/json": components["schemas"]["Error"];
|
|
40405
|
+
};
|
|
40406
|
+
};
|
|
40407
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
40408
|
+
409: {
|
|
40409
|
+
headers: {
|
|
40410
|
+
[name: string]: unknown;
|
|
40411
|
+
};
|
|
40412
|
+
content: {
|
|
40413
|
+
"application/json": components["schemas"]["Error"];
|
|
40414
|
+
};
|
|
40415
|
+
};
|
|
40416
|
+
/** @description Rate limited */
|
|
40417
|
+
429: {
|
|
40418
|
+
headers: {
|
|
40419
|
+
[name: string]: unknown;
|
|
40420
|
+
};
|
|
40421
|
+
content: {
|
|
40422
|
+
"application/json": components["schemas"]["Error"];
|
|
40423
|
+
};
|
|
40424
|
+
};
|
|
40425
|
+
};
|
|
40426
|
+
};
|
|
40427
|
+
delete?: never;
|
|
40428
|
+
options?: never;
|
|
40429
|
+
head?: never;
|
|
40430
|
+
patch?: never;
|
|
40431
|
+
trace?: never;
|
|
40432
|
+
};
|
|
39471
40433
|
"/sale-notes/{id}/approve": {
|
|
39472
40434
|
parameters: {
|
|
39473
40435
|
query?: never;
|
|
@@ -149854,6 +150816,8 @@ interface paths {
|
|
|
149854
150816
|
* `deducciones_clp` is the Σ of the dueño share of every retained cost line the settlement discharged, and `deductions` lists them one by one (`cost_entry_id`, `label`, `entry_date`, `dueno_clp`). Selling a consigned car deducts them all: `monto_owner_clp` is `amount_venta_clp` minus the comisión minus `deducciones_clp`.
|
|
149855
150817
|
*
|
|
149856
150818
|
* `sends` is the log of `POST /consignments/{id}/liquidacion/send`, newest first (last 10): `channel`, `to`, `sent_at`, `by` (member or API key id) and `by_name`. `whatsapp_send_enabled` says whether the workspace may send it on WhatsApp (its staff-WhatsApp switch is on); when false, offer email only.
|
|
150819
|
+
*
|
|
150820
|
+
* `settlement_difference` (app#7320): `null` unless the sale’s price was corrected after this liquidación was paid (or adjustments exist). The record above is never rewritten; this says `paid_with_price_clp`, `current_price_clp`, `paid_to_owner_clp`, `due_to_owner_clp` (the owner’s share at the current price with this liquidación’s own terms and deductions), `adjusted_clp`, `difference_clp` (positive: the dealer owes the owner; negative: the owner owes the dealer), `status` and the `adjustments`. Close it with `POST /consignments/{id}/liquidacion/adjustments`.
|
|
149857
150821
|
*/
|
|
149858
150822
|
get: {
|
|
149859
150823
|
parameters: {
|
|
@@ -234734,6 +235698,7 @@ interface paths {
|
|
|
234734
235698
|
form_name: string | null;
|
|
234735
235699
|
treatment_label: string;
|
|
234736
235700
|
}[];
|
|
235701
|
+
notification_emails: string[];
|
|
234737
235702
|
token_hint: string | null;
|
|
234738
235703
|
intake_path: string;
|
|
234739
235704
|
};
|
|
@@ -234840,6 +235805,8 @@ interface paths {
|
|
|
234840
235805
|
/** @description What the patient reads in the second message: «…en nuestro formulario de <treatment_label>». Control characters and repeated spaces are removed and it is cut at 60 characters. */
|
|
234841
235806
|
treatment_label: string;
|
|
234842
235807
|
}[];
|
|
235808
|
+
/** @description Addresses outside the workspace (the clinic’s own inbox) that always receive the «Llegó un paciente» email for every live form lead. Replaces the stored list; at most 10. */
|
|
235809
|
+
notification_emails?: string[];
|
|
234843
235810
|
};
|
|
234844
235811
|
};
|
|
234845
235812
|
};
|
|
@@ -234880,6 +235847,7 @@ interface paths {
|
|
|
234880
235847
|
form_name: string | null;
|
|
234881
235848
|
treatment_label: string;
|
|
234882
235849
|
}[];
|
|
235850
|
+
notification_emails: string[];
|
|
234883
235851
|
token_hint: string | null;
|
|
234884
235852
|
intake_path: string;
|
|
234885
235853
|
};
|
|
@@ -235017,6 +235985,7 @@ interface paths {
|
|
|
235017
235985
|
form_name: string | null;
|
|
235018
235986
|
treatment_label: string;
|
|
235019
235987
|
}[];
|
|
235988
|
+
notification_emails: string[];
|
|
235020
235989
|
token_hint: string | null;
|
|
235021
235990
|
intake_path: string;
|
|
235022
235991
|
};
|
|
@@ -282626,362 +283595,370 @@ interface components {
|
|
|
282626
283595
|
/** @description The weekly Finanzas digest template (resumen_finanzas_semanal_v1), wired on approval. */
|
|
282627
283596
|
digest_template_name?: string;
|
|
282628
283597
|
};
|
|
282629
|
-
|
|
282630
|
-
/** @description
|
|
282631
|
-
|
|
282632
|
-
};
|
|
282633
|
-
|
|
282634
|
-
|
|
282635
|
-
|
|
282636
|
-
|
|
282637
|
-
|
|
282638
|
-
|
|
282639
|
-
|
|
282640
|
-
|
|
282641
|
-
|
|
282642
|
-
|
|
282643
|
-
|
|
282644
|
-
|
|
282645
|
-
|
|
282646
|
-
|
|
282647
|
-
|
|
282648
|
-
|
|
282649
|
-
|
|
282650
|
-
|
|
282651
|
-
|
|
282652
|
-
|
|
282653
|
-
|
|
282654
|
-
|
|
282655
|
-
|
|
282656
|
-
|
|
282657
|
-
|
|
282658
|
-
|
|
282659
|
-
|
|
282660
|
-
|
|
282661
|
-
|
|
282662
|
-
|
|
282663
|
-
|
|
282664
|
-
|
|
282665
|
-
|
|
282666
|
-
|
|
282667
|
-
|
|
282668
|
-
|
|
282669
|
-
|
|
282670
|
-
|
|
282671
|
-
|
|
282672
|
-
|
|
282673
|
-
|
|
282674
|
-
|
|
282675
|
-
|
|
282676
|
-
|
|
282677
|
-
|
|
282678
|
-
|
|
282679
|
-
|
|
282680
|
-
|
|
282681
|
-
|
|
282682
|
-
|
|
282683
|
-
|
|
282684
|
-
|
|
282685
|
-
|
|
282686
|
-
|
|
282687
|
-
|
|
282688
|
-
|
|
282689
|
-
|
|
282690
|
-
|
|
282691
|
-
|
|
282692
|
-
|
|
282693
|
-
|
|
282694
|
-
|
|
282695
|
-
|
|
282696
|
-
|
|
282697
|
-
|
|
282698
|
-
|
|
282699
|
-
|
|
282700
|
-
|
|
282701
|
-
|
|
282702
|
-
|
|
282703
|
-
|
|
282704
|
-
|
|
282705
|
-
|
|
282706
|
-
|
|
282707
|
-
|
|
282708
|
-
|
|
282709
|
-
|
|
282710
|
-
|
|
282711
|
-
|
|
282712
|
-
|
|
282713
|
-
|
|
282714
|
-
|
|
282715
|
-
|
|
282716
|
-
|
|
282717
|
-
|
|
282718
|
-
|
|
282719
|
-
|
|
282720
|
-
|
|
282721
|
-
|
|
282722
|
-
|
|
282723
|
-
|
|
282724
|
-
|
|
282725
|
-
|
|
282726
|
-
|
|
282727
|
-
|
|
282728
|
-
|
|
282729
|
-
|
|
282730
|
-
|
|
282731
|
-
|
|
282732
|
-
|
|
282733
|
-
|
|
282734
|
-
|
|
282735
|
-
|
|
282736
|
-
|
|
282737
|
-
|
|
282738
|
-
|
|
282739
|
-
|
|
282740
|
-
|
|
282741
|
-
/** @description
|
|
282742
|
-
|
|
282743
|
-
/** @description
|
|
282744
|
-
|
|
282745
|
-
/** @
|
|
282746
|
-
|
|
282747
|
-
/** @description
|
|
282748
|
-
|
|
282749
|
-
/** @
|
|
282750
|
-
|
|
282751
|
-
/** @description
|
|
282752
|
-
|
|
282753
|
-
|
|
282754
|
-
|
|
282755
|
-
|
|
282756
|
-
|
|
282757
|
-
|
|
282758
|
-
|
|
282759
|
-
*
|
|
282760
|
-
|
|
282761
|
-
|
|
282762
|
-
|
|
282763
|
-
|
|
282764
|
-
|
|
282765
|
-
|
|
282766
|
-
|
|
282767
|
-
|
|
282768
|
-
|
|
282769
|
-
|
|
282770
|
-
|
|
282771
|
-
|
|
282772
|
-
|
|
282773
|
-
|
|
282774
|
-
|
|
282775
|
-
|
|
282776
|
-
|
|
282777
|
-
|
|
282778
|
-
|
|
282779
|
-
|
|
282780
|
-
|
|
282781
|
-
|
|
282782
|
-
|
|
282783
|
-
|
|
282784
|
-
/** @description
|
|
282785
|
-
|
|
282786
|
-
/** @description
|
|
282787
|
-
|
|
282788
|
-
/** @description
|
|
282789
|
-
|
|
282790
|
-
|
|
282791
|
-
|
|
282792
|
-
|
|
282793
|
-
|
|
282794
|
-
|
|
282795
|
-
|
|
282796
|
-
|
|
282797
|
-
|
|
282798
|
-
|
|
282799
|
-
|
|
282800
|
-
|
|
282801
|
-
|
|
282802
|
-
|
|
282803
|
-
|
|
282804
|
-
|
|
282805
|
-
|
|
282806
|
-
|
|
282807
|
-
|
|
282808
|
-
|
|
282809
|
-
|
|
282810
|
-
|
|
282811
|
-
|
|
282812
|
-
|
|
282813
|
-
* @
|
|
282814
|
-
|
|
282815
|
-
|
|
282816
|
-
|
|
282817
|
-
|
|
282818
|
-
* @
|
|
282819
|
-
|
|
282820
|
-
|
|
282821
|
-
|
|
282822
|
-
|
|
282823
|
-
|
|
282824
|
-
|
|
282825
|
-
|
|
282826
|
-
|
|
282827
|
-
|
|
282828
|
-
|
|
282829
|
-
|
|
282830
|
-
|
|
282831
|
-
|
|
282832
|
-
|
|
282833
|
-
|
|
282834
|
-
|
|
282835
|
-
/** @enum {string} */
|
|
282836
|
-
|
|
282837
|
-
|
|
282838
|
-
|
|
282839
|
-
|
|
282840
|
-
|
|
282841
|
-
|
|
282842
|
-
|
|
282843
|
-
|
|
282844
|
-
|
|
282845
|
-
|
|
282846
|
-
|
|
282847
|
-
/** @description
|
|
282848
|
-
|
|
282849
|
-
|
|
282850
|
-
|
|
282851
|
-
|
|
282852
|
-
|
|
282853
|
-
|
|
282854
|
-
|
|
282855
|
-
|
|
282856
|
-
|
|
282857
|
-
|
|
282858
|
-
|
|
282859
|
-
|
|
282860
|
-
|
|
282861
|
-
|
|
282862
|
-
|
|
282863
|
-
|
|
282864
|
-
|
|
282865
|
-
|
|
282866
|
-
|
|
282867
|
-
|
|
282868
|
-
|
|
282869
|
-
|
|
282870
|
-
|
|
282871
|
-
|
|
282872
|
-
|
|
282873
|
-
|
|
282874
|
-
|
|
282875
|
-
|
|
282876
|
-
|
|
282877
|
-
|
|
282878
|
-
|
|
282879
|
-
|
|
282880
|
-
|
|
282881
|
-
|
|
282882
|
-
|
|
282883
|
-
|
|
282884
|
-
|
|
282885
|
-
|
|
282886
|
-
|
|
282887
|
-
|
|
282888
|
-
|
|
282889
|
-
|
|
282890
|
-
|
|
282891
|
-
|
|
282892
|
-
|
|
282893
|
-
|
|
282894
|
-
|
|
282895
|
-
|
|
282896
|
-
|
|
282897
|
-
|
|
282898
|
-
|
|
282899
|
-
|
|
282900
|
-
|
|
282901
|
-
|
|
282902
|
-
/** @description
|
|
282903
|
-
|
|
282904
|
-
/** @description
|
|
282905
|
-
|
|
282906
|
-
/** @description
|
|
282907
|
-
|
|
282908
|
-
|
|
282909
|
-
|
|
282910
|
-
|
|
282911
|
-
|
|
282912
|
-
|
|
282913
|
-
|
|
282914
|
-
|
|
282915
|
-
|
|
282916
|
-
|
|
282917
|
-
|
|
282918
|
-
|
|
282919
|
-
* @
|
|
282920
|
-
|
|
282921
|
-
|
|
282922
|
-
|
|
282923
|
-
|
|
282924
|
-
* @
|
|
282925
|
-
|
|
282926
|
-
|
|
282927
|
-
|
|
282928
|
-
|
|
282929
|
-
|
|
282930
|
-
|
|
282931
|
-
|
|
282932
|
-
};
|
|
282933
|
-
|
|
282934
|
-
|
|
282935
|
-
|
|
282936
|
-
|
|
282937
|
-
|
|
282938
|
-
|
|
282939
|
-
|
|
282940
|
-
|
|
282941
|
-
|
|
282942
|
-
|
|
282943
|
-
|
|
282944
|
-
|
|
282945
|
-
|
|
282946
|
-
|
|
282947
|
-
|
|
282948
|
-
|
|
282949
|
-
|
|
282950
|
-
|
|
282951
|
-
|
|
282952
|
-
|
|
282953
|
-
|
|
282954
|
-
|
|
282955
|
-
|
|
282956
|
-
|
|
282957
|
-
|
|
282958
|
-
|
|
282959
|
-
|
|
282960
|
-
|
|
282961
|
-
|
|
282962
|
-
|
|
282963
|
-
|
|
282964
|
-
|
|
282965
|
-
|
|
282966
|
-
|
|
282967
|
-
|
|
282968
|
-
|
|
282969
|
-
|
|
282970
|
-
/** @description The visit
|
|
282971
|
-
|
|
282972
|
-
|
|
282973
|
-
|
|
283598
|
+
agency_staff?: {
|
|
283599
|
+
/** @description Members (user ids) who are agency staff: people of the agency or of Vitrina who run this workspace for the business. «Llegó un paciente» defaults off for them; the first-contact alarm goes to them only. */
|
|
283600
|
+
user_ids: string[];
|
|
283601
|
+
};
|
|
283602
|
+
stock_alert?: {
|
|
283603
|
+
/** @description Lead stages that trigger the «Stock faltante» check when a lead moves into them. Empty turns it off. */
|
|
283604
|
+
stage_ids: string[];
|
|
283605
|
+
};
|
|
283606
|
+
};
|
|
283607
|
+
/** @description Read-only: the template state of each staff WhatsApp rail. Ignored on write. */
|
|
283608
|
+
staff_rails?: {
|
|
283609
|
+
staff_whatsapp: {
|
|
283610
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
283611
|
+
armed: boolean;
|
|
283612
|
+
/**
|
|
283613
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
283614
|
+
* @enum {string}
|
|
283615
|
+
*/
|
|
283616
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283617
|
+
reason: string | null;
|
|
283618
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
283619
|
+
wired: boolean;
|
|
283620
|
+
templates: {
|
|
283621
|
+
key: string;
|
|
283622
|
+
name: string;
|
|
283623
|
+
language: string;
|
|
283624
|
+
/** @enum {string} */
|
|
283625
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283626
|
+
rejection_reason: string | null;
|
|
283627
|
+
}[];
|
|
283628
|
+
};
|
|
283629
|
+
unanswered_supervisor_whatsapp: {
|
|
283630
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
283631
|
+
armed: boolean;
|
|
283632
|
+
/**
|
|
283633
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
283634
|
+
* @enum {string}
|
|
283635
|
+
*/
|
|
283636
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283637
|
+
reason: string | null;
|
|
283638
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
283639
|
+
wired: boolean;
|
|
283640
|
+
templates: {
|
|
283641
|
+
key: string;
|
|
283642
|
+
name: string;
|
|
283643
|
+
language: string;
|
|
283644
|
+
/** @enum {string} */
|
|
283645
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283646
|
+
rejection_reason: string | null;
|
|
283647
|
+
}[];
|
|
283648
|
+
};
|
|
283649
|
+
booking_whatsapp: {
|
|
283650
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
283651
|
+
armed: boolean;
|
|
283652
|
+
/**
|
|
283653
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
283654
|
+
* @enum {string}
|
|
283655
|
+
*/
|
|
283656
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283657
|
+
reason: string | null;
|
|
283658
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
283659
|
+
wired: boolean;
|
|
283660
|
+
templates: {
|
|
283661
|
+
key: string;
|
|
283662
|
+
name: string;
|
|
283663
|
+
language: string;
|
|
283664
|
+
/** @enum {string} */
|
|
283665
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283666
|
+
rejection_reason: string | null;
|
|
283667
|
+
}[];
|
|
283668
|
+
};
|
|
283669
|
+
finanzas_whatsapp: {
|
|
283670
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
283671
|
+
armed: boolean;
|
|
283672
|
+
/**
|
|
283673
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
283674
|
+
* @enum {string}
|
|
283675
|
+
*/
|
|
283676
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283677
|
+
reason: string | null;
|
|
283678
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
283679
|
+
wired: boolean;
|
|
283680
|
+
templates: {
|
|
283681
|
+
key: string;
|
|
283682
|
+
name: string;
|
|
283683
|
+
language: string;
|
|
283684
|
+
/** @enum {string} */
|
|
283685
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283686
|
+
rejection_reason: string | null;
|
|
283687
|
+
}[];
|
|
283688
|
+
};
|
|
283689
|
+
reminder_whatsapp: {
|
|
283690
|
+
/** @description The rail is switched on (`enabled: true`). */
|
|
283691
|
+
armed: boolean;
|
|
283692
|
+
/**
|
|
283693
|
+
* @description Worst state across the rail templates (blocked, rejected, missing, pending, approved); `off` when not armed or nothing to provision; `no_number` when armed without a sending number.
|
|
283694
|
+
* @enum {string}
|
|
283695
|
+
*/
|
|
283696
|
+
template_state: "off" | "no_number" | "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283697
|
+
reason: string | null;
|
|
283698
|
+
/** @description The rail has its template name set (by an admin or on approval). */
|
|
283699
|
+
wired: boolean;
|
|
283700
|
+
templates: {
|
|
283701
|
+
key: string;
|
|
283702
|
+
name: string;
|
|
283703
|
+
language: string;
|
|
283704
|
+
/** @enum {string} */
|
|
283705
|
+
state: "missing" | "pending" | "approved" | "rejected" | "blocked";
|
|
283706
|
+
rejection_reason: string | null;
|
|
283707
|
+
}[];
|
|
283708
|
+
};
|
|
283709
|
+
};
|
|
283710
|
+
/** @description Workspace display name. */
|
|
283711
|
+
name?: string;
|
|
283712
|
+
/** @description IANA time zone, e.g. `America/Santiago`. */
|
|
283713
|
+
timezone?: string;
|
|
283714
|
+
/** @description Default language, e.g. `es`. */
|
|
283715
|
+
language?: string;
|
|
283716
|
+
/** @description ISO 4217 currency, e.g. `CLP`. */
|
|
283717
|
+
currency?: string;
|
|
283718
|
+
/** @enum {string} */
|
|
283719
|
+
date_format?: "latam" | "us" | "iso";
|
|
283720
|
+
/** @description The workspace's declared public website. */
|
|
283721
|
+
website?: string;
|
|
283722
|
+
/** @description Where the store's own product pages live, e.g. `https://macphones.cl/iphone/{slug}`. Placeholders (the product's fields): `{slug}` (title as a URL slug), `{sku}`, `{id}`, `{brand}`. The agent's stock search returns each product's page link when this is set; a product can override it with `attributes.public_url`. Send `null` or an empty string to clear. */
|
|
283723
|
+
product_url_template?: string | null;
|
|
283724
|
+
/** @description Vitrina Ads workspace choices; absent until first answered. */
|
|
283725
|
+
ads?: {
|
|
283726
|
+
/**
|
|
283727
|
+
* @description How the «Instalar el tag» step was answered: `site` (the tag goes on the workspace website) or `no_site` (no website; skipped on purpose). Absent/`null` = never answered.
|
|
283728
|
+
* @enum {string|null}
|
|
283729
|
+
*/
|
|
283730
|
+
tag_choice?: "site" | "no_site" | null;
|
|
283731
|
+
/**
|
|
283732
|
+
* Format: date-time
|
|
283733
|
+
* @description Server-stamped on every `tag_choice` write.
|
|
283734
|
+
*/
|
|
283735
|
+
tag_choice_at?: string | null;
|
|
283736
|
+
/** @description The monthly goal the Ads hero measures pace against. */
|
|
283737
|
+
goal?: {
|
|
283738
|
+
/**
|
|
283739
|
+
* @description `outcomes` = results from ads this month; `value` = attributed value (CLP); `roas` = return (×).
|
|
283740
|
+
* @enum {string}
|
|
283741
|
+
*/
|
|
283742
|
+
kind: "outcomes" | "value" | "roas";
|
|
283743
|
+
/** @description The month’s target. `roas` ≤ 100; `value` ≤ 10^10; `outcomes` ≤ 10^6. */
|
|
283744
|
+
target: number;
|
|
283745
|
+
/**
|
|
283746
|
+
* @description The only period: the calendar month.
|
|
283747
|
+
* @enum {string}
|
|
283748
|
+
*/
|
|
283749
|
+
period: "month";
|
|
283750
|
+
} | null;
|
|
283751
|
+
/** @description Which specialty each campaign / ad set / ad books (a name fragment → especialidad, professionals, entry-visit minutes and price). The agenda-capacity check behind «Pausar» / «Subir» reads it first; absent = the name match. */
|
|
283752
|
+
specialty_map?: {
|
|
283753
|
+
/** @description A fragment of the campaign, ad-set or ad name (accent- and case-insensitive). */
|
|
283754
|
+
match: string;
|
|
283755
|
+
/** @description The roster specialty it books (e.g. «TTM»). */
|
|
283756
|
+
especialidad?: string;
|
|
283757
|
+
/** @description The vendor professional ids (`clinic_professional.external_id`) it books with. */
|
|
283758
|
+
professional_ids?: string[];
|
|
283759
|
+
/** @description How long the entry visit (the evaluation) takes. */
|
|
283760
|
+
visit_minutes?: number;
|
|
283761
|
+
/** @description What the entry visit costs (CLP). */
|
|
283762
|
+
evaluation_price?: number;
|
|
283763
|
+
}[] | null;
|
|
283764
|
+
/**
|
|
283765
|
+
* Format: date-time
|
|
283766
|
+
* @description Server-stamped on every `goal` write.
|
|
283767
|
+
*/
|
|
283768
|
+
goal_at?: string | null;
|
|
283769
|
+
/** @description Who last wrote the goal: the member's user id, or the API key id. */
|
|
283770
|
+
goal_by?: string | null;
|
|
283771
|
+
/** @description `{ [action key]: until ISO }` — Ads actions hidden until that instant; expired entries are pruned on every write. */
|
|
283772
|
+
dismissed_actions?: {
|
|
283773
|
+
[key: string]: string;
|
|
283774
|
+
};
|
|
283775
|
+
};
|
|
283776
|
+
/** @description The stored tenant voice (brand name + tú/usted) customer-facing WhatsApp templates are written in; absent until set. */
|
|
283777
|
+
voice?: {
|
|
283778
|
+
/** @description Brand name templates say literally ("te escribimos de Automec"). Absent = the workspace name. */
|
|
283779
|
+
brand_name?: string;
|
|
283780
|
+
/**
|
|
283781
|
+
* @description How templates address people. Absent = `usted` for healthcare, `tu` otherwise.
|
|
283782
|
+
* @enum {string}
|
|
283783
|
+
*/
|
|
283784
|
+
register?: "tu" | "usted";
|
|
283785
|
+
/**
|
|
283786
|
+
* @description «Signos de apertura» in the AI's chat replies and follow-ups. `none` (default when absent): no opening «¿» «¡», the way people type in a Chilean chat; removed at send time from every AI message. `keep`: the agent writes them. An agent can override it (`behavior_policies.opening_marks`).
|
|
283787
|
+
* @enum {string}
|
|
283788
|
+
*/
|
|
283789
|
+
opening_marks?: "none" | "keep";
|
|
283790
|
+
/**
|
|
283791
|
+
* @description «Trato» of the AI agents: `tu`, `usted`, or `mirror` (tú until the customer uses usted). Absent: each agent's own instructions decide. Wins over the agent's instructions; an agent can override it (`behavior_policies.register`).
|
|
283792
|
+
* @enum {string}
|
|
283793
|
+
*/
|
|
283794
|
+
agent_register?: "tu" | "usted" | "mirror";
|
|
283795
|
+
};
|
|
283796
|
+
/** @description The AI agent's vocabulary: the workspace's banned terms; absent until set. */
|
|
283797
|
+
agent_language?: {
|
|
283798
|
+
/** @description Words the AI agent must never write to customers (case- and accent-insensitive, whole words), merged with the platform es-CL list. A reply that uses one is rewritten without it before it is sent. Up to 100 terms of 2 to 60 characters. */
|
|
283799
|
+
banned_terms?: string[];
|
|
283800
|
+
};
|
|
283801
|
+
/** @description Read-only: the voice templates are actually written in (stored value or default), with where each part came from. Ignored on write. */
|
|
283802
|
+
voice_resolved?: {
|
|
283803
|
+
brand_name: string;
|
|
283804
|
+
/** @enum {string} */
|
|
283805
|
+
register: "tu" | "usted";
|
|
283806
|
+
/** @enum {string} */
|
|
283807
|
+
brand_name_source: "stored" | "workspace_name";
|
|
283808
|
+
/** @enum {string} */
|
|
283809
|
+
register_source: "stored" | "vertical_default";
|
|
283810
|
+
};
|
|
283811
|
+
/**
|
|
283812
|
+
* @description Write-only secret: the Slack incoming-webhook URL is never returned. `••••` when one is configured; absent otherwise. Read `slack_webhook_configured` instead.
|
|
283813
|
+
* @enum {string}
|
|
283814
|
+
*/
|
|
283815
|
+
slack_webhook_url?: "••••";
|
|
283816
|
+
/** @description Whether a Slack incoming webhook is configured for workspace alerts. */
|
|
283817
|
+
slack_webhook_configured?: boolean;
|
|
283818
|
+
/** @description «Gestionar taller en Vitrina» (automotive). On: the workspace has the «Servicio de vehículos» workshop board next to Soporte. Never set → reads true exactly when that board already exists. Writing `true` creates the board (idempotent; refused with 400 outside the automotive vertical); `false` removes it only while no ticket was ever placed on it — a board in use is kept (see `workshop_board.in_use`). */
|
|
283819
|
+
manage_workshop?: boolean;
|
|
283820
|
+
/** @description Read-only: the workshop board `manage_workshop` governs. Ignored on write. */
|
|
283821
|
+
workshop_board?: {
|
|
283822
|
+
/**
|
|
283823
|
+
* Format: uuid
|
|
283824
|
+
* @description The «Servicio de vehículos» board; null when there is none.
|
|
283825
|
+
*/
|
|
283826
|
+
pipeline_id: string | null;
|
|
283827
|
+
/** @description A ticket was ever placed on the board; turning `manage_workshop` off keeps it. */
|
|
283828
|
+
in_use: boolean;
|
|
283829
|
+
};
|
|
283830
|
+
};
|
|
283831
|
+
TenantSettingsPublicWrite: {
|
|
283832
|
+
/** @description Trade-in buy table («parte de pago»), for a business that buys used devices: `price_table` rows `{model, top, used, min_battery_pct?, low_battery_factor?, direct_purchase?}` (`top` = max paid for a flawless unit, `used` = with normal wear, whole currency units; capacity does not change the value; `min_battery_pct` = a known battery under it is not bought; `low_battery_factor` (0–1) = a known battery under `perfect_battery_pct` caps the price at `used × low_battery_factor` instead of `used`; `direct_purchase: false` = the model is taken only as part of the payment for another item, never bought outright — absent = true), `not_bought` (models never bought), `floor_factor` (0–1, default 0.7: the low end for a unit with issues or unknown condition is `used × floor_factor`), `perfect_floor_factor` (0–1, default 0.85: the low end for a flawless unit is `used × perfect_floor_factor`, its high end is `top`), `rounding` (default 10000), `perfect_battery_pct` (default 90), `currency` (default CLP). On an ecommerce workspace its presence offers the agents the `estimate_trade_in` tool (a wide range of what the customer would still pay) and the `quote_buyback` tool (the most paid for one device sold outright, or the discount for a `direct_purchase: false` model); the business’s own site reads it at `GET /storefront/trade-in`. Replaced whole on write; `null` clears it. */
|
|
283833
|
+
trade_in?: {
|
|
283834
|
+
price_table: {
|
|
283835
|
+
model: string;
|
|
283836
|
+
top: number;
|
|
283837
|
+
used: number;
|
|
283838
|
+
min_battery_pct?: number;
|
|
283839
|
+
low_battery_factor?: number;
|
|
283840
|
+
direct_purchase?: boolean;
|
|
283841
|
+
}[];
|
|
283842
|
+
not_bought?: string[];
|
|
283843
|
+
floor_factor?: number;
|
|
283844
|
+
perfect_floor_factor?: number;
|
|
283845
|
+
rounding?: number;
|
|
283846
|
+
perfect_battery_pct?: number;
|
|
283847
|
+
currency?: string;
|
|
283848
|
+
} | null;
|
|
283849
|
+
/** @description Vitrina Ads workspace choices. `tag_choice`: how the «Instalar el tag» step was answered — `site` (the tag goes on the workspace's website, pasted or through Google Tag Manager) or `no_site` (no website; step skipped on purpose); `null` clears it. `goal`: the monthly goal the Ads hero measures pace against (`{kind, target, period:'month'}`; `null` clears it — `PUT /ads/goal` is the dedicated door). `dismissed_actions`: `{ [action id]: until ISO }` merged onto the stored map (`null` removes an id; expired entries are pruned). `specialty_map`: which specialty (and professionals, entry-visit length and price) each campaign / ad set / ad books — the agenda-capacity check behind «Pausar» / «Subir» reads it before the name match; replaces the stored list whole (`null` clears it). Merged into the stored `ads` object; the server stamps `tag_choice_at` / `goal_at` / `goal_by` on every write, and `GET /tenant/settings` returns them under `ads`. */
|
|
283850
|
+
ads?: {
|
|
283851
|
+
/** @enum {string|null} */
|
|
283852
|
+
tag_choice?: "site" | "no_site" | null;
|
|
283853
|
+
goal?: {
|
|
283854
|
+
/**
|
|
283855
|
+
* @description `outcomes` = results from ads this month; `value` = attributed value (CLP); `roas` = return (×).
|
|
283856
|
+
* @enum {string}
|
|
283857
|
+
*/
|
|
283858
|
+
kind: "outcomes" | "value" | "roas";
|
|
283859
|
+
/** @description The month’s target. `roas` ≤ 100; `value` ≤ 10^10; `outcomes` ≤ 10^6. */
|
|
283860
|
+
target: number;
|
|
283861
|
+
/**
|
|
283862
|
+
* @description The only period: the calendar month.
|
|
283863
|
+
* @enum {string}
|
|
283864
|
+
*/
|
|
283865
|
+
period: "month";
|
|
283866
|
+
} | null;
|
|
283867
|
+
dismissed_actions?: {
|
|
283868
|
+
[key: string]: string | null;
|
|
283869
|
+
};
|
|
283870
|
+
specialty_map?: {
|
|
283871
|
+
/** @description A fragment of the campaign, ad-set or ad name (accent- and case-insensitive). */
|
|
283872
|
+
match: string;
|
|
283873
|
+
/** @description The roster specialty it books (e.g. «TTM»). */
|
|
283874
|
+
especialidad?: string;
|
|
283875
|
+
/** @description The vendor professional ids (`clinic_professional.external_id`) it books with. */
|
|
283876
|
+
professional_ids?: string[];
|
|
283877
|
+
/** @description How long the entry visit (the evaluation) takes. */
|
|
283878
|
+
visit_minutes?: number;
|
|
283879
|
+
/** @description What the entry visit costs (CLP). */
|
|
283880
|
+
evaluation_price?: number;
|
|
283881
|
+
}[] | null;
|
|
283882
|
+
};
|
|
283883
|
+
voice?: {
|
|
283884
|
+
/** @description Brand name templates say literally ("te escribimos de Automec"). Absent = the workspace name. */
|
|
283885
|
+
brand_name?: string;
|
|
283886
|
+
/**
|
|
283887
|
+
* @description How templates address people. Absent = `usted` for healthcare, `tu` otherwise.
|
|
283888
|
+
* @enum {string}
|
|
283889
|
+
*/
|
|
283890
|
+
register?: "tu" | "usted";
|
|
283891
|
+
/**
|
|
283892
|
+
* @description «Signos de apertura» in the AI's chat replies and follow-ups. `none` (default when absent): no opening «¿» «¡», the way people type in a Chilean chat; removed at send time from every AI message. `keep`: the agent writes them. An agent can override it (`behavior_policies.opening_marks`).
|
|
283893
|
+
* @enum {string}
|
|
283894
|
+
*/
|
|
283895
|
+
opening_marks?: "none" | "keep";
|
|
283896
|
+
/**
|
|
283897
|
+
* @description «Trato» of the AI agents: `tu`, `usted`, or `mirror` (tú until the customer uses usted). Absent: each agent's own instructions decide. Wins over the agent's instructions; an agent can override it (`behavior_policies.register`).
|
|
283898
|
+
* @enum {string}
|
|
283899
|
+
*/
|
|
283900
|
+
agent_register?: "tu" | "usted" | "mirror";
|
|
283901
|
+
} | null;
|
|
283902
|
+
agent_language?: {
|
|
283903
|
+
/** @description Words the AI agent must never write to customers (case- and accent-insensitive, whole words), merged with the platform es-CL list. A reply that uses one is rewritten without it before it is sent. Up to 100 terms of 2 to 60 characters. */
|
|
283904
|
+
banned_terms?: string[];
|
|
283905
|
+
};
|
|
283906
|
+
notifications?: {
|
|
283907
|
+
staff_whatsapp?: {
|
|
283908
|
+
enabled?: boolean;
|
|
283909
|
+
/** Format: uuid */
|
|
283910
|
+
account_id?: string;
|
|
283911
|
+
template_name?: string;
|
|
283912
|
+
template_language?: string;
|
|
283913
|
+
};
|
|
283914
|
+
unanswered_supervisor_whatsapp?: {
|
|
283915
|
+
enabled?: boolean;
|
|
283916
|
+
/** Format: uuid */
|
|
283917
|
+
account_id?: string;
|
|
283918
|
+
template_name?: string;
|
|
283919
|
+
template_language?: string;
|
|
283920
|
+
user_ids?: string[];
|
|
283921
|
+
/** @description Minutes of open time a conversation waits on the team before the supervisors get the WhatsApp, once per episode. Unset = 60. */
|
|
283922
|
+
delay_minutes?: number;
|
|
283923
|
+
};
|
|
283924
|
+
/** @description Staff WhatsApp on every «sin respuesta» reminder, to the assignee (template aviso_sigue_esperando_v1). Opt-in: each send costs a WhatsApp conversation. */
|
|
283925
|
+
reminder_whatsapp?: {
|
|
283926
|
+
enabled?: boolean;
|
|
283927
|
+
/** Format: uuid */
|
|
283928
|
+
account_id?: string;
|
|
283929
|
+
template_name?: string;
|
|
283930
|
+
template_language?: string;
|
|
283931
|
+
};
|
|
283932
|
+
booking_whatsapp?: {
|
|
283933
|
+
enabled?: boolean;
|
|
283934
|
+
/** Format: uuid */
|
|
283935
|
+
account_id?: string;
|
|
283936
|
+
template_name?: string;
|
|
283937
|
+
template_language?: string;
|
|
283938
|
+
change_template_name?: string;
|
|
283939
|
+
/** @description The template for a visit booked on the website (aviso_visita_web_v1, no button), wired on approval. */
|
|
283940
|
+
web_template_name?: string;
|
|
283941
|
+
/** @description The day's visits template (aviso_visitas_del_dia_v1), wired on approval. */
|
|
283942
|
+
digest_template_name?: string;
|
|
283943
|
+
/** @description The visit-about-to-start template (aviso_visita_pronto_v1), wired on approval. */
|
|
283944
|
+
reminder_template_name?: string;
|
|
283945
|
+
};
|
|
283946
|
+
visit_watchers_whatsapp?: {
|
|
283947
|
+
user_ids: string[];
|
|
283948
|
+
};
|
|
283949
|
+
finanzas_whatsapp?: {
|
|
283950
|
+
enabled?: boolean;
|
|
283951
|
+
/** Format: uuid */
|
|
283952
|
+
account_id?: string;
|
|
283953
|
+
template_name?: string;
|
|
283954
|
+
template_language?: string;
|
|
283955
|
+
/** @description The weekly Finanzas digest template (resumen_finanzas_semanal_v1), wired on approval. */
|
|
283956
|
+
digest_template_name?: string;
|
|
283957
|
+
};
|
|
283958
|
+
agency_staff?: {
|
|
283959
|
+
/** @description Members (user ids) who are agency staff: people of the agency or of Vitrina who run this workspace for the business. «Llegó un paciente» defaults off for them; the first-contact alarm goes to them only. */
|
|
282974
283960
|
user_ids: string[];
|
|
282975
283961
|
};
|
|
282976
|
-
finanzas_whatsapp?: {
|
|
282977
|
-
enabled?: boolean;
|
|
282978
|
-
/** Format: uuid */
|
|
282979
|
-
account_id?: string;
|
|
282980
|
-
template_name?: string;
|
|
282981
|
-
template_language?: string;
|
|
282982
|
-
/** @description The weekly Finanzas digest template (resumen_finanzas_semanal_v1), wired on approval. */
|
|
282983
|
-
digest_template_name?: string;
|
|
282984
|
-
};
|
|
282985
283962
|
stock_alert?: {
|
|
282986
283963
|
/** @description Lead stages that trigger the «Stock faltante» check when a lead moves into them. Empty turns it off. */
|
|
282987
283964
|
stage_ids: string[];
|
|
@@ -283990,6 +284967,51 @@ interface components {
|
|
|
283990
284967
|
requested_price_clp: number;
|
|
283991
284968
|
proposed_terms: components["schemas"]["ProposedSaleNoteTerms"];
|
|
283992
284969
|
};
|
|
284970
|
+
SaleNoteTransferTax: {
|
|
284971
|
+
/** Format: uuid */
|
|
284972
|
+
line_id: string;
|
|
284973
|
+
charge_clp: number;
|
|
284974
|
+
/** @enum {string} */
|
|
284975
|
+
source: "calculated" | "typed";
|
|
284976
|
+
at_current_price_clp: number | null;
|
|
284977
|
+
gaps: {
|
|
284978
|
+
input: string;
|
|
284979
|
+
detail: string;
|
|
284980
|
+
}[];
|
|
284981
|
+
recalculation_offered: boolean;
|
|
284982
|
+
};
|
|
284983
|
+
SettlementDifference: {
|
|
284984
|
+
/** Format: uuid */
|
|
284985
|
+
liquidacion_id: string;
|
|
284986
|
+
/** Format: uuid */
|
|
284987
|
+
consignment_contract_id: string;
|
|
284988
|
+
/** Format: uuid */
|
|
284989
|
+
sale_note_id: string;
|
|
284990
|
+
liquidacion_paid_at: string;
|
|
284991
|
+
paid_with_price_clp: number;
|
|
284992
|
+
current_price_clp: number;
|
|
284993
|
+
paid_to_owner_clp: number;
|
|
284994
|
+
comision_at_current_price_clp: number | null;
|
|
284995
|
+
due_to_owner_clp: number;
|
|
284996
|
+
adjusted_clp: number;
|
|
284997
|
+
difference_clp: number;
|
|
284998
|
+
/** @enum {string} */
|
|
284999
|
+
status: "dealer_owes_owner" | "owner_owes_dealer" | "settled";
|
|
285000
|
+
adjustments: {
|
|
285001
|
+
/** Format: uuid */
|
|
285002
|
+
id: string;
|
|
285003
|
+
/** @enum {string} */
|
|
285004
|
+
direction: "pago_complementario" | "reintegro";
|
|
285005
|
+
amount_clp: number;
|
|
285006
|
+
paid_at: string;
|
|
285007
|
+
/** @enum {string|null} */
|
|
285008
|
+
payout_method: "transferencia" | "vale_vista" | "cheque" | "efectivo" | null;
|
|
285009
|
+
note: string | null;
|
|
285010
|
+
/** Format: uuid */
|
|
285011
|
+
recorded_by: string | null;
|
|
285012
|
+
created_at: string;
|
|
285013
|
+
}[];
|
|
285014
|
+
};
|
|
283993
285015
|
SaleNoteRead: {
|
|
283994
285016
|
/** Format: uuid */
|
|
283995
285017
|
id: string;
|
|
@@ -284006,6 +285028,8 @@ interface components {
|
|
|
284006
285028
|
history: components["schemas"]["SaleNoteHistoryEntry"][];
|
|
284007
285029
|
compraventa_outdated: boolean;
|
|
284008
285030
|
pending_price_change: components["schemas"]["SaleNotePendingPriceChange"] | null;
|
|
285031
|
+
transfer_tax: components["schemas"]["SaleNoteTransferTax"] | null;
|
|
285032
|
+
settlement_difference: components["schemas"]["SettlementDifference"] | null;
|
|
284009
285033
|
} & {
|
|
284010
285034
|
[key: string]: unknown;
|
|
284011
285035
|
};
|
|
@@ -284022,6 +285046,38 @@ interface components {
|
|
|
284022
285046
|
} & {
|
|
284023
285047
|
[key: string]: unknown;
|
|
284024
285048
|
});
|
|
285049
|
+
SaleNotePaymentRemoval: {
|
|
285050
|
+
/** Format: uuid */
|
|
285051
|
+
payment_id: string;
|
|
285052
|
+
/** @enum {string} */
|
|
285053
|
+
effect: "reversed" | "released";
|
|
285054
|
+
amount_clp: number;
|
|
285055
|
+
on_note_clp: number;
|
|
285056
|
+
reason: string;
|
|
285057
|
+
reservation_deposit: {
|
|
285058
|
+
/** Format: uuid */
|
|
285059
|
+
reservation_id: string;
|
|
285060
|
+
reservation_folio: string | null;
|
|
285061
|
+
/** @enum {string} */
|
|
285062
|
+
effect: "no_longer_counted" | "still_counted";
|
|
285063
|
+
} | null;
|
|
285064
|
+
/** Format: uuid */
|
|
285065
|
+
change_id: string | null;
|
|
285066
|
+
};
|
|
285067
|
+
SaleNotePaymentRemoved: components["schemas"]["SaleNoteRead"] & ({
|
|
285068
|
+
payment_removal: components["schemas"]["SaleNotePaymentRemoval"];
|
|
285069
|
+
} & {
|
|
285070
|
+
[key: string]: unknown;
|
|
285071
|
+
});
|
|
285072
|
+
RemoveSaleNotePaymentBody: {
|
|
285073
|
+
reason: string;
|
|
285074
|
+
};
|
|
285075
|
+
ChangeSaleNoteAddOnBody: {
|
|
285076
|
+
description?: string;
|
|
285077
|
+
charge_clp?: number;
|
|
285078
|
+
/** @enum {string} */
|
|
285079
|
+
tax_treatment?: "afecto" | "exento" | "no_gravado" | "pass_through";
|
|
285080
|
+
};
|
|
284025
285081
|
ReservationConverted: {
|
|
284026
285082
|
reservation: {
|
|
284027
285083
|
/** Format: uuid */
|