@vitrina/api 13.5.0 → 13.6.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 +1207 -84
- package/dist/index.d.ts +1207 -84
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -7451,7 +7451,7 @@ interface paths {
|
|
|
7451
7451
|
};
|
|
7452
7452
|
/**
|
|
7453
7453
|
* Get the funnel report
|
|
7454
|
-
* @description The board's Pasos del embudo (ADR 0132) with the number of leads that reached each one in the period, the conversion from the step before, the split by stage inside each step, and Perdido apart. Counts only: this is the door the aggregates-only Consultor seat reads, next to `boards` lists the sales boards that can be read (id + name) so a board picker needs no other scope; `pipeline_id` selects one. `leads:read`. WHAT A COUNT MEANS. The cohort is the leads of the board CREATED in the period (`from` to `to`, both days inclusive, in the workspace clock). A lead counts in a step when it has ever stood on a stage of that step OR OF A LATER ONE — from its stage history, or from its current stage when it has none — so a lead that skipped a step still counts for the steps before it, and every cohort lead counts in the first step. The cohort is fixed by the creation date but how far it got is read as of now: a lead created in the period and sold next month counts in the last step the next time you look. `current` is where the cohort stands today. `lost` is the cohort leads standing on a lost stage today, split by the step they were lost from; `step_key: null` is history that cannot say (never guessed into a step). `sum(steps[].current) + lost.total + unplaced = cohort`.
|
|
7454
|
+
* @description The board's Pasos del embudo (ADR 0132) with the number of leads that reached each one in the period, the conversion from the step before, the split by stage inside each step, and Perdido apart. Counts only: this is the door the aggregates-only Consultor seat reads, next to `boards` lists the sales boards that can be read (id + name) so a board picker needs no other scope; `pipeline_id` selects one. The last step (Venta) carries `money`: what its people paid since their lead was created (`null` = more than 2 000 people, or unknown). `leads:read`. WHAT A COUNT MEANS. The cohort is the leads of the board CREATED in the period (`from` to `to`, both days inclusive, in the workspace clock). A lead counts in a step when it has ever stood on a stage of that step OR OF A LATER ONE — from its stage history, or from its current stage when it has none — so a lead that skipped a step still counts for the steps before it, and every cohort lead counts in the first step. The cohort is fixed by the creation date but how far it got is read as of now: a lead created in the period and sold next month counts in the last step the next time you look. `current` is where the cohort stands today. `lost` is the cohort leads standing on a lost stage today, split by the step they were lost from; `step_key: null` is history that cannot say (never guessed into a step). `sum(steps[].current) + lost.total + unplaced = cohort`.
|
|
7455
7455
|
*/
|
|
7456
7456
|
get: {
|
|
7457
7457
|
parameters: {
|
|
@@ -7517,7 +7517,8 @@ interface paths {
|
|
|
7517
7517
|
* "current": 14,
|
|
7518
7518
|
* "conversion_from_previous": 0.4,
|
|
7519
7519
|
* "conversion_from_start": 0.4,
|
|
7520
|
-
* "stages": []
|
|
7520
|
+
* "stages": [],
|
|
7521
|
+
* "money": 3450000
|
|
7521
7522
|
* }
|
|
7522
7523
|
* ],
|
|
7523
7524
|
* "lost": {
|
|
@@ -7813,7 +7814,7 @@ interface paths {
|
|
|
7813
7814
|
};
|
|
7814
7815
|
/**
|
|
7815
7816
|
* List the people behind a funnel count
|
|
7816
|
-
* @description The leads behind one number of `GET /funnel-report`, read through the same cohort and the same rules, so the list always has as many rows as the count says (`total`). `measure=reached&step=` is a step headline; `measure=current` is who stands there today; `measure=lost` is Perdido (narrow with `step`, or `lost_from_unknown=true`); `measure=unplaced` is the leads on a stage that belongs to no step. Add `stage_id` for one stage of a step. Newest activity first. Needs `leads:read`; the contact name
|
|
7817
|
+
* @description The leads behind one number of `GET /funnel-report`, read through the same cohort and the same rules, so the list always has as many rows as the count says (`total`). `measure=reached&step=` is a step headline; `measure=current` is who stands there today; `measure=lost` is Perdido (narrow with `step`, or `lost_from_unknown=true`); `measure=unplaced` is the leads on a stage that belongs to no step. Add `stage_id` for one stage of a step. Newest activity first. Needs `leads:read`; the contact name and phone ride only with `contacts:read`. D60: each person also carries `score` and `score_reason` («qué pasó»), `lost_reason` («motivo»), the next cita (else the last, `cita_at`/`cita_status`), `paid` (CLP the clinic recorded since the lead was created) and, for a clinic, `origin` (Meta naming the ad, Orgánico, Sin dato). WHAT A COUNT MEANS. The cohort is the leads of the board CREATED in the period (`from` to `to`, both days inclusive, in the workspace clock). A lead counts in a step when it has ever stood on a stage of that step OR OF A LATER ONE — from its stage history, or from its current stage when it has none — so a lead that skipped a step still counts for the steps before it, and every cohort lead counts in the first step. The cohort is fixed by the creation date but how far it got is read as of now: a lead created in the period and sold next month counts in the last step the next time you look. `current` is where the cohort stands today. `lost` is the cohort leads standing on a lost stage today, split by the step they were lost from; `step_key: null` is history that cannot say (never guessed into a step). `sum(steps[].current) + lost.total + unplaced = cohort`.
|
|
7817
7818
|
*/
|
|
7818
7819
|
get: {
|
|
7819
7820
|
parameters: {
|
|
@@ -7878,7 +7879,24 @@ interface paths {
|
|
|
7878
7879
|
* "last_activity_at": "2026-10-08T09:30:00.000Z",
|
|
7879
7880
|
* "last_move_at": "2026-09-20T16:00:00.000Z",
|
|
7880
7881
|
* "last_move_stage_name": "Evaluación agendada",
|
|
7881
|
-
* "reached_step_key": "scheduled"
|
|
7882
|
+
* "reached_step_key": "scheduled",
|
|
7883
|
+
* "phone": "+56 9 1234 5678",
|
|
7884
|
+
* "score": 72,
|
|
7885
|
+
* "score_reason": "Pidió hora para evaluación de implante; preguntó por cuotas.",
|
|
7886
|
+
* "lost_reason": null,
|
|
7887
|
+
* "cita_at": "2026-10-14T13:00:00.000Z",
|
|
7888
|
+
* "cita_status": "confirmed",
|
|
7889
|
+
* "paid": 45000,
|
|
7890
|
+
* "origin": {
|
|
7891
|
+
* "kind": "meta",
|
|
7892
|
+
* "label": "Meta · Implantes 2",
|
|
7893
|
+
* "ad_id": "120210000000000101",
|
|
7894
|
+
* "ad_name": "Implantes 2",
|
|
7895
|
+
* "ad_set_name": "INTERESES",
|
|
7896
|
+
* "campaign_name": "IMPLANTES",
|
|
7897
|
+
* "first_touch_at": "2026-09-12T14:01:00.000Z",
|
|
7898
|
+
* "via": "first_message"
|
|
7899
|
+
* }
|
|
7882
7900
|
* }
|
|
7883
7901
|
* ]
|
|
7884
7902
|
* }
|
|
@@ -12690,7 +12708,7 @@ interface paths {
|
|
|
12690
12708
|
"application/json": {
|
|
12691
12709
|
/** Format: uri */
|
|
12692
12710
|
url?: string;
|
|
12693
|
-
events?: ("*" | "ai_agent.publish" | "ai_agent_graph.publish" | "agent_scenario_run.completed" | "agent_scenario_suite.completed" | "conversation.created" | "conversation.assigned" | "conversation.resolved" | "message.received" | "message.sent" | "ticket.opened" | "ticket.reopened" | "ticket.resolved" | "ticket.closed" | "sla.breached" | "kb.source.create" | "kb.source.embed" | "kb.source.update" | "kb.source.delete" | "kb_file.uploaded" | "kb_file.deleted" | "skill.created" | "skill.updated" | "skill.deleted" | "custom_tool.created" | "custom_tool.updated" | "custom_tool.deleted" | "macro.applied" | "cost.budget_alert" | "runtime.budget_exceeded" | "lead.created" | "lead.stage_changed" | "lead.pipeline_changed" | "lead.assigned" | "lead.won" | "lead.lost" | "lead.unqualified" | "stock.synced" | "stock.source_retired" | "vehicle.published" | "vehicle.unpublished" | "vehicle.publish_failed" | "vehicle.created" | "vehicle.attachment.created" | "mercadolibre.order" | "mercadolibre.vis_lead" | "chileautos.lead" | "yapo.lead" | "website.lead" | "demo_lead.created" | "demo_lead.pending_scheduling" | "demo_lead.routed" | "demo_booking.booked" | "demo_booking.rescheduled" | "demo_booking.cancelled" | "consignment.candidate.created" | "quote.issued" | "quote.voided" | "quote.extended" | "quote.archived" | "reservation.created" | "reservation.voided" | "reservation.abono_disposed" | "reservation.converted" | "sale_note.issued" | "sale_note.approved" | "sale_note.voided" | "purchase_note.issued" | "purchase_note.corrected" | "purchase_note.voided" | "payment.recorded" | "consignment.created" | "consignment.returned" | "consignment.sold" | "credit_application.recorded" | "credit_application.submitted" | "credit_application.decided" | "credit_application.withdrawn" | "price_approval.requested" | "price_approval.decided" | "contact.created" | "contact.updated" | "contact.merged" | "appointment.booked" | "appointment.rescheduled" | "appointment.cancelled" | "appointment.completed" | "appointment.no_show" | "appointment.reminded" | "appointment.imported" | "campaign.sent" | "campaign.paused" | "sending_domain.verified" | "coach.proposals_ready" | "coach.finding_ready" | "voice.autonomous_call" | "safety_hold.placed" | "safety_hold.ack_overdue" | "safety_hold.first_response_overdue" | "team.created" | "team.updated" | "team.deleted" | "custom_role.created" | "custom_role.updated" | "custom_role.deleted" | "macro.created" | "macro.updated" | "macro.deleted" | "assignment_rule.created" | "assignment_rule.updated" | "assignment_rule.deleted" | "sla_policy.created" | "sla_policy.updated" | "sla_policy.deleted" | "automation_trigger.created" | "automation_trigger.updated" | "automation_trigger.deleted" | "sending_domain.created" | "sending_domain.deleted" | "whatsapp_template.created" | "whatsapp_template.status_changed" | "whatsapp_template.deleted" | "whatsapp_flow.created" | "whatsapp_flow.published" | "whatsapp_flow.deprecated" | "whatsapp_flow.deleted" | "whatsapp_flow.completed" | "channel.connected" | "channel.updated" | "channel.disconnected" | "membership.created" | "membership.updated" | "membership.removed" | "clinic_professional.created" | "clinic_professional.updated" | "clinic_professional.deleted" | "clinic_service.created" | "clinic_service.updated" | "clinic_service.deleted" | "clinic_price_list.updated" | "clinic_pack_purchase.created" | "clinic_pack_purchase.session_consumed" | "clinic_pack_purchase.cancelled" | "clinic_budget.created" | "clinic_budget.sent" | "clinic_budget.accepted" | "clinic_budget.rejected" | "clinic_budget.voided" | "clinic_budget.mirror_changed" | "clinic_cash_session.opened" | "clinic_cash_session.closed" | "clinic_patient.created" | "clinic_patient.updated" | "clinic_patient.deleted" | "clinic_patient.merged" | "clinic_encounter.opened" | "clinic_encounter.closed" | "clinic_note.signed" | "clinic_note.amended" | "clinic_consent.signed" | "clinic_consent.revoked" | "clinic_document.uploaded" | "clinic_document.deleted" | "clinic_privacy_request.completed")[];
|
|
12711
|
+
events?: ("*" | "ai_agent.publish" | "ai_agent_graph.publish" | "agent_scenario_run.completed" | "agent_scenario_suite.completed" | "conversation.created" | "conversation.assigned" | "conversation.resolved" | "message.received" | "message.sent" | "ticket.opened" | "ticket.reopened" | "ticket.resolved" | "ticket.closed" | "sla.breached" | "kb.source.create" | "kb.source.embed" | "kb.source.update" | "kb.source.delete" | "kb_file.uploaded" | "kb_file.deleted" | "skill.created" | "skill.updated" | "skill.deleted" | "custom_tool.created" | "custom_tool.updated" | "custom_tool.deleted" | "macro.applied" | "cost.budget_alert" | "runtime.budget_exceeded" | "lead.created" | "lead.stage_changed" | "lead.pipeline_changed" | "lead.assigned" | "lead.won" | "lead.lost" | "lead.unqualified" | "stock.synced" | "stock.source_retired" | "vehicle.published" | "vehicle.unpublished" | "vehicle.publish_failed" | "vehicle.created" | "vehicle.attachment.created" | "mercadolibre.order" | "mercadolibre.vis_lead" | "chileautos.lead" | "yapo.lead" | "website.lead" | "demo_lead.created" | "demo_lead.pending_scheduling" | "demo_lead.routed" | "demo_booking.booked" | "demo_booking.rescheduled" | "demo_booking.cancelled" | "demo_booking.held" | "demo_booking.no_show" | "consignment.candidate.created" | "quote.issued" | "quote.voided" | "quote.extended" | "quote.archived" | "reservation.created" | "reservation.voided" | "reservation.abono_disposed" | "reservation.converted" | "sale_note.issued" | "sale_note.approved" | "sale_note.voided" | "purchase_note.issued" | "purchase_note.corrected" | "purchase_note.voided" | "payment.recorded" | "consignment.created" | "consignment.returned" | "consignment.sold" | "credit_application.recorded" | "credit_application.submitted" | "credit_application.decided" | "credit_application.withdrawn" | "price_approval.requested" | "price_approval.decided" | "contact.created" | "contact.updated" | "contact.merged" | "appointment.booked" | "appointment.rescheduled" | "appointment.cancelled" | "appointment.completed" | "appointment.no_show" | "appointment.reminded" | "appointment.imported" | "campaign.sent" | "campaign.paused" | "sending_domain.verified" | "coach.proposals_ready" | "coach.finding_ready" | "voice.autonomous_call" | "safety_hold.placed" | "safety_hold.ack_overdue" | "safety_hold.first_response_overdue" | "team.created" | "team.updated" | "team.deleted" | "custom_role.created" | "custom_role.updated" | "custom_role.deleted" | "macro.created" | "macro.updated" | "macro.deleted" | "assignment_rule.created" | "assignment_rule.updated" | "assignment_rule.deleted" | "sla_policy.created" | "sla_policy.updated" | "sla_policy.deleted" | "automation_trigger.created" | "automation_trigger.updated" | "automation_trigger.deleted" | "sending_domain.created" | "sending_domain.deleted" | "whatsapp_template.created" | "whatsapp_template.status_changed" | "whatsapp_template.deleted" | "whatsapp_flow.created" | "whatsapp_flow.published" | "whatsapp_flow.deprecated" | "whatsapp_flow.deleted" | "whatsapp_flow.completed" | "channel.connected" | "channel.updated" | "channel.disconnected" | "membership.created" | "membership.updated" | "membership.removed" | "clinic_professional.created" | "clinic_professional.updated" | "clinic_professional.deleted" | "clinic_service.created" | "clinic_service.updated" | "clinic_service.deleted" | "clinic_price_list.updated" | "clinic_pack_purchase.created" | "clinic_pack_purchase.session_consumed" | "clinic_pack_purchase.cancelled" | "clinic_budget.created" | "clinic_budget.sent" | "clinic_budget.accepted" | "clinic_budget.rejected" | "clinic_budget.voided" | "clinic_budget.mirror_changed" | "clinic_cash_session.opened" | "clinic_cash_session.closed" | "clinic_patient.created" | "clinic_patient.updated" | "clinic_patient.deleted" | "clinic_patient.merged" | "clinic_encounter.opened" | "clinic_encounter.closed" | "clinic_note.signed" | "clinic_note.amended" | "clinic_consent.signed" | "clinic_consent.revoked" | "clinic_document.uploaded" | "clinic_document.deleted" | "clinic_privacy_request.completed")[];
|
|
12694
12712
|
enabled?: boolean;
|
|
12695
12713
|
description?: string | null;
|
|
12696
12714
|
/** @description «Incluir datos del recurso». `false` (the default) = every delivery is the notice: resource, changes, author, time and `url`, with `data_omitted: "not_requested"`. `true` = each delivery also carries `data` when, at dispatch time, this subscription's OWNER — whoever created it or last changed its url, events or this flag — holds the resource read scope (`read_scope` in the catalogue) and sees every record; otherwise `data_omitted` says why. An event about a dato sensible is always the notice. */
|
|
@@ -82577,53 +82595,910 @@ interface paths {
|
|
|
82577
82595
|
};
|
|
82578
82596
|
trace?: never;
|
|
82579
82597
|
};
|
|
82580
|
-
"/appointments/{id}/cancel": {
|
|
82598
|
+
"/appointments/{id}/cancel": {
|
|
82599
|
+
parameters: {
|
|
82600
|
+
query?: never;
|
|
82601
|
+
header?: never;
|
|
82602
|
+
path?: never;
|
|
82603
|
+
cookie?: never;
|
|
82604
|
+
};
|
|
82605
|
+
get?: never;
|
|
82606
|
+
put?: never;
|
|
82607
|
+
/**
|
|
82608
|
+
* Cancel an appointment
|
|
82609
|
+
* @description Sets `cancelled`, drops the pending reminder, removes the mirrored calendar event, fires `appointment.cancelled` and frees the slot for the follow-up trigger. Idempotent — cancelling an already-cancelled appointment answers 200 with the row and does none of it again.
|
|
82610
|
+
*
|
|
82611
|
+
* **Two scopes: `appointments:delete` AND `messages:send`.** The first is the split that lets a workspace grant "may book and reschedule" without granting "may un-book" (`appointments:write` reaches neither). The second is because a MESSAGE LEAVES VITRINA here, which is what every sending operation costs (ADR 0106 §3.2) — a credential that may cancel but holds no authority to write to anybody gets a 403.
|
|
82612
|
+
*
|
|
82613
|
+
* **It messages the customer.** The workspace is the one calling this off, so the cancellation notice goes out on the appointment’s originating conversation, in the workspace language and timezone. That send is best-effort and stamped for idempotency — it never fails the call and never goes out twice — and it is skipped entirely when the appointment has no conversation behind it. It is a transactional confirmation Vitrina composes about a booking the person made, not a send this caller authors, so it does not go through the política de envíos verdicts: a Bloqueo there would leave somebody turning up to a cancelled appointment.
|
|
82614
|
+
*
|
|
82615
|
+
* **`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.
|
|
82616
|
+
*
|
|
82617
|
+
* 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.
|
|
82618
|
+
*/
|
|
82619
|
+
post: {
|
|
82620
|
+
parameters: {
|
|
82621
|
+
query?: never;
|
|
82622
|
+
header?: {
|
|
82623
|
+
/** @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. */
|
|
82624
|
+
"Idempotency-Key"?: string;
|
|
82625
|
+
};
|
|
82626
|
+
path: {
|
|
82627
|
+
id: string;
|
|
82628
|
+
};
|
|
82629
|
+
cookie?: never;
|
|
82630
|
+
};
|
|
82631
|
+
requestBody?: {
|
|
82632
|
+
content: {
|
|
82633
|
+
/**
|
|
82634
|
+
* @example {
|
|
82635
|
+
* "reason": "Reprogramamos por disponibilidad del equipo."
|
|
82636
|
+
* }
|
|
82637
|
+
*/
|
|
82638
|
+
"application/json": {
|
|
82639
|
+
reason?: string;
|
|
82640
|
+
};
|
|
82641
|
+
};
|
|
82642
|
+
};
|
|
82643
|
+
responses: {
|
|
82644
|
+
/** @description The cancelled appointment */
|
|
82645
|
+
200: {
|
|
82646
|
+
headers: {
|
|
82647
|
+
[name: string]: unknown;
|
|
82648
|
+
};
|
|
82649
|
+
content: {
|
|
82650
|
+
/**
|
|
82651
|
+
* @example {
|
|
82652
|
+
* "data": {
|
|
82653
|
+
* "id": "dddddddd-0000-4000-8000-000000000001",
|
|
82654
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
82655
|
+
* "lead_id": null,
|
|
82656
|
+
* "contact_id": "22222222-0000-4000-8000-000000000001",
|
|
82657
|
+
* "conversation_id": null,
|
|
82658
|
+
* "vehicle_id": null,
|
|
82659
|
+
* "appointment_type_id": "eeee0000-0000-4000-8000-000000000001",
|
|
82660
|
+
* "owner_user_id": "11111111-0000-4000-8000-000000000001",
|
|
82661
|
+
* "location_id": "b1b1b1b1-0000-4000-8000-000000000001",
|
|
82662
|
+
* "professional_id": null,
|
|
82663
|
+
* "resource_id": null,
|
|
82664
|
+
* "kind": "external",
|
|
82665
|
+
* "source": "human",
|
|
82666
|
+
* "engine": "native",
|
|
82667
|
+
* "external_id": null,
|
|
82668
|
+
* "status": "cancelled",
|
|
82669
|
+
* "status_epoch": 2,
|
|
82670
|
+
* "clinic_status_id": null,
|
|
82671
|
+
* "arrival_state": "scheduled",
|
|
82672
|
+
* "arrived_at": null,
|
|
82673
|
+
* "in_room_at": null,
|
|
82674
|
+
* "done_at": null,
|
|
82675
|
+
* "series_id": null,
|
|
82676
|
+
* "series_index": null,
|
|
82677
|
+
* "booking_landing_id": null,
|
|
82678
|
+
* "attribution": null,
|
|
82679
|
+
* "starts_at": "2026-10-01T14:00:00.000Z",
|
|
82680
|
+
* "ends_at": "2026-10-01T14:45:00.000Z",
|
|
82681
|
+
* "hold_expires_at": null,
|
|
82682
|
+
* "google_event_id": null,
|
|
82683
|
+
* "google_ical_uid": null,
|
|
82684
|
+
* "google_updated_at": null,
|
|
82685
|
+
* "google_etag": null,
|
|
82686
|
+
* "reminder_at": "2026-10-01T12:00:00.000Z",
|
|
82687
|
+
* "reminder_sent_at": null,
|
|
82688
|
+
* "reminder_job_id": "appt-reminder-dddddddd-0000-4000-8000-000000000001",
|
|
82689
|
+
* "customer_name": "Camila R.",
|
|
82690
|
+
* "notes": "Primera visita.",
|
|
82691
|
+
* "metadata": {},
|
|
82692
|
+
* "display_seq": 3,
|
|
82693
|
+
* "display_id": "A-3",
|
|
82694
|
+
* "created_at": "2026-09-22T12:50:37.046Z",
|
|
82695
|
+
* "updated_at": "2026-09-22T12:50:37.080Z"
|
|
82696
|
+
* }
|
|
82697
|
+
* }
|
|
82698
|
+
*/
|
|
82699
|
+
"application/json": {
|
|
82700
|
+
data?: unknown;
|
|
82701
|
+
meta?: {
|
|
82702
|
+
[key: string]: unknown;
|
|
82703
|
+
};
|
|
82704
|
+
};
|
|
82705
|
+
};
|
|
82706
|
+
};
|
|
82707
|
+
/** @description Validation error */
|
|
82708
|
+
400: {
|
|
82709
|
+
headers: {
|
|
82710
|
+
[name: string]: unknown;
|
|
82711
|
+
};
|
|
82712
|
+
content: {
|
|
82713
|
+
"application/json": components["schemas"]["Error"];
|
|
82714
|
+
};
|
|
82715
|
+
};
|
|
82716
|
+
/** @description Unauthorized */
|
|
82717
|
+
401: {
|
|
82718
|
+
headers: {
|
|
82719
|
+
[name: string]: unknown;
|
|
82720
|
+
};
|
|
82721
|
+
content: {
|
|
82722
|
+
"application/json": components["schemas"]["Error"];
|
|
82723
|
+
};
|
|
82724
|
+
};
|
|
82725
|
+
/** @description Forbidden */
|
|
82726
|
+
403: {
|
|
82727
|
+
headers: {
|
|
82728
|
+
[name: string]: unknown;
|
|
82729
|
+
};
|
|
82730
|
+
content: {
|
|
82731
|
+
"application/json": components["schemas"]["Error"];
|
|
82732
|
+
};
|
|
82733
|
+
};
|
|
82734
|
+
/** @description Not found */
|
|
82735
|
+
404: {
|
|
82736
|
+
headers: {
|
|
82737
|
+
[name: string]: unknown;
|
|
82738
|
+
};
|
|
82739
|
+
content: {
|
|
82740
|
+
"application/json": components["schemas"]["Error"];
|
|
82741
|
+
};
|
|
82742
|
+
};
|
|
82743
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
82744
|
+
409: {
|
|
82745
|
+
headers: {
|
|
82746
|
+
[name: string]: unknown;
|
|
82747
|
+
};
|
|
82748
|
+
content: {
|
|
82749
|
+
"application/json": components["schemas"]["Error"];
|
|
82750
|
+
};
|
|
82751
|
+
};
|
|
82752
|
+
/** @description Rate limited */
|
|
82753
|
+
429: {
|
|
82754
|
+
headers: {
|
|
82755
|
+
[name: string]: unknown;
|
|
82756
|
+
};
|
|
82757
|
+
content: {
|
|
82758
|
+
"application/json": components["schemas"]["Error"];
|
|
82759
|
+
};
|
|
82760
|
+
};
|
|
82761
|
+
};
|
|
82762
|
+
};
|
|
82763
|
+
delete?: never;
|
|
82764
|
+
options?: never;
|
|
82765
|
+
head?: never;
|
|
82766
|
+
patch?: never;
|
|
82767
|
+
trace?: never;
|
|
82768
|
+
};
|
|
82769
|
+
"/appointments/reminders/plan": {
|
|
82770
|
+
parameters: {
|
|
82771
|
+
query?: never;
|
|
82772
|
+
header?: never;
|
|
82773
|
+
path?: never;
|
|
82774
|
+
cookie?: never;
|
|
82775
|
+
};
|
|
82776
|
+
/**
|
|
82777
|
+
* Get the appointment reminder ladder
|
|
82778
|
+
* @description The rungs, the single-sender declaration, whether anything is being sent right now (`live`) and `blocked_reason` when it is not. A rung has an `event` (`before_start` by default, `booked` for the welcome right after booking, `no_show` for the rebook with three fresh slots), an `email` mode (`never` / `fallback` / `also`, the twin with a .ics) and optional per-kind WhatsApp `templates` (`demo`, `clinic`, `visit`, `generic`). Off for every tenant until its owner saves a plan and declares Vitrina the single sender.
|
|
82779
|
+
*/
|
|
82780
|
+
get: {
|
|
82781
|
+
parameters: {
|
|
82782
|
+
query?: never;
|
|
82783
|
+
header?: never;
|
|
82784
|
+
path?: never;
|
|
82785
|
+
cookie?: never;
|
|
82786
|
+
};
|
|
82787
|
+
requestBody?: never;
|
|
82788
|
+
responses: {
|
|
82789
|
+
/** @description Reminder plan */
|
|
82790
|
+
200: {
|
|
82791
|
+
headers: {
|
|
82792
|
+
[name: string]: unknown;
|
|
82793
|
+
};
|
|
82794
|
+
content: {
|
|
82795
|
+
/**
|
|
82796
|
+
* @example {
|
|
82797
|
+
* "data": {
|
|
82798
|
+
* "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b10",
|
|
82799
|
+
* "name": "Recordatorios de cita",
|
|
82800
|
+
* "rungs": [
|
|
82801
|
+
* {
|
|
82802
|
+
* "key": "welcome",
|
|
82803
|
+
* "event": "booked",
|
|
82804
|
+
* "offset_hours": 0,
|
|
82805
|
+
* "channel": "whatsapp",
|
|
82806
|
+
* "email": "also",
|
|
82807
|
+
* "template_name": null,
|
|
82808
|
+
* "templates": {
|
|
82809
|
+
* "demo": "demo_confirmada_v1"
|
|
82810
|
+
* },
|
|
82811
|
+
* "asks_confirmation": false,
|
|
82812
|
+
* "include_reschedule_link": true
|
|
82813
|
+
* },
|
|
82814
|
+
* {
|
|
82815
|
+
* "key": "h24",
|
|
82816
|
+
* "offset_hours": 24,
|
|
82817
|
+
* "channel": "whatsapp",
|
|
82818
|
+
* "email": "fallback",
|
|
82819
|
+
* "template_name": "recordatorio_24h",
|
|
82820
|
+
* "asks_confirmation": true,
|
|
82821
|
+
* "include_reschedule_link": true
|
|
82822
|
+
* },
|
|
82823
|
+
* {
|
|
82824
|
+
* "key": "h2",
|
|
82825
|
+
* "offset_hours": 2,
|
|
82826
|
+
* "channel": "whatsapp",
|
|
82827
|
+
* "template_name": "recordatorio_2h",
|
|
82828
|
+
* "asks_confirmation": false,
|
|
82829
|
+
* "include_reschedule_link": false
|
|
82830
|
+
* },
|
|
82831
|
+
* {
|
|
82832
|
+
* "key": "no_show",
|
|
82833
|
+
* "event": "no_show",
|
|
82834
|
+
* "offset_hours": 0.17,
|
|
82835
|
+
* "channel": "whatsapp",
|
|
82836
|
+
* "email": "fallback",
|
|
82837
|
+
* "template_name": "reagendar",
|
|
82838
|
+
* "asks_confirmation": false,
|
|
82839
|
+
* "include_reschedule_link": true
|
|
82840
|
+
* }
|
|
82841
|
+
* ],
|
|
82842
|
+
* "active": true,
|
|
82843
|
+
* "single_sender_confirmed_at": "2026-10-11T12:00:00.000Z",
|
|
82844
|
+
* "single_sender_confirmed_by": null,
|
|
82845
|
+
* "vendor_sends_reminders": false,
|
|
82846
|
+
* "live": true,
|
|
82847
|
+
* "blocked_reason": null,
|
|
82848
|
+
* "defaults": [],
|
|
82849
|
+
* "updated_at": "2026-10-11T12:00:00.000Z",
|
|
82850
|
+
* "confirm_status_id": null,
|
|
82851
|
+
* "confirm_status": null,
|
|
82852
|
+
* "create_contacts_from_patient_phone": false
|
|
82853
|
+
* }
|
|
82854
|
+
* }
|
|
82855
|
+
*/
|
|
82856
|
+
"application/json": {
|
|
82857
|
+
data?: unknown;
|
|
82858
|
+
meta?: {
|
|
82859
|
+
[key: string]: unknown;
|
|
82860
|
+
};
|
|
82861
|
+
};
|
|
82862
|
+
};
|
|
82863
|
+
};
|
|
82864
|
+
/** @description Validation error */
|
|
82865
|
+
400: {
|
|
82866
|
+
headers: {
|
|
82867
|
+
[name: string]: unknown;
|
|
82868
|
+
};
|
|
82869
|
+
content: {
|
|
82870
|
+
"application/json": components["schemas"]["Error"];
|
|
82871
|
+
};
|
|
82872
|
+
};
|
|
82873
|
+
/** @description Unauthorized */
|
|
82874
|
+
401: {
|
|
82875
|
+
headers: {
|
|
82876
|
+
[name: string]: unknown;
|
|
82877
|
+
};
|
|
82878
|
+
content: {
|
|
82879
|
+
"application/json": components["schemas"]["Error"];
|
|
82880
|
+
};
|
|
82881
|
+
};
|
|
82882
|
+
/** @description Forbidden */
|
|
82883
|
+
403: {
|
|
82884
|
+
headers: {
|
|
82885
|
+
[name: string]: unknown;
|
|
82886
|
+
};
|
|
82887
|
+
content: {
|
|
82888
|
+
"application/json": components["schemas"]["Error"];
|
|
82889
|
+
};
|
|
82890
|
+
};
|
|
82891
|
+
/** @description Not found */
|
|
82892
|
+
404: {
|
|
82893
|
+
headers: {
|
|
82894
|
+
[name: string]: unknown;
|
|
82895
|
+
};
|
|
82896
|
+
content: {
|
|
82897
|
+
"application/json": components["schemas"]["Error"];
|
|
82898
|
+
};
|
|
82899
|
+
};
|
|
82900
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
82901
|
+
409: {
|
|
82902
|
+
headers: {
|
|
82903
|
+
[name: string]: unknown;
|
|
82904
|
+
};
|
|
82905
|
+
content: {
|
|
82906
|
+
"application/json": components["schemas"]["Error"];
|
|
82907
|
+
};
|
|
82908
|
+
};
|
|
82909
|
+
/** @description Rate limited */
|
|
82910
|
+
429: {
|
|
82911
|
+
headers: {
|
|
82912
|
+
[name: string]: unknown;
|
|
82913
|
+
};
|
|
82914
|
+
content: {
|
|
82915
|
+
"application/json": components["schemas"]["Error"];
|
|
82916
|
+
};
|
|
82917
|
+
};
|
|
82918
|
+
};
|
|
82919
|
+
};
|
|
82920
|
+
/**
|
|
82921
|
+
* Save the appointment reminder ladder
|
|
82922
|
+
* @description Replaces the rungs. 400 `single_sender_not_confirmed` when `active` is requested without the declaration. Outside the 24 h WhatsApp window a rung needs an APPROVED template on the number (named variables: `nombre`, `fecha`, `hora`, `anfitrion`, `reunion`, `enlace`, `opcion_1`..`opcion_3`); with `email: "fallback"` a missing template falls back to email instead of staying silent.
|
|
82923
|
+
*/
|
|
82924
|
+
put: {
|
|
82925
|
+
parameters: {
|
|
82926
|
+
query?: never;
|
|
82927
|
+
header?: never;
|
|
82928
|
+
path?: never;
|
|
82929
|
+
cookie?: never;
|
|
82930
|
+
};
|
|
82931
|
+
requestBody?: {
|
|
82932
|
+
content: {
|
|
82933
|
+
/**
|
|
82934
|
+
* @example {
|
|
82935
|
+
* "rungs": [
|
|
82936
|
+
* {
|
|
82937
|
+
* "key": "welcome",
|
|
82938
|
+
* "event": "booked",
|
|
82939
|
+
* "offset_hours": 0,
|
|
82940
|
+
* "channel": "whatsapp",
|
|
82941
|
+
* "email": "also",
|
|
82942
|
+
* "template_name": null,
|
|
82943
|
+
* "templates": {
|
|
82944
|
+
* "demo": "demo_confirmada_v1"
|
|
82945
|
+
* },
|
|
82946
|
+
* "asks_confirmation": false,
|
|
82947
|
+
* "include_reschedule_link": true
|
|
82948
|
+
* },
|
|
82949
|
+
* {
|
|
82950
|
+
* "key": "h24",
|
|
82951
|
+
* "offset_hours": 24,
|
|
82952
|
+
* "channel": "whatsapp",
|
|
82953
|
+
* "email": "fallback",
|
|
82954
|
+
* "template_name": "recordatorio_24h",
|
|
82955
|
+
* "asks_confirmation": true,
|
|
82956
|
+
* "include_reschedule_link": true
|
|
82957
|
+
* },
|
|
82958
|
+
* {
|
|
82959
|
+
* "key": "h2",
|
|
82960
|
+
* "offset_hours": 2,
|
|
82961
|
+
* "channel": "whatsapp",
|
|
82962
|
+
* "template_name": "recordatorio_2h",
|
|
82963
|
+
* "asks_confirmation": false,
|
|
82964
|
+
* "include_reschedule_link": false
|
|
82965
|
+
* },
|
|
82966
|
+
* {
|
|
82967
|
+
* "key": "no_show",
|
|
82968
|
+
* "event": "no_show",
|
|
82969
|
+
* "offset_hours": 0.17,
|
|
82970
|
+
* "channel": "whatsapp",
|
|
82971
|
+
* "email": "fallback",
|
|
82972
|
+
* "template_name": "reagendar",
|
|
82973
|
+
* "asks_confirmation": false,
|
|
82974
|
+
* "include_reschedule_link": true
|
|
82975
|
+
* }
|
|
82976
|
+
* ],
|
|
82977
|
+
* "active": true
|
|
82978
|
+
* }
|
|
82979
|
+
*/
|
|
82980
|
+
"application/json": {
|
|
82981
|
+
name?: string;
|
|
82982
|
+
rungs: {
|
|
82983
|
+
key: string;
|
|
82984
|
+
offset_hours: number;
|
|
82985
|
+
/** @enum {string} */
|
|
82986
|
+
event?: "before_start" | "booked" | "no_show";
|
|
82987
|
+
/** @enum {string} */
|
|
82988
|
+
email?: "never" | "fallback" | "also";
|
|
82989
|
+
templates?: {
|
|
82990
|
+
demo?: string;
|
|
82991
|
+
clinic?: string;
|
|
82992
|
+
visit?: string;
|
|
82993
|
+
generic?: string;
|
|
82994
|
+
};
|
|
82995
|
+
/**
|
|
82996
|
+
* @default whatsapp
|
|
82997
|
+
* @enum {string}
|
|
82998
|
+
*/
|
|
82999
|
+
channel?: "whatsapp" | "email";
|
|
83000
|
+
template_name?: string | null;
|
|
83001
|
+
/** @default false */
|
|
83002
|
+
asks_confirmation?: boolean;
|
|
83003
|
+
/** @default true */
|
|
83004
|
+
include_reschedule_link?: boolean;
|
|
83005
|
+
}[];
|
|
83006
|
+
active: boolean;
|
|
83007
|
+
vendor_sends_reminders?: boolean;
|
|
83008
|
+
/** Format: uuid */
|
|
83009
|
+
confirm_status_id?: string | null;
|
|
83010
|
+
create_contacts_from_patient_phone?: boolean;
|
|
83011
|
+
quiet_hours_enforced?: boolean;
|
|
83012
|
+
};
|
|
83013
|
+
};
|
|
83014
|
+
};
|
|
83015
|
+
responses: {
|
|
83016
|
+
/** @description Reminder plan */
|
|
83017
|
+
200: {
|
|
83018
|
+
headers: {
|
|
83019
|
+
[name: string]: unknown;
|
|
83020
|
+
};
|
|
83021
|
+
content: {
|
|
83022
|
+
/**
|
|
83023
|
+
* @example {
|
|
83024
|
+
* "data": {
|
|
83025
|
+
* "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b10",
|
|
83026
|
+
* "name": "Recordatorios de cita",
|
|
83027
|
+
* "rungs": [
|
|
83028
|
+
* {
|
|
83029
|
+
* "key": "welcome",
|
|
83030
|
+
* "event": "booked",
|
|
83031
|
+
* "offset_hours": 0,
|
|
83032
|
+
* "channel": "whatsapp",
|
|
83033
|
+
* "email": "also",
|
|
83034
|
+
* "template_name": null,
|
|
83035
|
+
* "templates": {
|
|
83036
|
+
* "demo": "demo_confirmada_v1"
|
|
83037
|
+
* },
|
|
83038
|
+
* "asks_confirmation": false,
|
|
83039
|
+
* "include_reschedule_link": true
|
|
83040
|
+
* },
|
|
83041
|
+
* {
|
|
83042
|
+
* "key": "h24",
|
|
83043
|
+
* "offset_hours": 24,
|
|
83044
|
+
* "channel": "whatsapp",
|
|
83045
|
+
* "email": "fallback",
|
|
83046
|
+
* "template_name": "recordatorio_24h",
|
|
83047
|
+
* "asks_confirmation": true,
|
|
83048
|
+
* "include_reschedule_link": true
|
|
83049
|
+
* },
|
|
83050
|
+
* {
|
|
83051
|
+
* "key": "h2",
|
|
83052
|
+
* "offset_hours": 2,
|
|
83053
|
+
* "channel": "whatsapp",
|
|
83054
|
+
* "template_name": "recordatorio_2h",
|
|
83055
|
+
* "asks_confirmation": false,
|
|
83056
|
+
* "include_reschedule_link": false
|
|
83057
|
+
* },
|
|
83058
|
+
* {
|
|
83059
|
+
* "key": "no_show",
|
|
83060
|
+
* "event": "no_show",
|
|
83061
|
+
* "offset_hours": 0.17,
|
|
83062
|
+
* "channel": "whatsapp",
|
|
83063
|
+
* "email": "fallback",
|
|
83064
|
+
* "template_name": "reagendar",
|
|
83065
|
+
* "asks_confirmation": false,
|
|
83066
|
+
* "include_reschedule_link": true
|
|
83067
|
+
* }
|
|
83068
|
+
* ],
|
|
83069
|
+
* "active": true,
|
|
83070
|
+
* "single_sender_confirmed_at": "2026-10-11T12:00:00.000Z",
|
|
83071
|
+
* "single_sender_confirmed_by": null,
|
|
83072
|
+
* "vendor_sends_reminders": false,
|
|
83073
|
+
* "live": true,
|
|
83074
|
+
* "blocked_reason": null,
|
|
83075
|
+
* "defaults": [],
|
|
83076
|
+
* "updated_at": "2026-10-11T12:00:00.000Z",
|
|
83077
|
+
* "confirm_status_id": null,
|
|
83078
|
+
* "confirm_status": null,
|
|
83079
|
+
* "create_contacts_from_patient_phone": false
|
|
83080
|
+
* }
|
|
83081
|
+
* }
|
|
83082
|
+
*/
|
|
83083
|
+
"application/json": {
|
|
83084
|
+
data?: unknown;
|
|
83085
|
+
meta?: {
|
|
83086
|
+
[key: string]: unknown;
|
|
83087
|
+
};
|
|
83088
|
+
};
|
|
83089
|
+
};
|
|
83090
|
+
};
|
|
83091
|
+
/** @description Validation error */
|
|
83092
|
+
400: {
|
|
83093
|
+
headers: {
|
|
83094
|
+
[name: string]: unknown;
|
|
83095
|
+
};
|
|
83096
|
+
content: {
|
|
83097
|
+
"application/json": components["schemas"]["Error"];
|
|
83098
|
+
};
|
|
83099
|
+
};
|
|
83100
|
+
/** @description Unauthorized */
|
|
83101
|
+
401: {
|
|
83102
|
+
headers: {
|
|
83103
|
+
[name: string]: unknown;
|
|
83104
|
+
};
|
|
83105
|
+
content: {
|
|
83106
|
+
"application/json": components["schemas"]["Error"];
|
|
83107
|
+
};
|
|
83108
|
+
};
|
|
83109
|
+
/** @description Forbidden */
|
|
83110
|
+
403: {
|
|
83111
|
+
headers: {
|
|
83112
|
+
[name: string]: unknown;
|
|
83113
|
+
};
|
|
83114
|
+
content: {
|
|
83115
|
+
"application/json": components["schemas"]["Error"];
|
|
83116
|
+
};
|
|
83117
|
+
};
|
|
83118
|
+
/** @description Not found */
|
|
83119
|
+
404: {
|
|
83120
|
+
headers: {
|
|
83121
|
+
[name: string]: unknown;
|
|
83122
|
+
};
|
|
83123
|
+
content: {
|
|
83124
|
+
"application/json": components["schemas"]["Error"];
|
|
83125
|
+
};
|
|
83126
|
+
};
|
|
83127
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
83128
|
+
409: {
|
|
83129
|
+
headers: {
|
|
83130
|
+
[name: string]: unknown;
|
|
83131
|
+
};
|
|
83132
|
+
content: {
|
|
83133
|
+
"application/json": components["schemas"]["Error"];
|
|
83134
|
+
};
|
|
83135
|
+
};
|
|
83136
|
+
/** @description Rate limited */
|
|
83137
|
+
429: {
|
|
83138
|
+
headers: {
|
|
83139
|
+
[name: string]: unknown;
|
|
83140
|
+
};
|
|
83141
|
+
content: {
|
|
83142
|
+
"application/json": components["schemas"]["Error"];
|
|
83143
|
+
};
|
|
83144
|
+
};
|
|
83145
|
+
};
|
|
83146
|
+
};
|
|
83147
|
+
post?: never;
|
|
83148
|
+
delete?: never;
|
|
83149
|
+
options?: never;
|
|
83150
|
+
head?: never;
|
|
83151
|
+
patch?: never;
|
|
83152
|
+
trace?: never;
|
|
83153
|
+
};
|
|
83154
|
+
"/appointments/reminders/plan/confirm-single-sender": {
|
|
83155
|
+
parameters: {
|
|
83156
|
+
query?: never;
|
|
83157
|
+
header?: never;
|
|
83158
|
+
path?: never;
|
|
83159
|
+
cookie?: never;
|
|
83160
|
+
};
|
|
83161
|
+
get?: never;
|
|
83162
|
+
put?: never;
|
|
83163
|
+
/**
|
|
83164
|
+
* Declare Vitrina the single sender of reminders
|
|
83165
|
+
* @description Records who declared that no other system reminds these people (the only thing that makes an active ladder legal). Reversible with POST /appointments/reminders/plan/revoke-single-sender.
|
|
83166
|
+
*/
|
|
83167
|
+
post: {
|
|
83168
|
+
parameters: {
|
|
83169
|
+
query?: never;
|
|
83170
|
+
header?: {
|
|
83171
|
+
/** @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. */
|
|
83172
|
+
"Idempotency-Key"?: string;
|
|
83173
|
+
};
|
|
83174
|
+
path?: never;
|
|
83175
|
+
cookie?: never;
|
|
83176
|
+
};
|
|
83177
|
+
requestBody?: never;
|
|
83178
|
+
responses: {
|
|
83179
|
+
/** @description Reminder plan */
|
|
83180
|
+
200: {
|
|
83181
|
+
headers: {
|
|
83182
|
+
[name: string]: unknown;
|
|
83183
|
+
};
|
|
83184
|
+
content: {
|
|
83185
|
+
/**
|
|
83186
|
+
* @example {
|
|
83187
|
+
* "data": {
|
|
83188
|
+
* "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b10",
|
|
83189
|
+
* "name": "Recordatorios de cita",
|
|
83190
|
+
* "rungs": [
|
|
83191
|
+
* {
|
|
83192
|
+
* "key": "welcome",
|
|
83193
|
+
* "event": "booked",
|
|
83194
|
+
* "offset_hours": 0,
|
|
83195
|
+
* "channel": "whatsapp",
|
|
83196
|
+
* "email": "also",
|
|
83197
|
+
* "template_name": null,
|
|
83198
|
+
* "templates": {
|
|
83199
|
+
* "demo": "demo_confirmada_v1"
|
|
83200
|
+
* },
|
|
83201
|
+
* "asks_confirmation": false,
|
|
83202
|
+
* "include_reschedule_link": true
|
|
83203
|
+
* },
|
|
83204
|
+
* {
|
|
83205
|
+
* "key": "h24",
|
|
83206
|
+
* "offset_hours": 24,
|
|
83207
|
+
* "channel": "whatsapp",
|
|
83208
|
+
* "email": "fallback",
|
|
83209
|
+
* "template_name": "recordatorio_24h",
|
|
83210
|
+
* "asks_confirmation": true,
|
|
83211
|
+
* "include_reschedule_link": true
|
|
83212
|
+
* },
|
|
83213
|
+
* {
|
|
83214
|
+
* "key": "h2",
|
|
83215
|
+
* "offset_hours": 2,
|
|
83216
|
+
* "channel": "whatsapp",
|
|
83217
|
+
* "template_name": "recordatorio_2h",
|
|
83218
|
+
* "asks_confirmation": false,
|
|
83219
|
+
* "include_reschedule_link": false
|
|
83220
|
+
* },
|
|
83221
|
+
* {
|
|
83222
|
+
* "key": "no_show",
|
|
83223
|
+
* "event": "no_show",
|
|
83224
|
+
* "offset_hours": 0.17,
|
|
83225
|
+
* "channel": "whatsapp",
|
|
83226
|
+
* "email": "fallback",
|
|
83227
|
+
* "template_name": "reagendar",
|
|
83228
|
+
* "asks_confirmation": false,
|
|
83229
|
+
* "include_reschedule_link": true
|
|
83230
|
+
* }
|
|
83231
|
+
* ],
|
|
83232
|
+
* "active": true,
|
|
83233
|
+
* "single_sender_confirmed_at": "2026-10-11T12:00:00.000Z",
|
|
83234
|
+
* "single_sender_confirmed_by": null,
|
|
83235
|
+
* "vendor_sends_reminders": false,
|
|
83236
|
+
* "live": true,
|
|
83237
|
+
* "blocked_reason": null,
|
|
83238
|
+
* "defaults": [],
|
|
83239
|
+
* "updated_at": "2026-10-11T12:00:00.000Z",
|
|
83240
|
+
* "confirm_status_id": null,
|
|
83241
|
+
* "confirm_status": null,
|
|
83242
|
+
* "create_contacts_from_patient_phone": false
|
|
83243
|
+
* }
|
|
83244
|
+
* }
|
|
83245
|
+
*/
|
|
83246
|
+
"application/json": {
|
|
83247
|
+
data?: unknown;
|
|
83248
|
+
meta?: {
|
|
83249
|
+
[key: string]: unknown;
|
|
83250
|
+
};
|
|
83251
|
+
};
|
|
83252
|
+
};
|
|
83253
|
+
};
|
|
83254
|
+
/** @description Validation error */
|
|
83255
|
+
400: {
|
|
83256
|
+
headers: {
|
|
83257
|
+
[name: string]: unknown;
|
|
83258
|
+
};
|
|
83259
|
+
content: {
|
|
83260
|
+
"application/json": components["schemas"]["Error"];
|
|
83261
|
+
};
|
|
83262
|
+
};
|
|
83263
|
+
/** @description Unauthorized */
|
|
83264
|
+
401: {
|
|
83265
|
+
headers: {
|
|
83266
|
+
[name: string]: unknown;
|
|
83267
|
+
};
|
|
83268
|
+
content: {
|
|
83269
|
+
"application/json": components["schemas"]["Error"];
|
|
83270
|
+
};
|
|
83271
|
+
};
|
|
83272
|
+
/** @description Forbidden */
|
|
83273
|
+
403: {
|
|
83274
|
+
headers: {
|
|
83275
|
+
[name: string]: unknown;
|
|
83276
|
+
};
|
|
83277
|
+
content: {
|
|
83278
|
+
"application/json": components["schemas"]["Error"];
|
|
83279
|
+
};
|
|
83280
|
+
};
|
|
83281
|
+
/** @description Not found */
|
|
83282
|
+
404: {
|
|
83283
|
+
headers: {
|
|
83284
|
+
[name: string]: unknown;
|
|
83285
|
+
};
|
|
83286
|
+
content: {
|
|
83287
|
+
"application/json": components["schemas"]["Error"];
|
|
83288
|
+
};
|
|
83289
|
+
};
|
|
83290
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
83291
|
+
409: {
|
|
83292
|
+
headers: {
|
|
83293
|
+
[name: string]: unknown;
|
|
83294
|
+
};
|
|
83295
|
+
content: {
|
|
83296
|
+
"application/json": components["schemas"]["Error"];
|
|
83297
|
+
};
|
|
83298
|
+
};
|
|
83299
|
+
/** @description Rate limited */
|
|
83300
|
+
429: {
|
|
83301
|
+
headers: {
|
|
83302
|
+
[name: string]: unknown;
|
|
83303
|
+
};
|
|
83304
|
+
content: {
|
|
83305
|
+
"application/json": components["schemas"]["Error"];
|
|
83306
|
+
};
|
|
83307
|
+
};
|
|
83308
|
+
};
|
|
83309
|
+
};
|
|
83310
|
+
delete?: never;
|
|
83311
|
+
options?: never;
|
|
83312
|
+
head?: never;
|
|
83313
|
+
patch?: never;
|
|
83314
|
+
trace?: never;
|
|
83315
|
+
};
|
|
83316
|
+
"/appointments/reminders/plan/revoke-single-sender": {
|
|
83317
|
+
parameters: {
|
|
83318
|
+
query?: never;
|
|
83319
|
+
header?: never;
|
|
83320
|
+
path?: never;
|
|
83321
|
+
cookie?: never;
|
|
83322
|
+
};
|
|
83323
|
+
get?: never;
|
|
83324
|
+
put?: never;
|
|
83325
|
+
/**
|
|
83326
|
+
* Stop sending reminders
|
|
83327
|
+
* @description Clears the declaration and deactivates the ladder in the same write.
|
|
83328
|
+
*/
|
|
83329
|
+
post: {
|
|
83330
|
+
parameters: {
|
|
83331
|
+
query?: never;
|
|
83332
|
+
header?: {
|
|
83333
|
+
/** @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. */
|
|
83334
|
+
"Idempotency-Key"?: string;
|
|
83335
|
+
};
|
|
83336
|
+
path?: never;
|
|
83337
|
+
cookie?: never;
|
|
83338
|
+
};
|
|
83339
|
+
requestBody?: never;
|
|
83340
|
+
responses: {
|
|
83341
|
+
/** @description Reminder plan */
|
|
83342
|
+
200: {
|
|
83343
|
+
headers: {
|
|
83344
|
+
[name: string]: unknown;
|
|
83345
|
+
};
|
|
83346
|
+
content: {
|
|
83347
|
+
/**
|
|
83348
|
+
* @example {
|
|
83349
|
+
* "data": {
|
|
83350
|
+
* "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b10",
|
|
83351
|
+
* "name": "Recordatorios de cita",
|
|
83352
|
+
* "rungs": [
|
|
83353
|
+
* {
|
|
83354
|
+
* "key": "welcome",
|
|
83355
|
+
* "event": "booked",
|
|
83356
|
+
* "offset_hours": 0,
|
|
83357
|
+
* "channel": "whatsapp",
|
|
83358
|
+
* "email": "also",
|
|
83359
|
+
* "template_name": null,
|
|
83360
|
+
* "templates": {
|
|
83361
|
+
* "demo": "demo_confirmada_v1"
|
|
83362
|
+
* },
|
|
83363
|
+
* "asks_confirmation": false,
|
|
83364
|
+
* "include_reschedule_link": true
|
|
83365
|
+
* },
|
|
83366
|
+
* {
|
|
83367
|
+
* "key": "h24",
|
|
83368
|
+
* "offset_hours": 24,
|
|
83369
|
+
* "channel": "whatsapp",
|
|
83370
|
+
* "email": "fallback",
|
|
83371
|
+
* "template_name": "recordatorio_24h",
|
|
83372
|
+
* "asks_confirmation": true,
|
|
83373
|
+
* "include_reschedule_link": true
|
|
83374
|
+
* },
|
|
83375
|
+
* {
|
|
83376
|
+
* "key": "h2",
|
|
83377
|
+
* "offset_hours": 2,
|
|
83378
|
+
* "channel": "whatsapp",
|
|
83379
|
+
* "template_name": "recordatorio_2h",
|
|
83380
|
+
* "asks_confirmation": false,
|
|
83381
|
+
* "include_reschedule_link": false
|
|
83382
|
+
* },
|
|
83383
|
+
* {
|
|
83384
|
+
* "key": "no_show",
|
|
83385
|
+
* "event": "no_show",
|
|
83386
|
+
* "offset_hours": 0.17,
|
|
83387
|
+
* "channel": "whatsapp",
|
|
83388
|
+
* "email": "fallback",
|
|
83389
|
+
* "template_name": "reagendar",
|
|
83390
|
+
* "asks_confirmation": false,
|
|
83391
|
+
* "include_reschedule_link": true
|
|
83392
|
+
* }
|
|
83393
|
+
* ],
|
|
83394
|
+
* "active": true,
|
|
83395
|
+
* "single_sender_confirmed_at": "2026-10-11T12:00:00.000Z",
|
|
83396
|
+
* "single_sender_confirmed_by": null,
|
|
83397
|
+
* "vendor_sends_reminders": false,
|
|
83398
|
+
* "live": true,
|
|
83399
|
+
* "blocked_reason": null,
|
|
83400
|
+
* "defaults": [],
|
|
83401
|
+
* "updated_at": "2026-10-11T12:00:00.000Z",
|
|
83402
|
+
* "confirm_status_id": null,
|
|
83403
|
+
* "confirm_status": null,
|
|
83404
|
+
* "create_contacts_from_patient_phone": false
|
|
83405
|
+
* }
|
|
83406
|
+
* }
|
|
83407
|
+
*/
|
|
83408
|
+
"application/json": {
|
|
83409
|
+
data?: unknown;
|
|
83410
|
+
meta?: {
|
|
83411
|
+
[key: string]: unknown;
|
|
83412
|
+
};
|
|
83413
|
+
};
|
|
83414
|
+
};
|
|
83415
|
+
};
|
|
83416
|
+
/** @description Validation error */
|
|
83417
|
+
400: {
|
|
83418
|
+
headers: {
|
|
83419
|
+
[name: string]: unknown;
|
|
83420
|
+
};
|
|
83421
|
+
content: {
|
|
83422
|
+
"application/json": components["schemas"]["Error"];
|
|
83423
|
+
};
|
|
83424
|
+
};
|
|
83425
|
+
/** @description Unauthorized */
|
|
83426
|
+
401: {
|
|
83427
|
+
headers: {
|
|
83428
|
+
[name: string]: unknown;
|
|
83429
|
+
};
|
|
83430
|
+
content: {
|
|
83431
|
+
"application/json": components["schemas"]["Error"];
|
|
83432
|
+
};
|
|
83433
|
+
};
|
|
83434
|
+
/** @description Forbidden */
|
|
83435
|
+
403: {
|
|
83436
|
+
headers: {
|
|
83437
|
+
[name: string]: unknown;
|
|
83438
|
+
};
|
|
83439
|
+
content: {
|
|
83440
|
+
"application/json": components["schemas"]["Error"];
|
|
83441
|
+
};
|
|
83442
|
+
};
|
|
83443
|
+
/** @description Not found */
|
|
83444
|
+
404: {
|
|
83445
|
+
headers: {
|
|
83446
|
+
[name: string]: unknown;
|
|
83447
|
+
};
|
|
83448
|
+
content: {
|
|
83449
|
+
"application/json": components["schemas"]["Error"];
|
|
83450
|
+
};
|
|
83451
|
+
};
|
|
83452
|
+
/** @description Conflict (incl. Idempotency-Key reuse with different body) */
|
|
83453
|
+
409: {
|
|
83454
|
+
headers: {
|
|
83455
|
+
[name: string]: unknown;
|
|
83456
|
+
};
|
|
83457
|
+
content: {
|
|
83458
|
+
"application/json": components["schemas"]["Error"];
|
|
83459
|
+
};
|
|
83460
|
+
};
|
|
83461
|
+
/** @description Rate limited */
|
|
83462
|
+
429: {
|
|
83463
|
+
headers: {
|
|
83464
|
+
[name: string]: unknown;
|
|
83465
|
+
};
|
|
83466
|
+
content: {
|
|
83467
|
+
"application/json": components["schemas"]["Error"];
|
|
83468
|
+
};
|
|
83469
|
+
};
|
|
83470
|
+
};
|
|
83471
|
+
};
|
|
83472
|
+
delete?: never;
|
|
83473
|
+
options?: never;
|
|
83474
|
+
head?: never;
|
|
83475
|
+
patch?: never;
|
|
83476
|
+
trace?: never;
|
|
83477
|
+
};
|
|
83478
|
+
"/appointments/reminders": {
|
|
82581
83479
|
parameters: {
|
|
82582
83480
|
query?: never;
|
|
82583
83481
|
header?: never;
|
|
82584
83482
|
path?: never;
|
|
82585
83483
|
cookie?: never;
|
|
82586
83484
|
};
|
|
82587
|
-
get?: never;
|
|
82588
|
-
put?: never;
|
|
82589
83485
|
/**
|
|
82590
|
-
*
|
|
82591
|
-
* @description
|
|
82592
|
-
*
|
|
82593
|
-
* **Two scopes: `appointments:delete` AND `messages:send`.** The first is the split that lets a workspace grant "may book and reschedule" without granting "may un-book" (`appointments:write` reaches neither). The second is because a MESSAGE LEAVES VITRINA here, which is what every sending operation costs (ADR 0106 §3.2) — a credential that may cancel but holds no authority to write to anybody gets a 403.
|
|
82594
|
-
*
|
|
82595
|
-
* **It messages the customer.** The workspace is the one calling this off, so the cancellation notice goes out on the appointment’s originating conversation, in the workspace language and timezone. That send is best-effort and stamped for idempotency — it never fails the call and never goes out twice — and it is skipped entirely when the appointment has no conversation behind it. It is a transactional confirmation Vitrina composes about a booking the person made, not a send this caller authors, so it does not go through the política de envíos verdicts: a Bloqueo there would leave somebody turning up to a cancelled appointment.
|
|
82596
|
-
*
|
|
82597
|
-
* **`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.
|
|
82598
|
-
*
|
|
82599
|
-
* 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.
|
|
83486
|
+
* List sent appointment reminders
|
|
83487
|
+
* @description The send ledger: one row per appointment per rung (and per email twin, keyed `<rung>_email`) with the outcome, the reason when skipped, the manage link that went out and the person's confirm/cancel reply.
|
|
82600
83488
|
*/
|
|
82601
|
-
|
|
83489
|
+
get: {
|
|
82602
83490
|
parameters: {
|
|
82603
|
-
query?:
|
|
82604
|
-
|
|
82605
|
-
|
|
82606
|
-
"Idempotency-Key"?: string;
|
|
82607
|
-
};
|
|
82608
|
-
path: {
|
|
82609
|
-
id: string;
|
|
83491
|
+
query?: {
|
|
83492
|
+
limit?: number;
|
|
83493
|
+
offset?: number | null;
|
|
82610
83494
|
};
|
|
83495
|
+
header?: never;
|
|
83496
|
+
path?: never;
|
|
82611
83497
|
cookie?: never;
|
|
82612
83498
|
};
|
|
82613
|
-
requestBody?:
|
|
82614
|
-
content: {
|
|
82615
|
-
/**
|
|
82616
|
-
* @example {
|
|
82617
|
-
* "reason": "Reprogramamos por disponibilidad del equipo."
|
|
82618
|
-
* }
|
|
82619
|
-
*/
|
|
82620
|
-
"application/json": {
|
|
82621
|
-
reason?: string;
|
|
82622
|
-
};
|
|
82623
|
-
};
|
|
82624
|
-
};
|
|
83499
|
+
requestBody?: never;
|
|
82625
83500
|
responses: {
|
|
82626
|
-
/** @description
|
|
83501
|
+
/** @description Appointment reminders */
|
|
82627
83502
|
200: {
|
|
82628
83503
|
headers: {
|
|
82629
83504
|
[name: string]: unknown;
|
|
@@ -82632,49 +83507,29 @@ interface paths {
|
|
|
82632
83507
|
/**
|
|
82633
83508
|
* @example {
|
|
82634
83509
|
* "data": {
|
|
82635
|
-
* "
|
|
82636
|
-
*
|
|
82637
|
-
*
|
|
82638
|
-
*
|
|
82639
|
-
*
|
|
82640
|
-
*
|
|
82641
|
-
*
|
|
82642
|
-
*
|
|
82643
|
-
*
|
|
82644
|
-
*
|
|
82645
|
-
*
|
|
82646
|
-
*
|
|
82647
|
-
*
|
|
82648
|
-
*
|
|
82649
|
-
*
|
|
82650
|
-
*
|
|
82651
|
-
*
|
|
82652
|
-
*
|
|
82653
|
-
*
|
|
82654
|
-
*
|
|
82655
|
-
*
|
|
82656
|
-
*
|
|
82657
|
-
*
|
|
82658
|
-
* "series_index": null,
|
|
82659
|
-
* "booking_landing_id": null,
|
|
82660
|
-
* "attribution": null,
|
|
82661
|
-
* "starts_at": "2026-10-01T14:00:00.000Z",
|
|
82662
|
-
* "ends_at": "2026-10-01T14:45:00.000Z",
|
|
82663
|
-
* "hold_expires_at": null,
|
|
82664
|
-
* "google_event_id": null,
|
|
82665
|
-
* "google_ical_uid": null,
|
|
82666
|
-
* "google_updated_at": null,
|
|
82667
|
-
* "google_etag": null,
|
|
82668
|
-
* "reminder_at": "2026-10-01T12:00:00.000Z",
|
|
82669
|
-
* "reminder_sent_at": null,
|
|
82670
|
-
* "reminder_job_id": "appt-reminder-dddddddd-0000-4000-8000-000000000001",
|
|
82671
|
-
* "customer_name": "Camila R.",
|
|
82672
|
-
* "notes": "Primera visita.",
|
|
82673
|
-
* "metadata": {},
|
|
82674
|
-
* "display_seq": 3,
|
|
82675
|
-
* "display_id": "A-3",
|
|
82676
|
-
* "created_at": "2026-09-22T12:50:37.046Z",
|
|
82677
|
-
* "updated_at": "2026-09-22T12:50:37.080Z"
|
|
83510
|
+
* "items": [
|
|
83511
|
+
* {
|
|
83512
|
+
* "id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b11",
|
|
83513
|
+
* "appointment_id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b12",
|
|
83514
|
+
* "rung_key": "welcome",
|
|
83515
|
+
* "offset_minutes": 0,
|
|
83516
|
+
* "channel": "whatsapp",
|
|
83517
|
+
* "asks_confirmation": false,
|
|
83518
|
+
* "template_name": "demo_confirmada_v1",
|
|
83519
|
+
* "status": "sent",
|
|
83520
|
+
* "reason_code": null,
|
|
83521
|
+
* "detail": null,
|
|
83522
|
+
* "conversation_id": "0198f3c2-6d1e-7a52-9c5b-3f1d2e7a4b13",
|
|
83523
|
+
* "sent_at": "2026-10-11T12:01:00.000Z",
|
|
83524
|
+
* "manage_url": null,
|
|
83525
|
+
* "reply_kind": null,
|
|
83526
|
+
* "reply_text": null,
|
|
83527
|
+
* "replied_at": null,
|
|
83528
|
+
* "applied_status_id": null,
|
|
83529
|
+
* "apply_error": null,
|
|
83530
|
+
* "created_at": "2026-10-11T12:01:00.000Z"
|
|
83531
|
+
* }
|
|
83532
|
+
* ]
|
|
82678
83533
|
* }
|
|
82679
83534
|
* }
|
|
82680
83535
|
*/
|
|
@@ -82742,6 +83597,8 @@ interface paths {
|
|
|
82742
83597
|
};
|
|
82743
83598
|
};
|
|
82744
83599
|
};
|
|
83600
|
+
put?: never;
|
|
83601
|
+
post?: never;
|
|
82745
83602
|
delete?: never;
|
|
82746
83603
|
options?: never;
|
|
82747
83604
|
head?: never;
|
|
@@ -140052,6 +140909,148 @@ interface paths {
|
|
|
140052
140909
|
patch?: never;
|
|
140053
140910
|
trace?: never;
|
|
140054
140911
|
};
|
|
140912
|
+
"/ads/paid-funnel": {
|
|
140913
|
+
parameters: {
|
|
140914
|
+
query?: never;
|
|
140915
|
+
header?: never;
|
|
140916
|
+
path?: never;
|
|
140917
|
+
cookie?: never;
|
|
140918
|
+
};
|
|
140919
|
+
/**
|
|
140920
|
+
* Paid funnel: spend, leads, qualified, booked, held and paid per arm, campaign, ad set and ad
|
|
140921
|
+
* @description The scoreboard that judges a paid test on cost per demo HELD. Per row: people at each step (lead → ICP-qualified → demo booked → demo held → first paid invoice), the cost of each step, contacted within 24 h, lead-to-booked, show rate and qualified share, for one destination `arm` (`whatsapp`, `instant_form`, `website`, `other`; an ad with spend and nobody is `unassigned`). Steps are read from the outcome ledger the Meta events leave from, so a column equals the events sent for the same period (`basis=event`; `reconciliation.events` prints them). People with no id at the level sit on the arm’s `unattributed` row, so rows sum to `totals`; `reconciliation.spend_matches` checks Σ spend against `/ads/overview`. A failed read is `null`, never 0.
|
|
140922
|
+
*/
|
|
140923
|
+
get: {
|
|
140924
|
+
parameters: {
|
|
140925
|
+
query: {
|
|
140926
|
+
/** @description Window start (inclusive), YYYY-MM-DD, Santiago. */
|
|
140927
|
+
from: string;
|
|
140928
|
+
/** @description Window end (inclusive), YYYY-MM-DD, Santiago. */
|
|
140929
|
+
to: string;
|
|
140930
|
+
/** @description `arm` (WhatsApp / Instant Form / website), `campaign`, `ad_set` or `ad`. `arms` is always returned whatever the level. */
|
|
140931
|
+
level?: "arm" | "campaign" | "ad_set" | "ad";
|
|
140932
|
+
/** @description `cohort` (default): the people whose lead fell in the window, every later step counted whenever it happened. `event`: every column is the number of people whose event of that step fell in the window, so each equals the events sent to Meta for the same period. */
|
|
140933
|
+
basis?: "cohort" | "event";
|
|
140934
|
+
/** @description The attribution model for the spend read. Default `last_touch`. */
|
|
140935
|
+
model?: string;
|
|
140936
|
+
};
|
|
140937
|
+
header?: never;
|
|
140938
|
+
path?: never;
|
|
140939
|
+
cookie?: never;
|
|
140940
|
+
};
|
|
140941
|
+
requestBody?: never;
|
|
140942
|
+
responses: {
|
|
140943
|
+
/** @description The funnel at the requested level */
|
|
140944
|
+
200: {
|
|
140945
|
+
headers: {
|
|
140946
|
+
[name: string]: unknown;
|
|
140947
|
+
};
|
|
140948
|
+
content: {
|
|
140949
|
+
"application/json": {
|
|
140950
|
+
data: components["schemas"]["AdsDemoFunnel"];
|
|
140951
|
+
};
|
|
140952
|
+
};
|
|
140953
|
+
};
|
|
140954
|
+
/** @description Validation error */
|
|
140955
|
+
400: {
|
|
140956
|
+
headers: {
|
|
140957
|
+
[name: string]: unknown;
|
|
140958
|
+
};
|
|
140959
|
+
content: {
|
|
140960
|
+
"application/json": components["schemas"]["Error"];
|
|
140961
|
+
};
|
|
140962
|
+
};
|
|
140963
|
+
/** @description Unauthorized */
|
|
140964
|
+
401: {
|
|
140965
|
+
headers: {
|
|
140966
|
+
[name: string]: unknown;
|
|
140967
|
+
};
|
|
140968
|
+
content: {
|
|
140969
|
+
"application/json": components["schemas"]["Error"];
|
|
140970
|
+
};
|
|
140971
|
+
};
|
|
140972
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
140973
|
+
402: {
|
|
140974
|
+
headers: {
|
|
140975
|
+
[name: string]: unknown;
|
|
140976
|
+
};
|
|
140977
|
+
content: {
|
|
140978
|
+
/**
|
|
140979
|
+
* @example {
|
|
140980
|
+
* "error": {
|
|
140981
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
140982
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
140983
|
+
* "details": {
|
|
140984
|
+
* "required": [
|
|
140985
|
+
* "vitrina_ads"
|
|
140986
|
+
* ],
|
|
140987
|
+
* "active": [],
|
|
140988
|
+
* "feature": "vitrina_ads",
|
|
140989
|
+
* "entitlement_state": "off"
|
|
140990
|
+
* }
|
|
140991
|
+
* }
|
|
140992
|
+
* }
|
|
140993
|
+
*/
|
|
140994
|
+
"application/json": components["schemas"]["Error"];
|
|
140995
|
+
};
|
|
140996
|
+
};
|
|
140997
|
+
/** @description Forbidden */
|
|
140998
|
+
403: {
|
|
140999
|
+
headers: {
|
|
141000
|
+
[name: string]: unknown;
|
|
141001
|
+
};
|
|
141002
|
+
content: {
|
|
141003
|
+
"application/json": components["schemas"]["Error"];
|
|
141004
|
+
};
|
|
141005
|
+
};
|
|
141006
|
+
/** @description Not found */
|
|
141007
|
+
404: {
|
|
141008
|
+
headers: {
|
|
141009
|
+
[name: string]: unknown;
|
|
141010
|
+
};
|
|
141011
|
+
content: {
|
|
141012
|
+
"application/json": components["schemas"]["Error"];
|
|
141013
|
+
};
|
|
141014
|
+
};
|
|
141015
|
+
/** @description Vitrina Ads is active but the delegated key has not finished rotating (`ADS_KEY_NEEDS_REMINT`) — retry once `GET /ads/state` reports `needs_remint: false`. Also the generic conflict of a write. */
|
|
141016
|
+
409: {
|
|
141017
|
+
headers: {
|
|
141018
|
+
[name: string]: unknown;
|
|
141019
|
+
};
|
|
141020
|
+
content: {
|
|
141021
|
+
/**
|
|
141022
|
+
* @example {
|
|
141023
|
+
* "error": {
|
|
141024
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
141025
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
141026
|
+
* "details": {
|
|
141027
|
+
* "key_kind": "core"
|
|
141028
|
+
* }
|
|
141029
|
+
* }
|
|
141030
|
+
* }
|
|
141031
|
+
*/
|
|
141032
|
+
"application/json": components["schemas"]["Error"];
|
|
141033
|
+
};
|
|
141034
|
+
};
|
|
141035
|
+
/** @description Rate limited */
|
|
141036
|
+
429: {
|
|
141037
|
+
headers: {
|
|
141038
|
+
[name: string]: unknown;
|
|
141039
|
+
};
|
|
141040
|
+
content: {
|
|
141041
|
+
"application/json": components["schemas"]["Error"];
|
|
141042
|
+
};
|
|
141043
|
+
};
|
|
141044
|
+
};
|
|
141045
|
+
};
|
|
141046
|
+
put?: never;
|
|
141047
|
+
post?: never;
|
|
141048
|
+
delete?: never;
|
|
141049
|
+
options?: never;
|
|
141050
|
+
head?: never;
|
|
141051
|
+
patch?: never;
|
|
141052
|
+
trace?: never;
|
|
141053
|
+
};
|
|
140055
141054
|
"/ads/overview": {
|
|
140056
141055
|
parameters: {
|
|
140057
141056
|
query?: never;
|
|
@@ -175593,7 +176592,7 @@ interface components {
|
|
|
175593
176592
|
};
|
|
175594
176593
|
WebhookEventDoc: {
|
|
175595
176594
|
/** @enum {string} */
|
|
175596
|
-
name: "ai_agent.publish" | "ai_agent_graph.publish" | "agent_scenario_run.completed" | "agent_scenario_suite.completed" | "conversation.created" | "conversation.assigned" | "conversation.resolved" | "message.received" | "message.sent" | "ticket.opened" | "ticket.reopened" | "ticket.resolved" | "ticket.closed" | "sla.breached" | "kb.source.create" | "kb.source.embed" | "kb.source.update" | "kb.source.delete" | "kb_file.uploaded" | "kb_file.deleted" | "skill.created" | "skill.updated" | "skill.deleted" | "custom_tool.created" | "custom_tool.updated" | "custom_tool.deleted" | "macro.applied" | "cost.budget_alert" | "runtime.budget_exceeded" | "lead.created" | "lead.stage_changed" | "lead.pipeline_changed" | "lead.assigned" | "lead.won" | "lead.lost" | "lead.unqualified" | "stock.synced" | "stock.source_retired" | "vehicle.published" | "vehicle.unpublished" | "vehicle.publish_failed" | "vehicle.created" | "vehicle.attachment.created" | "mercadolibre.order" | "mercadolibre.vis_lead" | "chileautos.lead" | "yapo.lead" | "website.lead" | "demo_lead.created" | "demo_lead.pending_scheduling" | "demo_lead.routed" | "demo_booking.booked" | "demo_booking.rescheduled" | "demo_booking.cancelled" | "consignment.candidate.created" | "quote.issued" | "quote.voided" | "quote.extended" | "quote.archived" | "reservation.created" | "reservation.voided" | "reservation.abono_disposed" | "reservation.converted" | "sale_note.issued" | "sale_note.approved" | "sale_note.voided" | "purchase_note.issued" | "purchase_note.corrected" | "purchase_note.voided" | "payment.recorded" | "consignment.created" | "consignment.returned" | "consignment.sold" | "credit_application.recorded" | "credit_application.submitted" | "credit_application.decided" | "credit_application.withdrawn" | "price_approval.requested" | "price_approval.decided" | "contact.created" | "contact.updated" | "contact.merged" | "appointment.booked" | "appointment.rescheduled" | "appointment.cancelled" | "appointment.completed" | "appointment.no_show" | "appointment.reminded" | "appointment.imported" | "campaign.sent" | "campaign.paused" | "sending_domain.verified" | "coach.proposals_ready" | "coach.finding_ready" | "voice.autonomous_call" | "safety_hold.placed" | "safety_hold.ack_overdue" | "safety_hold.first_response_overdue" | "team.created" | "team.updated" | "team.deleted" | "custom_role.created" | "custom_role.updated" | "custom_role.deleted" | "macro.created" | "macro.updated" | "macro.deleted" | "assignment_rule.created" | "assignment_rule.updated" | "assignment_rule.deleted" | "sla_policy.created" | "sla_policy.updated" | "sla_policy.deleted" | "automation_trigger.created" | "automation_trigger.updated" | "automation_trigger.deleted" | "sending_domain.created" | "sending_domain.deleted" | "whatsapp_template.created" | "whatsapp_template.status_changed" | "whatsapp_template.deleted" | "whatsapp_flow.created" | "whatsapp_flow.published" | "whatsapp_flow.deprecated" | "whatsapp_flow.deleted" | "whatsapp_flow.completed" | "channel.connected" | "channel.updated" | "channel.disconnected" | "membership.created" | "membership.updated" | "membership.removed" | "clinic_professional.created" | "clinic_professional.updated" | "clinic_professional.deleted" | "clinic_service.created" | "clinic_service.updated" | "clinic_service.deleted" | "clinic_price_list.updated" | "clinic_pack_purchase.created" | "clinic_pack_purchase.session_consumed" | "clinic_pack_purchase.cancelled" | "clinic_budget.created" | "clinic_budget.sent" | "clinic_budget.accepted" | "clinic_budget.rejected" | "clinic_budget.voided" | "clinic_budget.mirror_changed" | "clinic_cash_session.opened" | "clinic_cash_session.closed" | "clinic_patient.created" | "clinic_patient.updated" | "clinic_patient.deleted" | "clinic_patient.merged" | "clinic_encounter.opened" | "clinic_encounter.closed" | "clinic_note.signed" | "clinic_note.amended" | "clinic_consent.signed" | "clinic_consent.revoked" | "clinic_document.uploaded" | "clinic_document.deleted" | "clinic_privacy_request.completed";
|
|
176595
|
+
name: "ai_agent.publish" | "ai_agent_graph.publish" | "agent_scenario_run.completed" | "agent_scenario_suite.completed" | "conversation.created" | "conversation.assigned" | "conversation.resolved" | "message.received" | "message.sent" | "ticket.opened" | "ticket.reopened" | "ticket.resolved" | "ticket.closed" | "sla.breached" | "kb.source.create" | "kb.source.embed" | "kb.source.update" | "kb.source.delete" | "kb_file.uploaded" | "kb_file.deleted" | "skill.created" | "skill.updated" | "skill.deleted" | "custom_tool.created" | "custom_tool.updated" | "custom_tool.deleted" | "macro.applied" | "cost.budget_alert" | "runtime.budget_exceeded" | "lead.created" | "lead.stage_changed" | "lead.pipeline_changed" | "lead.assigned" | "lead.won" | "lead.lost" | "lead.unqualified" | "stock.synced" | "stock.source_retired" | "vehicle.published" | "vehicle.unpublished" | "vehicle.publish_failed" | "vehicle.created" | "vehicle.attachment.created" | "mercadolibre.order" | "mercadolibre.vis_lead" | "chileautos.lead" | "yapo.lead" | "website.lead" | "demo_lead.created" | "demo_lead.pending_scheduling" | "demo_lead.routed" | "demo_booking.booked" | "demo_booking.rescheduled" | "demo_booking.cancelled" | "demo_booking.held" | "demo_booking.no_show" | "consignment.candidate.created" | "quote.issued" | "quote.voided" | "quote.extended" | "quote.archived" | "reservation.created" | "reservation.voided" | "reservation.abono_disposed" | "reservation.converted" | "sale_note.issued" | "sale_note.approved" | "sale_note.voided" | "purchase_note.issued" | "purchase_note.corrected" | "purchase_note.voided" | "payment.recorded" | "consignment.created" | "consignment.returned" | "consignment.sold" | "credit_application.recorded" | "credit_application.submitted" | "credit_application.decided" | "credit_application.withdrawn" | "price_approval.requested" | "price_approval.decided" | "contact.created" | "contact.updated" | "contact.merged" | "appointment.booked" | "appointment.rescheduled" | "appointment.cancelled" | "appointment.completed" | "appointment.no_show" | "appointment.reminded" | "appointment.imported" | "campaign.sent" | "campaign.paused" | "sending_domain.verified" | "coach.proposals_ready" | "coach.finding_ready" | "voice.autonomous_call" | "safety_hold.placed" | "safety_hold.ack_overdue" | "safety_hold.first_response_overdue" | "team.created" | "team.updated" | "team.deleted" | "custom_role.created" | "custom_role.updated" | "custom_role.deleted" | "macro.created" | "macro.updated" | "macro.deleted" | "assignment_rule.created" | "assignment_rule.updated" | "assignment_rule.deleted" | "sla_policy.created" | "sla_policy.updated" | "sla_policy.deleted" | "automation_trigger.created" | "automation_trigger.updated" | "automation_trigger.deleted" | "sending_domain.created" | "sending_domain.deleted" | "whatsapp_template.created" | "whatsapp_template.status_changed" | "whatsapp_template.deleted" | "whatsapp_flow.created" | "whatsapp_flow.published" | "whatsapp_flow.deprecated" | "whatsapp_flow.deleted" | "whatsapp_flow.completed" | "channel.connected" | "channel.updated" | "channel.disconnected" | "membership.created" | "membership.updated" | "membership.removed" | "clinic_professional.created" | "clinic_professional.updated" | "clinic_professional.deleted" | "clinic_service.created" | "clinic_service.updated" | "clinic_service.deleted" | "clinic_price_list.updated" | "clinic_pack_purchase.created" | "clinic_pack_purchase.session_consumed" | "clinic_pack_purchase.cancelled" | "clinic_budget.created" | "clinic_budget.sent" | "clinic_budget.accepted" | "clinic_budget.rejected" | "clinic_budget.voided" | "clinic_budget.mirror_changed" | "clinic_cash_session.opened" | "clinic_cash_session.closed" | "clinic_patient.created" | "clinic_patient.updated" | "clinic_patient.deleted" | "clinic_patient.merged" | "clinic_encounter.opened" | "clinic_encounter.closed" | "clinic_note.signed" | "clinic_note.amended" | "clinic_consent.signed" | "clinic_consent.revoked" | "clinic_document.uploaded" | "clinic_document.deleted" | "clinic_privacy_request.completed";
|
|
175597
176596
|
/** @description The schema version of this event type — every delivery carries it as `version`. Bumped only on a breaking change to `data`. */
|
|
175598
176597
|
version: number;
|
|
175599
176598
|
/** @description What the event is about — the `resource.type` of every delivery (`lead`, `vehicle`, `contact`, …). */
|
|
@@ -175660,7 +176659,7 @@ interface components {
|
|
|
175660
176659
|
CreateWebhookBody: {
|
|
175661
176660
|
/** Format: uri */
|
|
175662
176661
|
url: string;
|
|
175663
|
-
events: ("*" | "ai_agent.publish" | "ai_agent_graph.publish" | "agent_scenario_run.completed" | "agent_scenario_suite.completed" | "conversation.created" | "conversation.assigned" | "conversation.resolved" | "message.received" | "message.sent" | "ticket.opened" | "ticket.reopened" | "ticket.resolved" | "ticket.closed" | "sla.breached" | "kb.source.create" | "kb.source.embed" | "kb.source.update" | "kb.source.delete" | "kb_file.uploaded" | "kb_file.deleted" | "skill.created" | "skill.updated" | "skill.deleted" | "custom_tool.created" | "custom_tool.updated" | "custom_tool.deleted" | "macro.applied" | "cost.budget_alert" | "runtime.budget_exceeded" | "lead.created" | "lead.stage_changed" | "lead.pipeline_changed" | "lead.assigned" | "lead.won" | "lead.lost" | "lead.unqualified" | "stock.synced" | "stock.source_retired" | "vehicle.published" | "vehicle.unpublished" | "vehicle.publish_failed" | "vehicle.created" | "vehicle.attachment.created" | "mercadolibre.order" | "mercadolibre.vis_lead" | "chileautos.lead" | "yapo.lead" | "website.lead" | "demo_lead.created" | "demo_lead.pending_scheduling" | "demo_lead.routed" | "demo_booking.booked" | "demo_booking.rescheduled" | "demo_booking.cancelled" | "consignment.candidate.created" | "quote.issued" | "quote.voided" | "quote.extended" | "quote.archived" | "reservation.created" | "reservation.voided" | "reservation.abono_disposed" | "reservation.converted" | "sale_note.issued" | "sale_note.approved" | "sale_note.voided" | "purchase_note.issued" | "purchase_note.corrected" | "purchase_note.voided" | "payment.recorded" | "consignment.created" | "consignment.returned" | "consignment.sold" | "credit_application.recorded" | "credit_application.submitted" | "credit_application.decided" | "credit_application.withdrawn" | "price_approval.requested" | "price_approval.decided" | "contact.created" | "contact.updated" | "contact.merged" | "appointment.booked" | "appointment.rescheduled" | "appointment.cancelled" | "appointment.completed" | "appointment.no_show" | "appointment.reminded" | "appointment.imported" | "campaign.sent" | "campaign.paused" | "sending_domain.verified" | "coach.proposals_ready" | "coach.finding_ready" | "voice.autonomous_call" | "safety_hold.placed" | "safety_hold.ack_overdue" | "safety_hold.first_response_overdue" | "team.created" | "team.updated" | "team.deleted" | "custom_role.created" | "custom_role.updated" | "custom_role.deleted" | "macro.created" | "macro.updated" | "macro.deleted" | "assignment_rule.created" | "assignment_rule.updated" | "assignment_rule.deleted" | "sla_policy.created" | "sla_policy.updated" | "sla_policy.deleted" | "automation_trigger.created" | "automation_trigger.updated" | "automation_trigger.deleted" | "sending_domain.created" | "sending_domain.deleted" | "whatsapp_template.created" | "whatsapp_template.status_changed" | "whatsapp_template.deleted" | "whatsapp_flow.created" | "whatsapp_flow.published" | "whatsapp_flow.deprecated" | "whatsapp_flow.deleted" | "whatsapp_flow.completed" | "channel.connected" | "channel.updated" | "channel.disconnected" | "membership.created" | "membership.updated" | "membership.removed" | "clinic_professional.created" | "clinic_professional.updated" | "clinic_professional.deleted" | "clinic_service.created" | "clinic_service.updated" | "clinic_service.deleted" | "clinic_price_list.updated" | "clinic_pack_purchase.created" | "clinic_pack_purchase.session_consumed" | "clinic_pack_purchase.cancelled" | "clinic_budget.created" | "clinic_budget.sent" | "clinic_budget.accepted" | "clinic_budget.rejected" | "clinic_budget.voided" | "clinic_budget.mirror_changed" | "clinic_cash_session.opened" | "clinic_cash_session.closed" | "clinic_patient.created" | "clinic_patient.updated" | "clinic_patient.deleted" | "clinic_patient.merged" | "clinic_encounter.opened" | "clinic_encounter.closed" | "clinic_note.signed" | "clinic_note.amended" | "clinic_consent.signed" | "clinic_consent.revoked" | "clinic_document.uploaded" | "clinic_document.deleted" | "clinic_privacy_request.completed")[];
|
|
176662
|
+
events: ("*" | "ai_agent.publish" | "ai_agent_graph.publish" | "agent_scenario_run.completed" | "agent_scenario_suite.completed" | "conversation.created" | "conversation.assigned" | "conversation.resolved" | "message.received" | "message.sent" | "ticket.opened" | "ticket.reopened" | "ticket.resolved" | "ticket.closed" | "sla.breached" | "kb.source.create" | "kb.source.embed" | "kb.source.update" | "kb.source.delete" | "kb_file.uploaded" | "kb_file.deleted" | "skill.created" | "skill.updated" | "skill.deleted" | "custom_tool.created" | "custom_tool.updated" | "custom_tool.deleted" | "macro.applied" | "cost.budget_alert" | "runtime.budget_exceeded" | "lead.created" | "lead.stage_changed" | "lead.pipeline_changed" | "lead.assigned" | "lead.won" | "lead.lost" | "lead.unqualified" | "stock.synced" | "stock.source_retired" | "vehicle.published" | "vehicle.unpublished" | "vehicle.publish_failed" | "vehicle.created" | "vehicle.attachment.created" | "mercadolibre.order" | "mercadolibre.vis_lead" | "chileautos.lead" | "yapo.lead" | "website.lead" | "demo_lead.created" | "demo_lead.pending_scheduling" | "demo_lead.routed" | "demo_booking.booked" | "demo_booking.rescheduled" | "demo_booking.cancelled" | "demo_booking.held" | "demo_booking.no_show" | "consignment.candidate.created" | "quote.issued" | "quote.voided" | "quote.extended" | "quote.archived" | "reservation.created" | "reservation.voided" | "reservation.abono_disposed" | "reservation.converted" | "sale_note.issued" | "sale_note.approved" | "sale_note.voided" | "purchase_note.issued" | "purchase_note.corrected" | "purchase_note.voided" | "payment.recorded" | "consignment.created" | "consignment.returned" | "consignment.sold" | "credit_application.recorded" | "credit_application.submitted" | "credit_application.decided" | "credit_application.withdrawn" | "price_approval.requested" | "price_approval.decided" | "contact.created" | "contact.updated" | "contact.merged" | "appointment.booked" | "appointment.rescheduled" | "appointment.cancelled" | "appointment.completed" | "appointment.no_show" | "appointment.reminded" | "appointment.imported" | "campaign.sent" | "campaign.paused" | "sending_domain.verified" | "coach.proposals_ready" | "coach.finding_ready" | "voice.autonomous_call" | "safety_hold.placed" | "safety_hold.ack_overdue" | "safety_hold.first_response_overdue" | "team.created" | "team.updated" | "team.deleted" | "custom_role.created" | "custom_role.updated" | "custom_role.deleted" | "macro.created" | "macro.updated" | "macro.deleted" | "assignment_rule.created" | "assignment_rule.updated" | "assignment_rule.deleted" | "sla_policy.created" | "sla_policy.updated" | "sla_policy.deleted" | "automation_trigger.created" | "automation_trigger.updated" | "automation_trigger.deleted" | "sending_domain.created" | "sending_domain.deleted" | "whatsapp_template.created" | "whatsapp_template.status_changed" | "whatsapp_template.deleted" | "whatsapp_flow.created" | "whatsapp_flow.published" | "whatsapp_flow.deprecated" | "whatsapp_flow.deleted" | "whatsapp_flow.completed" | "channel.connected" | "channel.updated" | "channel.disconnected" | "membership.created" | "membership.updated" | "membership.removed" | "clinic_professional.created" | "clinic_professional.updated" | "clinic_professional.deleted" | "clinic_service.created" | "clinic_service.updated" | "clinic_service.deleted" | "clinic_price_list.updated" | "clinic_pack_purchase.created" | "clinic_pack_purchase.session_consumed" | "clinic_pack_purchase.cancelled" | "clinic_budget.created" | "clinic_budget.sent" | "clinic_budget.accepted" | "clinic_budget.rejected" | "clinic_budget.voided" | "clinic_budget.mirror_changed" | "clinic_cash_session.opened" | "clinic_cash_session.closed" | "clinic_patient.created" | "clinic_patient.updated" | "clinic_patient.deleted" | "clinic_patient.merged" | "clinic_encounter.opened" | "clinic_encounter.closed" | "clinic_note.signed" | "clinic_note.amended" | "clinic_consent.signed" | "clinic_consent.revoked" | "clinic_document.uploaded" | "clinic_document.deleted" | "clinic_privacy_request.completed")[];
|
|
175664
176663
|
description?: string | null;
|
|
175665
176664
|
/** @description «Incluir datos del recurso». `false` (the default) = every delivery is the notice: resource, changes, author, time and `url`, with `data_omitted: "not_requested"`. `true` = each delivery also carries `data` when, at dispatch time, this subscription's OWNER — whoever created it or last changed its url, events or this flag — holds the resource read scope (`read_scope` in the catalogue) and sees every record; otherwise `data_omitted` says why. An event about a dato sensible is always the notice. */
|
|
175666
176665
|
include_data?: boolean;
|
|
@@ -178690,6 +179689,8 @@ interface components {
|
|
|
178690
179689
|
accepted_value?: number | null;
|
|
178691
179690
|
/** @description How many accepted presupuestos / closed sales `accepted_value` is. Totals and campaign rows: the engine-credited list Resumen sums. */
|
|
178692
179691
|
accepted_count?: number | null;
|
|
179692
|
+
/** @description D60 · «Con diagnóstico»: people whose conversation the entity opened and who got a presupuesto presented. Absent = unknown. */
|
|
179693
|
+
diagnosed?: number | null;
|
|
178693
179694
|
/** @description `accepted_value` ÷ spend («Retorno en presupuestos»). `null` = unknown or no spend. */
|
|
178694
179695
|
accepted_return?: number | null;
|
|
178695
179696
|
patient_return?: components["schemas"]["AdsPatientReturn"];
|
|
@@ -178757,6 +179758,8 @@ interface components {
|
|
|
178757
179758
|
accepted_value?: number | null;
|
|
178758
179759
|
/** @description How many accepted presupuestos / closed sales `accepted_value` is. Totals and campaign rows: the engine-credited list Resumen sums. */
|
|
178759
179760
|
accepted_count?: number | null;
|
|
179761
|
+
/** @description D60 · «Con diagnóstico»: people whose conversation the entity opened and who got a presupuesto presented. Absent = unknown. */
|
|
179762
|
+
diagnosed?: number | null;
|
|
178760
179763
|
/** @description `accepted_value` ÷ spend («Retorno en presupuestos»). `null` = unknown or no spend. */
|
|
178761
179764
|
accepted_return?: number | null;
|
|
178762
179765
|
patient_return?: components["schemas"]["AdsPatientReturn"];
|
|
@@ -178839,6 +179842,8 @@ interface components {
|
|
|
178839
179842
|
accepted_value?: number | null;
|
|
178840
179843
|
/** @description How many accepted presupuestos / closed sales `accepted_value` is. Totals and campaign rows: the engine-credited list Resumen sums. */
|
|
178841
179844
|
accepted_count?: number | null;
|
|
179845
|
+
/** @description D60 · «Con diagnóstico»: people whose conversation the entity opened and who got a presupuesto presented. Absent = unknown. */
|
|
179846
|
+
diagnosed?: number | null;
|
|
178842
179847
|
/** @description `accepted_value` ÷ spend («Retorno en presupuestos»). `null` = unknown or no spend. */
|
|
178843
179848
|
accepted_return?: number | null;
|
|
178844
179849
|
patient_return?: components["schemas"]["AdsPatientReturn"];
|
|
@@ -178878,6 +179883,124 @@ interface components {
|
|
|
178878
179883
|
/** @description The public Facebook watch page: the fallback link. */
|
|
178879
179884
|
watch_url: string | null;
|
|
178880
179885
|
};
|
|
179886
|
+
AdsDemoFunnelRow: {
|
|
179887
|
+
/** @enum {string} */
|
|
179888
|
+
arm: "whatsapp" | "instant_form" | "website" | "other" | "unassigned";
|
|
179889
|
+
/** @description Meta id at this level; `null` on an arm row and on the «sin atribución» row. */
|
|
179890
|
+
external_id: string | null;
|
|
179891
|
+
name: string | null;
|
|
179892
|
+
parent: {
|
|
179893
|
+
external_id: string | null;
|
|
179894
|
+
name: string | null;
|
|
179895
|
+
} | null;
|
|
179896
|
+
/** @description The arm’s people with no id at this level. */
|
|
179897
|
+
unattributed: boolean;
|
|
179898
|
+
/** @description People with a lead (`lead_created`). */
|
|
179899
|
+
leads: number;
|
|
179900
|
+
/** @description Of those, ICP-qualified (`lead_qualified`). */
|
|
179901
|
+
qualified: number;
|
|
179902
|
+
/** @description People with a demo booked (`appointment_booked`). */
|
|
179903
|
+
booked: number;
|
|
179904
|
+
/** @description People whose demo was held (`appointment_attended`). */
|
|
179905
|
+
held: number;
|
|
179906
|
+
/** @description People with a first paid invoice (`first_payment`). */
|
|
179907
|
+
paid: number;
|
|
179908
|
+
/** @description Leads that got a reply (agent, human or API) within 24 h of the lead. */
|
|
179909
|
+
contacted_24h: number;
|
|
179910
|
+
/** @description `null` = unknown or none on this row. */
|
|
179911
|
+
spend: number | null;
|
|
179912
|
+
costs: {
|
|
179913
|
+
per_lead: number | null;
|
|
179914
|
+
per_qualified: number | null;
|
|
179915
|
+
per_booked: number | null;
|
|
179916
|
+
/** @description THE metric the A/B is judged on (D5). */
|
|
179917
|
+
per_held: number | null;
|
|
179918
|
+
per_paid: number | null;
|
|
179919
|
+
};
|
|
179920
|
+
rates: {
|
|
179921
|
+
/** @description qualified ÷ leads */
|
|
179922
|
+
qualified_share: number | null;
|
|
179923
|
+
/** @description contacted within 24 h ÷ leads */
|
|
179924
|
+
contacted_24h_rate: number | null;
|
|
179925
|
+
/** @description booked ÷ leads */
|
|
179926
|
+
lead_to_booked: number | null;
|
|
179927
|
+
/** @description held ÷ booked */
|
|
179928
|
+
show_rate: number | null;
|
|
179929
|
+
};
|
|
179930
|
+
};
|
|
179931
|
+
AdsDemoFunnel: {
|
|
179932
|
+
/** @enum {string} */
|
|
179933
|
+
level: "arm" | "campaign" | "ad_set" | "ad";
|
|
179934
|
+
/** @enum {string} */
|
|
179935
|
+
basis: "cohort" | "event";
|
|
179936
|
+
window: {
|
|
179937
|
+
from: string;
|
|
179938
|
+
to: string;
|
|
179939
|
+
};
|
|
179940
|
+
rows: components["schemas"]["AdsDemoFunnelRow"][];
|
|
179941
|
+
arms: components["schemas"]["AdsDemoFunnelRow"][];
|
|
179942
|
+
totals: {
|
|
179943
|
+
/** @description People with a lead (`lead_created`). */
|
|
179944
|
+
leads: number;
|
|
179945
|
+
/** @description Of those, ICP-qualified (`lead_qualified`). */
|
|
179946
|
+
qualified: number;
|
|
179947
|
+
/** @description People with a demo booked (`appointment_booked`). */
|
|
179948
|
+
booked: number;
|
|
179949
|
+
/** @description People whose demo was held (`appointment_attended`). */
|
|
179950
|
+
held: number;
|
|
179951
|
+
/** @description People with a first paid invoice (`first_payment`). */
|
|
179952
|
+
paid: number;
|
|
179953
|
+
/** @description Leads that got a reply (agent, human or API) within 24 h of the lead. */
|
|
179954
|
+
contacted_24h: number;
|
|
179955
|
+
spend: number | null;
|
|
179956
|
+
costs: {
|
|
179957
|
+
per_lead: number | null;
|
|
179958
|
+
per_qualified: number | null;
|
|
179959
|
+
per_booked: number | null;
|
|
179960
|
+
/** @description THE metric the A/B is judged on (D5). */
|
|
179961
|
+
per_held: number | null;
|
|
179962
|
+
per_paid: number | null;
|
|
179963
|
+
};
|
|
179964
|
+
rates: {
|
|
179965
|
+
/** @description qualified ÷ leads */
|
|
179966
|
+
qualified_share: number | null;
|
|
179967
|
+
/** @description contacted within 24 h ÷ leads */
|
|
179968
|
+
contacted_24h_rate: number | null;
|
|
179969
|
+
/** @description booked ÷ leads */
|
|
179970
|
+
lead_to_booked: number | null;
|
|
179971
|
+
/** @description held ÷ booked */
|
|
179972
|
+
show_rate: number | null;
|
|
179973
|
+
};
|
|
179974
|
+
};
|
|
179975
|
+
reconciliation: {
|
|
179976
|
+
overview_spend: number | null;
|
|
179977
|
+
spend_matches: boolean | null;
|
|
179978
|
+
events: {
|
|
179979
|
+
lead_created: {
|
|
179980
|
+
events: number;
|
|
179981
|
+
people: number;
|
|
179982
|
+
};
|
|
179983
|
+
lead_qualified: {
|
|
179984
|
+
events: number;
|
|
179985
|
+
people: number;
|
|
179986
|
+
};
|
|
179987
|
+
appointment_booked: {
|
|
179988
|
+
events: number;
|
|
179989
|
+
people: number;
|
|
179990
|
+
};
|
|
179991
|
+
appointment_attended: {
|
|
179992
|
+
events: number;
|
|
179993
|
+
people: number;
|
|
179994
|
+
};
|
|
179995
|
+
first_payment: {
|
|
179996
|
+
events: number;
|
|
179997
|
+
people: number;
|
|
179998
|
+
};
|
|
179999
|
+
} | null;
|
|
180000
|
+
counts_match: boolean | null;
|
|
180001
|
+
leads_without_ad: number;
|
|
180002
|
+
};
|
|
180003
|
+
};
|
|
178881
180004
|
/** @description «Retorno total de pacientes de anuncios (primer pago + cuotas)» over the money-covered window. On `current` only; `null` = unknown (the credit is still warming). */
|
|
178882
180005
|
AdsPatientReturnTotal: components["schemas"]["AdsPatientReturn"] & ({
|
|
178883
180006
|
/** @description Median days from the ad touch that counts it to each person’s first payment, over the first payments of the period. */
|