@vitrina/api 11.5.0 → 11.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 +928 -138
- package/dist/index.d.ts +928 -138
- package/package.json +8 -10
package/dist/index.d.ts
CHANGED
|
@@ -4598,7 +4598,7 @@ interface paths {
|
|
|
4598
4598
|
get?: never;
|
|
4599
4599
|
/**
|
|
4600
4600
|
* Assign a ticket to a teammate or a team
|
|
4601
|
-
* @description Send at least one of `handler`, `assignee_user_id`, `team_id`; an empty body is a 400. `null` on either id CLEARS it, omitting the key leaves it alone — two different requests, and the server tells them apart. Assigning drops a system line in the origin conversation naming the author («Camila», «Camila vía Claude», «CRM
|
|
4601
|
+
* @description Send at least one of `handler`, `assignee_user_id`, `team_id`; an empty body is a 400. `null` on either id CLEARS it, omitting the key leaves it alone — two different requests, and the server tells them apart. Assigning drops a system line in the origin conversation naming the author («Camila», «Camila vía Claude», «CRM propio (API)»).
|
|
4602
4602
|
*
|
|
4603
4603
|
* This is the key-friendly counterpart of `POST /tickets/{id}/claim`.
|
|
4604
4604
|
*/
|
|
@@ -5610,7 +5610,7 @@ interface paths {
|
|
|
5610
5610
|
* "conversation_id": "bbbbbbbb-0000-4000-8000-000000000001",
|
|
5611
5611
|
* "channel": "web",
|
|
5612
5612
|
* "role": "system",
|
|
5613
|
-
* "content": "CRM
|
|
5613
|
+
* "content": "CRM propio (API) reasignó la conversación",
|
|
5614
5614
|
* "type": "event",
|
|
5615
5615
|
* "tool_calls": null,
|
|
5616
5616
|
* "tool_call_id": null,
|
|
@@ -14265,6 +14265,8 @@ interface paths {
|
|
|
14265
14265
|
/**
|
|
14266
14266
|
* Create a vehicle (manual stock)
|
|
14267
14267
|
* @description plate_normalized is server-derived from registration_number; a plate already claimed by another ACTIVE vehicle of the tenant returns 409 (conflicto de patente). A plate the Chilean grammar cannot read derives plate_normalized = null, so the DB backstop cannot see it: the service then compares the RAW value (upper/trim) against the tenant active stock and answers the SAME 409, and flags the unit under attributes.curated.needsReview = ["plate"] with curated.plateReason = "plate_unrecognized". The plate is never refused on its own merits (allow-and-flag, ADR 0022) — only a duplicate is.
|
|
14268
|
+
*
|
|
14269
|
+
* **Publish in the same call (`publish_to`).** Optional. Name the marketplaces this vehicle should go to — portal slugs such as `chileautos` / `mercadolibre`, or integration ids from GET /marketplaces — and it is published right after it is saved, through the same path as POST /vehicles/{id}/publish. Omitted or `[]` saves only; there is no default. Every entry is validated first: a portal with no connected account, a slug matching several accounts, or an id from another workspace answers **422 and nothing is saved**. Once saved, the vehicle stays saved: a portal that fails to publish is an `error` entry in `publications`, never a failed request (still 201). The response then carries `publications`, one `PublishOutcome` per account (`published`, `pending` for queued transports such as `chileautos_panel` and Facebook Marketplace, `already_published`, or `error` with the reason). `publications` is absent when `publish_to` was not sent.
|
|
14268
14270
|
*/
|
|
14269
14271
|
post: {
|
|
14270
14272
|
parameters: {
|
|
@@ -14292,7 +14294,11 @@ interface paths {
|
|
|
14292
14294
|
* "color": "Gris",
|
|
14293
14295
|
* "registration_number": "FGXY21",
|
|
14294
14296
|
* "vin": "9BWZZZ377NP004512",
|
|
14295
|
-
* "location_id": "b1b1b1b1-0000-4000-8000-000000000001"
|
|
14297
|
+
* "location_id": "b1b1b1b1-0000-4000-8000-000000000001",
|
|
14298
|
+
* "publish_to": [
|
|
14299
|
+
* "chileautos",
|
|
14300
|
+
* "mercadolibre"
|
|
14301
|
+
* ]
|
|
14296
14302
|
* }
|
|
14297
14303
|
*/
|
|
14298
14304
|
"application/json": {
|
|
@@ -14346,11 +14352,19 @@ interface paths {
|
|
|
14346
14352
|
municipalidad_comuna_code?: string | null;
|
|
14347
14353
|
last_service_date?: string | null;
|
|
14348
14354
|
service_odometer_km?: number | null;
|
|
14355
|
+
/**
|
|
14356
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `facebook`, `facebook_marketplace`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
14357
|
+
* @example [
|
|
14358
|
+
* "chileautos",
|
|
14359
|
+
* "mercadolibre"
|
|
14360
|
+
* ]
|
|
14361
|
+
*/
|
|
14362
|
+
publish_to?: string[];
|
|
14349
14363
|
};
|
|
14350
14364
|
};
|
|
14351
14365
|
};
|
|
14352
14366
|
responses: {
|
|
14353
|
-
/** @description Vehicle */
|
|
14367
|
+
/** @description Vehicle. Carries `publications` only when `publish_to` was sent. */
|
|
14354
14368
|
201: {
|
|
14355
14369
|
headers: {
|
|
14356
14370
|
[name: string]: unknown;
|
|
@@ -14428,7 +14442,61 @@ interface paths {
|
|
|
14428
14442
|
* "updated_at": "2026-09-15T18:34:48.575Z",
|
|
14429
14443
|
* "live_sale_note": null,
|
|
14430
14444
|
* "active_reservation": null,
|
|
14431
|
-
* "not_on_lot": false
|
|
14445
|
+
* "not_on_lot": false,
|
|
14446
|
+
* "publications": [
|
|
14447
|
+
* {
|
|
14448
|
+
* "integration_id": "33333333-0000-4000-8000-000000000003",
|
|
14449
|
+
* "provider": "chileautos_panel",
|
|
14450
|
+
* "status": "pending",
|
|
14451
|
+
* "external_id": null,
|
|
14452
|
+
* "publication": {
|
|
14453
|
+
* "id": "88888888-0000-4000-8000-000000000003",
|
|
14454
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
14455
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
14456
|
+
* "marketplace_account_id": "33333333-0000-4000-8000-000000000003",
|
|
14457
|
+
* "provider": "chileautos_panel",
|
|
14458
|
+
* "external_id": null,
|
|
14459
|
+
* "status": "pending",
|
|
14460
|
+
* "origin": "vitrina",
|
|
14461
|
+
* "permalink": null,
|
|
14462
|
+
* "last_synced_at": null,
|
|
14463
|
+
* "last_published_at": null,
|
|
14464
|
+
* "last_error": null,
|
|
14465
|
+
* "close_retry_count": 0,
|
|
14466
|
+
* "portal_state": null,
|
|
14467
|
+
* "portal_state_at": null,
|
|
14468
|
+
* "raw_provider_payload": null,
|
|
14469
|
+
* "created_at": "2026-09-16T09:00:00.000Z",
|
|
14470
|
+
* "updated_at": "2026-09-19T10:00:00.000Z"
|
|
14471
|
+
* }
|
|
14472
|
+
* },
|
|
14473
|
+
* {
|
|
14474
|
+
* "integration_id": "33333333-0000-4000-8000-000000000001",
|
|
14475
|
+
* "provider": "mercadolibre",
|
|
14476
|
+
* "status": "published",
|
|
14477
|
+
* "external_id": "MLC-1234567890",
|
|
14478
|
+
* "publication": {
|
|
14479
|
+
* "id": "88888888-0000-4000-8000-000000000001",
|
|
14480
|
+
* "tenant_id": "a1a1a1a1-0000-4000-8000-000000000001",
|
|
14481
|
+
* "vehicle_id": "e1e1e1e1-0000-4000-8000-000000000001",
|
|
14482
|
+
* "marketplace_account_id": "33333333-0000-4000-8000-000000000001",
|
|
14483
|
+
* "provider": "mercadolibre",
|
|
14484
|
+
* "external_id": "MLC-1234567890",
|
|
14485
|
+
* "status": "published",
|
|
14486
|
+
* "origin": "vitrina",
|
|
14487
|
+
* "permalink": "https://articulo.mercadolibre.cl/MLC-1234567890",
|
|
14488
|
+
* "last_synced_at": "2026-09-19T10:00:00.000Z",
|
|
14489
|
+
* "last_published_at": "2026-09-16T09:00:00.000Z",
|
|
14490
|
+
* "last_error": null,
|
|
14491
|
+
* "close_retry_count": 0,
|
|
14492
|
+
* "portal_state": "active",
|
|
14493
|
+
* "portal_state_at": "2026-09-19T10:00:00.000Z",
|
|
14494
|
+
* "raw_provider_payload": null,
|
|
14495
|
+
* "created_at": "2026-09-16T09:00:00.000Z",
|
|
14496
|
+
* "updated_at": "2026-09-19T10:00:00.000Z"
|
|
14497
|
+
* }
|
|
14498
|
+
* }
|
|
14499
|
+
* ]
|
|
14432
14500
|
* }
|
|
14433
14501
|
* }
|
|
14434
14502
|
*/
|
|
@@ -14795,6 +14863,8 @@ interface paths {
|
|
|
14795
14863
|
/**
|
|
14796
14864
|
* Update a vehicle
|
|
14797
14865
|
* @description Updating registration_number re-derives plate_normalized; a collision with another ACTIVE vehicle of the tenant returns 409 (conflicto de patente).
|
|
14866
|
+
*
|
|
14867
|
+
* **`publish_to` only ADDS portals.** Same contract as on POST /vehicles (validated before the edit is written; 422 writes nothing; a portal failure is an `error` entry in `publications`, never a failed request). A portal where the vehicle is already live or has a queued publish is a no-op (`already_published`) — never a second ad, so an ERP may safely retry. A portal LEFT OUT of `publish_to` is NOT unpublished: removal is DELETE /vehicles/{id}/publications/{pubId}. A body with only `publish_to` publishes without editing the vehicle.
|
|
14798
14868
|
*/
|
|
14799
14869
|
put: {
|
|
14800
14870
|
parameters: {
|
|
@@ -14863,11 +14933,19 @@ interface paths {
|
|
|
14863
14933
|
municipalidad_comuna_code?: string | null;
|
|
14864
14934
|
last_service_date?: string | null;
|
|
14865
14935
|
service_odometer_km?: number | null;
|
|
14936
|
+
/**
|
|
14937
|
+
* @description OPTIONAL. Marketplaces to publish this vehicle to right after it is saved — the same effect as a follow-up POST /vehicles/{id}/publish, in one call. Omitted or `[]` means save only and publish nowhere: there is no default and no tenant-level setting. Each entry is either a portal slug (`chileautos`, `chileautos_panel`, `facebook`, `facebook_marketplace`, `linze`, `mercadolibre`, `yapo`) or a marketplace integration id (the `id` of a row from GET /marketplaces). A portal slug resolves to the connected account the workspace has for that portal, whichever transport it uses (`chileautos` reaches the certified API account or the `chileautos_panel` account). Every entry is validated BEFORE the vehicle is written, and any bad entry answers 422 with nothing saved: a slug with no connected account, a slug matching more than one account (pass the integration id instead), an id that is not one of this workspace's accounts, or a portal that does not accept this vehicle type. Entries resolving to the same account are deduplicated. A portal FAILING to publish never fails the save — see `publications` in the response. On PUT, `publish_to` only ADDS portals: a portal where the vehicle is already live or queued is a no-op (`already_published`), never a second ad, and a portal left out is NOT unpublished — removal is DELETE /vehicles/{id}/publications/{pubId}.
|
|
14938
|
+
* @example [
|
|
14939
|
+
* "chileautos",
|
|
14940
|
+
* "mercadolibre"
|
|
14941
|
+
* ]
|
|
14942
|
+
*/
|
|
14943
|
+
publish_to?: string[];
|
|
14866
14944
|
};
|
|
14867
14945
|
};
|
|
14868
14946
|
};
|
|
14869
14947
|
responses: {
|
|
14870
|
-
/** @description Vehicle */
|
|
14948
|
+
/** @description Vehicle. Carries `publications` only when `publish_to` was sent. */
|
|
14871
14949
|
200: {
|
|
14872
14950
|
headers: {
|
|
14873
14951
|
[name: string]: unknown;
|
|
@@ -20918,7 +20996,7 @@ interface paths {
|
|
|
20918
20996
|
};
|
|
20919
20997
|
/**
|
|
20920
20998
|
* List a lead's activity timeline
|
|
20921
|
-
* @description Newest first. Every line carries its `author` (ADR 0106 §3.1): the member who acted (with `via` when they acted through a connected app or a personal token — «Camila vía Claude»), the API key that acted («CRM
|
|
20999
|
+
* @description Newest first. Every line carries its `author` (ADR 0106 §3.1): the member who acted (with `via` when they acted through a connected app or a personal token — «Camila vía Claude»), the API key that acted («CRM propio (API)», named as it was then), the AI agent, or the system. `kind` says what happened and `data` is kind-specific; `id` is the timeline row's own legacy sequence number, not a uuid — `lead_id` beside it is the reference.
|
|
20922
21000
|
*/
|
|
20923
21001
|
get: {
|
|
20924
21002
|
parameters: {
|
|
@@ -20982,7 +21060,7 @@ interface paths {
|
|
|
20982
21060
|
* "author": {
|
|
20983
21061
|
* "kind": "api_key",
|
|
20984
21062
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
20985
|
-
* "name": "CRM
|
|
21063
|
+
* "name": "CRM propio"
|
|
20986
21064
|
* },
|
|
20987
21065
|
* "created_at": "2026-09-21T14:02:11.000Z"
|
|
20988
21066
|
* },
|
|
@@ -72431,7 +72509,7 @@ interface paths {
|
|
|
72431
72509
|
* "author": {
|
|
72432
72510
|
* "kind": "api_key",
|
|
72433
72511
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
72434
|
-
* "name": "CRM
|
|
72512
|
+
* "name": "CRM propio"
|
|
72435
72513
|
* },
|
|
72436
72514
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
72437
72515
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -72638,7 +72716,7 @@ interface paths {
|
|
|
72638
72716
|
* "author": {
|
|
72639
72717
|
* "kind": "api_key",
|
|
72640
72718
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
72641
|
-
* "name": "CRM
|
|
72719
|
+
* "name": "CRM propio"
|
|
72642
72720
|
* },
|
|
72643
72721
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
72644
72722
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -72879,7 +72957,7 @@ interface paths {
|
|
|
72879
72957
|
* "author": {
|
|
72880
72958
|
* "kind": "api_key",
|
|
72881
72959
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
72882
|
-
* "name": "CRM
|
|
72960
|
+
* "name": "CRM propio"
|
|
72883
72961
|
* },
|
|
72884
72962
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
72885
72963
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -73267,7 +73345,7 @@ interface paths {
|
|
|
73267
73345
|
* "author": {
|
|
73268
73346
|
* "kind": "api_key",
|
|
73269
73347
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
73270
|
-
* "name": "CRM
|
|
73348
|
+
* "name": "CRM propio"
|
|
73271
73349
|
* },
|
|
73272
73350
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
73273
73351
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -73454,7 +73532,7 @@ interface paths {
|
|
|
73454
73532
|
* "author": {
|
|
73455
73533
|
* "kind": "api_key",
|
|
73456
73534
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
73457
|
-
* "name": "CRM
|
|
73535
|
+
* "name": "CRM propio"
|
|
73458
73536
|
* },
|
|
73459
73537
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
73460
73538
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -73768,7 +73846,7 @@ interface paths {
|
|
|
73768
73846
|
* "author": {
|
|
73769
73847
|
* "kind": "api_key",
|
|
73770
73848
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
73771
|
-
* "name": "CRM
|
|
73849
|
+
* "name": "CRM propio"
|
|
73772
73850
|
* },
|
|
73773
73851
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
73774
73852
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -73945,7 +74023,7 @@ interface paths {
|
|
|
73945
74023
|
* "author": {
|
|
73946
74024
|
* "kind": "api_key",
|
|
73947
74025
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
73948
|
-
* "name": "CRM
|
|
74026
|
+
* "name": "CRM propio"
|
|
73949
74027
|
* },
|
|
73950
74028
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
73951
74029
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -74116,7 +74194,7 @@ interface paths {
|
|
|
74116
74194
|
* "author": {
|
|
74117
74195
|
* "kind": "api_key",
|
|
74118
74196
|
* "id": "c1c1c1c1-0000-4000-8000-000000000001",
|
|
74119
|
-
* "name": "CRM
|
|
74197
|
+
* "name": "CRM propio"
|
|
74120
74198
|
* },
|
|
74121
74199
|
* "created_at": "2026-09-22T11:08:10.882Z",
|
|
74122
74200
|
* "updated_at": "2026-09-22T11:08:10.882Z"
|
|
@@ -87575,6 +87653,8 @@ interface paths {
|
|
|
87575
87653
|
to: string;
|
|
87576
87654
|
/** @description Atribu attribution model. Defaults to `last_touch`. */
|
|
87577
87655
|
model?: string;
|
|
87656
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
87657
|
+
sample?: "1" | "true";
|
|
87578
87658
|
/** @description Documentary only — `/ads/overview` always returns `previous` (the immediately-preceding window of equal length) alongside `current`; there is nothing to switch on. */
|
|
87579
87659
|
compare?: "previous_period";
|
|
87580
87660
|
};
|
|
@@ -87779,6 +87859,8 @@ interface paths {
|
|
|
87779
87859
|
to: string;
|
|
87780
87860
|
/** @description Atribu attribution model. Defaults to `last_touch`. */
|
|
87781
87861
|
model?: string;
|
|
87862
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
87863
|
+
sample?: "1" | "true";
|
|
87782
87864
|
limit?: number;
|
|
87783
87865
|
};
|
|
87784
87866
|
header?: never;
|
|
@@ -87939,6 +88021,8 @@ interface paths {
|
|
|
87939
88021
|
to: string;
|
|
87940
88022
|
/** @description Atribu attribution model. Defaults to `last_touch`. */
|
|
87941
88023
|
model?: string;
|
|
88024
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
88025
|
+
sample?: "1" | "true";
|
|
87942
88026
|
/** @description The campaign’s PLATFORM id — the `campaign_external_id` an `/ads/campaigns` row returns, never Atribu’s internal `campaign_id`. */
|
|
87943
88027
|
campaign_id: string;
|
|
87944
88028
|
};
|
|
@@ -88083,7 +88167,584 @@ interface paths {
|
|
|
88083
88167
|
patch?: never;
|
|
88084
88168
|
trace?: never;
|
|
88085
88169
|
};
|
|
88086
|
-
"/ads/creatives": {
|
|
88170
|
+
"/ads/creatives": {
|
|
88171
|
+
parameters: {
|
|
88172
|
+
query?: never;
|
|
88173
|
+
header?: never;
|
|
88174
|
+
path?: never;
|
|
88175
|
+
cookie?: never;
|
|
88176
|
+
};
|
|
88177
|
+
/**
|
|
88178
|
+
* Top-performing ads (cohort-normalized creative scoring)
|
|
88179
|
+
* @description Proxies Atribu’s `top-performers` operation — a ROLLING lookback (`window`), not a date range: that is the real endpoint’s own shape. Each ad carries three distinct measures, presented separately — `composite_score` (0-100, a transparent rule blend), `top_performer_likelihood` (0-1, a probability, never ROAS) and `attributed_revenue`/`roas` (real cash attribution, present when `truth_grade` is `attributed`).
|
|
88180
|
+
*
|
|
88181
|
+
* This is the PROFILE-scoped read — every Vitrina tenant’s delegated key is minted for exactly one Atribu profile, so it cannot call Atribu’s cross-profile `/workspaces/{id}/top-performers` (that route is session-bearer-only and answers `403 insufficient_scope` to any API key).
|
|
88182
|
+
*/
|
|
88183
|
+
get: {
|
|
88184
|
+
parameters: {
|
|
88185
|
+
query?: {
|
|
88186
|
+
/** @description A rolling lookback, not a date range — Atribu’s `top-performers` operation takes no `from`/`to`. Defaults to `28d`. */
|
|
88187
|
+
window?: "7d" | "14d" | "28d" | "lifetime";
|
|
88188
|
+
limit?: number;
|
|
88189
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
88190
|
+
sample?: "1" | "true";
|
|
88191
|
+
};
|
|
88192
|
+
header?: never;
|
|
88193
|
+
path?: never;
|
|
88194
|
+
cookie?: never;
|
|
88195
|
+
};
|
|
88196
|
+
requestBody?: never;
|
|
88197
|
+
responses: {
|
|
88198
|
+
/** @description The window’s top-performing ads */
|
|
88199
|
+
200: {
|
|
88200
|
+
headers: {
|
|
88201
|
+
[name: string]: unknown;
|
|
88202
|
+
};
|
|
88203
|
+
content: {
|
|
88204
|
+
/**
|
|
88205
|
+
* @example {
|
|
88206
|
+
* "data": {
|
|
88207
|
+
* "data": [
|
|
88208
|
+
* {
|
|
88209
|
+
* "ad_external_id": "120212000000000009",
|
|
88210
|
+
* "ad_name": "Video testimonio 15s",
|
|
88211
|
+
* "campaign_name": "Leads · Septiembre",
|
|
88212
|
+
* "ad_set_name": "Santiago 25-45",
|
|
88213
|
+
* "creative_thumbnail_url": null,
|
|
88214
|
+
* "score_window": "28d",
|
|
88215
|
+
* "composite_score": 0.82,
|
|
88216
|
+
* "top_performer_likelihood": 0.71,
|
|
88217
|
+
* "maturity_stage": "mature",
|
|
88218
|
+
* "truth_grade": "attributed",
|
|
88219
|
+
* "primary_outcome_kind": "closed_won",
|
|
88220
|
+
* "spend": 150000,
|
|
88221
|
+
* "impressions": 48200,
|
|
88222
|
+
* "ctr": 1.9,
|
|
88223
|
+
* "attributed_revenue": 480000,
|
|
88224
|
+
* "roas": 3.2,
|
|
88225
|
+
* "fatigue_state": "active",
|
|
88226
|
+
* "fatigue_risk_tier": "low"
|
|
88227
|
+
* }
|
|
88228
|
+
* ]
|
|
88229
|
+
* }
|
|
88230
|
+
* }
|
|
88231
|
+
*/
|
|
88232
|
+
"application/json": {
|
|
88233
|
+
data: components["schemas"]["AdsCreatives"];
|
|
88234
|
+
};
|
|
88235
|
+
};
|
|
88236
|
+
};
|
|
88237
|
+
/** @description Validation error */
|
|
88238
|
+
400: {
|
|
88239
|
+
headers: {
|
|
88240
|
+
[name: string]: unknown;
|
|
88241
|
+
};
|
|
88242
|
+
content: {
|
|
88243
|
+
"application/json": components["schemas"]["Error"];
|
|
88244
|
+
};
|
|
88245
|
+
};
|
|
88246
|
+
/** @description Unauthorized */
|
|
88247
|
+
401: {
|
|
88248
|
+
headers: {
|
|
88249
|
+
[name: string]: unknown;
|
|
88250
|
+
};
|
|
88251
|
+
content: {
|
|
88252
|
+
"application/json": components["schemas"]["Error"];
|
|
88253
|
+
};
|
|
88254
|
+
};
|
|
88255
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
88256
|
+
402: {
|
|
88257
|
+
headers: {
|
|
88258
|
+
[name: string]: unknown;
|
|
88259
|
+
};
|
|
88260
|
+
content: {
|
|
88261
|
+
/**
|
|
88262
|
+
* @example {
|
|
88263
|
+
* "error": {
|
|
88264
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
88265
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
88266
|
+
* "details": {
|
|
88267
|
+
* "required": [
|
|
88268
|
+
* "vitrina_ads"
|
|
88269
|
+
* ],
|
|
88270
|
+
* "active": [],
|
|
88271
|
+
* "feature": "vitrina_ads",
|
|
88272
|
+
* "entitlement_state": "off"
|
|
88273
|
+
* }
|
|
88274
|
+
* }
|
|
88275
|
+
* }
|
|
88276
|
+
*/
|
|
88277
|
+
"application/json": components["schemas"]["Error"];
|
|
88278
|
+
};
|
|
88279
|
+
};
|
|
88280
|
+
/** @description Forbidden */
|
|
88281
|
+
403: {
|
|
88282
|
+
headers: {
|
|
88283
|
+
[name: string]: unknown;
|
|
88284
|
+
};
|
|
88285
|
+
content: {
|
|
88286
|
+
"application/json": components["schemas"]["Error"];
|
|
88287
|
+
};
|
|
88288
|
+
};
|
|
88289
|
+
/** @description Not found */
|
|
88290
|
+
404: {
|
|
88291
|
+
headers: {
|
|
88292
|
+
[name: string]: unknown;
|
|
88293
|
+
};
|
|
88294
|
+
content: {
|
|
88295
|
+
"application/json": components["schemas"]["Error"];
|
|
88296
|
+
};
|
|
88297
|
+
};
|
|
88298
|
+
/** @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. */
|
|
88299
|
+
409: {
|
|
88300
|
+
headers: {
|
|
88301
|
+
[name: string]: unknown;
|
|
88302
|
+
};
|
|
88303
|
+
content: {
|
|
88304
|
+
/**
|
|
88305
|
+
* @example {
|
|
88306
|
+
* "error": {
|
|
88307
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
88308
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
88309
|
+
* "details": {
|
|
88310
|
+
* "key_kind": "core"
|
|
88311
|
+
* }
|
|
88312
|
+
* }
|
|
88313
|
+
* }
|
|
88314
|
+
*/
|
|
88315
|
+
"application/json": components["schemas"]["Error"];
|
|
88316
|
+
};
|
|
88317
|
+
};
|
|
88318
|
+
/** @description Rate limited */
|
|
88319
|
+
429: {
|
|
88320
|
+
headers: {
|
|
88321
|
+
[name: string]: unknown;
|
|
88322
|
+
};
|
|
88323
|
+
content: {
|
|
88324
|
+
"application/json": components["schemas"]["Error"];
|
|
88325
|
+
};
|
|
88326
|
+
};
|
|
88327
|
+
};
|
|
88328
|
+
};
|
|
88329
|
+
put?: never;
|
|
88330
|
+
post?: never;
|
|
88331
|
+
delete?: never;
|
|
88332
|
+
options?: never;
|
|
88333
|
+
head?: never;
|
|
88334
|
+
patch?: never;
|
|
88335
|
+
trace?: never;
|
|
88336
|
+
};
|
|
88337
|
+
"/ads/health": {
|
|
88338
|
+
parameters: {
|
|
88339
|
+
query?: never;
|
|
88340
|
+
header?: never;
|
|
88341
|
+
path?: never;
|
|
88342
|
+
cookie?: never;
|
|
88343
|
+
};
|
|
88344
|
+
/**
|
|
88345
|
+
* Attribution trust, UTM quality and attribution coverage
|
|
88346
|
+
* @description One combined read over three Atribu operations, so a dashboard panel needs one call, not three:
|
|
88347
|
+
*
|
|
88348
|
+
* * `trust` — Atribu’s `trust` operation: how much of the profile’s cash is traceable to an ad (`traceable_pct_by_value`/`_by_count`), whether the instrumentation producing that number is sound (`instrumentation.tracking_healthy`), and which way the traceable half is moving (`traceable_roas_trend`). READ `instrumentation` BEFORE rendering `traceable_pct_by_value` as an indictment — a low number reads as "great organic" when tracking is healthy and "broken tracking" when it is not.
|
|
88349
|
+
* * `utm` — Atribu’s `quality/utm` operation: the cached UTM-health badge (malformed/missing/dangling-ad-id anomaly counts over the traffic side) plus the dangling-ad-ids rollup (attributed cash that cannot be placed in the ad hierarchy).
|
|
88350
|
+
* * `attribution_coverage` — Atribu’s `quality/attribution` operation: the conversion side — how many of the window’s conversions carry a real ad id, an `fbclid` only, or nothing, partitioning `total_conversions`.
|
|
88351
|
+
*
|
|
88352
|
+
* ⚠ Named `/attribution-coverage` in this ticket’s original prose — the live Atribu spec names this operation `quality/attribution`; there is no separate `/attribution-coverage` path. Same read, corrected name.
|
|
88353
|
+
*/
|
|
88354
|
+
get: {
|
|
88355
|
+
parameters: {
|
|
88356
|
+
query: {
|
|
88357
|
+
/** @description Window start (inclusive), YYYY-MM-DD. */
|
|
88358
|
+
from: string;
|
|
88359
|
+
/** @description Window end (inclusive), YYYY-MM-DD. */
|
|
88360
|
+
to: string;
|
|
88361
|
+
/** @description Atribu attribution model. Defaults to `last_touch`. */
|
|
88362
|
+
model?: string;
|
|
88363
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
88364
|
+
sample?: "1" | "true";
|
|
88365
|
+
/** @description Instrumentation-health + UTM-badge cached window, days (1-30, capped by the Ephemeral Buffer’s retention). Defaults to 30. */
|
|
88366
|
+
days?: number;
|
|
88367
|
+
/** @description Traceable-ROAS trend window, days, split in half for the recent-vs-prior comparison. Defaults to 28. */
|
|
88368
|
+
window_days?: number;
|
|
88369
|
+
};
|
|
88370
|
+
header?: never;
|
|
88371
|
+
path?: never;
|
|
88372
|
+
cookie?: never;
|
|
88373
|
+
};
|
|
88374
|
+
requestBody?: never;
|
|
88375
|
+
responses: {
|
|
88376
|
+
/** @description Trust, UTM quality and attribution coverage, together */
|
|
88377
|
+
200: {
|
|
88378
|
+
headers: {
|
|
88379
|
+
[name: string]: unknown;
|
|
88380
|
+
};
|
|
88381
|
+
content: {
|
|
88382
|
+
/**
|
|
88383
|
+
* @example {
|
|
88384
|
+
* "data": {
|
|
88385
|
+
* "trust": {
|
|
88386
|
+
* "model": "last_touch",
|
|
88387
|
+
* "currency": "CLP",
|
|
88388
|
+
* "traceable_pct_by_count": 41.5,
|
|
88389
|
+
* "traceable_pct_by_value": 38.2,
|
|
88390
|
+
* "total_count": 53,
|
|
88391
|
+
* "total_value": 5000000,
|
|
88392
|
+
* "instrumentation": {
|
|
88393
|
+
* "score": 0.86,
|
|
88394
|
+
* "verdict": "healthy_tracking",
|
|
88395
|
+
* "tracking_healthy": true,
|
|
88396
|
+
* "coverage_interpretation": "La mayoría de las ventas llegan con su origen publicitario.",
|
|
88397
|
+
* "missing": []
|
|
88398
|
+
* },
|
|
88399
|
+
* "traceable_roas_trend": {
|
|
88400
|
+
* "recent_roas": 3.4,
|
|
88401
|
+
* "prior_roas": 2.9,
|
|
88402
|
+
* "recent_spend": 845200,
|
|
88403
|
+
* "recent_traceable_revenue": 2873680,
|
|
88404
|
+
* "days_with_cash": 11
|
|
88405
|
+
* }
|
|
88406
|
+
* },
|
|
88407
|
+
* "utm": {
|
|
88408
|
+
* "scan_window_days": 14,
|
|
88409
|
+
* "events_scanned": 312,
|
|
88410
|
+
* "high_count": 3,
|
|
88411
|
+
* "medium_count": 7,
|
|
88412
|
+
* "refreshed_at": "2026-09-22T06:00:00.000Z",
|
|
88413
|
+
* "dangling_ad_ids": {
|
|
88414
|
+
* "window_days": 28,
|
|
88415
|
+
* "model": "last_touch",
|
|
88416
|
+
* "dangling_conversions": 2,
|
|
88417
|
+
* "attributed_cash": 90000,
|
|
88418
|
+
* "reporting_currency": "CLP",
|
|
88419
|
+
* "distinct_ad_ids": 1
|
|
88420
|
+
* }
|
|
88421
|
+
* },
|
|
88422
|
+
* "attribution_coverage": {
|
|
88423
|
+
* "total_conversions": 200,
|
|
88424
|
+
* "with_full_utms": 162,
|
|
88425
|
+
* "with_fbclid_only": 18,
|
|
88426
|
+
* "with_no_tracking": 20,
|
|
88427
|
+
* "coverage_percent": 90
|
|
88428
|
+
* }
|
|
88429
|
+
* }
|
|
88430
|
+
* }
|
|
88431
|
+
*/
|
|
88432
|
+
"application/json": {
|
|
88433
|
+
data: components["schemas"]["AdsHealth"];
|
|
88434
|
+
};
|
|
88435
|
+
};
|
|
88436
|
+
};
|
|
88437
|
+
/** @description Validation error */
|
|
88438
|
+
400: {
|
|
88439
|
+
headers: {
|
|
88440
|
+
[name: string]: unknown;
|
|
88441
|
+
};
|
|
88442
|
+
content: {
|
|
88443
|
+
"application/json": components["schemas"]["Error"];
|
|
88444
|
+
};
|
|
88445
|
+
};
|
|
88446
|
+
/** @description Unauthorized */
|
|
88447
|
+
401: {
|
|
88448
|
+
headers: {
|
|
88449
|
+
[name: string]: unknown;
|
|
88450
|
+
};
|
|
88451
|
+
content: {
|
|
88452
|
+
"application/json": components["schemas"]["Error"];
|
|
88453
|
+
};
|
|
88454
|
+
};
|
|
88455
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
88456
|
+
402: {
|
|
88457
|
+
headers: {
|
|
88458
|
+
[name: string]: unknown;
|
|
88459
|
+
};
|
|
88460
|
+
content: {
|
|
88461
|
+
/**
|
|
88462
|
+
* @example {
|
|
88463
|
+
* "error": {
|
|
88464
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
88465
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
88466
|
+
* "details": {
|
|
88467
|
+
* "required": [
|
|
88468
|
+
* "vitrina_ads"
|
|
88469
|
+
* ],
|
|
88470
|
+
* "active": [],
|
|
88471
|
+
* "feature": "vitrina_ads",
|
|
88472
|
+
* "entitlement_state": "off"
|
|
88473
|
+
* }
|
|
88474
|
+
* }
|
|
88475
|
+
* }
|
|
88476
|
+
*/
|
|
88477
|
+
"application/json": components["schemas"]["Error"];
|
|
88478
|
+
};
|
|
88479
|
+
};
|
|
88480
|
+
/** @description Forbidden */
|
|
88481
|
+
403: {
|
|
88482
|
+
headers: {
|
|
88483
|
+
[name: string]: unknown;
|
|
88484
|
+
};
|
|
88485
|
+
content: {
|
|
88486
|
+
"application/json": components["schemas"]["Error"];
|
|
88487
|
+
};
|
|
88488
|
+
};
|
|
88489
|
+
/** @description Not found */
|
|
88490
|
+
404: {
|
|
88491
|
+
headers: {
|
|
88492
|
+
[name: string]: unknown;
|
|
88493
|
+
};
|
|
88494
|
+
content: {
|
|
88495
|
+
"application/json": components["schemas"]["Error"];
|
|
88496
|
+
};
|
|
88497
|
+
};
|
|
88498
|
+
/** @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. */
|
|
88499
|
+
409: {
|
|
88500
|
+
headers: {
|
|
88501
|
+
[name: string]: unknown;
|
|
88502
|
+
};
|
|
88503
|
+
content: {
|
|
88504
|
+
/**
|
|
88505
|
+
* @example {
|
|
88506
|
+
* "error": {
|
|
88507
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
88508
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
88509
|
+
* "details": {
|
|
88510
|
+
* "key_kind": "core"
|
|
88511
|
+
* }
|
|
88512
|
+
* }
|
|
88513
|
+
* }
|
|
88514
|
+
*/
|
|
88515
|
+
"application/json": components["schemas"]["Error"];
|
|
88516
|
+
};
|
|
88517
|
+
};
|
|
88518
|
+
/** @description Rate limited */
|
|
88519
|
+
429: {
|
|
88520
|
+
headers: {
|
|
88521
|
+
[name: string]: unknown;
|
|
88522
|
+
};
|
|
88523
|
+
content: {
|
|
88524
|
+
"application/json": components["schemas"]["Error"];
|
|
88525
|
+
};
|
|
88526
|
+
};
|
|
88527
|
+
};
|
|
88528
|
+
};
|
|
88529
|
+
put?: never;
|
|
88530
|
+
post?: never;
|
|
88531
|
+
delete?: never;
|
|
88532
|
+
options?: never;
|
|
88533
|
+
head?: never;
|
|
88534
|
+
patch?: never;
|
|
88535
|
+
trace?: never;
|
|
88536
|
+
};
|
|
88537
|
+
"/ads/briefing": {
|
|
88538
|
+
parameters: {
|
|
88539
|
+
query?: never;
|
|
88540
|
+
header?: never;
|
|
88541
|
+
path?: never;
|
|
88542
|
+
cookie?: never;
|
|
88543
|
+
};
|
|
88544
|
+
/**
|
|
88545
|
+
* The briefing: ≤3 sentences about a screen’s figures
|
|
88546
|
+
* @description A short Spanish briefing for one Ads screen, written from PINNED aggregate facts: every figure in `lead`/`lines` is quoted verbatim from `facts[].display`, and `facts` is returned alongside so a client can show «¿Por qué?». Facts are aggregates only — campaign and ad names, never a person.
|
|
88547
|
+
*
|
|
88548
|
+
* `source` says who wrote the sentences: `model` (a narrator bound by a guard that rejects any number, name or sentence outside the rules) or `template` (deterministic — first week, Meta disconnected, no spend reading, the model slow or rejected). Both read identically. A briefing is cached per facts hash for 24 h, so two tabs and a reload read the same text; when the model misses its budget the template answers and the model briefing is finished in the background for the next load.
|
|
88549
|
+
*
|
|
88550
|
+
* `lead.figure` names the number the lead is built around (`display` is its exact substring in `lead.text`). `lines[].ask` is a suggested follow-up question. `from`/`to` are required except for `creativos`, which takes the rolling `window`.
|
|
88551
|
+
*/
|
|
88552
|
+
get: {
|
|
88553
|
+
parameters: {
|
|
88554
|
+
query: {
|
|
88555
|
+
/** @description Which Ads screen the briefing is for. */
|
|
88556
|
+
screen: "resumen" | "campanas" | "atribuidos" | "creativos" | "salud";
|
|
88557
|
+
/** @description Window start (inclusive), YYYY-MM-DD. Required except for `creativos`. */
|
|
88558
|
+
from?: string;
|
|
88559
|
+
/** @description Window end (inclusive), YYYY-MM-DD. Required except for `creativos`. */
|
|
88560
|
+
to?: string;
|
|
88561
|
+
/** @description `creativos` only: the rolling lookback. Defaults to `28d`. */
|
|
88562
|
+
window?: "7d" | "14d" | "28d" | "lifetime";
|
|
88563
|
+
/** @description Attribution model. Defaults to `last_touch`. */
|
|
88564
|
+
model?: string;
|
|
88565
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
88566
|
+
sample?: "1" | "true";
|
|
88567
|
+
};
|
|
88568
|
+
header?: never;
|
|
88569
|
+
path?: never;
|
|
88570
|
+
cookie?: never;
|
|
88571
|
+
};
|
|
88572
|
+
requestBody?: never;
|
|
88573
|
+
responses: {
|
|
88574
|
+
/** @description The screen’s briefing */
|
|
88575
|
+
200: {
|
|
88576
|
+
headers: {
|
|
88577
|
+
[name: string]: unknown;
|
|
88578
|
+
};
|
|
88579
|
+
content: {
|
|
88580
|
+
/**
|
|
88581
|
+
* @example {
|
|
88582
|
+
* "data": {
|
|
88583
|
+
* "screen": "resumen",
|
|
88584
|
+
* "window": {
|
|
88585
|
+
* "from": "2026-08-24",
|
|
88586
|
+
* "to": "2026-09-22"
|
|
88587
|
+
* },
|
|
88588
|
+
* "lead": {
|
|
88589
|
+
* "text": "Tus anuncios devolvieron **3,7×** lo invertido: $845.200 se convirtieron en $3.120.000 en presupuestos aceptados.",
|
|
88590
|
+
* "fact_keys": [
|
|
88591
|
+
* "roas",
|
|
88592
|
+
* "spend",
|
|
88593
|
+
* "revenue"
|
|
88594
|
+
* ],
|
|
88595
|
+
* "figure": {
|
|
88596
|
+
* "fact_key": "roas",
|
|
88597
|
+
* "value": 3.69,
|
|
88598
|
+
* "format": "times",
|
|
88599
|
+
* "display": "3,7×",
|
|
88600
|
+
* "offset": 27
|
|
88601
|
+
* }
|
|
88602
|
+
* },
|
|
88603
|
+
* "lines": [
|
|
88604
|
+
* {
|
|
88605
|
+
* "text": "La mejor campaña fue «Evaluación sin costo · Meta», con 5,4× de retorno, y 36,4% de tus tratamientos vino de anuncios.",
|
|
88606
|
+
* "fact_keys": [
|
|
88607
|
+
* "best_campaign_name",
|
|
88608
|
+
* "best_campaign_roas",
|
|
88609
|
+
* "ads_share"
|
|
88610
|
+
* ],
|
|
88611
|
+
* "ask": "¿Qué campaña me conviene subir?"
|
|
88612
|
+
* }
|
|
88613
|
+
* ],
|
|
88614
|
+
* "facts": [
|
|
88615
|
+
* {
|
|
88616
|
+
* "key": "roas",
|
|
88617
|
+
* "label": "Retorno",
|
|
88618
|
+
* "value": 3.69,
|
|
88619
|
+
* "display": "3,7×",
|
|
88620
|
+
* "format": "times",
|
|
88621
|
+
* "source": "overview.current.roas",
|
|
88622
|
+
* "privacy": "aggregate"
|
|
88623
|
+
* },
|
|
88624
|
+
* {
|
|
88625
|
+
* "key": "spend",
|
|
88626
|
+
* "label": "Inversión en anuncios",
|
|
88627
|
+
* "value": 845200,
|
|
88628
|
+
* "display": "$845.200",
|
|
88629
|
+
* "format": "clp",
|
|
88630
|
+
* "source": "overview.current.spend",
|
|
88631
|
+
* "privacy": "aggregate"
|
|
88632
|
+
* }
|
|
88633
|
+
* ],
|
|
88634
|
+
* "actions": [],
|
|
88635
|
+
* "source": "model",
|
|
88636
|
+
* "generated_at": "2026-09-22T16:40:12.000Z",
|
|
88637
|
+
* "vocabulary": "healthcare",
|
|
88638
|
+
* "sample": false
|
|
88639
|
+
* }
|
|
88640
|
+
* }
|
|
88641
|
+
*/
|
|
88642
|
+
"application/json": {
|
|
88643
|
+
data: components["schemas"]["AdsBriefing"];
|
|
88644
|
+
};
|
|
88645
|
+
};
|
|
88646
|
+
};
|
|
88647
|
+
/** @description Validation error */
|
|
88648
|
+
400: {
|
|
88649
|
+
headers: {
|
|
88650
|
+
[name: string]: unknown;
|
|
88651
|
+
};
|
|
88652
|
+
content: {
|
|
88653
|
+
"application/json": components["schemas"]["Error"];
|
|
88654
|
+
};
|
|
88655
|
+
};
|
|
88656
|
+
/** @description Unauthorized */
|
|
88657
|
+
401: {
|
|
88658
|
+
headers: {
|
|
88659
|
+
[name: string]: unknown;
|
|
88660
|
+
};
|
|
88661
|
+
content: {
|
|
88662
|
+
"application/json": components["schemas"]["Error"];
|
|
88663
|
+
};
|
|
88664
|
+
};
|
|
88665
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
88666
|
+
402: {
|
|
88667
|
+
headers: {
|
|
88668
|
+
[name: string]: unknown;
|
|
88669
|
+
};
|
|
88670
|
+
content: {
|
|
88671
|
+
/**
|
|
88672
|
+
* @example {
|
|
88673
|
+
* "error": {
|
|
88674
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
88675
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
88676
|
+
* "details": {
|
|
88677
|
+
* "required": [
|
|
88678
|
+
* "vitrina_ads"
|
|
88679
|
+
* ],
|
|
88680
|
+
* "active": [],
|
|
88681
|
+
* "feature": "vitrina_ads",
|
|
88682
|
+
* "entitlement_state": "off"
|
|
88683
|
+
* }
|
|
88684
|
+
* }
|
|
88685
|
+
* }
|
|
88686
|
+
*/
|
|
88687
|
+
"application/json": components["schemas"]["Error"];
|
|
88688
|
+
};
|
|
88689
|
+
};
|
|
88690
|
+
/** @description Forbidden */
|
|
88691
|
+
403: {
|
|
88692
|
+
headers: {
|
|
88693
|
+
[name: string]: unknown;
|
|
88694
|
+
};
|
|
88695
|
+
content: {
|
|
88696
|
+
"application/json": components["schemas"]["Error"];
|
|
88697
|
+
};
|
|
88698
|
+
};
|
|
88699
|
+
/** @description Not found */
|
|
88700
|
+
404: {
|
|
88701
|
+
headers: {
|
|
88702
|
+
[name: string]: unknown;
|
|
88703
|
+
};
|
|
88704
|
+
content: {
|
|
88705
|
+
"application/json": components["schemas"]["Error"];
|
|
88706
|
+
};
|
|
88707
|
+
};
|
|
88708
|
+
/** @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. */
|
|
88709
|
+
409: {
|
|
88710
|
+
headers: {
|
|
88711
|
+
[name: string]: unknown;
|
|
88712
|
+
};
|
|
88713
|
+
content: {
|
|
88714
|
+
/**
|
|
88715
|
+
* @example {
|
|
88716
|
+
* "error": {
|
|
88717
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
88718
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
88719
|
+
* "details": {
|
|
88720
|
+
* "key_kind": "core"
|
|
88721
|
+
* }
|
|
88722
|
+
* }
|
|
88723
|
+
* }
|
|
88724
|
+
*/
|
|
88725
|
+
"application/json": components["schemas"]["Error"];
|
|
88726
|
+
};
|
|
88727
|
+
};
|
|
88728
|
+
/** @description Rate limited */
|
|
88729
|
+
429: {
|
|
88730
|
+
headers: {
|
|
88731
|
+
[name: string]: unknown;
|
|
88732
|
+
};
|
|
88733
|
+
content: {
|
|
88734
|
+
"application/json": components["schemas"]["Error"];
|
|
88735
|
+
};
|
|
88736
|
+
};
|
|
88737
|
+
};
|
|
88738
|
+
};
|
|
88739
|
+
put?: never;
|
|
88740
|
+
post?: never;
|
|
88741
|
+
delete?: never;
|
|
88742
|
+
options?: never;
|
|
88743
|
+
head?: never;
|
|
88744
|
+
patch?: never;
|
|
88745
|
+
trace?: never;
|
|
88746
|
+
};
|
|
88747
|
+
"/ads/goal": {
|
|
88087
88748
|
parameters: {
|
|
88088
88749
|
query?: never;
|
|
88089
88750
|
header?: never;
|
|
@@ -88091,17 +88752,14 @@ interface paths {
|
|
|
88091
88752
|
cookie?: never;
|
|
88092
88753
|
};
|
|
88093
88754
|
/**
|
|
88094
|
-
*
|
|
88095
|
-
* @description
|
|
88096
|
-
*
|
|
88097
|
-
* This is the PROFILE-scoped read — every Vitrina tenant’s delegated key is minted for exactly one Atribu profile, so it cannot call Atribu’s cross-profile `/workspaces/{id}/top-performers` (that route is session-bearer-only and answers `403 insufficient_scope` to any API key).
|
|
88755
|
+
* The workspace’s monthly Ads goal
|
|
88756
|
+
* @description The goal the Ads hero measures pace against — results from ads, attributed value or return for the calendar month — or `null` when none is set. With `sample=1` answers the sample dataset’s goal.
|
|
88098
88757
|
*/
|
|
88099
88758
|
get: {
|
|
88100
88759
|
parameters: {
|
|
88101
88760
|
query?: {
|
|
88102
|
-
/** @description
|
|
88103
|
-
|
|
88104
|
-
limit?: number;
|
|
88761
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
88762
|
+
sample?: "1" | "true";
|
|
88105
88763
|
};
|
|
88106
88764
|
header?: never;
|
|
88107
88765
|
path?: never;
|
|
@@ -88109,7 +88767,7 @@ interface paths {
|
|
|
88109
88767
|
};
|
|
88110
88768
|
requestBody?: never;
|
|
88111
88769
|
responses: {
|
|
88112
|
-
/** @description The
|
|
88770
|
+
/** @description The goal, or `null` */
|
|
88113
88771
|
200: {
|
|
88114
88772
|
headers: {
|
|
88115
88773
|
[name: string]: unknown;
|
|
@@ -88118,33 +88776,16 @@ interface paths {
|
|
|
88118
88776
|
/**
|
|
88119
88777
|
* @example {
|
|
88120
88778
|
* "data": {
|
|
88121
|
-
* "
|
|
88122
|
-
*
|
|
88123
|
-
*
|
|
88124
|
-
*
|
|
88125
|
-
*
|
|
88126
|
-
* "ad_set_name": "Santiago 25-45",
|
|
88127
|
-
* "creative_thumbnail_url": null,
|
|
88128
|
-
* "score_window": "28d",
|
|
88129
|
-
* "composite_score": 0.82,
|
|
88130
|
-
* "top_performer_likelihood": 0.71,
|
|
88131
|
-
* "maturity_stage": "mature",
|
|
88132
|
-
* "truth_grade": "attributed",
|
|
88133
|
-
* "primary_outcome_kind": "closed_won",
|
|
88134
|
-
* "spend": 150000,
|
|
88135
|
-
* "impressions": 48200,
|
|
88136
|
-
* "ctr": 1.9,
|
|
88137
|
-
* "attributed_revenue": 480000,
|
|
88138
|
-
* "roas": 3.2,
|
|
88139
|
-
* "fatigue_state": "active",
|
|
88140
|
-
* "fatigue_risk_tier": "low"
|
|
88141
|
-
* }
|
|
88142
|
-
* ]
|
|
88779
|
+
* "kind": "outcomes",
|
|
88780
|
+
* "target": 30,
|
|
88781
|
+
* "period": "month",
|
|
88782
|
+
* "updated_at": "2026-09-01T12:00:00.000Z",
|
|
88783
|
+
* "updated_by": "20000000-0000-4000-8000-000000000001"
|
|
88143
88784
|
* }
|
|
88144
88785
|
* }
|
|
88145
88786
|
*/
|
|
88146
88787
|
"application/json": {
|
|
88147
|
-
data: components["schemas"]["
|
|
88788
|
+
data: components["schemas"]["AdsGoal"];
|
|
88148
88789
|
};
|
|
88149
88790
|
};
|
|
88150
88791
|
};
|
|
@@ -88240,52 +88881,47 @@ interface paths {
|
|
|
88240
88881
|
};
|
|
88241
88882
|
};
|
|
88242
88883
|
};
|
|
88243
|
-
put?: never;
|
|
88244
|
-
post?: never;
|
|
88245
|
-
delete?: never;
|
|
88246
|
-
options?: never;
|
|
88247
|
-
head?: never;
|
|
88248
|
-
patch?: never;
|
|
88249
|
-
trace?: never;
|
|
88250
|
-
};
|
|
88251
|
-
"/ads/health": {
|
|
88252
|
-
parameters: {
|
|
88253
|
-
query?: never;
|
|
88254
|
-
header?: never;
|
|
88255
|
-
path?: never;
|
|
88256
|
-
cookie?: never;
|
|
88257
|
-
};
|
|
88258
88884
|
/**
|
|
88259
|
-
*
|
|
88260
|
-
* @description
|
|
88261
|
-
*
|
|
88262
|
-
* * `trust` — Atribu’s `trust` operation: how much of the profile’s cash is traceable to an ad (`traceable_pct_by_value`/`_by_count`), whether the instrumentation producing that number is sound (`instrumentation.tracking_healthy`), and which way the traceable half is moving (`traceable_roas_trend`). READ `instrumentation` BEFORE rendering `traceable_pct_by_value` as an indictment — a low number reads as "great organic" when tracking is healthy and "broken tracking" when it is not.
|
|
88263
|
-
* * `utm` — Atribu’s `quality/utm` operation: the cached UTM-health badge (malformed/missing/dangling-ad-id anomaly counts over the traffic side) plus the dangling-ad-ids rollup (attributed cash that cannot be placed in the ad hierarchy).
|
|
88264
|
-
* * `attribution_coverage` — Atribu’s `quality/attribution` operation: the conversion side — how many of the window’s conversions carry a real ad id, an `fbclid` only, or nothing, partitioning `total_conversions`.
|
|
88265
|
-
*
|
|
88266
|
-
* ⚠ Named `/attribution-coverage` in this ticket’s original prose — the live Atribu spec names this operation `quality/attribution`; there is no separate `/attribution-coverage` path. Same read, corrected name.
|
|
88885
|
+
* Set the monthly Ads goal
|
|
88886
|
+
* @description Replaces the goal. `target` > 0; a `roas` goal is at most 100, a `value` goal at most 10^10 CLP, an `outcomes` goal a whole number. The server stamps `updated_at`/`updated_by`. With `sample=1` the goal is validated and echoed with `persisted: false`, never stored.
|
|
88267
88887
|
*/
|
|
88268
|
-
|
|
88888
|
+
put: {
|
|
88269
88889
|
parameters: {
|
|
88270
|
-
query
|
|
88271
|
-
/** @description
|
|
88272
|
-
|
|
88273
|
-
/** @description Window end (inclusive), YYYY-MM-DD. */
|
|
88274
|
-
to: string;
|
|
88275
|
-
/** @description Atribu attribution model. Defaults to `last_touch`. */
|
|
88276
|
-
model?: string;
|
|
88277
|
-
/** @description Instrumentation-health + UTM-badge cached window, days (1-30, capped by the Ephemeral Buffer’s retention). Defaults to 30. */
|
|
88278
|
-
days?: number;
|
|
88279
|
-
/** @description Traceable-ROAS trend window, days, split in half for the recent-vs-prior comparison. Defaults to 28. */
|
|
88280
|
-
window_days?: number;
|
|
88890
|
+
query?: {
|
|
88891
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
88892
|
+
sample?: "1" | "true";
|
|
88281
88893
|
};
|
|
88282
88894
|
header?: never;
|
|
88283
88895
|
path?: never;
|
|
88284
88896
|
cookie?: never;
|
|
88285
88897
|
};
|
|
88286
|
-
requestBody
|
|
88898
|
+
requestBody: {
|
|
88899
|
+
content: {
|
|
88900
|
+
/**
|
|
88901
|
+
* @example {
|
|
88902
|
+
* "kind": "outcomes",
|
|
88903
|
+
* "target": 30,
|
|
88904
|
+
* "period": "month"
|
|
88905
|
+
* }
|
|
88906
|
+
*/
|
|
88907
|
+
"application/json": {
|
|
88908
|
+
/**
|
|
88909
|
+
* @description `outcomes` = results from ads this month; `value` = attributed value (CLP); `roas` = return (×).
|
|
88910
|
+
* @enum {string}
|
|
88911
|
+
*/
|
|
88912
|
+
kind: "outcomes" | "value" | "roas";
|
|
88913
|
+
/** @description The month’s target. `roas` ≤ 100; `value` ≤ 10^10; `outcomes` ≤ 10^6. */
|
|
88914
|
+
target: number;
|
|
88915
|
+
/**
|
|
88916
|
+
* @description The only period: the calendar month.
|
|
88917
|
+
* @enum {string}
|
|
88918
|
+
*/
|
|
88919
|
+
period: "month";
|
|
88920
|
+
};
|
|
88921
|
+
};
|
|
88922
|
+
};
|
|
88287
88923
|
responses: {
|
|
88288
|
-
/** @description
|
|
88924
|
+
/** @description The stored goal */
|
|
88289
88925
|
200: {
|
|
88290
88926
|
headers: {
|
|
88291
88927
|
[name: string]: unknown;
|
|
@@ -88294,55 +88930,17 @@ interface paths {
|
|
|
88294
88930
|
/**
|
|
88295
88931
|
* @example {
|
|
88296
88932
|
* "data": {
|
|
88297
|
-
* "
|
|
88298
|
-
*
|
|
88299
|
-
*
|
|
88300
|
-
*
|
|
88301
|
-
*
|
|
88302
|
-
*
|
|
88303
|
-
* "total_value": 5000000,
|
|
88304
|
-
* "instrumentation": {
|
|
88305
|
-
* "score": 0.86,
|
|
88306
|
-
* "verdict": "healthy_tracking",
|
|
88307
|
-
* "tracking_healthy": true,
|
|
88308
|
-
* "coverage_interpretation": "La mayoría de las ventas llegan con su origen publicitario.",
|
|
88309
|
-
* "missing": []
|
|
88310
|
-
* },
|
|
88311
|
-
* "traceable_roas_trend": {
|
|
88312
|
-
* "recent_roas": 3.4,
|
|
88313
|
-
* "prior_roas": 2.9,
|
|
88314
|
-
* "recent_spend": 845200,
|
|
88315
|
-
* "recent_traceable_revenue": 2873680,
|
|
88316
|
-
* "days_with_cash": 11
|
|
88317
|
-
* }
|
|
88318
|
-
* },
|
|
88319
|
-
* "utm": {
|
|
88320
|
-
* "scan_window_days": 14,
|
|
88321
|
-
* "events_scanned": 312,
|
|
88322
|
-
* "high_count": 3,
|
|
88323
|
-
* "medium_count": 7,
|
|
88324
|
-
* "refreshed_at": "2026-09-22T06:00:00.000Z",
|
|
88325
|
-
* "dangling_ad_ids": {
|
|
88326
|
-
* "window_days": 28,
|
|
88327
|
-
* "model": "last_touch",
|
|
88328
|
-
* "dangling_conversions": 2,
|
|
88329
|
-
* "attributed_cash": 90000,
|
|
88330
|
-
* "reporting_currency": "CLP",
|
|
88331
|
-
* "distinct_ad_ids": 1
|
|
88332
|
-
* }
|
|
88333
|
-
* },
|
|
88334
|
-
* "attribution_coverage": {
|
|
88335
|
-
* "total_conversions": 200,
|
|
88336
|
-
* "with_full_utms": 162,
|
|
88337
|
-
* "with_fbclid_only": 18,
|
|
88338
|
-
* "with_no_tracking": 20,
|
|
88339
|
-
* "coverage_percent": 90
|
|
88340
|
-
* }
|
|
88933
|
+
* "kind": "outcomes",
|
|
88934
|
+
* "target": 30,
|
|
88935
|
+
* "period": "month",
|
|
88936
|
+
* "updated_at": "2026-09-23T15:00:00.000Z",
|
|
88937
|
+
* "updated_by": "20000000-0000-4000-8000-000000000001",
|
|
88938
|
+
* "persisted": true
|
|
88341
88939
|
* }
|
|
88342
88940
|
* }
|
|
88343
88941
|
*/
|
|
88344
88942
|
"application/json": {
|
|
88345
|
-
data: components["schemas"]["
|
|
88943
|
+
data: components["schemas"]["AdsGoal"] & Record<string, never>;
|
|
88346
88944
|
};
|
|
88347
88945
|
};
|
|
88348
88946
|
};
|
|
@@ -88438,9 +89036,122 @@ interface paths {
|
|
|
88438
89036
|
};
|
|
88439
89037
|
};
|
|
88440
89038
|
};
|
|
88441
|
-
put?: never;
|
|
88442
89039
|
post?: never;
|
|
88443
|
-
|
|
89040
|
+
/**
|
|
89041
|
+
* Clear the monthly Ads goal
|
|
89042
|
+
* @description Removes the goal. Idempotent. With `sample=1` nothing is stored or removed.
|
|
89043
|
+
*/
|
|
89044
|
+
delete: {
|
|
89045
|
+
parameters: {
|
|
89046
|
+
query?: {
|
|
89047
|
+
/** @description `1` serves the deterministic sample dataset («Ver con datos de ejemplo»): same shapes, invented but internally consistent figures, no entitlement required (the scope still is). A sandbox workspace is always served the sample, with or without this parameter. */
|
|
89048
|
+
sample?: "1" | "true";
|
|
89049
|
+
};
|
|
89050
|
+
header?: never;
|
|
89051
|
+
path?: never;
|
|
89052
|
+
cookie?: never;
|
|
89053
|
+
};
|
|
89054
|
+
requestBody?: never;
|
|
89055
|
+
responses: {
|
|
89056
|
+
/** @description Cleared */
|
|
89057
|
+
204: {
|
|
89058
|
+
headers: {
|
|
89059
|
+
[name: string]: unknown;
|
|
89060
|
+
};
|
|
89061
|
+
content?: never;
|
|
89062
|
+
};
|
|
89063
|
+
/** @description Validation error */
|
|
89064
|
+
400: {
|
|
89065
|
+
headers: {
|
|
89066
|
+
[name: string]: unknown;
|
|
89067
|
+
};
|
|
89068
|
+
content: {
|
|
89069
|
+
"application/json": components["schemas"]["Error"];
|
|
89070
|
+
};
|
|
89071
|
+
};
|
|
89072
|
+
/** @description Unauthorized */
|
|
89073
|
+
401: {
|
|
89074
|
+
headers: {
|
|
89075
|
+
[name: string]: unknown;
|
|
89076
|
+
};
|
|
89077
|
+
content: {
|
|
89078
|
+
"application/json": components["schemas"]["Error"];
|
|
89079
|
+
};
|
|
89080
|
+
};
|
|
89081
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
89082
|
+
402: {
|
|
89083
|
+
headers: {
|
|
89084
|
+
[name: string]: unknown;
|
|
89085
|
+
};
|
|
89086
|
+
content: {
|
|
89087
|
+
/**
|
|
89088
|
+
* @example {
|
|
89089
|
+
* "error": {
|
|
89090
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
89091
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
89092
|
+
* "details": {
|
|
89093
|
+
* "required": [
|
|
89094
|
+
* "vitrina_ads"
|
|
89095
|
+
* ],
|
|
89096
|
+
* "active": [],
|
|
89097
|
+
* "feature": "vitrina_ads",
|
|
89098
|
+
* "entitlement_state": "off"
|
|
89099
|
+
* }
|
|
89100
|
+
* }
|
|
89101
|
+
* }
|
|
89102
|
+
*/
|
|
89103
|
+
"application/json": components["schemas"]["Error"];
|
|
89104
|
+
};
|
|
89105
|
+
};
|
|
89106
|
+
/** @description Forbidden */
|
|
89107
|
+
403: {
|
|
89108
|
+
headers: {
|
|
89109
|
+
[name: string]: unknown;
|
|
89110
|
+
};
|
|
89111
|
+
content: {
|
|
89112
|
+
"application/json": components["schemas"]["Error"];
|
|
89113
|
+
};
|
|
89114
|
+
};
|
|
89115
|
+
/** @description Not found */
|
|
89116
|
+
404: {
|
|
89117
|
+
headers: {
|
|
89118
|
+
[name: string]: unknown;
|
|
89119
|
+
};
|
|
89120
|
+
content: {
|
|
89121
|
+
"application/json": components["schemas"]["Error"];
|
|
89122
|
+
};
|
|
89123
|
+
};
|
|
89124
|
+
/** @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. */
|
|
89125
|
+
409: {
|
|
89126
|
+
headers: {
|
|
89127
|
+
[name: string]: unknown;
|
|
89128
|
+
};
|
|
89129
|
+
content: {
|
|
89130
|
+
/**
|
|
89131
|
+
* @example {
|
|
89132
|
+
* "error": {
|
|
89133
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
89134
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
89135
|
+
* "details": {
|
|
89136
|
+
* "key_kind": "core"
|
|
89137
|
+
* }
|
|
89138
|
+
* }
|
|
89139
|
+
* }
|
|
89140
|
+
*/
|
|
89141
|
+
"application/json": components["schemas"]["Error"];
|
|
89142
|
+
};
|
|
89143
|
+
};
|
|
89144
|
+
/** @description Rate limited */
|
|
89145
|
+
429: {
|
|
89146
|
+
headers: {
|
|
89147
|
+
[name: string]: unknown;
|
|
89148
|
+
};
|
|
89149
|
+
content: {
|
|
89150
|
+
"application/json": components["schemas"]["Error"];
|
|
89151
|
+
};
|
|
89152
|
+
};
|
|
89153
|
+
};
|
|
89154
|
+
};
|
|
88444
89155
|
options?: never;
|
|
88445
89156
|
head?: never;
|
|
88446
89157
|
patch?: never;
|
|
@@ -88482,8 +89193,8 @@ interface paths {
|
|
|
88482
89193
|
* "key_id": "abababab-0000-4000-8000-000000000001",
|
|
88483
89194
|
* "public_key": "trk_live_abc123",
|
|
88484
89195
|
* "snippet": "<script src=\"https://track.atribu.app/t.js?k=trk_live_abc123\" async></script>",
|
|
88485
|
-
* "combined_snippet": "<script src=\"https://api.vitrinadev.com/tag.js?site=
|
|
88486
|
-
* "site_key": "
|
|
89196
|
+
* "combined_snippet": "<script src=\"https://api.vitrinadev.com/tag.js?site=pk_live_sitekey000000000000\" async></script>",
|
|
89197
|
+
* "site_key": "pk_live_sitekey000000000000",
|
|
88487
89198
|
* "meta_pixel_id": null
|
|
88488
89199
|
* }
|
|
88489
89200
|
* }
|
|
@@ -88630,10 +89341,10 @@ interface paths {
|
|
|
88630
89341
|
* "data": {
|
|
88631
89342
|
* "key_id": "abababab-0000-4000-8000-000000000001",
|
|
88632
89343
|
* "public_key": "trk_live_abc123",
|
|
88633
|
-
* "site_key": "
|
|
89344
|
+
* "site_key": "pk_live_sitekey000000000000",
|
|
88634
89345
|
* "tag_name": "Vitrina Ads · tag",
|
|
88635
89346
|
* "trigger": "All Pages",
|
|
88636
|
-
* "snippet": "<script src=\"https://api.vitrinadev.com/tag.js?site=
|
|
89347
|
+
* "snippet": "<script src=\"https://api.vitrinadev.com/tag.js?site=pk_live_sitekey000000000000\" async></script>",
|
|
88637
89348
|
* "setup_checklist": [
|
|
88638
89349
|
* "En Google Tag Manager, crea una etiqueta nueva de tipo «HTML personalizado».",
|
|
88639
89350
|
* "Pega el fragmento de Vitrina (tag.js) tal cual.",
|
|
@@ -104117,7 +104828,7 @@ interface paths {
|
|
|
104117
104828
|
put?: never;
|
|
104118
104829
|
/**
|
|
104119
104830
|
* Freeze a pack
|
|
104120
|
-
* @description Honours the catalog's `freeze_allowed` / `freeze_max_count` (
|
|
104831
|
+
* @description Honours the catalog's `freeze_allowed` / `freeze_max_count` (a clinic's bridal package may be configured never to freeze). A CLOSED window pushes `expires_at` out by its own length immediately; an OPEN one («hasta nuevo aviso») pays out when it is lifted, because its length is not known until then.
|
|
104121
104832
|
*
|
|
104122
104833
|
* **Connected apps:** every patient and contact in the response is a Seudónimo de paciente — initials plus a stable number, `"M.F. · #1001"` — unless the clinic allowed patient names, with RUT, phone and email masked in free text and `meta.patient_privacy` saying so. Clinical alerts (`flags`) are withheld in both modes, and a non-JSON body (an export, a file) is refused with `403 CONNECTED_APP_SENSITIVE_DATA`.
|
|
104123
104834
|
*/
|
|
@@ -107232,7 +107943,7 @@ interface components {
|
|
|
107232
107943
|
};
|
|
107233
107944
|
Author: {
|
|
107234
107945
|
/**
|
|
107235
|
-
* @description `member` = a workspace member (in the app, or through a personal token / connected app — see `via`); `api_key` = an API key, a workspace integration credential («CRM
|
|
107946
|
+
* @description `member` = a workspace member (in the app, or through a personal token / connected app — see `via`); `api_key` = an API key, a workspace integration credential («CRM propio (API)»); `ai_agent` = the AI agent; `system` = the platform itself; `contact` = the customer.
|
|
107236
107947
|
* @enum {string}
|
|
107237
107948
|
*/
|
|
107238
107949
|
kind: "member" | "api_key" | "ai_agent" | "system" | "contact";
|
|
@@ -107899,6 +108610,85 @@ interface components {
|
|
|
107899
108610
|
coverage_percent: number;
|
|
107900
108611
|
};
|
|
107901
108612
|
};
|
|
108613
|
+
AdsFact: {
|
|
108614
|
+
/** @description Stable fact key (`roas`, `best_campaign_name`, …) — a vocabulary name, not a resource id. */
|
|
108615
|
+
key: string;
|
|
108616
|
+
/** @description Spanish label in the workspace’s vocabulary. */
|
|
108617
|
+
label: string;
|
|
108618
|
+
/** @description Raw value; `null` = unknown (never zero). `pct` values are 0–100. */
|
|
108619
|
+
value: number | string | null;
|
|
108620
|
+
/** @description The exact es-CL string a sentence quotes (`3,7×`, `$845.200`, `—`). */
|
|
108621
|
+
display: string;
|
|
108622
|
+
/** @enum {string} */
|
|
108623
|
+
format: "clp" | "int" | "times" | "pct" | "text" | "date";
|
|
108624
|
+
/** @description Where the value was read. */
|
|
108625
|
+
source: string;
|
|
108626
|
+
/**
|
|
108627
|
+
* @description Facts never carry a person.
|
|
108628
|
+
* @enum {string}
|
|
108629
|
+
*/
|
|
108630
|
+
privacy: "aggregate";
|
|
108631
|
+
};
|
|
108632
|
+
AdsBriefing: {
|
|
108633
|
+
/** @enum {string} */
|
|
108634
|
+
screen: "resumen" | "campanas" | "atribuidos" | "creativos" | "salud";
|
|
108635
|
+
window: {
|
|
108636
|
+
from: string;
|
|
108637
|
+
to: string;
|
|
108638
|
+
window?: string;
|
|
108639
|
+
};
|
|
108640
|
+
lead: {
|
|
108641
|
+
/** @description One sentence, plain text; `**bold**` is the only markup. */
|
|
108642
|
+
text: string;
|
|
108643
|
+
/** @description The facts this sentence quotes. */
|
|
108644
|
+
fact_keys: string[];
|
|
108645
|
+
/** @description A suggested «Pregúntale» question this line invites. */
|
|
108646
|
+
ask?: string;
|
|
108647
|
+
figure: {
|
|
108648
|
+
fact_key: string;
|
|
108649
|
+
value: number | string | null;
|
|
108650
|
+
/** @enum {string} */
|
|
108651
|
+
format: "clp" | "int" | "times" | "pct" | "text" | "date";
|
|
108652
|
+
/** @description The substring of `lead.text` to count up. */
|
|
108653
|
+
display: string;
|
|
108654
|
+
/** @description Where that whole figure starts in `lead.text` — split there, not on the first occurrence of `display` (a `12` can also sit inside `$12.000`). */
|
|
108655
|
+
offset: number;
|
|
108656
|
+
} | null;
|
|
108657
|
+
};
|
|
108658
|
+
lines: {
|
|
108659
|
+
/** @description One sentence, plain text; `**bold**` is the only markup. */
|
|
108660
|
+
text: string;
|
|
108661
|
+
/** @description The facts this sentence quotes. */
|
|
108662
|
+
fact_keys: string[];
|
|
108663
|
+
/** @description A suggested «Pregúntale» question this line invites. */
|
|
108664
|
+
ask?: string;
|
|
108665
|
+
}[];
|
|
108666
|
+
facts: components["schemas"]["AdsFact"][];
|
|
108667
|
+
/** @description Ids of the actions the rail should surface first (may be empty). */
|
|
108668
|
+
actions: string[];
|
|
108669
|
+
/**
|
|
108670
|
+
* @description Who wrote the sentences — both read from the same pinned facts.
|
|
108671
|
+
* @enum {string}
|
|
108672
|
+
*/
|
|
108673
|
+
source: "model" | "template";
|
|
108674
|
+
generated_at: string;
|
|
108675
|
+
/** @enum {string} */
|
|
108676
|
+
vocabulary: "automotive" | "healthcare" | "generic";
|
|
108677
|
+
/** @description `true` when written from the sample dataset. */
|
|
108678
|
+
sample: boolean;
|
|
108679
|
+
};
|
|
108680
|
+
AdsGoal: {
|
|
108681
|
+
/** @enum {string} */
|
|
108682
|
+
kind: "outcomes" | "value" | "roas";
|
|
108683
|
+
target: number;
|
|
108684
|
+
/** @enum {string} */
|
|
108685
|
+
period: "month";
|
|
108686
|
+
updated_at: string | null;
|
|
108687
|
+
/** @description Who last set it (a member or API key id); `null` when unknown. */
|
|
108688
|
+
updated_by: string | null;
|
|
108689
|
+
/** @description `false` in sample mode: the goal was validated but not stored. */
|
|
108690
|
+
persisted?: boolean;
|
|
108691
|
+
} | null;
|
|
107902
108692
|
AdsTrackingKey: {
|
|
107903
108693
|
key_id: string;
|
|
107904
108694
|
public_key: string;
|