@vitrina/api 11.6.0 → 11.9.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.cjs +4 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2662 -79
- package/dist/index.d.ts +2662 -79
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -87655,6 +87655,8 @@ interface paths {
|
|
|
87655
87655
|
model?: string;
|
|
87656
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
87657
|
sample?: "1" | "true";
|
|
87658
|
+
/** @description `day` ALSO answers `days[]` and `previous_days[]` — one point per calendar day of the window and of the previous window (the engine’s own day rows, never recomputed), beside the unchanged `current`/`previous` totals. Default `total`. */
|
|
87659
|
+
grain?: "total" | "day";
|
|
87658
87660
|
/** @description Documentary only — `/ads/overview` always returns `previous` (the immediately-preceding window of equal length) alongside `current`; there is nothing to switch on. */
|
|
87659
87661
|
compare?: "previous_period";
|
|
87660
87662
|
};
|
|
@@ -87728,7 +87730,491 @@ interface paths {
|
|
|
87728
87730
|
* "appointment_booked": 9,
|
|
87729
87731
|
* "closed_won": 3
|
|
87730
87732
|
* }
|
|
87731
|
-
* }
|
|
87733
|
+
* },
|
|
87734
|
+
* "days": [
|
|
87735
|
+
* {
|
|
87736
|
+
* "date": "2026-08-24",
|
|
87737
|
+
* "spend": 31800,
|
|
87738
|
+
* "revenue": 120000,
|
|
87739
|
+
* "outcomes": 2,
|
|
87740
|
+
* "attributed_outcomes": 1,
|
|
87741
|
+
* "partial": false
|
|
87742
|
+
* },
|
|
87743
|
+
* {
|
|
87744
|
+
* "date": "2026-08-25",
|
|
87745
|
+
* "spend": 35700,
|
|
87746
|
+
* "revenue": 130000,
|
|
87747
|
+
* "outcomes": 3,
|
|
87748
|
+
* "attributed_outcomes": 2,
|
|
87749
|
+
* "partial": false
|
|
87750
|
+
* },
|
|
87751
|
+
* {
|
|
87752
|
+
* "date": "2026-08-26",
|
|
87753
|
+
* "spend": 28700,
|
|
87754
|
+
* "revenue": 110000,
|
|
87755
|
+
* "outcomes": 1,
|
|
87756
|
+
* "attributed_outcomes": 1,
|
|
87757
|
+
* "partial": false
|
|
87758
|
+
* },
|
|
87759
|
+
* {
|
|
87760
|
+
* "date": "2026-08-27",
|
|
87761
|
+
* "spend": 33400,
|
|
87762
|
+
* "revenue": 120000,
|
|
87763
|
+
* "outcomes": 2,
|
|
87764
|
+
* "attributed_outcomes": 1,
|
|
87765
|
+
* "partial": false
|
|
87766
|
+
* },
|
|
87767
|
+
* {
|
|
87768
|
+
* "date": "2026-08-28",
|
|
87769
|
+
* "spend": 30300,
|
|
87770
|
+
* "revenue": 110000,
|
|
87771
|
+
* "outcomes": 1,
|
|
87772
|
+
* "attributed_outcomes": 1,
|
|
87773
|
+
* "partial": false
|
|
87774
|
+
* },
|
|
87775
|
+
* {
|
|
87776
|
+
* "date": "2026-08-29",
|
|
87777
|
+
* "spend": 19700,
|
|
87778
|
+
* "revenue": 70000,
|
|
87779
|
+
* "outcomes": 1,
|
|
87780
|
+
* "attributed_outcomes": 1,
|
|
87781
|
+
* "partial": false
|
|
87782
|
+
* },
|
|
87783
|
+
* {
|
|
87784
|
+
* "date": "2026-08-30",
|
|
87785
|
+
* "spend": 22100,
|
|
87786
|
+
* "revenue": 80000,
|
|
87787
|
+
* "outcomes": 1,
|
|
87788
|
+
* "attributed_outcomes": 1,
|
|
87789
|
+
* "partial": false
|
|
87790
|
+
* },
|
|
87791
|
+
* {
|
|
87792
|
+
* "date": "2026-08-31",
|
|
87793
|
+
* "spend": 28700,
|
|
87794
|
+
* "revenue": 110000,
|
|
87795
|
+
* "outcomes": 1,
|
|
87796
|
+
* "attributed_outcomes": 1,
|
|
87797
|
+
* "partial": false
|
|
87798
|
+
* },
|
|
87799
|
+
* {
|
|
87800
|
+
* "date": "2026-09-01",
|
|
87801
|
+
* "spend": 33400,
|
|
87802
|
+
* "revenue": 120000,
|
|
87803
|
+
* "outcomes": 2,
|
|
87804
|
+
* "attributed_outcomes": 1,
|
|
87805
|
+
* "partial": false
|
|
87806
|
+
* },
|
|
87807
|
+
* {
|
|
87808
|
+
* "date": "2026-09-02",
|
|
87809
|
+
* "spend": 30300,
|
|
87810
|
+
* "revenue": 110000,
|
|
87811
|
+
* "outcomes": 1,
|
|
87812
|
+
* "attributed_outcomes": 1,
|
|
87813
|
+
* "partial": false
|
|
87814
|
+
* },
|
|
87815
|
+
* {
|
|
87816
|
+
* "date": "2026-09-03",
|
|
87817
|
+
* "spend": 31800,
|
|
87818
|
+
* "revenue": 120000,
|
|
87819
|
+
* "outcomes": 2,
|
|
87820
|
+
* "attributed_outcomes": 1,
|
|
87821
|
+
* "partial": false
|
|
87822
|
+
* },
|
|
87823
|
+
* {
|
|
87824
|
+
* "date": "2026-09-04",
|
|
87825
|
+
* "spend": 35700,
|
|
87826
|
+
* "revenue": 130000,
|
|
87827
|
+
* "outcomes": 2,
|
|
87828
|
+
* "attributed_outcomes": 1,
|
|
87829
|
+
* "partial": false
|
|
87830
|
+
* },
|
|
87831
|
+
* {
|
|
87832
|
+
* "date": "2026-09-05",
|
|
87833
|
+
* "spend": 17800,
|
|
87834
|
+
* "revenue": 70000,
|
|
87835
|
+
* "outcomes": 1,
|
|
87836
|
+
* "attributed_outcomes": 1,
|
|
87837
|
+
* "partial": false
|
|
87838
|
+
* },
|
|
87839
|
+
* {
|
|
87840
|
+
* "date": "2026-09-06",
|
|
87841
|
+
* "spend": 20700,
|
|
87842
|
+
* "revenue": 80000,
|
|
87843
|
+
* "outcomes": 1,
|
|
87844
|
+
* "attributed_outcomes": 1,
|
|
87845
|
+
* "partial": false
|
|
87846
|
+
* },
|
|
87847
|
+
* {
|
|
87848
|
+
* "date": "2026-09-07",
|
|
87849
|
+
* "spend": 30300,
|
|
87850
|
+
* "revenue": 110000,
|
|
87851
|
+
* "outcomes": 1,
|
|
87852
|
+
* "attributed_outcomes": 1,
|
|
87853
|
+
* "partial": false
|
|
87854
|
+
* },
|
|
87855
|
+
* {
|
|
87856
|
+
* "date": "2026-09-08",
|
|
87857
|
+
* "spend": 31800,
|
|
87858
|
+
* "revenue": 120000,
|
|
87859
|
+
* "outcomes": 1,
|
|
87860
|
+
* "attributed_outcomes": 1,
|
|
87861
|
+
* "partial": false
|
|
87862
|
+
* },
|
|
87863
|
+
* {
|
|
87864
|
+
* "date": "2026-09-09",
|
|
87865
|
+
* "spend": 35700,
|
|
87866
|
+
* "revenue": 130000,
|
|
87867
|
+
* "outcomes": 2,
|
|
87868
|
+
* "attributed_outcomes": 1,
|
|
87869
|
+
* "partial": false
|
|
87870
|
+
* },
|
|
87871
|
+
* {
|
|
87872
|
+
* "date": "2026-09-10",
|
|
87873
|
+
* "spend": 28700,
|
|
87874
|
+
* "revenue": 110000,
|
|
87875
|
+
* "outcomes": 1,
|
|
87876
|
+
* "attributed_outcomes": 1,
|
|
87877
|
+
* "partial": false
|
|
87878
|
+
* },
|
|
87879
|
+
* {
|
|
87880
|
+
* "date": "2026-09-11",
|
|
87881
|
+
* "spend": 33400,
|
|
87882
|
+
* "revenue": 120000,
|
|
87883
|
+
* "outcomes": 2,
|
|
87884
|
+
* "attributed_outcomes": 1,
|
|
87885
|
+
* "partial": false
|
|
87886
|
+
* },
|
|
87887
|
+
* {
|
|
87888
|
+
* "date": "2026-09-12",
|
|
87889
|
+
* "spend": 18800,
|
|
87890
|
+
* "revenue": 70000,
|
|
87891
|
+
* "outcomes": 1,
|
|
87892
|
+
* "attributed_outcomes": 1,
|
|
87893
|
+
* "partial": false
|
|
87894
|
+
* },
|
|
87895
|
+
* {
|
|
87896
|
+
* "date": "2026-09-13",
|
|
87897
|
+
* "spend": 19700,
|
|
87898
|
+
* "revenue": 70000,
|
|
87899
|
+
* "outcomes": 1,
|
|
87900
|
+
* "attributed_outcomes": 1,
|
|
87901
|
+
* "partial": false
|
|
87902
|
+
* },
|
|
87903
|
+
* {
|
|
87904
|
+
* "date": "2026-09-14",
|
|
87905
|
+
* "spend": 35700,
|
|
87906
|
+
* "revenue": 130000,
|
|
87907
|
+
* "outcomes": 2,
|
|
87908
|
+
* "attributed_outcomes": 1,
|
|
87909
|
+
* "partial": false
|
|
87910
|
+
* },
|
|
87911
|
+
* {
|
|
87912
|
+
* "date": "2026-09-15",
|
|
87913
|
+
* "spend": 28700,
|
|
87914
|
+
* "revenue": 110000,
|
|
87915
|
+
* "outcomes": 1,
|
|
87916
|
+
* "attributed_outcomes": 1,
|
|
87917
|
+
* "partial": false
|
|
87918
|
+
* },
|
|
87919
|
+
* {
|
|
87920
|
+
* "date": "2026-09-16",
|
|
87921
|
+
* "spend": 33400,
|
|
87922
|
+
* "revenue": 120000,
|
|
87923
|
+
* "outcomes": 2,
|
|
87924
|
+
* "attributed_outcomes": 1,
|
|
87925
|
+
* "partial": false
|
|
87926
|
+
* },
|
|
87927
|
+
* {
|
|
87928
|
+
* "date": "2026-09-17",
|
|
87929
|
+
* "spend": 30200,
|
|
87930
|
+
* "revenue": 110000,
|
|
87931
|
+
* "outcomes": 1,
|
|
87932
|
+
* "attributed_outcomes": 1,
|
|
87933
|
+
* "partial": false
|
|
87934
|
+
* },
|
|
87935
|
+
* {
|
|
87936
|
+
* "date": "2026-09-18",
|
|
87937
|
+
* "spend": 31800,
|
|
87938
|
+
* "revenue": 120000,
|
|
87939
|
+
* "outcomes": 1,
|
|
87940
|
+
* "attributed_outcomes": 1,
|
|
87941
|
+
* "partial": false
|
|
87942
|
+
* },
|
|
87943
|
+
* {
|
|
87944
|
+
* "date": "2026-09-19",
|
|
87945
|
+
* "spend": 22100,
|
|
87946
|
+
* "revenue": 80000,
|
|
87947
|
+
* "outcomes": 1,
|
|
87948
|
+
* "attributed_outcomes": 1,
|
|
87949
|
+
* "partial": false
|
|
87950
|
+
* },
|
|
87951
|
+
* {
|
|
87952
|
+
* "date": "2026-09-20",
|
|
87953
|
+
* "spend": 17800,
|
|
87954
|
+
* "revenue": 70000,
|
|
87955
|
+
* "outcomes": 1,
|
|
87956
|
+
* "attributed_outcomes": 1,
|
|
87957
|
+
* "partial": false
|
|
87958
|
+
* },
|
|
87959
|
+
* {
|
|
87960
|
+
* "date": "2026-09-21",
|
|
87961
|
+
* "spend": 33400,
|
|
87962
|
+
* "revenue": 120000,
|
|
87963
|
+
* "outcomes": 2,
|
|
87964
|
+
* "attributed_outcomes": 1,
|
|
87965
|
+
* "partial": false
|
|
87966
|
+
* },
|
|
87967
|
+
* {
|
|
87968
|
+
* "date": "2026-09-22",
|
|
87969
|
+
* "spend": 13600,
|
|
87970
|
+
* "revenue": 50000,
|
|
87971
|
+
* "outcomes": 1,
|
|
87972
|
+
* "attributed_outcomes": 1,
|
|
87973
|
+
* "partial": true
|
|
87974
|
+
* }
|
|
87975
|
+
* ],
|
|
87976
|
+
* "previous_days": [
|
|
87977
|
+
* {
|
|
87978
|
+
* "date": "2026-07-25",
|
|
87979
|
+
* "spend": null,
|
|
87980
|
+
* "revenue": 60000,
|
|
87981
|
+
* "outcomes": 1,
|
|
87982
|
+
* "attributed_outcomes": 1,
|
|
87983
|
+
* "partial": false
|
|
87984
|
+
* },
|
|
87985
|
+
* {
|
|
87986
|
+
* "date": "2026-07-26",
|
|
87987
|
+
* "spend": null,
|
|
87988
|
+
* "revenue": 70000,
|
|
87989
|
+
* "outcomes": 1,
|
|
87990
|
+
* "attributed_outcomes": 1,
|
|
87991
|
+
* "partial": false
|
|
87992
|
+
* },
|
|
87993
|
+
* {
|
|
87994
|
+
* "date": "2026-07-27",
|
|
87995
|
+
* "spend": null,
|
|
87996
|
+
* "revenue": 80000,
|
|
87997
|
+
* "outcomes": 1,
|
|
87998
|
+
* "attributed_outcomes": 1,
|
|
87999
|
+
* "partial": false
|
|
88000
|
+
* },
|
|
88001
|
+
* {
|
|
88002
|
+
* "date": "2026-07-28",
|
|
88003
|
+
* "spend": null,
|
|
88004
|
+
* "revenue": 100000,
|
|
88005
|
+
* "outcomes": 2,
|
|
88006
|
+
* "attributed_outcomes": 1,
|
|
88007
|
+
* "partial": false
|
|
88008
|
+
* },
|
|
88009
|
+
* {
|
|
88010
|
+
* "date": "2026-07-29",
|
|
88011
|
+
* "spend": null,
|
|
88012
|
+
* "revenue": 90000,
|
|
88013
|
+
* "outcomes": 1,
|
|
88014
|
+
* "attributed_outcomes": 1,
|
|
88015
|
+
* "partial": false
|
|
88016
|
+
* },
|
|
88017
|
+
* {
|
|
88018
|
+
* "date": "2026-07-30",
|
|
88019
|
+
* "spend": null,
|
|
88020
|
+
* "revenue": 90000,
|
|
88021
|
+
* "outcomes": 2,
|
|
88022
|
+
* "attributed_outcomes": 1,
|
|
88023
|
+
* "partial": false
|
|
88024
|
+
* },
|
|
88025
|
+
* {
|
|
88026
|
+
* "date": "2026-07-31",
|
|
88027
|
+
* "spend": null,
|
|
88028
|
+
* "revenue": 110000,
|
|
88029
|
+
* "outcomes": 3,
|
|
88030
|
+
* "attributed_outcomes": 2,
|
|
88031
|
+
* "partial": false
|
|
88032
|
+
* },
|
|
88033
|
+
* {
|
|
88034
|
+
* "date": "2026-08-01",
|
|
88035
|
+
* "spend": null,
|
|
88036
|
+
* "revenue": 50000,
|
|
88037
|
+
* "outcomes": 1,
|
|
88038
|
+
* "attributed_outcomes": 1,
|
|
88039
|
+
* "partial": false
|
|
88040
|
+
* },
|
|
88041
|
+
* {
|
|
88042
|
+
* "date": "2026-08-02",
|
|
88043
|
+
* "spend": null,
|
|
88044
|
+
* "revenue": 60000,
|
|
88045
|
+
* "outcomes": 1,
|
|
88046
|
+
* "attributed_outcomes": 1,
|
|
88047
|
+
* "partial": false
|
|
88048
|
+
* },
|
|
88049
|
+
* {
|
|
88050
|
+
* "date": "2026-08-03",
|
|
88051
|
+
* "spend": null,
|
|
88052
|
+
* "revenue": 90000,
|
|
88053
|
+
* "outcomes": 1,
|
|
88054
|
+
* "attributed_outcomes": 1,
|
|
88055
|
+
* "partial": false
|
|
88056
|
+
* },
|
|
88057
|
+
* {
|
|
88058
|
+
* "date": "2026-08-04",
|
|
88059
|
+
* "spend": null,
|
|
88060
|
+
* "revenue": 90000,
|
|
88061
|
+
* "outcomes": 2,
|
|
88062
|
+
* "attributed_outcomes": 1,
|
|
88063
|
+
* "partial": false
|
|
88064
|
+
* },
|
|
88065
|
+
* {
|
|
88066
|
+
* "date": "2026-08-05",
|
|
88067
|
+
* "spend": null,
|
|
88068
|
+
* "revenue": 110000,
|
|
88069
|
+
* "outcomes": 2,
|
|
88070
|
+
* "attributed_outcomes": 1,
|
|
88071
|
+
* "partial": false
|
|
88072
|
+
* },
|
|
88073
|
+
* {
|
|
88074
|
+
* "date": "2026-08-06",
|
|
88075
|
+
* "spend": null,
|
|
88076
|
+
* "revenue": 80000,
|
|
88077
|
+
* "outcomes": 1,
|
|
88078
|
+
* "attributed_outcomes": 1,
|
|
88079
|
+
* "partial": false
|
|
88080
|
+
* },
|
|
88081
|
+
* {
|
|
88082
|
+
* "date": "2026-08-07",
|
|
88083
|
+
* "spend": null,
|
|
88084
|
+
* "revenue": 100000,
|
|
88085
|
+
* "outcomes": 2,
|
|
88086
|
+
* "attributed_outcomes": 1,
|
|
88087
|
+
* "partial": false
|
|
88088
|
+
* },
|
|
88089
|
+
* {
|
|
88090
|
+
* "date": "2026-08-08",
|
|
88091
|
+
* "spend": null,
|
|
88092
|
+
* "revenue": 60000,
|
|
88093
|
+
* "outcomes": 1,
|
|
88094
|
+
* "attributed_outcomes": 1,
|
|
88095
|
+
* "partial": false
|
|
88096
|
+
* },
|
|
88097
|
+
* {
|
|
88098
|
+
* "date": "2026-08-09",
|
|
88099
|
+
* "spend": null,
|
|
88100
|
+
* "revenue": 60000,
|
|
88101
|
+
* "outcomes": 1,
|
|
88102
|
+
* "attributed_outcomes": 1,
|
|
88103
|
+
* "partial": false
|
|
88104
|
+
* },
|
|
88105
|
+
* {
|
|
88106
|
+
* "date": "2026-08-10",
|
|
88107
|
+
* "spend": null,
|
|
88108
|
+
* "revenue": 110000,
|
|
88109
|
+
* "outcomes": 2,
|
|
88110
|
+
* "attributed_outcomes": 1,
|
|
88111
|
+
* "partial": false
|
|
88112
|
+
* },
|
|
88113
|
+
* {
|
|
88114
|
+
* "date": "2026-08-11",
|
|
88115
|
+
* "spend": null,
|
|
88116
|
+
* "revenue": 80000,
|
|
88117
|
+
* "outcomes": 1,
|
|
88118
|
+
* "attributed_outcomes": 1,
|
|
88119
|
+
* "partial": false
|
|
88120
|
+
* },
|
|
88121
|
+
* {
|
|
88122
|
+
* "date": "2026-08-12",
|
|
88123
|
+
* "spend": null,
|
|
88124
|
+
* "revenue": 100000,
|
|
88125
|
+
* "outcomes": 2,
|
|
88126
|
+
* "attributed_outcomes": 1,
|
|
88127
|
+
* "partial": false
|
|
88128
|
+
* },
|
|
88129
|
+
* {
|
|
88130
|
+
* "date": "2026-08-13",
|
|
88131
|
+
* "spend": null,
|
|
88132
|
+
* "revenue": 90000,
|
|
88133
|
+
* "outcomes": 1,
|
|
88134
|
+
* "attributed_outcomes": 1,
|
|
88135
|
+
* "partial": false
|
|
88136
|
+
* },
|
|
88137
|
+
* {
|
|
88138
|
+
* "date": "2026-08-14",
|
|
88139
|
+
* "spend": null,
|
|
88140
|
+
* "revenue": 90000,
|
|
88141
|
+
* "outcomes": 2,
|
|
88142
|
+
* "attributed_outcomes": 1,
|
|
88143
|
+
* "partial": false
|
|
88144
|
+
* },
|
|
88145
|
+
* {
|
|
88146
|
+
* "date": "2026-08-15",
|
|
88147
|
+
* "spend": null,
|
|
88148
|
+
* "revenue": 70000,
|
|
88149
|
+
* "outcomes": 1,
|
|
88150
|
+
* "attributed_outcomes": 1,
|
|
88151
|
+
* "partial": false
|
|
88152
|
+
* },
|
|
88153
|
+
* {
|
|
88154
|
+
* "date": "2026-08-16",
|
|
88155
|
+
* "spend": null,
|
|
88156
|
+
* "revenue": 50000,
|
|
88157
|
+
* "outcomes": 1,
|
|
88158
|
+
* "attributed_outcomes": 1,
|
|
88159
|
+
* "partial": false
|
|
88160
|
+
* },
|
|
88161
|
+
* {
|
|
88162
|
+
* "date": "2026-08-17",
|
|
88163
|
+
* "spend": null,
|
|
88164
|
+
* "revenue": 100000,
|
|
88165
|
+
* "outcomes": 2,
|
|
88166
|
+
* "attributed_outcomes": 1,
|
|
88167
|
+
* "partial": false
|
|
88168
|
+
* },
|
|
88169
|
+
* {
|
|
88170
|
+
* "date": "2026-08-18",
|
|
88171
|
+
* "spend": null,
|
|
88172
|
+
* "revenue": 90000,
|
|
88173
|
+
* "outcomes": 1,
|
|
88174
|
+
* "attributed_outcomes": 1,
|
|
88175
|
+
* "partial": false
|
|
88176
|
+
* },
|
|
88177
|
+
* {
|
|
88178
|
+
* "date": "2026-08-19",
|
|
88179
|
+
* "spend": null,
|
|
88180
|
+
* "revenue": 90000,
|
|
88181
|
+
* "outcomes": 1,
|
|
88182
|
+
* "attributed_outcomes": 1,
|
|
88183
|
+
* "partial": false
|
|
88184
|
+
* },
|
|
88185
|
+
* {
|
|
88186
|
+
* "date": "2026-08-20",
|
|
88187
|
+
* "spend": null,
|
|
88188
|
+
* "revenue": 110000,
|
|
88189
|
+
* "outcomes": 2,
|
|
88190
|
+
* "attributed_outcomes": 1,
|
|
88191
|
+
* "partial": false
|
|
88192
|
+
* },
|
|
88193
|
+
* {
|
|
88194
|
+
* "date": "2026-08-21",
|
|
88195
|
+
* "spend": null,
|
|
88196
|
+
* "revenue": 80000,
|
|
88197
|
+
* "outcomes": 1,
|
|
88198
|
+
* "attributed_outcomes": 1,
|
|
88199
|
+
* "partial": false
|
|
88200
|
+
* },
|
|
88201
|
+
* {
|
|
88202
|
+
* "date": "2026-08-22",
|
|
88203
|
+
* "spend": null,
|
|
88204
|
+
* "revenue": 60000,
|
|
88205
|
+
* "outcomes": 1,
|
|
88206
|
+
* "attributed_outcomes": 1,
|
|
88207
|
+
* "partial": false
|
|
88208
|
+
* },
|
|
88209
|
+
* {
|
|
88210
|
+
* "date": "2026-08-23",
|
|
88211
|
+
* "spend": null,
|
|
88212
|
+
* "revenue": 60000,
|
|
88213
|
+
* "outcomes": 1,
|
|
88214
|
+
* "attributed_outcomes": 1,
|
|
88215
|
+
* "partial": false
|
|
88216
|
+
* }
|
|
88217
|
+
* ]
|
|
87732
88218
|
* }
|
|
87733
88219
|
* }
|
|
87734
88220
|
*/
|
|
@@ -87862,6 +88348,8 @@ interface paths {
|
|
|
87862
88348
|
/** @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
88349
|
sample?: "1" | "true";
|
|
87864
88350
|
limit?: number;
|
|
88351
|
+
/** @description `1` adds each row’s `series[]`: one `{date, spend, outcome_count}` per day of the window (the last 92 days at most). */
|
|
88352
|
+
series?: "1" | "true";
|
|
87865
88353
|
};
|
|
87866
88354
|
header?: never;
|
|
87867
88355
|
path?: never;
|
|
@@ -87888,7 +88376,164 @@ interface paths {
|
|
|
87888
88376
|
* "outcome_value": 3120000,
|
|
87889
88377
|
* "roas": 3.69,
|
|
87890
88378
|
* "direct_cash_value": 2100000,
|
|
87891
|
-
* "inherited_cash_value": 600000
|
|
88379
|
+
* "inherited_cash_value": 600000,
|
|
88380
|
+
* "top_ad": {
|
|
88381
|
+
* "external_id": "120212000000000009",
|
|
88382
|
+
* "name": "Video testimonio 15s",
|
|
88383
|
+
* "creative_thumbnail_url": "https://cdn.vitrinadev.com/examples/ads/video-testimonio-15s.jpg"
|
|
88384
|
+
* },
|
|
88385
|
+
* "series": [
|
|
88386
|
+
* {
|
|
88387
|
+
* "date": "2026-08-24",
|
|
88388
|
+
* "spend": 31800,
|
|
88389
|
+
* "outcome_count": 1
|
|
88390
|
+
* },
|
|
88391
|
+
* {
|
|
88392
|
+
* "date": "2026-08-25",
|
|
88393
|
+
* "spend": 35700,
|
|
88394
|
+
* "outcome_count": 2
|
|
88395
|
+
* },
|
|
88396
|
+
* {
|
|
88397
|
+
* "date": "2026-08-26",
|
|
88398
|
+
* "spend": 28700,
|
|
88399
|
+
* "outcome_count": 1
|
|
88400
|
+
* },
|
|
88401
|
+
* {
|
|
88402
|
+
* "date": "2026-08-27",
|
|
88403
|
+
* "spend": 33400,
|
|
88404
|
+
* "outcome_count": 1
|
|
88405
|
+
* },
|
|
88406
|
+
* {
|
|
88407
|
+
* "date": "2026-08-28",
|
|
88408
|
+
* "spend": 30300,
|
|
88409
|
+
* "outcome_count": 1
|
|
88410
|
+
* },
|
|
88411
|
+
* {
|
|
88412
|
+
* "date": "2026-08-29",
|
|
88413
|
+
* "spend": 19700,
|
|
88414
|
+
* "outcome_count": 1
|
|
88415
|
+
* },
|
|
88416
|
+
* {
|
|
88417
|
+
* "date": "2026-08-30",
|
|
88418
|
+
* "spend": 22100,
|
|
88419
|
+
* "outcome_count": 1
|
|
88420
|
+
* },
|
|
88421
|
+
* {
|
|
88422
|
+
* "date": "2026-08-31",
|
|
88423
|
+
* "spend": 28700,
|
|
88424
|
+
* "outcome_count": 1
|
|
88425
|
+
* },
|
|
88426
|
+
* {
|
|
88427
|
+
* "date": "2026-09-01",
|
|
88428
|
+
* "spend": 33400,
|
|
88429
|
+
* "outcome_count": 1
|
|
88430
|
+
* },
|
|
88431
|
+
* {
|
|
88432
|
+
* "date": "2026-09-02",
|
|
88433
|
+
* "spend": 30300,
|
|
88434
|
+
* "outcome_count": 1
|
|
88435
|
+
* },
|
|
88436
|
+
* {
|
|
88437
|
+
* "date": "2026-09-03",
|
|
88438
|
+
* "spend": 31800,
|
|
88439
|
+
* "outcome_count": 1
|
|
88440
|
+
* },
|
|
88441
|
+
* {
|
|
88442
|
+
* "date": "2026-09-04",
|
|
88443
|
+
* "spend": 35700,
|
|
88444
|
+
* "outcome_count": 1
|
|
88445
|
+
* },
|
|
88446
|
+
* {
|
|
88447
|
+
* "date": "2026-09-05",
|
|
88448
|
+
* "spend": 17800,
|
|
88449
|
+
* "outcome_count": 1
|
|
88450
|
+
* },
|
|
88451
|
+
* {
|
|
88452
|
+
* "date": "2026-09-06",
|
|
88453
|
+
* "spend": 20700,
|
|
88454
|
+
* "outcome_count": 1
|
|
88455
|
+
* },
|
|
88456
|
+
* {
|
|
88457
|
+
* "date": "2026-09-07",
|
|
88458
|
+
* "spend": 30300,
|
|
88459
|
+
* "outcome_count": 1
|
|
88460
|
+
* },
|
|
88461
|
+
* {
|
|
88462
|
+
* "date": "2026-09-08",
|
|
88463
|
+
* "spend": 31800,
|
|
88464
|
+
* "outcome_count": 1
|
|
88465
|
+
* },
|
|
88466
|
+
* {
|
|
88467
|
+
* "date": "2026-09-09",
|
|
88468
|
+
* "spend": 35700,
|
|
88469
|
+
* "outcome_count": 1
|
|
88470
|
+
* },
|
|
88471
|
+
* {
|
|
88472
|
+
* "date": "2026-09-10",
|
|
88473
|
+
* "spend": 28700,
|
|
88474
|
+
* "outcome_count": 1
|
|
88475
|
+
* },
|
|
88476
|
+
* {
|
|
88477
|
+
* "date": "2026-09-11",
|
|
88478
|
+
* "spend": 33400,
|
|
88479
|
+
* "outcome_count": 1
|
|
88480
|
+
* },
|
|
88481
|
+
* {
|
|
88482
|
+
* "date": "2026-09-12",
|
|
88483
|
+
* "spend": 18800,
|
|
88484
|
+
* "outcome_count": 1
|
|
88485
|
+
* },
|
|
88486
|
+
* {
|
|
88487
|
+
* "date": "2026-09-13",
|
|
88488
|
+
* "spend": 19700,
|
|
88489
|
+
* "outcome_count": 1
|
|
88490
|
+
* },
|
|
88491
|
+
* {
|
|
88492
|
+
* "date": "2026-09-14",
|
|
88493
|
+
* "spend": 35700,
|
|
88494
|
+
* "outcome_count": 1
|
|
88495
|
+
* },
|
|
88496
|
+
* {
|
|
88497
|
+
* "date": "2026-09-15",
|
|
88498
|
+
* "spend": 28700,
|
|
88499
|
+
* "outcome_count": 1
|
|
88500
|
+
* },
|
|
88501
|
+
* {
|
|
88502
|
+
* "date": "2026-09-16",
|
|
88503
|
+
* "spend": 33400,
|
|
88504
|
+
* "outcome_count": 1
|
|
88505
|
+
* },
|
|
88506
|
+
* {
|
|
88507
|
+
* "date": "2026-09-17",
|
|
88508
|
+
* "spend": 30200,
|
|
88509
|
+
* "outcome_count": 1
|
|
88510
|
+
* },
|
|
88511
|
+
* {
|
|
88512
|
+
* "date": "2026-09-18",
|
|
88513
|
+
* "spend": 31800,
|
|
88514
|
+
* "outcome_count": 1
|
|
88515
|
+
* },
|
|
88516
|
+
* {
|
|
88517
|
+
* "date": "2026-09-19",
|
|
88518
|
+
* "spend": 22100,
|
|
88519
|
+
* "outcome_count": 1
|
|
88520
|
+
* },
|
|
88521
|
+
* {
|
|
88522
|
+
* "date": "2026-09-20",
|
|
88523
|
+
* "spend": 17800,
|
|
88524
|
+
* "outcome_count": 1
|
|
88525
|
+
* },
|
|
88526
|
+
* {
|
|
88527
|
+
* "date": "2026-09-21",
|
|
88528
|
+
* "spend": 33400,
|
|
88529
|
+
* "outcome_count": 1
|
|
88530
|
+
* },
|
|
88531
|
+
* {
|
|
88532
|
+
* "date": "2026-09-22",
|
|
88533
|
+
* "spend": 13600,
|
|
88534
|
+
* "outcome_count": 1
|
|
88535
|
+
* }
|
|
88536
|
+
* ]
|
|
87892
88537
|
* }
|
|
87893
88538
|
* ]
|
|
87894
88539
|
* }
|
|
@@ -88056,6 +88701,8 @@ interface paths {
|
|
|
88056
88701
|
* "credited_weight": 1,
|
|
88057
88702
|
* "touch_count": 3,
|
|
88058
88703
|
* "path_length": 3,
|
|
88704
|
+
* "first_touch_time": "2026-09-06T21:14:00.000Z",
|
|
88705
|
+
* "last_touch_time": "2026-09-11T13:02:00.000Z",
|
|
88059
88706
|
* "is_inherited": false
|
|
88060
88707
|
* }
|
|
88061
88708
|
* ]
|
|
@@ -88186,6 +88833,8 @@ interface paths {
|
|
|
88186
88833
|
/** @description A rolling lookback, not a date range — Atribu’s `top-performers` operation takes no `from`/`to`. Defaults to `28d`. */
|
|
88187
88834
|
window?: "7d" | "14d" | "28d" | "lifetime";
|
|
88188
88835
|
limit?: number;
|
|
88836
|
+
/** @description `1` adds each row’s `series[]`: the last 14 days of `{date, spend, ctr}` (the first 50 rows; later rows answer `series: null`). */
|
|
88837
|
+
series?: "1" | "true";
|
|
88189
88838
|
/** @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
88839
|
sample?: "1" | "true";
|
|
88191
88840
|
};
|
|
@@ -88209,6 +88858,10 @@ interface paths {
|
|
|
88209
88858
|
* "ad_external_id": "120212000000000009",
|
|
88210
88859
|
* "ad_name": "Video testimonio 15s",
|
|
88211
88860
|
* "campaign_name": "Leads · Septiembre",
|
|
88861
|
+
* "campaign": {
|
|
88862
|
+
* "external_id": "120211000000000001",
|
|
88863
|
+
* "name": "Leads · Septiembre"
|
|
88864
|
+
* },
|
|
88212
88865
|
* "ad_set_name": "Santiago 25-45",
|
|
88213
88866
|
* "creative_thumbnail_url": null,
|
|
88214
88867
|
* "score_window": "28d",
|
|
@@ -88223,7 +88876,79 @@ interface paths {
|
|
|
88223
88876
|
* "attributed_revenue": 480000,
|
|
88224
88877
|
* "roas": 3.2,
|
|
88225
88878
|
* "fatigue_state": "active",
|
|
88226
|
-
* "fatigue_risk_tier": "low"
|
|
88879
|
+
* "fatigue_risk_tier": "low",
|
|
88880
|
+
* "series": [
|
|
88881
|
+
* {
|
|
88882
|
+
* "date": "2026-09-09",
|
|
88883
|
+
* "spend": 6300,
|
|
88884
|
+
* "ctr": 1.79
|
|
88885
|
+
* },
|
|
88886
|
+
* {
|
|
88887
|
+
* "date": "2026-09-10",
|
|
88888
|
+
* "spend": 7000,
|
|
88889
|
+
* "ctr": 1.8
|
|
88890
|
+
* },
|
|
88891
|
+
* {
|
|
88892
|
+
* "date": "2026-09-11",
|
|
88893
|
+
* "spend": 5600,
|
|
88894
|
+
* "ctr": 1.82
|
|
88895
|
+
* },
|
|
88896
|
+
* {
|
|
88897
|
+
* "date": "2026-09-12",
|
|
88898
|
+
* "spend": 4100,
|
|
88899
|
+
* "ctr": 1.84
|
|
88900
|
+
* },
|
|
88901
|
+
* {
|
|
88902
|
+
* "date": "2026-09-13",
|
|
88903
|
+
* "spend": 3700,
|
|
88904
|
+
* "ctr": 1.86
|
|
88905
|
+
* },
|
|
88906
|
+
* {
|
|
88907
|
+
* "date": "2026-09-14",
|
|
88908
|
+
* "spend": 6300,
|
|
88909
|
+
* "ctr": 1.87
|
|
88910
|
+
* },
|
|
88911
|
+
* {
|
|
88912
|
+
* "date": "2026-09-15",
|
|
88913
|
+
* "spend": 7000,
|
|
88914
|
+
* "ctr": 1.89
|
|
88915
|
+
* },
|
|
88916
|
+
* {
|
|
88917
|
+
* "date": "2026-09-16",
|
|
88918
|
+
* "spend": 5600,
|
|
88919
|
+
* "ctr": 1.91
|
|
88920
|
+
* },
|
|
88921
|
+
* {
|
|
88922
|
+
* "date": "2026-09-17",
|
|
88923
|
+
* "spend": 6600,
|
|
88924
|
+
* "ctr": 1.93
|
|
88925
|
+
* },
|
|
88926
|
+
* {
|
|
88927
|
+
* "date": "2026-09-18",
|
|
88928
|
+
* "spend": 6000,
|
|
88929
|
+
* "ctr": 1.94
|
|
88930
|
+
* },
|
|
88931
|
+
* {
|
|
88932
|
+
* "date": "2026-09-19",
|
|
88933
|
+
* "spend": 3900,
|
|
88934
|
+
* "ctr": 1.96
|
|
88935
|
+
* },
|
|
88936
|
+
* {
|
|
88937
|
+
* "date": "2026-09-20",
|
|
88938
|
+
* "spend": 4300,
|
|
88939
|
+
* "ctr": 1.98
|
|
88940
|
+
* },
|
|
88941
|
+
* {
|
|
88942
|
+
* "date": "2026-09-21",
|
|
88943
|
+
* "spend": 5600,
|
|
88944
|
+
* "ctr": 2
|
|
88945
|
+
* },
|
|
88946
|
+
* {
|
|
88947
|
+
* "date": "2026-09-22",
|
|
88948
|
+
* "spend": 3000,
|
|
88949
|
+
* "ctr": 2.01
|
|
88950
|
+
* }
|
|
88951
|
+
* ]
|
|
88227
88952
|
* }
|
|
88228
88953
|
* ]
|
|
88229
88954
|
* }
|
|
@@ -88420,11 +89145,16 @@ interface paths {
|
|
|
88420
89145
|
* }
|
|
88421
89146
|
* },
|
|
88422
89147
|
* "attribution_coverage": {
|
|
88423
|
-
* "total_conversions":
|
|
88424
|
-
* "with_full_utms":
|
|
88425
|
-
* "with_fbclid_only":
|
|
88426
|
-
* "with_no_tracking":
|
|
88427
|
-
* "coverage_percent":
|
|
89148
|
+
* "total_conversions": 44,
|
|
89149
|
+
* "with_full_utms": 27,
|
|
89150
|
+
* "with_fbclid_only": 5,
|
|
89151
|
+
* "with_no_tracking": 12,
|
|
89152
|
+
* "coverage_percent": 72.7
|
|
89153
|
+
* },
|
|
89154
|
+
* "outcomes_coverage": {
|
|
89155
|
+
* "outcomes": 42,
|
|
89156
|
+
* "attributed_outcomes": 31,
|
|
89157
|
+
* "coverage_percent": 73.8
|
|
88428
89158
|
* }
|
|
88429
89159
|
* }
|
|
88430
89160
|
* }
|
|
@@ -88921,7 +89651,1512 @@ interface paths {
|
|
|
88921
89651
|
};
|
|
88922
89652
|
};
|
|
88923
89653
|
responses: {
|
|
88924
|
-
/** @description The stored goal */
|
|
89654
|
+
/** @description The stored goal */
|
|
89655
|
+
200: {
|
|
89656
|
+
headers: {
|
|
89657
|
+
[name: string]: unknown;
|
|
89658
|
+
};
|
|
89659
|
+
content: {
|
|
89660
|
+
/**
|
|
89661
|
+
* @example {
|
|
89662
|
+
* "data": {
|
|
89663
|
+
* "kind": "outcomes",
|
|
89664
|
+
* "target": 30,
|
|
89665
|
+
* "period": "month",
|
|
89666
|
+
* "updated_at": "2026-09-23T15:00:00.000Z",
|
|
89667
|
+
* "updated_by": "20000000-0000-4000-8000-000000000001",
|
|
89668
|
+
* "persisted": true
|
|
89669
|
+
* }
|
|
89670
|
+
* }
|
|
89671
|
+
*/
|
|
89672
|
+
"application/json": {
|
|
89673
|
+
data: components["schemas"]["AdsGoal"] & Record<string, never>;
|
|
89674
|
+
};
|
|
89675
|
+
};
|
|
89676
|
+
};
|
|
89677
|
+
/** @description Validation error */
|
|
89678
|
+
400: {
|
|
89679
|
+
headers: {
|
|
89680
|
+
[name: string]: unknown;
|
|
89681
|
+
};
|
|
89682
|
+
content: {
|
|
89683
|
+
"application/json": components["schemas"]["Error"];
|
|
89684
|
+
};
|
|
89685
|
+
};
|
|
89686
|
+
/** @description Unauthorized */
|
|
89687
|
+
401: {
|
|
89688
|
+
headers: {
|
|
89689
|
+
[name: string]: unknown;
|
|
89690
|
+
};
|
|
89691
|
+
content: {
|
|
89692
|
+
"application/json": components["schemas"]["Error"];
|
|
89693
|
+
};
|
|
89694
|
+
};
|
|
89695
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
89696
|
+
402: {
|
|
89697
|
+
headers: {
|
|
89698
|
+
[name: string]: unknown;
|
|
89699
|
+
};
|
|
89700
|
+
content: {
|
|
89701
|
+
/**
|
|
89702
|
+
* @example {
|
|
89703
|
+
* "error": {
|
|
89704
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
89705
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
89706
|
+
* "details": {
|
|
89707
|
+
* "required": [
|
|
89708
|
+
* "vitrina_ads"
|
|
89709
|
+
* ],
|
|
89710
|
+
* "active": [],
|
|
89711
|
+
* "feature": "vitrina_ads",
|
|
89712
|
+
* "entitlement_state": "off"
|
|
89713
|
+
* }
|
|
89714
|
+
* }
|
|
89715
|
+
* }
|
|
89716
|
+
*/
|
|
89717
|
+
"application/json": components["schemas"]["Error"];
|
|
89718
|
+
};
|
|
89719
|
+
};
|
|
89720
|
+
/** @description Forbidden */
|
|
89721
|
+
403: {
|
|
89722
|
+
headers: {
|
|
89723
|
+
[name: string]: unknown;
|
|
89724
|
+
};
|
|
89725
|
+
content: {
|
|
89726
|
+
"application/json": components["schemas"]["Error"];
|
|
89727
|
+
};
|
|
89728
|
+
};
|
|
89729
|
+
/** @description Not found */
|
|
89730
|
+
404: {
|
|
89731
|
+
headers: {
|
|
89732
|
+
[name: string]: unknown;
|
|
89733
|
+
};
|
|
89734
|
+
content: {
|
|
89735
|
+
"application/json": components["schemas"]["Error"];
|
|
89736
|
+
};
|
|
89737
|
+
};
|
|
89738
|
+
/** @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. */
|
|
89739
|
+
409: {
|
|
89740
|
+
headers: {
|
|
89741
|
+
[name: string]: unknown;
|
|
89742
|
+
};
|
|
89743
|
+
content: {
|
|
89744
|
+
/**
|
|
89745
|
+
* @example {
|
|
89746
|
+
* "error": {
|
|
89747
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
89748
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
89749
|
+
* "details": {
|
|
89750
|
+
* "key_kind": "core"
|
|
89751
|
+
* }
|
|
89752
|
+
* }
|
|
89753
|
+
* }
|
|
89754
|
+
*/
|
|
89755
|
+
"application/json": components["schemas"]["Error"];
|
|
89756
|
+
};
|
|
89757
|
+
};
|
|
89758
|
+
/** @description Rate limited */
|
|
89759
|
+
429: {
|
|
89760
|
+
headers: {
|
|
89761
|
+
[name: string]: unknown;
|
|
89762
|
+
};
|
|
89763
|
+
content: {
|
|
89764
|
+
"application/json": components["schemas"]["Error"];
|
|
89765
|
+
};
|
|
89766
|
+
};
|
|
89767
|
+
};
|
|
89768
|
+
};
|
|
89769
|
+
post?: never;
|
|
89770
|
+
/**
|
|
89771
|
+
* Clear the monthly Ads goal
|
|
89772
|
+
* @description Removes the goal. Idempotent. With `sample=1` nothing is stored or removed.
|
|
89773
|
+
*/
|
|
89774
|
+
delete: {
|
|
89775
|
+
parameters: {
|
|
89776
|
+
query?: {
|
|
89777
|
+
/** @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. */
|
|
89778
|
+
sample?: "1" | "true";
|
|
89779
|
+
};
|
|
89780
|
+
header?: never;
|
|
89781
|
+
path?: never;
|
|
89782
|
+
cookie?: never;
|
|
89783
|
+
};
|
|
89784
|
+
requestBody?: never;
|
|
89785
|
+
responses: {
|
|
89786
|
+
/** @description Cleared */
|
|
89787
|
+
204: {
|
|
89788
|
+
headers: {
|
|
89789
|
+
[name: string]: unknown;
|
|
89790
|
+
};
|
|
89791
|
+
content?: never;
|
|
89792
|
+
};
|
|
89793
|
+
/** @description Validation error */
|
|
89794
|
+
400: {
|
|
89795
|
+
headers: {
|
|
89796
|
+
[name: string]: unknown;
|
|
89797
|
+
};
|
|
89798
|
+
content: {
|
|
89799
|
+
"application/json": components["schemas"]["Error"];
|
|
89800
|
+
};
|
|
89801
|
+
};
|
|
89802
|
+
/** @description Unauthorized */
|
|
89803
|
+
401: {
|
|
89804
|
+
headers: {
|
|
89805
|
+
[name: string]: unknown;
|
|
89806
|
+
};
|
|
89807
|
+
content: {
|
|
89808
|
+
"application/json": components["schemas"]["Error"];
|
|
89809
|
+
};
|
|
89810
|
+
};
|
|
89811
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
89812
|
+
402: {
|
|
89813
|
+
headers: {
|
|
89814
|
+
[name: string]: unknown;
|
|
89815
|
+
};
|
|
89816
|
+
content: {
|
|
89817
|
+
/**
|
|
89818
|
+
* @example {
|
|
89819
|
+
* "error": {
|
|
89820
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
89821
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
89822
|
+
* "details": {
|
|
89823
|
+
* "required": [
|
|
89824
|
+
* "vitrina_ads"
|
|
89825
|
+
* ],
|
|
89826
|
+
* "active": [],
|
|
89827
|
+
* "feature": "vitrina_ads",
|
|
89828
|
+
* "entitlement_state": "off"
|
|
89829
|
+
* }
|
|
89830
|
+
* }
|
|
89831
|
+
* }
|
|
89832
|
+
*/
|
|
89833
|
+
"application/json": components["schemas"]["Error"];
|
|
89834
|
+
};
|
|
89835
|
+
};
|
|
89836
|
+
/** @description Forbidden */
|
|
89837
|
+
403: {
|
|
89838
|
+
headers: {
|
|
89839
|
+
[name: string]: unknown;
|
|
89840
|
+
};
|
|
89841
|
+
content: {
|
|
89842
|
+
"application/json": components["schemas"]["Error"];
|
|
89843
|
+
};
|
|
89844
|
+
};
|
|
89845
|
+
/** @description Not found */
|
|
89846
|
+
404: {
|
|
89847
|
+
headers: {
|
|
89848
|
+
[name: string]: unknown;
|
|
89849
|
+
};
|
|
89850
|
+
content: {
|
|
89851
|
+
"application/json": components["schemas"]["Error"];
|
|
89852
|
+
};
|
|
89853
|
+
};
|
|
89854
|
+
/** @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. */
|
|
89855
|
+
409: {
|
|
89856
|
+
headers: {
|
|
89857
|
+
[name: string]: unknown;
|
|
89858
|
+
};
|
|
89859
|
+
content: {
|
|
89860
|
+
/**
|
|
89861
|
+
* @example {
|
|
89862
|
+
* "error": {
|
|
89863
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
89864
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
89865
|
+
* "details": {
|
|
89866
|
+
* "key_kind": "core"
|
|
89867
|
+
* }
|
|
89868
|
+
* }
|
|
89869
|
+
* }
|
|
89870
|
+
*/
|
|
89871
|
+
"application/json": components["schemas"]["Error"];
|
|
89872
|
+
};
|
|
89873
|
+
};
|
|
89874
|
+
/** @description Rate limited */
|
|
89875
|
+
429: {
|
|
89876
|
+
headers: {
|
|
89877
|
+
[name: string]: unknown;
|
|
89878
|
+
};
|
|
89879
|
+
content: {
|
|
89880
|
+
"application/json": components["schemas"]["Error"];
|
|
89881
|
+
};
|
|
89882
|
+
};
|
|
89883
|
+
};
|
|
89884
|
+
};
|
|
89885
|
+
options?: never;
|
|
89886
|
+
head?: never;
|
|
89887
|
+
patch?: never;
|
|
89888
|
+
trace?: never;
|
|
89889
|
+
};
|
|
89890
|
+
"/ads/actions": {
|
|
89891
|
+
parameters: {
|
|
89892
|
+
query?: never;
|
|
89893
|
+
header?: never;
|
|
89894
|
+
path?: never;
|
|
89895
|
+
cookie?: never;
|
|
89896
|
+
};
|
|
89897
|
+
/**
|
|
89898
|
+
* The suggested actions for one Ads screen
|
|
89899
|
+
* @description Up to 6 suggested actions for a screen, primary first, derived from the screen’s figures and the open recommendations of the measurement engine: pause a worn-out ad, raise a winning ad set’s budget, re-check the conversion wiring, re-scan the ad links — or, when Meta is not connected, only a `nav` card to reconnect it. Nothing here runs by itself: preview → confirm → execute.
|
|
89900
|
+
*
|
|
89901
|
+
* A `key` is `<kind>:<target external id>:<YYYY-MM-DD>` and is stable for the day. Dismissed actions stay on the list with `dismissed_until` set, sorted last. `include=adset_duplicate_swap` also lists the duplicate-and-swap actions (hidden by default).
|
|
89902
|
+
*
|
|
89903
|
+
* Card state machine (client): `proposed → previewing → confirming → running → done | failed | refused → (done) reverted`; `dismissed` for 7 days; `simulated` replaces `done` in sample mode.
|
|
89904
|
+
*/
|
|
89905
|
+
get: {
|
|
89906
|
+
parameters: {
|
|
89907
|
+
query: {
|
|
89908
|
+
/** @description The screen whose action rail to list (`atribuidos` has none). */
|
|
89909
|
+
screen: "resumen" | "campanas" | "atribuidos" | "creativos" | "salud";
|
|
89910
|
+
from: string;
|
|
89911
|
+
to: string;
|
|
89912
|
+
/** @description `adset_duplicate_swap` also lists the duplicate-and-swap actions (Salud). Hidden by default: it rebuilds an ad set (new id, learning reset) and is offered as the alternative after a `promoted_object_frozen` refusal. */
|
|
89913
|
+
include?: "adset_duplicate_swap";
|
|
89914
|
+
/** @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. */
|
|
89915
|
+
sample?: "1" | "true";
|
|
89916
|
+
};
|
|
89917
|
+
header?: never;
|
|
89918
|
+
path?: never;
|
|
89919
|
+
cookie?: never;
|
|
89920
|
+
};
|
|
89921
|
+
requestBody?: never;
|
|
89922
|
+
responses: {
|
|
89923
|
+
/** @description The actions */
|
|
89924
|
+
200: {
|
|
89925
|
+
headers: {
|
|
89926
|
+
[name: string]: unknown;
|
|
89927
|
+
};
|
|
89928
|
+
content: {
|
|
89929
|
+
/**
|
|
89930
|
+
* @example {
|
|
89931
|
+
* "data": [
|
|
89932
|
+
* {
|
|
89933
|
+
* "key": "pause_ad:120212000000000006:2026-09-23",
|
|
89934
|
+
* "kind": "pause_ad",
|
|
89935
|
+
* "screen": [
|
|
89936
|
+
* "creativos",
|
|
89937
|
+
* "resumen"
|
|
89938
|
+
* ],
|
|
89939
|
+
* "primary": true,
|
|
89940
|
+
* "title": "Pausar «Video testimonio · 30 s»",
|
|
89941
|
+
* "why": "Está desgastado: la gente ya lo vio demasiadas veces y **$184.300** de gasto rinde cada vez menos.",
|
|
89942
|
+
* "effect": "Deja de mostrarse de inmediato; puedes reactivarlo cuando quieras.",
|
|
89943
|
+
* "target": {
|
|
89944
|
+
* "level": "ad",
|
|
89945
|
+
* "external_id": "120212000000000006",
|
|
89946
|
+
* "name": "Video testimonio · 30 s",
|
|
89947
|
+
* "campaign_external_id": null
|
|
89948
|
+
* },
|
|
89949
|
+
* "params": {},
|
|
89950
|
+
* "reversible": true,
|
|
89951
|
+
* "risk": "reversible",
|
|
89952
|
+
* "engine_ref": {
|
|
89953
|
+
* "op": "ads.pause"
|
|
89954
|
+
* },
|
|
89955
|
+
* "facts": [
|
|
89956
|
+
* "critical_creative_name",
|
|
89957
|
+
* "critical_creative_spend",
|
|
89958
|
+
* "fatigued_creatives"
|
|
89959
|
+
* ],
|
|
89960
|
+
* "dismissed_until": null
|
|
89961
|
+
* },
|
|
89962
|
+
* {
|
|
89963
|
+
* "key": "budget_change:120211000000000077:2026-09-23",
|
|
89964
|
+
* "kind": "budget_change",
|
|
89965
|
+
* "screen": [
|
|
89966
|
+
* "campanas",
|
|
89967
|
+
* "resumen"
|
|
89968
|
+
* ],
|
|
89969
|
+
* "primary": false,
|
|
89970
|
+
* "title": "Subir 20 % el presupuesto de «Implantes · Conjunto principal»",
|
|
89971
|
+
* "why": "Está trayendo tratamientos a buen costo y tiene espacio para crecer. Es parte de «Implantes · Septiembre», tu campaña con mejor retorno (**4,1×**).",
|
|
89972
|
+
* "effect": "El presupuesto diario sube 20 %; puedes deshacerlo.",
|
|
89973
|
+
* "target": {
|
|
89974
|
+
* "level": "ad_set",
|
|
89975
|
+
* "external_id": "120211000000000077",
|
|
89976
|
+
* "name": "Implantes · Conjunto principal",
|
|
89977
|
+
* "campaign_external_id": null
|
|
89978
|
+
* },
|
|
89979
|
+
* "params": {
|
|
89980
|
+
* "budget_change_pct": 20
|
|
89981
|
+
* },
|
|
89982
|
+
* "reversible": true,
|
|
89983
|
+
* "risk": "reversible",
|
|
89984
|
+
* "engine_ref": {
|
|
89985
|
+
* "op": "recommendations.apply",
|
|
89986
|
+
* "recommendation_id": "a0a0a0a0-0000-4000-8000-000000000001"
|
|
89987
|
+
* },
|
|
89988
|
+
* "facts": [
|
|
89989
|
+
* "best_campaign_name",
|
|
89990
|
+
* "best_campaign_roas"
|
|
89991
|
+
* ],
|
|
89992
|
+
* "dismissed_until": null
|
|
89993
|
+
* }
|
|
89994
|
+
* ]
|
|
89995
|
+
* }
|
|
89996
|
+
*/
|
|
89997
|
+
"application/json": {
|
|
89998
|
+
data: components["schemas"]["AdsAction"][];
|
|
89999
|
+
};
|
|
90000
|
+
};
|
|
90001
|
+
};
|
|
90002
|
+
/** @description Validation error */
|
|
90003
|
+
400: {
|
|
90004
|
+
headers: {
|
|
90005
|
+
[name: string]: unknown;
|
|
90006
|
+
};
|
|
90007
|
+
content: {
|
|
90008
|
+
"application/json": components["schemas"]["Error"];
|
|
90009
|
+
};
|
|
90010
|
+
};
|
|
90011
|
+
/** @description Unauthorized */
|
|
90012
|
+
401: {
|
|
90013
|
+
headers: {
|
|
90014
|
+
[name: string]: unknown;
|
|
90015
|
+
};
|
|
90016
|
+
content: {
|
|
90017
|
+
"application/json": components["schemas"]["Error"];
|
|
90018
|
+
};
|
|
90019
|
+
};
|
|
90020
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
90021
|
+
402: {
|
|
90022
|
+
headers: {
|
|
90023
|
+
[name: string]: unknown;
|
|
90024
|
+
};
|
|
90025
|
+
content: {
|
|
90026
|
+
/**
|
|
90027
|
+
* @example {
|
|
90028
|
+
* "error": {
|
|
90029
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
90030
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
90031
|
+
* "details": {
|
|
90032
|
+
* "required": [
|
|
90033
|
+
* "vitrina_ads"
|
|
90034
|
+
* ],
|
|
90035
|
+
* "active": [],
|
|
90036
|
+
* "feature": "vitrina_ads",
|
|
90037
|
+
* "entitlement_state": "off"
|
|
90038
|
+
* }
|
|
90039
|
+
* }
|
|
90040
|
+
* }
|
|
90041
|
+
*/
|
|
90042
|
+
"application/json": components["schemas"]["Error"];
|
|
90043
|
+
};
|
|
90044
|
+
};
|
|
90045
|
+
/** @description Forbidden */
|
|
90046
|
+
403: {
|
|
90047
|
+
headers: {
|
|
90048
|
+
[name: string]: unknown;
|
|
90049
|
+
};
|
|
90050
|
+
content: {
|
|
90051
|
+
"application/json": components["schemas"]["Error"];
|
|
90052
|
+
};
|
|
90053
|
+
};
|
|
90054
|
+
/** @description Not found */
|
|
90055
|
+
404: {
|
|
90056
|
+
headers: {
|
|
90057
|
+
[name: string]: unknown;
|
|
90058
|
+
};
|
|
90059
|
+
content: {
|
|
90060
|
+
"application/json": components["schemas"]["Error"];
|
|
90061
|
+
};
|
|
90062
|
+
};
|
|
90063
|
+
/** @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. */
|
|
90064
|
+
409: {
|
|
90065
|
+
headers: {
|
|
90066
|
+
[name: string]: unknown;
|
|
90067
|
+
};
|
|
90068
|
+
content: {
|
|
90069
|
+
/**
|
|
90070
|
+
* @example {
|
|
90071
|
+
* "error": {
|
|
90072
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
90073
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
90074
|
+
* "details": {
|
|
90075
|
+
* "key_kind": "core"
|
|
90076
|
+
* }
|
|
90077
|
+
* }
|
|
90078
|
+
* }
|
|
90079
|
+
*/
|
|
90080
|
+
"application/json": components["schemas"]["Error"];
|
|
90081
|
+
};
|
|
90082
|
+
};
|
|
90083
|
+
/** @description Rate limited */
|
|
90084
|
+
429: {
|
|
90085
|
+
headers: {
|
|
90086
|
+
[name: string]: unknown;
|
|
90087
|
+
};
|
|
90088
|
+
content: {
|
|
90089
|
+
"application/json": components["schemas"]["Error"];
|
|
90090
|
+
};
|
|
90091
|
+
};
|
|
90092
|
+
};
|
|
90093
|
+
};
|
|
90094
|
+
put?: never;
|
|
90095
|
+
post?: never;
|
|
90096
|
+
delete?: never;
|
|
90097
|
+
options?: never;
|
|
90098
|
+
head?: never;
|
|
90099
|
+
patch?: never;
|
|
90100
|
+
trace?: never;
|
|
90101
|
+
};
|
|
90102
|
+
"/ads/actions/{key}/preview": {
|
|
90103
|
+
parameters: {
|
|
90104
|
+
query?: never;
|
|
90105
|
+
header?: never;
|
|
90106
|
+
path?: never;
|
|
90107
|
+
cookie?: never;
|
|
90108
|
+
};
|
|
90109
|
+
get?: never;
|
|
90110
|
+
put?: never;
|
|
90111
|
+
/**
|
|
90112
|
+
* Preview an action before confirming it
|
|
90113
|
+
* @description Reads the target’s live state and returns what will change (`rows`: before → after), the warnings, and — for a duplicate-and-swap — the consent lines the owner must accept. It also records ONE single-use approval bound to the caller, the action and its exact parameters, valid for 10 minutes (`expires_at`): `preview_id` is what `execute` spends. No engine write happens here.
|
|
90114
|
+
*
|
|
90115
|
+
* 409 `ADS_ACTION_NOT_AVAILABLE` when the action is no longer on today’s list (or is a `nav` card, which has nothing to execute).
|
|
90116
|
+
*/
|
|
90117
|
+
post: {
|
|
90118
|
+
parameters: {
|
|
90119
|
+
query?: never;
|
|
90120
|
+
header?: {
|
|
90121
|
+
/** @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. */
|
|
90122
|
+
"Idempotency-Key"?: string;
|
|
90123
|
+
};
|
|
90124
|
+
path: {
|
|
90125
|
+
/** @description The action key: `<kind>:<target external id>:<YYYY-MM-DD>`. */
|
|
90126
|
+
key: string;
|
|
90127
|
+
};
|
|
90128
|
+
cookie?: never;
|
|
90129
|
+
};
|
|
90130
|
+
requestBody: {
|
|
90131
|
+
content: {
|
|
90132
|
+
/**
|
|
90133
|
+
* @example {
|
|
90134
|
+
* "from": "2026-08-24",
|
|
90135
|
+
* "to": "2026-09-23"
|
|
90136
|
+
* }
|
|
90137
|
+
*/
|
|
90138
|
+
"application/json": {
|
|
90139
|
+
from: string;
|
|
90140
|
+
to: string;
|
|
90141
|
+
sample?: boolean;
|
|
90142
|
+
};
|
|
90143
|
+
};
|
|
90144
|
+
};
|
|
90145
|
+
responses: {
|
|
90146
|
+
/** @description The preview */
|
|
90147
|
+
200: {
|
|
90148
|
+
headers: {
|
|
90149
|
+
[name: string]: unknown;
|
|
90150
|
+
};
|
|
90151
|
+
content: {
|
|
90152
|
+
/**
|
|
90153
|
+
* @example {
|
|
90154
|
+
* "data": {
|
|
90155
|
+
* "preview_id": "b1b1b1b1-0000-4000-8000-000000000001",
|
|
90156
|
+
* "expires_at": "2026-09-23T15:10:00.000Z",
|
|
90157
|
+
* "action_key": "budget_change:120211000000000077:2026-09-23",
|
|
90158
|
+
* "rows": [
|
|
90159
|
+
* {
|
|
90160
|
+
* "key": "daily_budget",
|
|
90161
|
+
* "label": "Presupuesto diario",
|
|
90162
|
+
* "before": "$10.000",
|
|
90163
|
+
* "after": "$12.000"
|
|
90164
|
+
* }
|
|
90165
|
+
* ],
|
|
90166
|
+
* "warnings": [
|
|
90167
|
+
* "Solo se permite cambiar el presupuesto hasta 50 % por vez."
|
|
90168
|
+
* ],
|
|
90169
|
+
* "consent": [],
|
|
90170
|
+
* "consent_terms": null,
|
|
90171
|
+
* "reversible": true,
|
|
90172
|
+
* "engine_op": "recommendations.apply"
|
|
90173
|
+
* }
|
|
90174
|
+
* }
|
|
90175
|
+
*/
|
|
90176
|
+
"application/json": {
|
|
90177
|
+
data: components["schemas"]["AdsActionPreview"];
|
|
90178
|
+
};
|
|
90179
|
+
};
|
|
90180
|
+
};
|
|
90181
|
+
/** @description Validation error */
|
|
90182
|
+
400: {
|
|
90183
|
+
headers: {
|
|
90184
|
+
[name: string]: unknown;
|
|
90185
|
+
};
|
|
90186
|
+
content: {
|
|
90187
|
+
"application/json": components["schemas"]["Error"];
|
|
90188
|
+
};
|
|
90189
|
+
};
|
|
90190
|
+
/** @description Unauthorized */
|
|
90191
|
+
401: {
|
|
90192
|
+
headers: {
|
|
90193
|
+
[name: string]: unknown;
|
|
90194
|
+
};
|
|
90195
|
+
content: {
|
|
90196
|
+
"application/json": components["schemas"]["Error"];
|
|
90197
|
+
};
|
|
90198
|
+
};
|
|
90199
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
90200
|
+
402: {
|
|
90201
|
+
headers: {
|
|
90202
|
+
[name: string]: unknown;
|
|
90203
|
+
};
|
|
90204
|
+
content: {
|
|
90205
|
+
/**
|
|
90206
|
+
* @example {
|
|
90207
|
+
* "error": {
|
|
90208
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
90209
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
90210
|
+
* "details": {
|
|
90211
|
+
* "required": [
|
|
90212
|
+
* "vitrina_ads"
|
|
90213
|
+
* ],
|
|
90214
|
+
* "active": [],
|
|
90215
|
+
* "feature": "vitrina_ads",
|
|
90216
|
+
* "entitlement_state": "off"
|
|
90217
|
+
* }
|
|
90218
|
+
* }
|
|
90219
|
+
* }
|
|
90220
|
+
*/
|
|
90221
|
+
"application/json": components["schemas"]["Error"];
|
|
90222
|
+
};
|
|
90223
|
+
};
|
|
90224
|
+
/** @description Forbidden */
|
|
90225
|
+
403: {
|
|
90226
|
+
headers: {
|
|
90227
|
+
[name: string]: unknown;
|
|
90228
|
+
};
|
|
90229
|
+
content: {
|
|
90230
|
+
"application/json": components["schemas"]["Error"];
|
|
90231
|
+
};
|
|
90232
|
+
};
|
|
90233
|
+
/** @description Not found */
|
|
90234
|
+
404: {
|
|
90235
|
+
headers: {
|
|
90236
|
+
[name: string]: unknown;
|
|
90237
|
+
};
|
|
90238
|
+
content: {
|
|
90239
|
+
"application/json": components["schemas"]["Error"];
|
|
90240
|
+
};
|
|
90241
|
+
};
|
|
90242
|
+
/** @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. */
|
|
90243
|
+
409: {
|
|
90244
|
+
headers: {
|
|
90245
|
+
[name: string]: unknown;
|
|
90246
|
+
};
|
|
90247
|
+
content: {
|
|
90248
|
+
/**
|
|
90249
|
+
* @example {
|
|
90250
|
+
* "error": {
|
|
90251
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
90252
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
90253
|
+
* "details": {
|
|
90254
|
+
* "key_kind": "core"
|
|
90255
|
+
* }
|
|
90256
|
+
* }
|
|
90257
|
+
* }
|
|
90258
|
+
*/
|
|
90259
|
+
"application/json": components["schemas"]["Error"];
|
|
90260
|
+
};
|
|
90261
|
+
};
|
|
90262
|
+
/** @description Rate limited */
|
|
90263
|
+
429: {
|
|
90264
|
+
headers: {
|
|
90265
|
+
[name: string]: unknown;
|
|
90266
|
+
};
|
|
90267
|
+
content: {
|
|
90268
|
+
"application/json": components["schemas"]["Error"];
|
|
90269
|
+
};
|
|
90270
|
+
};
|
|
90271
|
+
};
|
|
90272
|
+
};
|
|
90273
|
+
delete?: never;
|
|
90274
|
+
options?: never;
|
|
90275
|
+
head?: never;
|
|
90276
|
+
patch?: never;
|
|
90277
|
+
trace?: never;
|
|
90278
|
+
};
|
|
90279
|
+
"/ads/actions/{key}/execute": {
|
|
90280
|
+
parameters: {
|
|
90281
|
+
query?: never;
|
|
90282
|
+
header?: never;
|
|
90283
|
+
path?: never;
|
|
90284
|
+
cookie?: never;
|
|
90285
|
+
};
|
|
90286
|
+
get?: never;
|
|
90287
|
+
put?: never;
|
|
90288
|
+
/**
|
|
90289
|
+
* Confirm and run a previewed action
|
|
90290
|
+
* @description Spends the preview’s single-use approval and queues the engine write; poll `GET /ads/actions/executions/{id}`. **`Idempotency-Key` is required** (400 without): a replay with the same key answers the first execution and writes nothing.
|
|
90291
|
+
*
|
|
90292
|
+
* 409 `ADS_ACTION_REPLAY_BLOCKED` when the approval cannot be spent — `details.reason` is `expired` (preview older than 10 minutes), `consumed` (already confirmed, e.g. from another tab), `not_found` or `binding_mismatch` (another person’s preview, or another action — incl. a real preview sent with `sample: true`). In sample mode nothing reaches the engine: the execution is born `succeeded` with `simulated: true`, and only a sample preview can be spent.
|
|
90293
|
+
*
|
|
90294
|
+
* **Duplicate-and-swap** needs the owner’s acceptance of the preview’s `consent_terms` (the verbatim consent text): send `consent: { version, text_hash, accepted_at? }`. Missing, different or older than 24 h → 409 `ADS_ACTION_CONSENT_REQUIRED` (`details.reason` missing|mismatch|stale, `details.consent` = the current version and hash) — nothing is spent and nothing reaches the engine.
|
|
90295
|
+
*
|
|
90296
|
+
* If the job cannot be queued the answer is still 202, with `status: failed`: the execution exists and says why (`error.code: queue_unavailable`).
|
|
90297
|
+
*/
|
|
90298
|
+
post: {
|
|
90299
|
+
parameters: {
|
|
90300
|
+
query?: never;
|
|
90301
|
+
header?: {
|
|
90302
|
+
/** @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. */
|
|
90303
|
+
"Idempotency-Key"?: string;
|
|
90304
|
+
};
|
|
90305
|
+
path: {
|
|
90306
|
+
/** @description The action key: `<kind>:<target external id>:<YYYY-MM-DD>`. */
|
|
90307
|
+
key: string;
|
|
90308
|
+
};
|
|
90309
|
+
cookie?: never;
|
|
90310
|
+
};
|
|
90311
|
+
requestBody: {
|
|
90312
|
+
content: {
|
|
90313
|
+
/**
|
|
90314
|
+
* @example {
|
|
90315
|
+
* "preview_id": "b1b1b1b1-0000-4000-8000-000000000001"
|
|
90316
|
+
* }
|
|
90317
|
+
*/
|
|
90318
|
+
"application/json": {
|
|
90319
|
+
/**
|
|
90320
|
+
* Format: uuid
|
|
90321
|
+
* @description The `preview_id` the preview returned (single use, 10 minutes).
|
|
90322
|
+
*/
|
|
90323
|
+
preview_id: string;
|
|
90324
|
+
sample?: boolean;
|
|
90325
|
+
/** @description Duplicate-and-swap ONLY, and required there: the owner's acceptance of `consent_terms` from the preview — echo its `version` and `text_hash`. The accepting person is always the caller. */
|
|
90326
|
+
consent?: {
|
|
90327
|
+
version: string;
|
|
90328
|
+
text_hash: string;
|
|
90329
|
+
/**
|
|
90330
|
+
* Format: date-time
|
|
90331
|
+
* @description When the owner accepted (ISO 8601; defaults to now). At most 24 h old.
|
|
90332
|
+
*/
|
|
90333
|
+
accepted_at?: string;
|
|
90334
|
+
};
|
|
90335
|
+
};
|
|
90336
|
+
};
|
|
90337
|
+
};
|
|
90338
|
+
responses: {
|
|
90339
|
+
/** @description Queued (or the replayed execution) */
|
|
90340
|
+
202: {
|
|
90341
|
+
headers: {
|
|
90342
|
+
[name: string]: unknown;
|
|
90343
|
+
};
|
|
90344
|
+
content: {
|
|
90345
|
+
/**
|
|
90346
|
+
* @example {
|
|
90347
|
+
* "data": {
|
|
90348
|
+
* "execution_id": "e5e5e5e5-0000-4000-8000-000000000001",
|
|
90349
|
+
* "status": "queued"
|
|
90350
|
+
* }
|
|
90351
|
+
* }
|
|
90352
|
+
*/
|
|
90353
|
+
"application/json": {
|
|
90354
|
+
data: {
|
|
90355
|
+
/** Format: uuid */
|
|
90356
|
+
execution_id: string;
|
|
90357
|
+
/** @enum {string} */
|
|
90358
|
+
status: "queued" | "running" | "succeeded" | "failed" | "refused" | "rolled_back";
|
|
90359
|
+
};
|
|
90360
|
+
};
|
|
90361
|
+
};
|
|
90362
|
+
};
|
|
90363
|
+
/** @description Validation error */
|
|
90364
|
+
400: {
|
|
90365
|
+
headers: {
|
|
90366
|
+
[name: string]: unknown;
|
|
90367
|
+
};
|
|
90368
|
+
content: {
|
|
90369
|
+
"application/json": components["schemas"]["Error"];
|
|
90370
|
+
};
|
|
90371
|
+
};
|
|
90372
|
+
/** @description Unauthorized */
|
|
90373
|
+
401: {
|
|
90374
|
+
headers: {
|
|
90375
|
+
[name: string]: unknown;
|
|
90376
|
+
};
|
|
90377
|
+
content: {
|
|
90378
|
+
"application/json": components["schemas"]["Error"];
|
|
90379
|
+
};
|
|
90380
|
+
};
|
|
90381
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
90382
|
+
402: {
|
|
90383
|
+
headers: {
|
|
90384
|
+
[name: string]: unknown;
|
|
90385
|
+
};
|
|
90386
|
+
content: {
|
|
90387
|
+
/**
|
|
90388
|
+
* @example {
|
|
90389
|
+
* "error": {
|
|
90390
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
90391
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
90392
|
+
* "details": {
|
|
90393
|
+
* "required": [
|
|
90394
|
+
* "vitrina_ads"
|
|
90395
|
+
* ],
|
|
90396
|
+
* "active": [],
|
|
90397
|
+
* "feature": "vitrina_ads",
|
|
90398
|
+
* "entitlement_state": "off"
|
|
90399
|
+
* }
|
|
90400
|
+
* }
|
|
90401
|
+
* }
|
|
90402
|
+
*/
|
|
90403
|
+
"application/json": components["schemas"]["Error"];
|
|
90404
|
+
};
|
|
90405
|
+
};
|
|
90406
|
+
/** @description Forbidden */
|
|
90407
|
+
403: {
|
|
90408
|
+
headers: {
|
|
90409
|
+
[name: string]: unknown;
|
|
90410
|
+
};
|
|
90411
|
+
content: {
|
|
90412
|
+
"application/json": components["schemas"]["Error"];
|
|
90413
|
+
};
|
|
90414
|
+
};
|
|
90415
|
+
/** @description Not found */
|
|
90416
|
+
404: {
|
|
90417
|
+
headers: {
|
|
90418
|
+
[name: string]: unknown;
|
|
90419
|
+
};
|
|
90420
|
+
content: {
|
|
90421
|
+
"application/json": components["schemas"]["Error"];
|
|
90422
|
+
};
|
|
90423
|
+
};
|
|
90424
|
+
/** @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. */
|
|
90425
|
+
409: {
|
|
90426
|
+
headers: {
|
|
90427
|
+
[name: string]: unknown;
|
|
90428
|
+
};
|
|
90429
|
+
content: {
|
|
90430
|
+
/**
|
|
90431
|
+
* @example {
|
|
90432
|
+
* "error": {
|
|
90433
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
90434
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
90435
|
+
* "details": {
|
|
90436
|
+
* "key_kind": "core"
|
|
90437
|
+
* }
|
|
90438
|
+
* }
|
|
90439
|
+
* }
|
|
90440
|
+
*/
|
|
90441
|
+
"application/json": components["schemas"]["Error"];
|
|
90442
|
+
};
|
|
90443
|
+
};
|
|
90444
|
+
/** @description Rate limited */
|
|
90445
|
+
429: {
|
|
90446
|
+
headers: {
|
|
90447
|
+
[name: string]: unknown;
|
|
90448
|
+
};
|
|
90449
|
+
content: {
|
|
90450
|
+
"application/json": components["schemas"]["Error"];
|
|
90451
|
+
};
|
|
90452
|
+
};
|
|
90453
|
+
};
|
|
90454
|
+
};
|
|
90455
|
+
delete?: never;
|
|
90456
|
+
options?: never;
|
|
90457
|
+
head?: never;
|
|
90458
|
+
patch?: never;
|
|
90459
|
+
trace?: never;
|
|
90460
|
+
};
|
|
90461
|
+
"/ads/actions/executions": {
|
|
90462
|
+
parameters: {
|
|
90463
|
+
query?: never;
|
|
90464
|
+
header?: never;
|
|
90465
|
+
path?: never;
|
|
90466
|
+
cookie?: never;
|
|
90467
|
+
};
|
|
90468
|
+
/**
|
|
90469
|
+
* The actions journal («Lo que hice»)
|
|
90470
|
+
* @description Every action execution of the workspace (execute and rollback rows), newest first, each with what it touched (`target`) and who confirmed it (`created_by`, a display name — only for a caller holding `memberships:read`). `from`/`to` bound `created_at` by America/Santiago day; page with `before=<meta.next_before>`. Real mode lists real executions only; with `sample=1` it lists what was simulated plus two example rows of today (also readable on `GET /ads/actions/executions/{id}`; not undoable: `rollback_available: false`).
|
|
90471
|
+
*/
|
|
90472
|
+
get: {
|
|
90473
|
+
parameters: {
|
|
90474
|
+
query?: {
|
|
90475
|
+
/** @description First day (inclusive, America/Santiago) on `created_at`. */
|
|
90476
|
+
from?: string;
|
|
90477
|
+
/** @description Last day (inclusive, America/Santiago) on `created_at`. */
|
|
90478
|
+
to?: string;
|
|
90479
|
+
/** @description Paging cursor: a previous page’s `meta.next_before`, verbatim. */
|
|
90480
|
+
before?: string;
|
|
90481
|
+
/** @description Rows per page (default 20, max 50). */
|
|
90482
|
+
limit?: number;
|
|
90483
|
+
/** @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. */
|
|
90484
|
+
sample?: "1" | "true";
|
|
90485
|
+
};
|
|
90486
|
+
header?: never;
|
|
90487
|
+
path?: never;
|
|
90488
|
+
cookie?: never;
|
|
90489
|
+
};
|
|
90490
|
+
requestBody?: never;
|
|
90491
|
+
responses: {
|
|
90492
|
+
/** @description A page of the journal */
|
|
90493
|
+
200: {
|
|
90494
|
+
headers: {
|
|
90495
|
+
[name: string]: unknown;
|
|
90496
|
+
};
|
|
90497
|
+
content: {
|
|
90498
|
+
/**
|
|
90499
|
+
* @example {
|
|
90500
|
+
* "data": [
|
|
90501
|
+
* {
|
|
90502
|
+
* "id": "e5e5e5e5-0000-4000-8000-000000000003",
|
|
90503
|
+
* "action_key": "pause_ad:120212000000000006:2026-09-23",
|
|
90504
|
+
* "kind": "pause_ad",
|
|
90505
|
+
* "status": "succeeded",
|
|
90506
|
+
* "outcome": {
|
|
90507
|
+
* "summary": "Anuncio pausado en Meta.",
|
|
90508
|
+
* "engine_action_id": "f7f7f7f7-0000-4000-8000-000000000002",
|
|
90509
|
+
* "applied_at": "2026-09-23T16:20:04.000Z"
|
|
90510
|
+
* },
|
|
90511
|
+
* "error": null,
|
|
90512
|
+
* "rollback_available": true,
|
|
90513
|
+
* "rollback_of": null,
|
|
90514
|
+
* "simulated": false,
|
|
90515
|
+
* "created_at": "2026-09-23T16:20:01.000Z",
|
|
90516
|
+
* "finished_at": "2026-09-23T16:20:04.000Z",
|
|
90517
|
+
* "target": {
|
|
90518
|
+
* "level": "ad",
|
|
90519
|
+
* "external_id": "120212000000000006",
|
|
90520
|
+
* "name": "Blanqueamiento · Sonrisa"
|
|
90521
|
+
* },
|
|
90522
|
+
* "created_by": "Dueña Ejemplo"
|
|
90523
|
+
* },
|
|
90524
|
+
* {
|
|
90525
|
+
* "id": "e5e5e5e5-0000-4000-8000-000000000001",
|
|
90526
|
+
* "action_key": "budget_change:120211000000000077:2026-09-23",
|
|
90527
|
+
* "kind": "budget_change",
|
|
90528
|
+
* "status": "succeeded",
|
|
90529
|
+
* "outcome": {
|
|
90530
|
+
* "summary": "Cambio aplicado en Meta.",
|
|
90531
|
+
* "engine_action_id": "f7f7f7f7-0000-4000-8000-000000000001",
|
|
90532
|
+
* "applied_at": "2026-09-23T15:01:12.000Z"
|
|
90533
|
+
* },
|
|
90534
|
+
* "error": null,
|
|
90535
|
+
* "rollback_available": true,
|
|
90536
|
+
* "rollback_of": null,
|
|
90537
|
+
* "simulated": false,
|
|
90538
|
+
* "created_at": "2026-09-23T15:01:10.000Z",
|
|
90539
|
+
* "finished_at": "2026-09-23T15:01:12.000Z",
|
|
90540
|
+
* "target": {
|
|
90541
|
+
* "level": "ad_set",
|
|
90542
|
+
* "external_id": "120211000000000077",
|
|
90543
|
+
* "name": "Implantes · Las Condes"
|
|
90544
|
+
* },
|
|
90545
|
+
* "created_by": null
|
|
90546
|
+
* }
|
|
90547
|
+
* ],
|
|
90548
|
+
* "meta": {
|
|
90549
|
+
* "next_before": "2026-09-23T15:01:10.000000Z,e5e5e5e5-0000-4000-8000-000000000001"
|
|
90550
|
+
* }
|
|
90551
|
+
* }
|
|
90552
|
+
*/
|
|
90553
|
+
"application/json": {
|
|
90554
|
+
data: components["schemas"]["AdsActionExecutionListItem"][];
|
|
90555
|
+
meta: {
|
|
90556
|
+
/** @description Opaque cursor (`<created_at>,<id>`): pass as `before`. */
|
|
90557
|
+
next_before: string | null;
|
|
90558
|
+
};
|
|
90559
|
+
};
|
|
90560
|
+
};
|
|
90561
|
+
};
|
|
90562
|
+
/** @description Validation error */
|
|
90563
|
+
400: {
|
|
90564
|
+
headers: {
|
|
90565
|
+
[name: string]: unknown;
|
|
90566
|
+
};
|
|
90567
|
+
content: {
|
|
90568
|
+
"application/json": components["schemas"]["Error"];
|
|
90569
|
+
};
|
|
90570
|
+
};
|
|
90571
|
+
/** @description Unauthorized */
|
|
90572
|
+
401: {
|
|
90573
|
+
headers: {
|
|
90574
|
+
[name: string]: unknown;
|
|
90575
|
+
};
|
|
90576
|
+
content: {
|
|
90577
|
+
"application/json": components["schemas"]["Error"];
|
|
90578
|
+
};
|
|
90579
|
+
};
|
|
90580
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
90581
|
+
402: {
|
|
90582
|
+
headers: {
|
|
90583
|
+
[name: string]: unknown;
|
|
90584
|
+
};
|
|
90585
|
+
content: {
|
|
90586
|
+
/**
|
|
90587
|
+
* @example {
|
|
90588
|
+
* "error": {
|
|
90589
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
90590
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
90591
|
+
* "details": {
|
|
90592
|
+
* "required": [
|
|
90593
|
+
* "vitrina_ads"
|
|
90594
|
+
* ],
|
|
90595
|
+
* "active": [],
|
|
90596
|
+
* "feature": "vitrina_ads",
|
|
90597
|
+
* "entitlement_state": "off"
|
|
90598
|
+
* }
|
|
90599
|
+
* }
|
|
90600
|
+
* }
|
|
90601
|
+
*/
|
|
90602
|
+
"application/json": components["schemas"]["Error"];
|
|
90603
|
+
};
|
|
90604
|
+
};
|
|
90605
|
+
/** @description Forbidden */
|
|
90606
|
+
403: {
|
|
90607
|
+
headers: {
|
|
90608
|
+
[name: string]: unknown;
|
|
90609
|
+
};
|
|
90610
|
+
content: {
|
|
90611
|
+
"application/json": components["schemas"]["Error"];
|
|
90612
|
+
};
|
|
90613
|
+
};
|
|
90614
|
+
/** @description Not found */
|
|
90615
|
+
404: {
|
|
90616
|
+
headers: {
|
|
90617
|
+
[name: string]: unknown;
|
|
90618
|
+
};
|
|
90619
|
+
content: {
|
|
90620
|
+
"application/json": components["schemas"]["Error"];
|
|
90621
|
+
};
|
|
90622
|
+
};
|
|
90623
|
+
/** @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. */
|
|
90624
|
+
409: {
|
|
90625
|
+
headers: {
|
|
90626
|
+
[name: string]: unknown;
|
|
90627
|
+
};
|
|
90628
|
+
content: {
|
|
90629
|
+
/**
|
|
90630
|
+
* @example {
|
|
90631
|
+
* "error": {
|
|
90632
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
90633
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
90634
|
+
* "details": {
|
|
90635
|
+
* "key_kind": "core"
|
|
90636
|
+
* }
|
|
90637
|
+
* }
|
|
90638
|
+
* }
|
|
90639
|
+
*/
|
|
90640
|
+
"application/json": components["schemas"]["Error"];
|
|
90641
|
+
};
|
|
90642
|
+
};
|
|
90643
|
+
/** @description Rate limited */
|
|
90644
|
+
429: {
|
|
90645
|
+
headers: {
|
|
90646
|
+
[name: string]: unknown;
|
|
90647
|
+
};
|
|
90648
|
+
content: {
|
|
90649
|
+
"application/json": components["schemas"]["Error"];
|
|
90650
|
+
};
|
|
90651
|
+
};
|
|
90652
|
+
};
|
|
90653
|
+
};
|
|
90654
|
+
put?: never;
|
|
90655
|
+
post?: never;
|
|
90656
|
+
delete?: never;
|
|
90657
|
+
options?: never;
|
|
90658
|
+
head?: never;
|
|
90659
|
+
patch?: never;
|
|
90660
|
+
trace?: never;
|
|
90661
|
+
};
|
|
90662
|
+
"/ads/actions/executions/{id}": {
|
|
90663
|
+
parameters: {
|
|
90664
|
+
query?: never;
|
|
90665
|
+
header?: never;
|
|
90666
|
+
path?: never;
|
|
90667
|
+
cookie?: never;
|
|
90668
|
+
};
|
|
90669
|
+
/**
|
|
90670
|
+
* The status of an action execution
|
|
90671
|
+
* @description `queued → running → succeeded | failed | refused`; a succeeded execution becomes `rolled_back` when its rollback succeeds. `error.reason` is one of `promoted_object_frozen` (Meta froze the ad set’s conversion — the duplicate-and-swap is the alternative), `reconnect_required`, `permission_gap` (Meta connected without permission to manage ads — reconnect keeping it), `rate_limited`, `not_reversible`, `forbidden` (no person could be put on the record for the change — not a Meta grant problem), `consent_required` (the duplicate-and-swap consent is missing or stale — preview again), `engine_error` (incl. `code: budget_change_out_of_bounds` — outside the ±50 % allowed per change — `code: not_active` and `code: no_recommendation`). `error.message` is Spanish copy ready for the card.
|
|
90672
|
+
*/
|
|
90673
|
+
get: {
|
|
90674
|
+
parameters: {
|
|
90675
|
+
query?: {
|
|
90676
|
+
/** @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. */
|
|
90677
|
+
sample?: "1" | "true";
|
|
90678
|
+
};
|
|
90679
|
+
header?: never;
|
|
90680
|
+
path: {
|
|
90681
|
+
/** @description The execution id. */
|
|
90682
|
+
id: string;
|
|
90683
|
+
};
|
|
90684
|
+
cookie?: never;
|
|
90685
|
+
};
|
|
90686
|
+
requestBody?: never;
|
|
90687
|
+
responses: {
|
|
90688
|
+
/** @description The execution */
|
|
90689
|
+
200: {
|
|
90690
|
+
headers: {
|
|
90691
|
+
[name: string]: unknown;
|
|
90692
|
+
};
|
|
90693
|
+
content: {
|
|
90694
|
+
/**
|
|
90695
|
+
* @example {
|
|
90696
|
+
* "data": {
|
|
90697
|
+
* "id": "e5e5e5e5-0000-4000-8000-000000000001",
|
|
90698
|
+
* "action_key": "budget_change:120211000000000077:2026-09-23",
|
|
90699
|
+
* "kind": "budget_change",
|
|
90700
|
+
* "status": "succeeded",
|
|
90701
|
+
* "outcome": {
|
|
90702
|
+
* "summary": "Cambio aplicado en Meta.",
|
|
90703
|
+
* "engine_action_id": "f7f7f7f7-0000-4000-8000-000000000001",
|
|
90704
|
+
* "applied_at": "2026-09-23T15:01:12.000Z"
|
|
90705
|
+
* },
|
|
90706
|
+
* "error": null,
|
|
90707
|
+
* "rollback_available": true,
|
|
90708
|
+
* "rollback_of": null,
|
|
90709
|
+
* "simulated": false,
|
|
90710
|
+
* "created_at": "2026-09-23T15:01:10.000Z",
|
|
90711
|
+
* "finished_at": "2026-09-23T15:01:12.000Z"
|
|
90712
|
+
* }
|
|
90713
|
+
* }
|
|
90714
|
+
*/
|
|
90715
|
+
"application/json": {
|
|
90716
|
+
data: components["schemas"]["AdsActionExecution"];
|
|
90717
|
+
};
|
|
90718
|
+
};
|
|
90719
|
+
};
|
|
90720
|
+
/** @description Validation error */
|
|
90721
|
+
400: {
|
|
90722
|
+
headers: {
|
|
90723
|
+
[name: string]: unknown;
|
|
90724
|
+
};
|
|
90725
|
+
content: {
|
|
90726
|
+
"application/json": components["schemas"]["Error"];
|
|
90727
|
+
};
|
|
90728
|
+
};
|
|
90729
|
+
/** @description Unauthorized */
|
|
90730
|
+
401: {
|
|
90731
|
+
headers: {
|
|
90732
|
+
[name: string]: unknown;
|
|
90733
|
+
};
|
|
90734
|
+
content: {
|
|
90735
|
+
"application/json": components["schemas"]["Error"];
|
|
90736
|
+
};
|
|
90737
|
+
};
|
|
90738
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
90739
|
+
402: {
|
|
90740
|
+
headers: {
|
|
90741
|
+
[name: string]: unknown;
|
|
90742
|
+
};
|
|
90743
|
+
content: {
|
|
90744
|
+
/**
|
|
90745
|
+
* @example {
|
|
90746
|
+
* "error": {
|
|
90747
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
90748
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
90749
|
+
* "details": {
|
|
90750
|
+
* "required": [
|
|
90751
|
+
* "vitrina_ads"
|
|
90752
|
+
* ],
|
|
90753
|
+
* "active": [],
|
|
90754
|
+
* "feature": "vitrina_ads",
|
|
90755
|
+
* "entitlement_state": "off"
|
|
90756
|
+
* }
|
|
90757
|
+
* }
|
|
90758
|
+
* }
|
|
90759
|
+
*/
|
|
90760
|
+
"application/json": components["schemas"]["Error"];
|
|
90761
|
+
};
|
|
90762
|
+
};
|
|
90763
|
+
/** @description Forbidden */
|
|
90764
|
+
403: {
|
|
90765
|
+
headers: {
|
|
90766
|
+
[name: string]: unknown;
|
|
90767
|
+
};
|
|
90768
|
+
content: {
|
|
90769
|
+
"application/json": components["schemas"]["Error"];
|
|
90770
|
+
};
|
|
90771
|
+
};
|
|
90772
|
+
/** @description Not found */
|
|
90773
|
+
404: {
|
|
90774
|
+
headers: {
|
|
90775
|
+
[name: string]: unknown;
|
|
90776
|
+
};
|
|
90777
|
+
content: {
|
|
90778
|
+
"application/json": components["schemas"]["Error"];
|
|
90779
|
+
};
|
|
90780
|
+
};
|
|
90781
|
+
/** @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. */
|
|
90782
|
+
409: {
|
|
90783
|
+
headers: {
|
|
90784
|
+
[name: string]: unknown;
|
|
90785
|
+
};
|
|
90786
|
+
content: {
|
|
90787
|
+
/**
|
|
90788
|
+
* @example {
|
|
90789
|
+
* "error": {
|
|
90790
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
90791
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
90792
|
+
* "details": {
|
|
90793
|
+
* "key_kind": "core"
|
|
90794
|
+
* }
|
|
90795
|
+
* }
|
|
90796
|
+
* }
|
|
90797
|
+
*/
|
|
90798
|
+
"application/json": components["schemas"]["Error"];
|
|
90799
|
+
};
|
|
90800
|
+
};
|
|
90801
|
+
/** @description Rate limited */
|
|
90802
|
+
429: {
|
|
90803
|
+
headers: {
|
|
90804
|
+
[name: string]: unknown;
|
|
90805
|
+
};
|
|
90806
|
+
content: {
|
|
90807
|
+
"application/json": components["schemas"]["Error"];
|
|
90808
|
+
};
|
|
90809
|
+
};
|
|
90810
|
+
};
|
|
90811
|
+
};
|
|
90812
|
+
put?: never;
|
|
90813
|
+
post?: never;
|
|
90814
|
+
delete?: never;
|
|
90815
|
+
options?: never;
|
|
90816
|
+
head?: never;
|
|
90817
|
+
patch?: never;
|
|
90818
|
+
trace?: never;
|
|
90819
|
+
};
|
|
90820
|
+
"/ads/actions/executions/{id}/rollback": {
|
|
90821
|
+
parameters: {
|
|
90822
|
+
query?: never;
|
|
90823
|
+
header?: never;
|
|
90824
|
+
path?: never;
|
|
90825
|
+
cookie?: never;
|
|
90826
|
+
};
|
|
90827
|
+
get?: never;
|
|
90828
|
+
put?: never;
|
|
90829
|
+
/**
|
|
90830
|
+
* Undo an executed action
|
|
90831
|
+
* @description Queues the engine’s rollback of a `succeeded` execution with `rollback_available: true` and answers the NEW execution (`rollback_of` = the original). The engine restores the pre-change state only while the object still carries what the action wrote; otherwise the rollback is `refused` with `reason: not_reversible` (`code: state_drifted`). **`Idempotency-Key` is required.** 409 `ADS_ACTION_NOT_REVERSIBLE` when the execution has nothing to undo.
|
|
90832
|
+
*/
|
|
90833
|
+
post: {
|
|
90834
|
+
parameters: {
|
|
90835
|
+
query?: {
|
|
90836
|
+
/** @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. */
|
|
90837
|
+
sample?: "1" | "true";
|
|
90838
|
+
};
|
|
90839
|
+
header?: {
|
|
90840
|
+
/** @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. */
|
|
90841
|
+
"Idempotency-Key"?: string;
|
|
90842
|
+
};
|
|
90843
|
+
path: {
|
|
90844
|
+
/** @description The execution id. */
|
|
90845
|
+
id: string;
|
|
90846
|
+
};
|
|
90847
|
+
cookie?: never;
|
|
90848
|
+
};
|
|
90849
|
+
requestBody?: never;
|
|
90850
|
+
responses: {
|
|
90851
|
+
/** @description The rollback execution */
|
|
90852
|
+
202: {
|
|
90853
|
+
headers: {
|
|
90854
|
+
[name: string]: unknown;
|
|
90855
|
+
};
|
|
90856
|
+
content: {
|
|
90857
|
+
/**
|
|
90858
|
+
* @example {
|
|
90859
|
+
* "data": {
|
|
90860
|
+
* "execution_id": "e5e5e5e5-0000-4000-8000-000000000002",
|
|
90861
|
+
* "status": "queued"
|
|
90862
|
+
* }
|
|
90863
|
+
* }
|
|
90864
|
+
*/
|
|
90865
|
+
"application/json": {
|
|
90866
|
+
data: {
|
|
90867
|
+
/** Format: uuid */
|
|
90868
|
+
execution_id: string;
|
|
90869
|
+
/** @enum {string} */
|
|
90870
|
+
status: "queued" | "running" | "succeeded" | "failed" | "refused" | "rolled_back";
|
|
90871
|
+
};
|
|
90872
|
+
};
|
|
90873
|
+
};
|
|
90874
|
+
};
|
|
90875
|
+
/** @description Validation error */
|
|
90876
|
+
400: {
|
|
90877
|
+
headers: {
|
|
90878
|
+
[name: string]: unknown;
|
|
90879
|
+
};
|
|
90880
|
+
content: {
|
|
90881
|
+
"application/json": components["schemas"]["Error"];
|
|
90882
|
+
};
|
|
90883
|
+
};
|
|
90884
|
+
/** @description Unauthorized */
|
|
90885
|
+
401: {
|
|
90886
|
+
headers: {
|
|
90887
|
+
[name: string]: unknown;
|
|
90888
|
+
};
|
|
90889
|
+
content: {
|
|
90890
|
+
"application/json": components["schemas"]["Error"];
|
|
90891
|
+
};
|
|
90892
|
+
};
|
|
90893
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
90894
|
+
402: {
|
|
90895
|
+
headers: {
|
|
90896
|
+
[name: string]: unknown;
|
|
90897
|
+
};
|
|
90898
|
+
content: {
|
|
90899
|
+
/**
|
|
90900
|
+
* @example {
|
|
90901
|
+
* "error": {
|
|
90902
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
90903
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
90904
|
+
* "details": {
|
|
90905
|
+
* "required": [
|
|
90906
|
+
* "vitrina_ads"
|
|
90907
|
+
* ],
|
|
90908
|
+
* "active": [],
|
|
90909
|
+
* "feature": "vitrina_ads",
|
|
90910
|
+
* "entitlement_state": "off"
|
|
90911
|
+
* }
|
|
90912
|
+
* }
|
|
90913
|
+
* }
|
|
90914
|
+
*/
|
|
90915
|
+
"application/json": components["schemas"]["Error"];
|
|
90916
|
+
};
|
|
90917
|
+
};
|
|
90918
|
+
/** @description Forbidden */
|
|
90919
|
+
403: {
|
|
90920
|
+
headers: {
|
|
90921
|
+
[name: string]: unknown;
|
|
90922
|
+
};
|
|
90923
|
+
content: {
|
|
90924
|
+
"application/json": components["schemas"]["Error"];
|
|
90925
|
+
};
|
|
90926
|
+
};
|
|
90927
|
+
/** @description Not found */
|
|
90928
|
+
404: {
|
|
90929
|
+
headers: {
|
|
90930
|
+
[name: string]: unknown;
|
|
90931
|
+
};
|
|
90932
|
+
content: {
|
|
90933
|
+
"application/json": components["schemas"]["Error"];
|
|
90934
|
+
};
|
|
90935
|
+
};
|
|
90936
|
+
/** @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. */
|
|
90937
|
+
409: {
|
|
90938
|
+
headers: {
|
|
90939
|
+
[name: string]: unknown;
|
|
90940
|
+
};
|
|
90941
|
+
content: {
|
|
90942
|
+
/**
|
|
90943
|
+
* @example {
|
|
90944
|
+
* "error": {
|
|
90945
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
90946
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
90947
|
+
* "details": {
|
|
90948
|
+
* "key_kind": "core"
|
|
90949
|
+
* }
|
|
90950
|
+
* }
|
|
90951
|
+
* }
|
|
90952
|
+
*/
|
|
90953
|
+
"application/json": components["schemas"]["Error"];
|
|
90954
|
+
};
|
|
90955
|
+
};
|
|
90956
|
+
/** @description Rate limited */
|
|
90957
|
+
429: {
|
|
90958
|
+
headers: {
|
|
90959
|
+
[name: string]: unknown;
|
|
90960
|
+
};
|
|
90961
|
+
content: {
|
|
90962
|
+
"application/json": components["schemas"]["Error"];
|
|
90963
|
+
};
|
|
90964
|
+
};
|
|
90965
|
+
};
|
|
90966
|
+
};
|
|
90967
|
+
delete?: never;
|
|
90968
|
+
options?: never;
|
|
90969
|
+
head?: never;
|
|
90970
|
+
patch?: never;
|
|
90971
|
+
trace?: never;
|
|
90972
|
+
};
|
|
90973
|
+
"/ads/actions/{key}/dismiss": {
|
|
90974
|
+
parameters: {
|
|
90975
|
+
query?: never;
|
|
90976
|
+
header?: never;
|
|
90977
|
+
path?: never;
|
|
90978
|
+
cookie?: never;
|
|
90979
|
+
};
|
|
90980
|
+
get?: never;
|
|
90981
|
+
put?: never;
|
|
90982
|
+
/**
|
|
90983
|
+
* Hide an action for a few days
|
|
90984
|
+
* @description Hides the action from the rail for `days` (default 7, max 30): it stays on `GET /ads/actions` with `dismissed_until` set and sorted last. Stored in the workspace’s Ads settings; not persisted in sample mode (`persisted: false`).
|
|
90985
|
+
*/
|
|
90986
|
+
post: {
|
|
90987
|
+
parameters: {
|
|
90988
|
+
query?: never;
|
|
90989
|
+
header?: {
|
|
90990
|
+
/** @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. */
|
|
90991
|
+
"Idempotency-Key"?: string;
|
|
90992
|
+
};
|
|
90993
|
+
path: {
|
|
90994
|
+
/** @description The action key: `<kind>:<target external id>:<YYYY-MM-DD>`. */
|
|
90995
|
+
key: string;
|
|
90996
|
+
};
|
|
90997
|
+
cookie?: never;
|
|
90998
|
+
};
|
|
90999
|
+
requestBody: {
|
|
91000
|
+
content: {
|
|
91001
|
+
/**
|
|
91002
|
+
* @example {
|
|
91003
|
+
* "days": 7
|
|
91004
|
+
* }
|
|
91005
|
+
*/
|
|
91006
|
+
"application/json": {
|
|
91007
|
+
/** @default 7 */
|
|
91008
|
+
days?: number;
|
|
91009
|
+
sample?: boolean;
|
|
91010
|
+
};
|
|
91011
|
+
};
|
|
91012
|
+
};
|
|
91013
|
+
responses: {
|
|
91014
|
+
/** @description Dismissed */
|
|
91015
|
+
200: {
|
|
91016
|
+
headers: {
|
|
91017
|
+
[name: string]: unknown;
|
|
91018
|
+
};
|
|
91019
|
+
content: {
|
|
91020
|
+
/**
|
|
91021
|
+
* @example {
|
|
91022
|
+
* "data": {
|
|
91023
|
+
* "dismissed_until": "2026-09-30T15:00:00.000Z",
|
|
91024
|
+
* "persisted": true
|
|
91025
|
+
* }
|
|
91026
|
+
* }
|
|
91027
|
+
*/
|
|
91028
|
+
"application/json": {
|
|
91029
|
+
data: {
|
|
91030
|
+
dismissed_until: string;
|
|
91031
|
+
/** @description `false` in sample mode. */
|
|
91032
|
+
persisted: boolean;
|
|
91033
|
+
};
|
|
91034
|
+
};
|
|
91035
|
+
};
|
|
91036
|
+
};
|
|
91037
|
+
/** @description Validation error */
|
|
91038
|
+
400: {
|
|
91039
|
+
headers: {
|
|
91040
|
+
[name: string]: unknown;
|
|
91041
|
+
};
|
|
91042
|
+
content: {
|
|
91043
|
+
"application/json": components["schemas"]["Error"];
|
|
91044
|
+
};
|
|
91045
|
+
};
|
|
91046
|
+
/** @description Unauthorized */
|
|
91047
|
+
401: {
|
|
91048
|
+
headers: {
|
|
91049
|
+
[name: string]: unknown;
|
|
91050
|
+
};
|
|
91051
|
+
content: {
|
|
91052
|
+
"application/json": components["schemas"]["Error"];
|
|
91053
|
+
};
|
|
91054
|
+
};
|
|
91055
|
+
/** @description Vitrina Ads is not active for this workspace. `error.code` is `ENTITLEMENT_NOT_ACTIVE`, `error.details.feature` is `vitrina_ads`. */
|
|
91056
|
+
402: {
|
|
91057
|
+
headers: {
|
|
91058
|
+
[name: string]: unknown;
|
|
91059
|
+
};
|
|
91060
|
+
content: {
|
|
91061
|
+
/**
|
|
91062
|
+
* @example {
|
|
91063
|
+
* "error": {
|
|
91064
|
+
* "code": "ENTITLEMENT_NOT_ACTIVE",
|
|
91065
|
+
* "message": "El complemento Vitrina Ads no está activo en este espacio de trabajo.",
|
|
91066
|
+
* "details": {
|
|
91067
|
+
* "required": [
|
|
91068
|
+
* "vitrina_ads"
|
|
91069
|
+
* ],
|
|
91070
|
+
* "active": [],
|
|
91071
|
+
* "feature": "vitrina_ads",
|
|
91072
|
+
* "entitlement_state": "off"
|
|
91073
|
+
* }
|
|
91074
|
+
* }
|
|
91075
|
+
* }
|
|
91076
|
+
*/
|
|
91077
|
+
"application/json": components["schemas"]["Error"];
|
|
91078
|
+
};
|
|
91079
|
+
};
|
|
91080
|
+
/** @description Forbidden */
|
|
91081
|
+
403: {
|
|
91082
|
+
headers: {
|
|
91083
|
+
[name: string]: unknown;
|
|
91084
|
+
};
|
|
91085
|
+
content: {
|
|
91086
|
+
"application/json": components["schemas"]["Error"];
|
|
91087
|
+
};
|
|
91088
|
+
};
|
|
91089
|
+
/** @description Not found */
|
|
91090
|
+
404: {
|
|
91091
|
+
headers: {
|
|
91092
|
+
[name: string]: unknown;
|
|
91093
|
+
};
|
|
91094
|
+
content: {
|
|
91095
|
+
"application/json": components["schemas"]["Error"];
|
|
91096
|
+
};
|
|
91097
|
+
};
|
|
91098
|
+
/** @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. */
|
|
91099
|
+
409: {
|
|
91100
|
+
headers: {
|
|
91101
|
+
[name: string]: unknown;
|
|
91102
|
+
};
|
|
91103
|
+
content: {
|
|
91104
|
+
/**
|
|
91105
|
+
* @example {
|
|
91106
|
+
* "error": {
|
|
91107
|
+
* "code": "ADS_KEY_NEEDS_REMINT",
|
|
91108
|
+
* "message": "Vitrina Ads is active but the delegated key has not finished rotating (key_kind: core)",
|
|
91109
|
+
* "details": {
|
|
91110
|
+
* "key_kind": "core"
|
|
91111
|
+
* }
|
|
91112
|
+
* }
|
|
91113
|
+
* }
|
|
91114
|
+
*/
|
|
91115
|
+
"application/json": components["schemas"]["Error"];
|
|
91116
|
+
};
|
|
91117
|
+
};
|
|
91118
|
+
/** @description Rate limited */
|
|
91119
|
+
429: {
|
|
91120
|
+
headers: {
|
|
91121
|
+
[name: string]: unknown;
|
|
91122
|
+
};
|
|
91123
|
+
content: {
|
|
91124
|
+
"application/json": components["schemas"]["Error"];
|
|
91125
|
+
};
|
|
91126
|
+
};
|
|
91127
|
+
};
|
|
91128
|
+
};
|
|
91129
|
+
delete?: never;
|
|
91130
|
+
options?: never;
|
|
91131
|
+
head?: never;
|
|
91132
|
+
patch?: never;
|
|
91133
|
+
trace?: never;
|
|
91134
|
+
};
|
|
91135
|
+
"/ads/tracking/key": {
|
|
91136
|
+
parameters: {
|
|
91137
|
+
query?: never;
|
|
91138
|
+
header?: never;
|
|
91139
|
+
path?: never;
|
|
91140
|
+
cookie?: never;
|
|
91141
|
+
};
|
|
91142
|
+
/**
|
|
91143
|
+
* The workspace's tracking key and the tag to paste
|
|
91144
|
+
* @description Ensures an active tracking key exists for the workspace (minting one on the first call — idempotent, a repeat never mints a second key) and returns the tag to paste. `combined_snippet` is THE tag: Vitrina's one-line loader (`<script src=".../tag.js?site=pk_…">`), which boots the assistant and the measurement from the same tag. Its site key (`site_key`) is the newest unexpired publishable key of the workspace, or — when it has none — one minted on this read for the workspace's Vitrina site, registered domains and declared website, and listed afterwards among its publishable keys. `combined_snippet` and `site_key` are `null` only when no origin can be derived at all.
|
|
91145
|
+
*
|
|
91146
|
+
* `snippet` is the measurement provider's raw tracker script (the tracking half alone), kept for API consumers that self-host it; Vitrina's own UI renders `combined_snippet` only. `meta_pixel_id` is present when the workspace has a Meta pixel configured.
|
|
91147
|
+
*
|
|
91148
|
+
* 402 `ENTITLEMENT_NOT_ACTIVE` (`feature: vitrina_ads`) when Vitrina Ads is not active for this workspace; 409 `ADS_KEY_NEEDS_REMINT` when the Add-on is on but the delegated key has not finished rotating. Admin-scoped (`ads:read`).
|
|
91149
|
+
*/
|
|
91150
|
+
get: {
|
|
91151
|
+
parameters: {
|
|
91152
|
+
query?: never;
|
|
91153
|
+
header?: never;
|
|
91154
|
+
path?: never;
|
|
91155
|
+
cookie?: never;
|
|
91156
|
+
};
|
|
91157
|
+
requestBody?: never;
|
|
91158
|
+
responses: {
|
|
91159
|
+
/** @description The tracking key and the tag to paste */
|
|
88925
91160
|
200: {
|
|
88926
91161
|
headers: {
|
|
88927
91162
|
[name: string]: unknown;
|
|
@@ -88930,17 +91165,17 @@ interface paths {
|
|
|
88930
91165
|
/**
|
|
88931
91166
|
* @example {
|
|
88932
91167
|
* "data": {
|
|
88933
|
-
* "
|
|
88934
|
-
* "
|
|
88935
|
-
* "
|
|
88936
|
-
* "
|
|
88937
|
-
* "
|
|
88938
|
-
* "
|
|
91168
|
+
* "key_id": "abababab-0000-4000-8000-000000000001",
|
|
91169
|
+
* "public_key": "trk_live_abc123",
|
|
91170
|
+
* "snippet": "<script src=\"https://track.atribu.app/t.js?k=trk_live_abc123\" async></script>",
|
|
91171
|
+
* "combined_snippet": "<script src=\"https://api.vitrinadev.com/tag.js?site=pk_live_sitekey000000000000\" async></script>",
|
|
91172
|
+
* "site_key": "pk_live_sitekey000000000000",
|
|
91173
|
+
* "meta_pixel_id": null
|
|
88939
91174
|
* }
|
|
88940
91175
|
* }
|
|
88941
91176
|
*/
|
|
88942
91177
|
"application/json": {
|
|
88943
|
-
data: components["schemas"]["
|
|
91178
|
+
data: components["schemas"]["AdsTrackingKey"];
|
|
88944
91179
|
};
|
|
88945
91180
|
};
|
|
88946
91181
|
};
|
|
@@ -89036,16 +91271,33 @@ interface paths {
|
|
|
89036
91271
|
};
|
|
89037
91272
|
};
|
|
89038
91273
|
};
|
|
91274
|
+
put?: never;
|
|
89039
91275
|
post?: never;
|
|
91276
|
+
delete?: never;
|
|
91277
|
+
options?: never;
|
|
91278
|
+
head?: never;
|
|
91279
|
+
patch?: never;
|
|
91280
|
+
trace?: never;
|
|
91281
|
+
};
|
|
91282
|
+
"/ads/tracking/installers/gtm": {
|
|
91283
|
+
parameters: {
|
|
91284
|
+
query?: never;
|
|
91285
|
+
header?: never;
|
|
91286
|
+
path?: never;
|
|
91287
|
+
cookie?: never;
|
|
91288
|
+
};
|
|
89040
91289
|
/**
|
|
89041
|
-
*
|
|
89042
|
-
* @description
|
|
91290
|
+
* The tag as a ready-to-paste Google Tag Manager installer
|
|
91291
|
+
* @description The tag name, "All Pages" trigger, snippet and setup checklist for a Google Tag Manager Custom HTML tag. The `snippet` is the COMBINED loader (`<script src=".../tag.js?site=…">`): pasting this ONE tag boots the assistant AND starts the measurement. `tag_name` and `setup_checklist` are Vitrina-branded user-facing copy (Spanish) that names only `tag.js`.
|
|
91292
|
+
*
|
|
91293
|
+
* `site_id` (optional) is the publishable `pk_…` key of the site the tag is being installed on — embedded into the snippet's `?site=` query so the tag survives GTM stripping `data-*` off the `<script>` tag it re-creates. Absent → the workspace's own site key (the `site_key` of `GET /ads/tracking/key`, minted on first read); 400 when the workspace has none and no origin to mint one for.
|
|
91294
|
+
*
|
|
91295
|
+
* Same entitlement gate as `GET /ads/tracking/key`. Admin-scoped (`ads:read`).
|
|
89043
91296
|
*/
|
|
89044
|
-
|
|
91297
|
+
get: {
|
|
89045
91298
|
parameters: {
|
|
89046
91299
|
query?: {
|
|
89047
|
-
|
|
89048
|
-
sample?: "1" | "true";
|
|
91300
|
+
site_id?: string;
|
|
89049
91301
|
};
|
|
89050
91302
|
header?: never;
|
|
89051
91303
|
path?: never;
|
|
@@ -89053,12 +91305,35 @@ interface paths {
|
|
|
89053
91305
|
};
|
|
89054
91306
|
requestBody?: never;
|
|
89055
91307
|
responses: {
|
|
89056
|
-
/** @description
|
|
89057
|
-
|
|
91308
|
+
/** @description The GTM Custom HTML installer payload */
|
|
91309
|
+
200: {
|
|
89058
91310
|
headers: {
|
|
89059
91311
|
[name: string]: unknown;
|
|
89060
91312
|
};
|
|
89061
|
-
content
|
|
91313
|
+
content: {
|
|
91314
|
+
/**
|
|
91315
|
+
* @example {
|
|
91316
|
+
* "data": {
|
|
91317
|
+
* "key_id": "abababab-0000-4000-8000-000000000001",
|
|
91318
|
+
* "public_key": "trk_live_abc123",
|
|
91319
|
+
* "site_key": "pk_live_sitekey000000000000",
|
|
91320
|
+
* "tag_name": "Vitrina Ads · tag",
|
|
91321
|
+
* "trigger": "All Pages",
|
|
91322
|
+
* "snippet": "<script src=\"https://api.vitrinadev.com/tag.js?site=pk_live_sitekey000000000000\" async></script>",
|
|
91323
|
+
* "setup_checklist": [
|
|
91324
|
+
* "En Google Tag Manager, crea una etiqueta nueva de tipo «HTML personalizado».",
|
|
91325
|
+
* "Pega el fragmento de Vitrina (tag.js) tal cual.",
|
|
91326
|
+
* "Activador: All Pages.",
|
|
91327
|
+
* "Guarda la etiqueta y publica el contenedor.",
|
|
91328
|
+
* "El asistente y la medición se cargan desde este mismo tag.js: no agregues otro fragmento de Vitrina aparte."
|
|
91329
|
+
* ]
|
|
91330
|
+
* }
|
|
91331
|
+
* }
|
|
91332
|
+
*/
|
|
91333
|
+
"application/json": {
|
|
91334
|
+
data: components["schemas"]["AdsGtmInstaller"];
|
|
91335
|
+
};
|
|
91336
|
+
};
|
|
89062
91337
|
};
|
|
89063
91338
|
/** @description Validation error */
|
|
89064
91339
|
400: {
|
|
@@ -89152,12 +91427,15 @@ interface paths {
|
|
|
89152
91427
|
};
|
|
89153
91428
|
};
|
|
89154
91429
|
};
|
|
91430
|
+
put?: never;
|
|
91431
|
+
post?: never;
|
|
91432
|
+
delete?: never;
|
|
89155
91433
|
options?: never;
|
|
89156
91434
|
head?: never;
|
|
89157
91435
|
patch?: never;
|
|
89158
91436
|
trace?: never;
|
|
89159
91437
|
};
|
|
89160
|
-
"/ads/tracking/
|
|
91438
|
+
"/ads/tracking/status": {
|
|
89161
91439
|
parameters: {
|
|
89162
91440
|
query?: never;
|
|
89163
91441
|
header?: never;
|
|
@@ -89165,12 +91443,12 @@ interface paths {
|
|
|
89165
91443
|
cookie?: never;
|
|
89166
91444
|
};
|
|
89167
91445
|
/**
|
|
89168
|
-
*
|
|
89169
|
-
* @description
|
|
91446
|
+
* Is the tag installed? Last event seen, events in 24 h, domain
|
|
91447
|
+
* @description Tag detection for the workspace's tracking key. `source: tracker` (the normal case) reads the measurement provider's per-key last-event time (`last_seen_at`), the tracker events of the last 24 hours (`events_24h`) and the hostname of the latest verified install check (`domain`). `installed` is `true` only when the tag sent an event in the last 30 days — never without a timestamp.
|
|
89170
91448
|
*
|
|
89171
|
-
*
|
|
91449
|
+
* When the per-key read is unavailable the answer falls back to the health read's daily UTM scan: `source: health`, `installed` = the refreshed scan counted events, `last_seen_at` / `events_24h` / `domain` = `null`. `events_24h` is `null` (never `0`) whenever the count could not be read.
|
|
89172
91450
|
*
|
|
89173
|
-
*
|
|
91451
|
+
* Same entitlement gate as `GET /ads/tracking/key`. Admin-scoped (`ads:read`).
|
|
89174
91452
|
*/
|
|
89175
91453
|
get: {
|
|
89176
91454
|
parameters: {
|
|
@@ -89181,7 +91459,7 @@ interface paths {
|
|
|
89181
91459
|
};
|
|
89182
91460
|
requestBody?: never;
|
|
89183
91461
|
responses: {
|
|
89184
|
-
/** @description The
|
|
91462
|
+
/** @description The tag detection status */
|
|
89185
91463
|
200: {
|
|
89186
91464
|
headers: {
|
|
89187
91465
|
[name: string]: unknown;
|
|
@@ -89190,17 +91468,16 @@ interface paths {
|
|
|
89190
91468
|
/**
|
|
89191
91469
|
* @example {
|
|
89192
91470
|
* "data": {
|
|
89193
|
-
* "
|
|
89194
|
-
* "
|
|
89195
|
-
* "
|
|
89196
|
-
* "
|
|
89197
|
-
* "
|
|
89198
|
-
* "meta_pixel_id": null
|
|
91471
|
+
* "installed": true,
|
|
91472
|
+
* "last_seen_at": "2026-09-23T14:02:11.000Z",
|
|
91473
|
+
* "events_24h": 184,
|
|
91474
|
+
* "domain": "www.clinica-ejemplo.cl",
|
|
91475
|
+
* "source": "tracker"
|
|
89199
91476
|
* }
|
|
89200
91477
|
* }
|
|
89201
91478
|
*/
|
|
89202
91479
|
"application/json": {
|
|
89203
|
-
data: components["schemas"]["
|
|
91480
|
+
data: components["schemas"]["AdsTrackingStatus"];
|
|
89204
91481
|
};
|
|
89205
91482
|
};
|
|
89206
91483
|
};
|
|
@@ -89304,7 +91581,7 @@ interface paths {
|
|
|
89304
91581
|
patch?: never;
|
|
89305
91582
|
trace?: never;
|
|
89306
91583
|
};
|
|
89307
|
-
"/ads/
|
|
91584
|
+
"/ads/feed": {
|
|
89308
91585
|
parameters: {
|
|
89309
91586
|
query?: never;
|
|
89310
91587
|
header?: never;
|
|
@@ -89312,17 +91589,34 @@ interface paths {
|
|
|
89312
91589
|
cookie?: never;
|
|
89313
91590
|
};
|
|
89314
91591
|
/**
|
|
89315
|
-
* The
|
|
89316
|
-
* @description
|
|
91592
|
+
* The live feed of recorded outcomes
|
|
91593
|
+
* @description Every outcome Vitrina recorded for the workspace (a lead, a booking, an attended visit, a presented quote, a closed sale, a payment), newest first — Vitrina’s own ledger, so a row appears the moment it happens, not after the engine’s daily sync. A row names the campaign the attribution engine credited (`ad`, from a cache refreshed every 5 minutes over the requested window, up to 92 days back; `null` until then — `meta.enrichment` says whether it is complete — with `matched: true` that reads «anuncio por confirmar»).
|
|
89317
91594
|
*
|
|
89318
|
-
* `
|
|
91595
|
+
* `contact.display_name` is filled only for a caller that also holds `contacts:read`; everyone else gets `null` and `contact.key` (the last 4 hex of the contact id).
|
|
89319
91596
|
*
|
|
89320
|
-
*
|
|
91597
|
+
* Polling: call with `since=<newest created_at seen>` (verbatim); the answer re-includes the 5 seconds before it, so dedupe by `id`. Paging: `before=<meta.next_before>` (verbatim; when a polling page comes back full, page down with `before` + the same `since` to close the gap). `only_ads=1` / `campaign_id` keep the rows the engine credited (to that campaign). With `sample=1` answers the sample dataset’s feed.
|
|
89321
91598
|
*/
|
|
89322
91599
|
get: {
|
|
89323
91600
|
parameters: {
|
|
89324
|
-
query
|
|
89325
|
-
|
|
91601
|
+
query: {
|
|
91602
|
+
/** @description Window start (inclusive, Santiago day), YYYY-MM-DD. */
|
|
91603
|
+
from: string;
|
|
91604
|
+
/** @description Window end (inclusive, Santiago day), YYYY-MM-DD. */
|
|
91605
|
+
to: string;
|
|
91606
|
+
/** @description Only outcomes of this stage. */
|
|
91607
|
+
stage?: "lead_created" | "appointment_booked" | "appointment_attended" | "quote_presented" | "closed_won" | "payment_received";
|
|
91608
|
+
/** @description `1` keeps only outcomes the engine credited to a campaign (the enrichment covers the requested window, up to 92 days back; check `meta.enrichment`). */
|
|
91609
|
+
only_ads?: "1" | "true";
|
|
91610
|
+
/** @description Only outcomes credited to this campaign (its PLATFORM id). */
|
|
91611
|
+
campaign_id?: string;
|
|
91612
|
+
/** @description Polling cursor: pass back the newest `created_at` seen, verbatim. The answer re-includes the 5 seconds before it (an outcome committed late with an earlier timestamp is not lost) — dedupe by `id`. */
|
|
91613
|
+
since?: string;
|
|
91614
|
+
/** @description Paging cursor: `meta.next_before` of the previous page, verbatim (`<created_at>,<id>` — the id breaks ties between rows recorded in the same instant). Combine with `since` to fill a gap after a full polling page. */
|
|
91615
|
+
before?: string;
|
|
91616
|
+
/** @description Page size, 1–50. Defaults to 30. */
|
|
91617
|
+
limit?: number;
|
|
91618
|
+
/** @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. */
|
|
91619
|
+
sample?: "1" | "true";
|
|
89326
91620
|
};
|
|
89327
91621
|
header?: never;
|
|
89328
91622
|
path?: never;
|
|
@@ -89330,7 +91624,7 @@ interface paths {
|
|
|
89330
91624
|
};
|
|
89331
91625
|
requestBody?: never;
|
|
89332
91626
|
responses: {
|
|
89333
|
-
/** @description
|
|
91627
|
+
/** @description A page of the feed, newest first */
|
|
89334
91628
|
200: {
|
|
89335
91629
|
headers: {
|
|
89336
91630
|
[name: string]: unknown;
|
|
@@ -89338,25 +91632,69 @@ interface paths {
|
|
|
89338
91632
|
content: {
|
|
89339
91633
|
/**
|
|
89340
91634
|
* @example {
|
|
89341
|
-
* "data":
|
|
89342
|
-
*
|
|
89343
|
-
*
|
|
89344
|
-
*
|
|
89345
|
-
*
|
|
89346
|
-
*
|
|
89347
|
-
*
|
|
89348
|
-
*
|
|
89349
|
-
* "
|
|
89350
|
-
* "
|
|
89351
|
-
*
|
|
89352
|
-
*
|
|
89353
|
-
*
|
|
89354
|
-
*
|
|
91635
|
+
* "data": [
|
|
91636
|
+
* {
|
|
91637
|
+
* "id": "01926f3e-7c1a-7b2e-9f10-3a5b7c9d0e1f",
|
|
91638
|
+
* "stage": "closed_won",
|
|
91639
|
+
* "occurred_at": "2026-09-22T19:40:12.000Z",
|
|
91640
|
+
* "created_at": "2026-09-22T19:40:13.482913Z",
|
|
91641
|
+
* "matched": true,
|
|
91642
|
+
* "value": 1200000,
|
|
91643
|
+
* "action_source": "business_messaging",
|
|
91644
|
+
* "contact": {
|
|
91645
|
+
* "id": "5b0c2f1e-8a3d-4c6b-9e7f-1a2b3c4d5e6f",
|
|
91646
|
+
* "display_name": "Paciente Ejemplo",
|
|
91647
|
+
* "key": "5e6f"
|
|
91648
|
+
* },
|
|
91649
|
+
* "ad": {
|
|
91650
|
+
* "name": null,
|
|
91651
|
+
* "ad_set_name": null,
|
|
91652
|
+
* "creative_thumbnail_url": null,
|
|
91653
|
+
* "campaign": {
|
|
91654
|
+
* "external_id": "120211000000000001",
|
|
91655
|
+
* "name": "Ortodoncia invisible · Septiembre"
|
|
91656
|
+
* }
|
|
91657
|
+
* },
|
|
91658
|
+
* "credited_weight": 1,
|
|
91659
|
+
* "touch_count": 3
|
|
91660
|
+
* },
|
|
91661
|
+
* {
|
|
91662
|
+
* "id": "01926f3a-1b2c-7d3e-8f40-5a6b7c8d9e0f",
|
|
91663
|
+
* "stage": "appointment_booked",
|
|
91664
|
+
* "occurred_at": "2026-09-22T18:02:55.000Z",
|
|
91665
|
+
* "created_at": "2026-09-22T18:02:56.104220Z",
|
|
91666
|
+
* "matched": true,
|
|
91667
|
+
* "value": null,
|
|
91668
|
+
* "action_source": "business_messaging",
|
|
91669
|
+
* "contact": {
|
|
91670
|
+
* "id": "7c1d3e2f-9b4a-4d5c-8e6f-2b3c4d5e6f70",
|
|
91671
|
+
* "display_name": null,
|
|
91672
|
+
* "key": "6f70"
|
|
91673
|
+
* },
|
|
91674
|
+
* "ad": null,
|
|
91675
|
+
* "credited_weight": null,
|
|
91676
|
+
* "touch_count": null
|
|
91677
|
+
* }
|
|
91678
|
+
* ],
|
|
91679
|
+
* "meta": {
|
|
91680
|
+
* "next_before": "2026-09-22T18:02:56.104220Z,01926f3a-1b2c-7d3e-8f40-5a6b7c8d9e0f",
|
|
91681
|
+
* "server_time": "2026-09-22T19:41:00.000Z",
|
|
91682
|
+
* "enrichment": "ready"
|
|
89355
91683
|
* }
|
|
89356
91684
|
* }
|
|
89357
91685
|
*/
|
|
89358
91686
|
"application/json": {
|
|
89359
|
-
data: components["schemas"]["
|
|
91687
|
+
data: components["schemas"]["AdsFeedItem"][];
|
|
91688
|
+
meta: {
|
|
91689
|
+
/** @description Opaque cursor (`<created_at>,<id>`): pass as `before` for the next (older) page; `null` at the end. */
|
|
91690
|
+
next_before: string | null;
|
|
91691
|
+
server_time: string;
|
|
91692
|
+
/**
|
|
91693
|
+
* @description Whether the campaign credit on this page is complete: `pending` — still being read, retry shortly (a matched row may show `ad: null` and `only_ads` may be short); `unavailable` — the attribution engine could not be read in the last minute.
|
|
91694
|
+
* @enum {string}
|
|
91695
|
+
*/
|
|
91696
|
+
enrichment: "ready" | "pending" | "unavailable";
|
|
91697
|
+
};
|
|
89360
91698
|
};
|
|
89361
91699
|
};
|
|
89362
91700
|
};
|
|
@@ -89460,7 +91798,7 @@ interface paths {
|
|
|
89460
91798
|
patch?: never;
|
|
89461
91799
|
trace?: never;
|
|
89462
91800
|
};
|
|
89463
|
-
"/ads/
|
|
91801
|
+
"/ads/feed/{id}/journey": {
|
|
89464
91802
|
parameters: {
|
|
89465
91803
|
query?: never;
|
|
89466
91804
|
header?: never;
|
|
@@ -89468,23 +91806,29 @@ interface paths {
|
|
|
89468
91806
|
cookie?: never;
|
|
89469
91807
|
};
|
|
89470
91808
|
/**
|
|
89471
|
-
*
|
|
89472
|
-
* @description
|
|
89473
|
-
*
|
|
89474
|
-
* When the per-key read is unavailable the answer falls back to the health read's daily UTM scan: `source: health`, `installed` = the refreshed scan counted events, `last_seen_at` / `events_24h` / `domain` = `null`. `events_24h` is `null` (never `0`) whenever the count could not be read.
|
|
89475
|
-
*
|
|
89476
|
-
* Same entitlement gate as `GET /ads/tracking/key`. Admin-scoped (`ads:read`).
|
|
91809
|
+
* One feed row’s path to its outcome
|
|
91810
|
+
* @description The touches that led to one recorded outcome, oldest first, ending at the outcome: ad views and clicks (ad and campaign names), site visits, conversations. From the attribution engine (`source: engine`) when it credited the outcome and the delegated key may read people; otherwise Vitrina’s own record of this contact’s outcomes (`source: vitrina`) — still a path, without the ad touches. Never carries a URL, referrer, email or device. 404 when the id is not a live row of this workspace. With `sample=1` answers the sample dataset’s journey (pass the feed’s `from`/`to` when it was not the last 30 days).
|
|
89477
91811
|
*/
|
|
89478
91812
|
get: {
|
|
89479
91813
|
parameters: {
|
|
89480
|
-
query?:
|
|
91814
|
+
query?: {
|
|
91815
|
+
/** @description Sample mode only: the feed window the item came from (defaults to the last 30 days). Ignored for real data. */
|
|
91816
|
+
from?: string;
|
|
91817
|
+
/** @description Sample mode only — see `from`. */
|
|
91818
|
+
to?: string;
|
|
91819
|
+
/** @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. */
|
|
91820
|
+
sample?: "1" | "true";
|
|
91821
|
+
};
|
|
89481
91822
|
header?: never;
|
|
89482
|
-
path
|
|
91823
|
+
path: {
|
|
91824
|
+
/** @description The feed item id (`data[].id`). */
|
|
91825
|
+
id: string;
|
|
91826
|
+
};
|
|
89483
91827
|
cookie?: never;
|
|
89484
91828
|
};
|
|
89485
91829
|
requestBody?: never;
|
|
89486
91830
|
responses: {
|
|
89487
|
-
/** @description The
|
|
91831
|
+
/** @description The journey */
|
|
89488
91832
|
200: {
|
|
89489
91833
|
headers: {
|
|
89490
91834
|
[name: string]: unknown;
|
|
@@ -89493,16 +91837,44 @@ interface paths {
|
|
|
89493
91837
|
/**
|
|
89494
91838
|
* @example {
|
|
89495
91839
|
* "data": {
|
|
89496
|
-
* "
|
|
89497
|
-
*
|
|
89498
|
-
*
|
|
89499
|
-
*
|
|
89500
|
-
*
|
|
91840
|
+
* "steps": [
|
|
91841
|
+
* {
|
|
91842
|
+
* "kind": "ad",
|
|
91843
|
+
* "label": "Reel · Antes y después",
|
|
91844
|
+
* "detail": "Ortodoncia invisible · Septiembre",
|
|
91845
|
+
* "at": "2026-09-19T21:10:00.000Z",
|
|
91846
|
+
* "channel": "meta"
|
|
91847
|
+
* },
|
|
91848
|
+
* {
|
|
91849
|
+
* "kind": "click",
|
|
91850
|
+
* "label": "Reel · Antes y después",
|
|
91851
|
+
* "detail": "Ortodoncia invisible · Septiembre",
|
|
91852
|
+
* "at": "2026-09-20T13:02:00.000Z",
|
|
91853
|
+
* "channel": "meta"
|
|
91854
|
+
* },
|
|
91855
|
+
* {
|
|
91856
|
+
* "kind": "chat",
|
|
91857
|
+
* "label": "Conversación",
|
|
91858
|
+
* "detail": null,
|
|
91859
|
+
* "at": "2026-09-20T13:03:00.000Z",
|
|
91860
|
+
* "channel": "whatsapp"
|
|
91861
|
+
* },
|
|
91862
|
+
* {
|
|
91863
|
+
* "kind": "outcome",
|
|
91864
|
+
* "label": "Presupuesto aceptado",
|
|
91865
|
+
* "detail": null,
|
|
91866
|
+
* "at": "2026-09-22T19:40:12.000Z"
|
|
91867
|
+
* }
|
|
91868
|
+
* ],
|
|
91869
|
+
* "touch_count": 3,
|
|
91870
|
+
* "credited_weight": 1,
|
|
91871
|
+
* "model": "last_touch",
|
|
91872
|
+
* "source": "engine"
|
|
89501
91873
|
* }
|
|
89502
91874
|
* }
|
|
89503
91875
|
*/
|
|
89504
91876
|
"application/json": {
|
|
89505
|
-
data: components["schemas"]["
|
|
91877
|
+
data: components["schemas"]["AdsJourney"];
|
|
89506
91878
|
};
|
|
89507
91879
|
};
|
|
89508
91880
|
};
|
|
@@ -108454,6 +110826,17 @@ interface components {
|
|
|
108454
110826
|
last_synced_at: string | null;
|
|
108455
110827
|
};
|
|
108456
110828
|
MetaAdsAdsResponse: components["schemas"]["MetaAdsAdsNotConnected"] | components["schemas"]["MetaAdsAdsConnected"];
|
|
110829
|
+
AdsOverviewDay: {
|
|
110830
|
+
date: string;
|
|
110831
|
+
/** @description `null` exactly when the engine could not scope spend. */
|
|
110832
|
+
spend: number | null;
|
|
110833
|
+
/** @description Attributed value that day. */
|
|
110834
|
+
revenue: number;
|
|
110835
|
+
outcomes: number;
|
|
110836
|
+
attributed_outcomes: number;
|
|
110837
|
+
/** @description `true` on the day still running (today, America/Santiago): end the solid line before it. */
|
|
110838
|
+
partial: boolean;
|
|
110839
|
+
};
|
|
108457
110840
|
AdsOverview: {
|
|
108458
110841
|
current: {
|
|
108459
110842
|
spend: number | null;
|
|
@@ -108507,6 +110890,10 @@ interface components {
|
|
|
108507
110890
|
[key: string]: number;
|
|
108508
110891
|
};
|
|
108509
110892
|
};
|
|
110893
|
+
/** @description `grain=day` only: every day of the window, oldest first. */
|
|
110894
|
+
days?: components["schemas"]["AdsOverviewDay"][];
|
|
110895
|
+
/** @description `grain=day` only: every day of the previous window of equal length. */
|
|
110896
|
+
previous_days?: components["schemas"]["AdsOverviewDay"][];
|
|
108510
110897
|
};
|
|
108511
110898
|
AdsCampaigns: {
|
|
108512
110899
|
data: {
|
|
@@ -108519,6 +110906,20 @@ interface components {
|
|
|
108519
110906
|
roas: number;
|
|
108520
110907
|
direct_cash_value: number | null;
|
|
108521
110908
|
inherited_cash_value: number | null;
|
|
110909
|
+
/** @description The campaign’s highest-spend ad among the top-50 scored ads of the creatives read (the rolling window nearest this range: 7d / 14d / 28d); `null` when unknown. */
|
|
110910
|
+
top_ad: {
|
|
110911
|
+
/** @description The ad’s platform (Meta) id. */
|
|
110912
|
+
external_id: string;
|
|
110913
|
+
name: string | null;
|
|
110914
|
+
creative_thumbnail_url: string | null;
|
|
110915
|
+
} | null;
|
|
110916
|
+
/** @description `series=1` only. `null` when the daily delivery read failed. A day without delivery is `spend: 0`. */
|
|
110917
|
+
series?: {
|
|
110918
|
+
date: string;
|
|
110919
|
+
spend: number;
|
|
110920
|
+
/** @description Conversions credited primarily to the campaign that day (each conversion counted once, on its largest-credit campaign). `null` when unknown: credit not available yet, the campaign outside the credited set read (top 25 by outcomes), or a day before the credit window (the last 92 days). Under a multi-touch model the days can sum to less than the row’s `outcome_count`. */
|
|
110921
|
+
outcome_count: number | null;
|
|
110922
|
+
}[] | null;
|
|
108522
110923
|
}[];
|
|
108523
110924
|
};
|
|
108524
110925
|
AdsAttributedSales: {
|
|
@@ -108536,6 +110937,8 @@ interface components {
|
|
|
108536
110937
|
credited_weight: number;
|
|
108537
110938
|
touch_count: number;
|
|
108538
110939
|
path_length: number | null;
|
|
110940
|
+
first_touch_time: string | null;
|
|
110941
|
+
last_touch_time: string | null;
|
|
108539
110942
|
is_inherited: boolean;
|
|
108540
110943
|
}[];
|
|
108541
110944
|
};
|
|
@@ -108544,6 +110947,12 @@ interface components {
|
|
|
108544
110947
|
ad_external_id: string;
|
|
108545
110948
|
ad_name: string | null;
|
|
108546
110949
|
campaign_name: string | null;
|
|
110950
|
+
/** @description The ad’s campaign; `null` when the engine does not say. */
|
|
110951
|
+
campaign: {
|
|
110952
|
+
/** @description The campaign’s platform id = an `/ads/campaigns` row’s `campaign_external_id`. Join by this, never by name. */
|
|
110953
|
+
external_id: string;
|
|
110954
|
+
name: string | null;
|
|
110955
|
+
} | null;
|
|
108547
110956
|
ad_set_name: string | null;
|
|
108548
110957
|
creative_thumbnail_url: string | null;
|
|
108549
110958
|
score_window: string;
|
|
@@ -108561,6 +110970,13 @@ interface components {
|
|
|
108561
110970
|
fatigue_state: "active" | "paused" | "degraded" | null;
|
|
108562
110971
|
/** @enum {string|null} */
|
|
108563
110972
|
fatigue_risk_tier: "low" | "medium" | "high" | "critical" | null;
|
|
110973
|
+
/** @description `series=1` only: the last 14 days (America/Santiago). `null` past the first 50 rows or when this ad’s daily read failed (never a zero-filled line for an unknown); `spend: 0` days are measured no-delivery days. */
|
|
110974
|
+
series?: {
|
|
110975
|
+
date: string;
|
|
110976
|
+
spend: number;
|
|
110977
|
+
/** @description Percent (clicks ÷ impressions × 100), like the row’s `ctr`; `null` on a day without impressions. */
|
|
110978
|
+
ctr: number | null;
|
|
110979
|
+
}[] | null;
|
|
108564
110980
|
}[];
|
|
108565
110981
|
};
|
|
108566
110982
|
AdsHealth: {
|
|
@@ -108609,6 +111025,12 @@ interface components {
|
|
|
108609
111025
|
with_no_tracking: number;
|
|
108610
111026
|
coverage_percent: number;
|
|
108611
111027
|
};
|
|
111028
|
+
/** @description THE population «cobertura» and «outcomes» share: the same counts `/ads/overview` answers for this window and model (`current.outcomes`, `current.attributed_outcomes`, `current.coverage_percent`). Salud prints this; `attribution_coverage` is the tracking-signal diagnostic (the engine’s attribution-eligible conversions and whether each carried a UTM / click id) — a different population, never shown as «de N». `null` when the overview read failed (the rest of the page stands). */
|
|
111029
|
+
outcomes_coverage: {
|
|
111030
|
+
outcomes: number;
|
|
111031
|
+
attributed_outcomes: number;
|
|
111032
|
+
coverage_percent: number;
|
|
111033
|
+
} | null;
|
|
108612
111034
|
};
|
|
108613
111035
|
AdsFact: {
|
|
108614
111036
|
/** @description Stable fact key (`roas`, `best_campaign_name`, …) — a vocabulary name, not a resource id. */
|
|
@@ -108620,7 +111042,7 @@ interface components {
|
|
|
108620
111042
|
/** @description The exact es-CL string a sentence quotes (`3,7×`, `$845.200`, `—`). */
|
|
108621
111043
|
display: string;
|
|
108622
111044
|
/** @enum {string} */
|
|
108623
|
-
format: "clp" | "int" | "times" | "pct" | "text" | "date";
|
|
111045
|
+
format: "clp" | "int" | "times" | "pct" | "text" | "date" | "days";
|
|
108624
111046
|
/** @description Where the value was read. */
|
|
108625
111047
|
source: string;
|
|
108626
111048
|
/**
|
|
@@ -108648,7 +111070,7 @@ interface components {
|
|
|
108648
111070
|
fact_key: string;
|
|
108649
111071
|
value: number | string | null;
|
|
108650
111072
|
/** @enum {string} */
|
|
108651
|
-
format: "clp" | "int" | "times" | "pct" | "text" | "date";
|
|
111073
|
+
format: "clp" | "int" | "times" | "pct" | "text" | "date" | "days";
|
|
108652
111074
|
/** @description The substring of `lead.text` to count up. */
|
|
108653
111075
|
display: string;
|
|
108654
111076
|
/** @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`). */
|
|
@@ -108689,6 +111111,111 @@ interface components {
|
|
|
108689
111111
|
/** @description `false` in sample mode: the goal was validated but not stored. */
|
|
108690
111112
|
persisted?: boolean;
|
|
108691
111113
|
} | null;
|
|
111114
|
+
AdsAction: {
|
|
111115
|
+
/** @description `<kind>:<target external id>:<YYYY-MM-DD>` — a composite key, stable for a day. */
|
|
111116
|
+
key: string;
|
|
111117
|
+
/** @enum {string} */
|
|
111118
|
+
kind: "pause_ad" | "budget_change" | "adset_duplicate_swap" | "utm_refresh" | "wiring_recheck" | "nav";
|
|
111119
|
+
screen: ("resumen" | "campanas" | "creativos" | "salud")[];
|
|
111120
|
+
/** @description The one card the rail leads with. */
|
|
111121
|
+
primary: boolean;
|
|
111122
|
+
title: string;
|
|
111123
|
+
/** @description Spanish; `**bold**` is the only markup. */
|
|
111124
|
+
why: string;
|
|
111125
|
+
effect: string | null;
|
|
111126
|
+
target: {
|
|
111127
|
+
/** @enum {string} */
|
|
111128
|
+
level: "ad" | "ad_set" | "campaign" | "profile";
|
|
111129
|
+
/** @description The Meta id of the object (null for profile-level actions). */
|
|
111130
|
+
external_id: string | null;
|
|
111131
|
+
name: string | null;
|
|
111132
|
+
campaign_external_id?: string | null;
|
|
111133
|
+
};
|
|
111134
|
+
/** @description The engine’s own vocabulary, e.g. `{ budget_change_pct: 20 }`. */
|
|
111135
|
+
params: {
|
|
111136
|
+
[key: string]: unknown;
|
|
111137
|
+
};
|
|
111138
|
+
reversible: boolean;
|
|
111139
|
+
/** @enum {string|null} */
|
|
111140
|
+
risk: "reversible" | "learning_reset" | "consequences" | null;
|
|
111141
|
+
/** @description Which operation executes it; `null` for `nav`. */
|
|
111142
|
+
engine_ref: {
|
|
111143
|
+
/** @enum {string} */
|
|
111144
|
+
op: "recommendations.apply" | "ads.pause" | "wiring.ad_sets" | "quality.utm_refresh" | "wiring.recheck" | "actions.rollback";
|
|
111145
|
+
recommendation_id?: string;
|
|
111146
|
+
} | null;
|
|
111147
|
+
/** @description `nav` only: a workspace-relative path. */
|
|
111148
|
+
href?: string;
|
|
111149
|
+
cta?: string;
|
|
111150
|
+
/** @description Fact keys the card is built from. */
|
|
111151
|
+
facts: string[];
|
|
111152
|
+
dismissed_until: string | null;
|
|
111153
|
+
};
|
|
111154
|
+
AdsActionPreview: {
|
|
111155
|
+
/** Format: uuid */
|
|
111156
|
+
preview_id: string;
|
|
111157
|
+
expires_at: string;
|
|
111158
|
+
action_key: string;
|
|
111159
|
+
rows: {
|
|
111160
|
+
key: string;
|
|
111161
|
+
label: string;
|
|
111162
|
+
before: string;
|
|
111163
|
+
after: string;
|
|
111164
|
+
}[];
|
|
111165
|
+
warnings: string[];
|
|
111166
|
+
/** @description Duplicate-and-swap only: `consent_terms.text` split into lines, for display (verbatim). */
|
|
111167
|
+
consent: string[];
|
|
111168
|
+
/** @description Duplicate-and-swap only: what the owner accepts before confirming. Execute must send `consent: { version, text_hash }`. */
|
|
111169
|
+
consent_terms: {
|
|
111170
|
+
version: string;
|
|
111171
|
+
/** @enum {string} */
|
|
111172
|
+
locale: "es";
|
|
111173
|
+
/** @description The consent text, VERBATIM — render it as is (plain text, `\n` line breaks, `- ` bullets). */
|
|
111174
|
+
text: string;
|
|
111175
|
+
/** @description SHA-256 (lowercase hex, UTF-8) of `text`. */
|
|
111176
|
+
text_hash: string;
|
|
111177
|
+
} | null;
|
|
111178
|
+
reversible: boolean;
|
|
111179
|
+
/** @enum {string|null} */
|
|
111180
|
+
engine_op: "recommendations.apply" | "ads.pause" | "wiring.ad_sets" | "quality.utm_refresh" | "wiring.recheck" | "actions.rollback" | null;
|
|
111181
|
+
};
|
|
111182
|
+
AdsActionExecution: {
|
|
111183
|
+
/** Format: uuid */
|
|
111184
|
+
id: string;
|
|
111185
|
+
action_key: string;
|
|
111186
|
+
/** @enum {string} */
|
|
111187
|
+
kind: "pause_ad" | "budget_change" | "adset_duplicate_swap" | "utm_refresh" | "wiring_recheck";
|
|
111188
|
+
/** @enum {string} */
|
|
111189
|
+
status: "queued" | "running" | "succeeded" | "failed" | "refused" | "rolled_back";
|
|
111190
|
+
outcome: {
|
|
111191
|
+
summary: string;
|
|
111192
|
+
engine_action_id: string | null;
|
|
111193
|
+
applied_at: string | null;
|
|
111194
|
+
} | null;
|
|
111195
|
+
error: {
|
|
111196
|
+
code: string;
|
|
111197
|
+
/** @enum {string} */
|
|
111198
|
+
reason: "promoted_object_frozen" | "reconnect_required" | "permission_gap" | "rate_limited" | "not_reversible" | "forbidden" | "consent_required" | "engine_error";
|
|
111199
|
+
message: string;
|
|
111200
|
+
} | null;
|
|
111201
|
+
rollback_available: boolean;
|
|
111202
|
+
/** Format: uuid */
|
|
111203
|
+
rollback_of: string | null;
|
|
111204
|
+
simulated: boolean;
|
|
111205
|
+
created_at: string;
|
|
111206
|
+
finished_at: string | null;
|
|
111207
|
+
};
|
|
111208
|
+
AdsActionExecutionListItem: components["schemas"]["AdsActionExecution"] & {
|
|
111209
|
+
target: {
|
|
111210
|
+
/** @enum {string} */
|
|
111211
|
+
level: "ad" | "ad_set" | "campaign" | "profile";
|
|
111212
|
+
/** @description The Meta id of what was touched; `null` for a profile-level action. */
|
|
111213
|
+
external_id: string | null;
|
|
111214
|
+
name: string | null;
|
|
111215
|
+
};
|
|
111216
|
+
/** @description Display name of the member who confirmed it — only for a caller holding `memberships:read` (sample mode included, for the rows the owner simulated); `null` otherwise, for an API key, and on the two sample example rows. Write «Vitrina» for `null`. */
|
|
111217
|
+
created_by: string | null;
|
|
111218
|
+
};
|
|
108692
111219
|
AdsTrackingKey: {
|
|
108693
111220
|
key_id: string;
|
|
108694
111221
|
public_key: string;
|
|
@@ -108706,6 +111233,7 @@ interface components {
|
|
|
108706
111233
|
snippet: string;
|
|
108707
111234
|
setup_checklist: string[];
|
|
108708
111235
|
};
|
|
111236
|
+
/** @description No per-day series: tag events are counted over the last 24 hours only (`events_24h`); a day-by-day count is not available. */
|
|
108709
111237
|
AdsTrackingStatus: {
|
|
108710
111238
|
installed: boolean;
|
|
108711
111239
|
last_seen_at: string | null;
|
|
@@ -108714,6 +111242,61 @@ interface components {
|
|
|
108714
111242
|
/** @enum {string} */
|
|
108715
111243
|
source: "tracker" | "health";
|
|
108716
111244
|
};
|
|
111245
|
+
AdsFeedItem: {
|
|
111246
|
+
/** Format: uuid */
|
|
111247
|
+
id: string;
|
|
111248
|
+
/** @enum {string} */
|
|
111249
|
+
stage: "lead_created" | "appointment_booked" | "appointment_attended" | "quote_presented" | "closed_won" | "payment_received";
|
|
111250
|
+
/** @description When the outcome happened. */
|
|
111251
|
+
occurred_at: string;
|
|
111252
|
+
/** @description When Vitrina recorded it — the cursor field, microsecond-exact. */
|
|
111253
|
+
created_at: string;
|
|
111254
|
+
/** @description The engine accepted the outcome as a conversion it can attribute. `true` with `ad: null` = «anuncio por confirmar». */
|
|
111255
|
+
matched: boolean;
|
|
111256
|
+
/** @description CLP for money stages; `null` otherwise (never 0). */
|
|
111257
|
+
value: number | null;
|
|
111258
|
+
/** @enum {string} */
|
|
111259
|
+
action_source: "website" | "business_messaging" | "physical_store" | "system_generated" | "phone_call" | "chat" | "email" | "app" | "other";
|
|
111260
|
+
contact: {
|
|
111261
|
+
id: string;
|
|
111262
|
+
/** @description Only when the caller holds `contacts:read`; else `null`. */
|
|
111263
|
+
display_name: string | null;
|
|
111264
|
+
/** @description Last 4 hex of the contact id. */
|
|
111265
|
+
key: string;
|
|
111266
|
+
};
|
|
111267
|
+
/** @description The campaign the engine credited; `null` until it has. Campaign-grain today: `name`/`ad_set_name` are `null` for real data. */
|
|
111268
|
+
ad: {
|
|
111269
|
+
name: string | null;
|
|
111270
|
+
ad_set_name: string | null;
|
|
111271
|
+
/** @description The ad’s thumbnail (Ads v3). `null` on real data today (the engine’s credit is campaign-grain — it names no ad) and in sample mode (the UI draws a placeholder); render the megaphone glyph for `null`. */
|
|
111272
|
+
creative_thumbnail_url: string | null;
|
|
111273
|
+
campaign: {
|
|
111274
|
+
/** @description The campaign’s PLATFORM id (what `campaign_id` filters on). */
|
|
111275
|
+
external_id: string;
|
|
111276
|
+
name: string;
|
|
111277
|
+
};
|
|
111278
|
+
} | null;
|
|
111279
|
+
credited_weight: number | null;
|
|
111280
|
+
touch_count: number | null;
|
|
111281
|
+
};
|
|
111282
|
+
AdsJourney: {
|
|
111283
|
+
steps: {
|
|
111284
|
+
/** @enum {string} */
|
|
111285
|
+
kind: "ad" | "click" | "visit" | "chat" | "outcome";
|
|
111286
|
+
label: string;
|
|
111287
|
+
detail: string | null;
|
|
111288
|
+
at: string;
|
|
111289
|
+
channel?: string;
|
|
111290
|
+
}[];
|
|
111291
|
+
touch_count: number;
|
|
111292
|
+
credited_weight: number | null;
|
|
111293
|
+
model: string;
|
|
111294
|
+
/**
|
|
111295
|
+
* @description `engine` = the attribution engine’s touches; `vitrina` = only the outcomes Vitrina recorded for this contact (the delegated key cannot read people, or the engine has no path for it yet).
|
|
111296
|
+
* @enum {string}
|
|
111297
|
+
*/
|
|
111298
|
+
source: "engine" | "vitrina";
|
|
111299
|
+
};
|
|
108717
111300
|
};
|
|
108718
111301
|
responses: never;
|
|
108719
111302
|
parameters: never;
|
|
@@ -108774,7 +111357,7 @@ declare function createClient(opts: CreateClientOptions): VitrinaClient;
|
|
|
108774
111357
|
* is regenerated — narrow on the ones you handle, never assume this
|
|
108775
111358
|
* list is exhaustive at runtime.
|
|
108776
111359
|
*/
|
|
108777
|
-
type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED' | 'FACEBOOK_MARKETPLACE_NOT_AVAILABLE' | 'WORKSPACE_MEMBER_INACTIVE' | 'DEVICE_AGENT_ALREADY_PAIRED' | 'DEVICE_AGENT_SELF_REQUIRES_USER' | 'DEVICE_AGENT_KIND_NOT_ALLOWED' | 'DEVICE_TASK_STATUS_NOT_ALLOWED' | 'FACEBOOK_MARKETPLACE_NO_PHONE_AGENT' | 'FACEBOOK_MARKETPLACE_THREAD_NOT_ADDRESSABLE' | 'FACEBOOK_MARKETPLACE_ATTACHMENT_UNSUPPORTED' | 'REPLY_PACING_LOCKED' | 'SANDBOX_CHANNEL_FORBIDDEN' | 'SANDBOX_BILLING_FORBIDDEN' | 'SANDBOX_NOT_PROVISIONED' | 'SANDBOX_RESET_UNAVAILABLE' | 'CONNECTED_APP_SENSITIVE_DATA' | 'handoff_mismatch' | 'sync_in_flight' | 'atribu_refused' | 'start_again' | 'reconnect' | 'partner_token_invalid' | 'OUTBOUND_BLOCKED' | 'OUTBOUND_WARNING' | 'dpa_acceptance_required' | 'EMAIL_SENDER_UNRESOLVED' | 'CAMPAIGN_FROM_CONNECTED_MAILBOX' | 'BANK_FEED_NOT_CONFIGURED' | 'ADDON_NOT_PRICED' | 'MIRROR_LINES_UNMAPPED';
|
|
111360
|
+
type ErrorCode = 'VALIDATION_ERROR' | 'NOT_FOUND' | 'UNAUTHORIZED' | 'FORBIDDEN' | 'CONFLICT' | 'UNIQUE_CONFLICT' | 'IDEMPOTENCY_KEY_CONFLICT' | 'VERTICAL_NOT_ENABLED' | 'ENTITLEMENT_NOT_ACTIVE' | 'UNSUPPORTED_VEHICLE_TYPE' | 'NO_OFFERING_ADAPTER' | 'PAYLOAD_TOO_LARGE' | 'UNSUPPORTED_MEDIA_TYPE' | 'UPSTREAM_ERROR' | 'RATE_LIMITED' | 'GONE' | 'INTERNAL_ERROR' | 'MESSAGING_ACCOUNT_TENANT_MISSING' | 'COPILOT_APPROVALS_UNAVAILABLE' | 'COPILOT_APPROVAL_REPLAY_BLOCKED' | 'DEALER_SITES_NOT_CONFIGURED' | 'STOREFRONT_ZONES_NOT_CONFIGURED' | 'RECONTACTO_NOT_ENABLED' | 'SYNC_QUEUE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_UNAVAILABLE' | 'ATTRIBUTION_PROFILE_MISMATCH' | 'ADS_KEY_NEEDS_REMINT' | 'ADS_ACTION_REPLAY_BLOCKED' | 'ADS_ACTION_NOT_AVAILABLE' | 'ADS_ACTION_NOT_REVERSIBLE' | 'ADS_ACTION_CONSENT_REQUIRED' | 'MISSING_SIGNATURE' | 'MALFORMED_SIGNATURE' | 'STALE_SIGNATURE' | 'INVALID_SIGNATURE' | 'REPLAY_DETECTED' | 'TURNSTILE_UNAVAILABLE' | 'TASADOR_QUOTA_EXHAUSTED' | 'TASADOR_ANON_DAILY_LIMIT' | 'TASADOR_CAPACITY_REACHED' | 'CLINIC_PLAN_REQUIRED' | 'TENANT_BILLING_PAUSED' | 'FACEBOOK_MARKETPLACE_NOT_AVAILABLE' | 'WORKSPACE_MEMBER_INACTIVE' | 'DEVICE_AGENT_ALREADY_PAIRED' | 'DEVICE_AGENT_SELF_REQUIRES_USER' | 'DEVICE_AGENT_KIND_NOT_ALLOWED' | 'DEVICE_TASK_STATUS_NOT_ALLOWED' | 'FACEBOOK_MARKETPLACE_NO_PHONE_AGENT' | 'FACEBOOK_MARKETPLACE_THREAD_NOT_ADDRESSABLE' | 'FACEBOOK_MARKETPLACE_ATTACHMENT_UNSUPPORTED' | 'REPLY_PACING_LOCKED' | 'SANDBOX_CHANNEL_FORBIDDEN' | 'SANDBOX_BILLING_FORBIDDEN' | 'SANDBOX_NOT_PROVISIONED' | 'SANDBOX_RESET_UNAVAILABLE' | 'CONNECTED_APP_SENSITIVE_DATA' | 'handoff_mismatch' | 'sync_in_flight' | 'atribu_refused' | 'start_again' | 'reconnect' | 'partner_token_invalid' | 'OUTBOUND_BLOCKED' | 'OUTBOUND_WARNING' | 'dpa_acceptance_required' | 'EMAIL_SENDER_UNRESOLVED' | 'CAMPAIGN_FROM_CONNECTED_MAILBOX' | 'BANK_FEED_NOT_CONFIGURED' | 'ADDON_NOT_PRICED' | 'MIRROR_LINES_UNMAPPED';
|
|
108778
111361
|
declare const ERROR_CODES: readonly ErrorCode[];
|
|
108779
111362
|
|
|
108780
111363
|
/**
|