zernio-sdk 0.0.550 → 0.0.552
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.
- checksums.yaml +4 -4
- data/README.md +73 -75
- data/docs/AdAccountsApi.md +915 -0
- data/docs/AdCampaignsApi.md +615 -15
- data/docs/AdCreativesApi.md +815 -0
- data/docs/AdInsightsApi.md +415 -0
- data/docs/AdTargetingApi.md +371 -0
- data/docs/AnalyticsApi.md +7 -7
- data/docs/BoostPostRequestTracking.md +1 -1
- data/docs/{CreateLeadFormRequestQuestionsInnerOptionsInner.md → BoostPostRequestTrackingUrlTagsInner.md} +2 -2
- data/docs/ConversionsApi.md +890 -0
- data/docs/CreateLeadFormRequestQuestionsInner.md +1 -1
- data/docs/LeadGenApi.md +527 -0
- data/docs/MessagingAdsApi.md +215 -0
- data/docs/ReachAndFrequencyApi.md +294 -0
- data/docs/TrackingTagsApi.md +141 -0
- data/docs/YouTubeDailyViewsResponse.md +2 -0
- data/docs/YouTubeDemographicsResponse.md +2 -0
- data/docs/YouTubeVideoRetentionResponse.md +2 -0
- data/lib/zernio-sdk/api/ad_accounts_api.rb +958 -0
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +618 -12
- data/lib/zernio-sdk/api/ad_creatives_api.rb +826 -0
- data/lib/zernio-sdk/api/ad_insights_api.rb +446 -0
- data/lib/zernio-sdk/api/ad_targeting_api.rb +404 -0
- data/lib/zernio-sdk/api/analytics_api.rb +8 -8
- data/lib/zernio-sdk/api/conversions_api.rb +936 -0
- data/lib/zernio-sdk/api/lead_gen_api.rb +547 -0
- data/lib/zernio-sdk/api/messaging_ads_api.rb +226 -0
- data/lib/zernio-sdk/api/reach_and_frequency_api.rb +316 -0
- data/lib/zernio-sdk/api/tracking_tags_api.rb +137 -0
- data/lib/zernio-sdk/models/boost_post_request_tracking.rb +5 -2
- data/lib/zernio-sdk/models/{create_lead_form_request_questions_inner_options_inner.rb → boost_post_request_tracking_url_tags_inner.rb} +3 -3
- data/lib/zernio-sdk/models/create_lead_form_request_questions_inner.rb +1 -1
- data/lib/zernio-sdk/models/you_tube_daily_views_response.rb +11 -1
- data/lib/zernio-sdk/models/you_tube_demographics_response.rb +11 -1
- data/lib/zernio-sdk/models/you_tube_video_retention_response.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +9 -2
- data/openapi.yaml +329 -163
- data/spec/api/ad_accounts_api_spec.rb +206 -0
- data/spec/api/ad_campaigns_api_spec.rb +119 -6
- data/spec/api/ad_creatives_api_spec.rb +182 -0
- data/spec/api/ad_insights_api_spec.rb +120 -0
- data/spec/api/ad_targeting_api_spec.rb +101 -0
- data/spec/api/analytics_api_spec.rb +4 -4
- data/spec/api/conversions_api_spec.rb +199 -0
- data/spec/api/lead_gen_api_spec.rb +131 -0
- data/spec/api/messaging_ads_api_spec.rb +71 -0
- data/spec/api/reach_and_frequency_api_spec.rb +87 -0
- data/spec/api/tracking_tags_api_spec.rb +25 -0
- data/spec/models/{create_lead_form_request_questions_inner_options_inner_spec.rb → boost_post_request_tracking_url_tags_inner_spec.rb} +6 -6
- data/spec/models/you_tube_daily_views_response_spec.rb +6 -0
- data/spec/models/you_tube_demographics_response_spec.rb +6 -0
- data/spec/models/you_tube_video_retention_response_spec.rb +6 -0
- metadata +38 -10
- data/docs/AdsApi.md +0 -5278
- data/lib/zernio-sdk/api/ads_api.rb +0 -5391
- data/spec/api/ads_api_spec.rb +0 -1015
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# Zernio::MessagingAdsApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**create_call_ad**](MessagingAdsApi.md#create_call_ad) | **POST** /v1/ads/call | Create Click-to-Call ad |
|
|
8
|
+
| [**create_ctwa_ad**](MessagingAdsApi.md#create_ctwa_ad) | **POST** /v1/ads/ctwa | Create Click-to-WhatsApp ad (deprecated) |
|
|
9
|
+
| [**create_messaging_ad**](MessagingAdsApi.md#create_messaging_ad) | **POST** /v1/ads/messaging | Create click-to-message ad (WhatsApp / Messenger / Instagram Direct) |
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
## create_call_ad
|
|
13
|
+
|
|
14
|
+
> create_call_ad(create_call_ad_request)
|
|
15
|
+
|
|
16
|
+
Create Click-to-Call ad
|
|
17
|
+
|
|
18
|
+
Same shape and flow as POST /v1/ads/ctwa, but the CTA is CALL_NOW dialing `phoneNumber` via a tel: link. The ad set is destination_type PHONE_CALL optimizing QUALITY_CALL and the campaign objective defaults to OUTCOME_LEADS. Supports the same single-creative and multi-creative shapes as CTWA.
|
|
19
|
+
|
|
20
|
+
### Examples
|
|
21
|
+
|
|
22
|
+
```ruby
|
|
23
|
+
require 'time'
|
|
24
|
+
require 'zernio-sdk'
|
|
25
|
+
# setup authorization
|
|
26
|
+
Zernio.configure do |config|
|
|
27
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
28
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
api_instance = Zernio::MessagingAdsApi.new
|
|
32
|
+
create_call_ad_request = Zernio::CreateCallAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily', phone_number: 'phone_number_example', link_url: 'link_url_example'}) # CreateCallAdRequest |
|
|
33
|
+
|
|
34
|
+
begin
|
|
35
|
+
# Create Click-to-Call ad
|
|
36
|
+
api_instance.create_call_ad(create_call_ad_request)
|
|
37
|
+
rescue Zernio::ApiError => e
|
|
38
|
+
puts "Error when calling MessagingAdsApi->create_call_ad: #{e}"
|
|
39
|
+
end
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
#### Using the create_call_ad_with_http_info variant
|
|
43
|
+
|
|
44
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
45
|
+
|
|
46
|
+
> <Array(nil, Integer, Hash)> create_call_ad_with_http_info(create_call_ad_request)
|
|
47
|
+
|
|
48
|
+
```ruby
|
|
49
|
+
begin
|
|
50
|
+
# Create Click-to-Call ad
|
|
51
|
+
data, status_code, headers = api_instance.create_call_ad_with_http_info(create_call_ad_request)
|
|
52
|
+
p status_code # => 2xx
|
|
53
|
+
p headers # => { ... }
|
|
54
|
+
p data # => nil
|
|
55
|
+
rescue Zernio::ApiError => e
|
|
56
|
+
puts "Error when calling MessagingAdsApi->create_call_ad_with_http_info: #{e}"
|
|
57
|
+
end
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
### Parameters
|
|
61
|
+
|
|
62
|
+
| Name | Type | Description | Notes |
|
|
63
|
+
| ---- | ---- | ----------- | ----- |
|
|
64
|
+
| **create_call_ad_request** | [**CreateCallAdRequest**](CreateCallAdRequest.md) | | |
|
|
65
|
+
|
|
66
|
+
### Return type
|
|
67
|
+
|
|
68
|
+
nil (empty response body)
|
|
69
|
+
|
|
70
|
+
### Authorization
|
|
71
|
+
|
|
72
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
73
|
+
|
|
74
|
+
### HTTP request headers
|
|
75
|
+
|
|
76
|
+
- **Content-Type**: application/json
|
|
77
|
+
- **Accept**: application/json
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
## create_ctwa_ad
|
|
81
|
+
|
|
82
|
+
> <CreateCtwaAd201Response> create_ctwa_ad(ctwa_ad_request_body)
|
|
83
|
+
|
|
84
|
+
Create Click-to-WhatsApp ad (deprecated)
|
|
85
|
+
|
|
86
|
+
Deprecated: use POST /v1/ads/messaging with `destination: whatsapp`. This endpoint stays available for back-compat; no removal planned. Creates one or more Click-to-WhatsApp (CTWA) ads on Meta under a single campaign and ad set. When tapped, each ad opens a WhatsApp conversation with the business attached to the supplied Facebook Page. The full hierarchy (campaign, ad set, creative(s), ad(s)) is created and activated in one call. The CTA is locked to WHATSAPP_MESSAGE and the destination is hard-coded to api.whatsapp.com/send; Meta resolves the actual WhatsApp number from the Page-to-WA pairing configured in Page settings or Business Manager. Supports two mutually-exclusive shapes: - **Single-creative**: supply top-level `headline`, `body`, and one of `imageUrl` / `video`. Creates 1 campaign + 1 ad set + 1 ad. - **Multi-creative**: supply a `creatives[]` array with N entries (each carrying its own headline, body, and image/video). Creates 1 campaign + 1 ad set + N ads sharing budget and targeting so Meta A/Bs the creatives inside a single auction instead of fragmenting budget across N parallel campaigns. Recommended when launching multiple creative variants for the same campaign. Prerequisites enforced by Meta (surfaced as platform_error on failure): the Facebook Page must be paired with a verified WhatsApp Business number, the WhatsApp Business Account must be business-verified, and the Meta access token must carry ads_management.
|
|
87
|
+
|
|
88
|
+
### Examples
|
|
89
|
+
|
|
90
|
+
```ruby
|
|
91
|
+
require 'time'
|
|
92
|
+
require 'zernio-sdk'
|
|
93
|
+
# setup authorization
|
|
94
|
+
Zernio.configure do |config|
|
|
95
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
96
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
api_instance = Zernio::MessagingAdsApi.new
|
|
100
|
+
ctwa_ad_request_body = Zernio::CtwaAdRequestBody.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily'}) # CtwaAdRequestBody |
|
|
101
|
+
|
|
102
|
+
begin
|
|
103
|
+
# Create Click-to-WhatsApp ad (deprecated)
|
|
104
|
+
result = api_instance.create_ctwa_ad(ctwa_ad_request_body)
|
|
105
|
+
p result
|
|
106
|
+
rescue Zernio::ApiError => e
|
|
107
|
+
puts "Error when calling MessagingAdsApi->create_ctwa_ad: #{e}"
|
|
108
|
+
end
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
#### Using the create_ctwa_ad_with_http_info variant
|
|
112
|
+
|
|
113
|
+
This returns an Array which contains the response data, status code and headers.
|
|
114
|
+
|
|
115
|
+
> <Array(<CreateCtwaAd201Response>, Integer, Hash)> create_ctwa_ad_with_http_info(ctwa_ad_request_body)
|
|
116
|
+
|
|
117
|
+
```ruby
|
|
118
|
+
begin
|
|
119
|
+
# Create Click-to-WhatsApp ad (deprecated)
|
|
120
|
+
data, status_code, headers = api_instance.create_ctwa_ad_with_http_info(ctwa_ad_request_body)
|
|
121
|
+
p status_code # => 2xx
|
|
122
|
+
p headers # => { ... }
|
|
123
|
+
p data # => <CreateCtwaAd201Response>
|
|
124
|
+
rescue Zernio::ApiError => e
|
|
125
|
+
puts "Error when calling MessagingAdsApi->create_ctwa_ad_with_http_info: #{e}"
|
|
126
|
+
end
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Parameters
|
|
130
|
+
|
|
131
|
+
| Name | Type | Description | Notes |
|
|
132
|
+
| ---- | ---- | ----------- | ----- |
|
|
133
|
+
| **ctwa_ad_request_body** | [**CtwaAdRequestBody**](CtwaAdRequestBody.md) | | |
|
|
134
|
+
|
|
135
|
+
### Return type
|
|
136
|
+
|
|
137
|
+
[**CreateCtwaAd201Response**](CreateCtwaAd201Response.md)
|
|
138
|
+
|
|
139
|
+
### Authorization
|
|
140
|
+
|
|
141
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
142
|
+
|
|
143
|
+
### HTTP request headers
|
|
144
|
+
|
|
145
|
+
- **Content-Type**: application/json
|
|
146
|
+
- **Accept**: application/json
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
## create_messaging_ad
|
|
150
|
+
|
|
151
|
+
> create_messaging_ad(create_messaging_ad_request)
|
|
152
|
+
|
|
153
|
+
Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
|
|
154
|
+
|
|
155
|
+
Creates a click-to-message ad; `destination` selects where the tapped ad opens a conversation: WhatsApp, the Page's Messenger inbox or the linked Instagram account's Direct inbox. The ad set is created with the matching destination_type and CONVERSATIONS optimization; the campaign objective defaults to OUTCOME_ENGAGEMENT. Supports single-creative and multi-creative shapes. Supersedes POST /v1/ads/ctwa (deprecated, equivalent to `destination: whatsapp`).
|
|
156
|
+
|
|
157
|
+
### Examples
|
|
158
|
+
|
|
159
|
+
```ruby
|
|
160
|
+
require 'time'
|
|
161
|
+
require 'zernio-sdk'
|
|
162
|
+
# setup authorization
|
|
163
|
+
Zernio.configure do |config|
|
|
164
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
165
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
166
|
+
end
|
|
167
|
+
|
|
168
|
+
api_instance = Zernio::MessagingAdsApi.new
|
|
169
|
+
create_messaging_ad_request = Zernio::CreateMessagingAdRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', name: 'name_example', budget_amount: 3.56, budget_type: 'daily', destination: 'whatsapp'}) # CreateMessagingAdRequest |
|
|
170
|
+
|
|
171
|
+
begin
|
|
172
|
+
# Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
|
|
173
|
+
api_instance.create_messaging_ad(create_messaging_ad_request)
|
|
174
|
+
rescue Zernio::ApiError => e
|
|
175
|
+
puts "Error when calling MessagingAdsApi->create_messaging_ad: #{e}"
|
|
176
|
+
end
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
#### Using the create_messaging_ad_with_http_info variant
|
|
180
|
+
|
|
181
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
182
|
+
|
|
183
|
+
> <Array(nil, Integer, Hash)> create_messaging_ad_with_http_info(create_messaging_ad_request)
|
|
184
|
+
|
|
185
|
+
```ruby
|
|
186
|
+
begin
|
|
187
|
+
# Create click-to-message ad (WhatsApp / Messenger / Instagram Direct)
|
|
188
|
+
data, status_code, headers = api_instance.create_messaging_ad_with_http_info(create_messaging_ad_request)
|
|
189
|
+
p status_code # => 2xx
|
|
190
|
+
p headers # => { ... }
|
|
191
|
+
p data # => nil
|
|
192
|
+
rescue Zernio::ApiError => e
|
|
193
|
+
puts "Error when calling MessagingAdsApi->create_messaging_ad_with_http_info: #{e}"
|
|
194
|
+
end
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### Parameters
|
|
198
|
+
|
|
199
|
+
| Name | Type | Description | Notes |
|
|
200
|
+
| ---- | ---- | ----------- | ----- |
|
|
201
|
+
| **create_messaging_ad_request** | [**CreateMessagingAdRequest**](CreateMessagingAdRequest.md) | | |
|
|
202
|
+
|
|
203
|
+
### Return type
|
|
204
|
+
|
|
205
|
+
nil (empty response body)
|
|
206
|
+
|
|
207
|
+
### Authorization
|
|
208
|
+
|
|
209
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
210
|
+
|
|
211
|
+
### HTTP request headers
|
|
212
|
+
|
|
213
|
+
- **Content-Type**: application/json
|
|
214
|
+
- **Accept**: application/json
|
|
215
|
+
|
|
@@ -0,0 +1,294 @@
|
|
|
1
|
+
# Zernio::ReachAndFrequencyApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://zernio.com/api*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
| ------ | ------------ | ----------- |
|
|
7
|
+
| [**cancel_rf_reservation**](ReachAndFrequencyApi.md#cancel_rf_reservation) | **DELETE** /v1/ads/rf-predictions/{predictionId} | Cancel a Reach & Frequency reservation |
|
|
8
|
+
| [**create_rf_prediction**](ReachAndFrequencyApi.md#create_rf_prediction) | **POST** /v1/ads/rf-predictions | Create a Reach & Frequency prediction |
|
|
9
|
+
| [**get_rf_prediction**](ReachAndFrequencyApi.md#get_rf_prediction) | **GET** /v1/ads/rf-predictions/{predictionId} | Read a Reach & Frequency prediction |
|
|
10
|
+
| [**reserve_rf_prediction**](ReachAndFrequencyApi.md#reserve_rf_prediction) | **POST** /v1/ads/rf-predictions/{predictionId}/reserve | Reserve a Reach & Frequency prediction |
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## cancel_rf_reservation
|
|
14
|
+
|
|
15
|
+
> cancel_rf_reservation(prediction_id, account_id, ad_account_id)
|
|
16
|
+
|
|
17
|
+
Cancel a Reach & Frequency reservation
|
|
18
|
+
|
|
19
|
+
Releases a RESERVATION's locked price and inventory. Unreserved predictions expire on their own.
|
|
20
|
+
|
|
21
|
+
### Examples
|
|
22
|
+
|
|
23
|
+
```ruby
|
|
24
|
+
require 'time'
|
|
25
|
+
require 'zernio-sdk'
|
|
26
|
+
# setup authorization
|
|
27
|
+
Zernio.configure do |config|
|
|
28
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
29
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
api_instance = Zernio::ReachAndFrequencyApi.new
|
|
33
|
+
prediction_id = 'prediction_id_example' # String |
|
|
34
|
+
account_id = 'account_id_example' # String |
|
|
35
|
+
ad_account_id = 'ad_account_id_example' # String |
|
|
36
|
+
|
|
37
|
+
begin
|
|
38
|
+
# Cancel a Reach & Frequency reservation
|
|
39
|
+
api_instance.cancel_rf_reservation(prediction_id, account_id, ad_account_id)
|
|
40
|
+
rescue Zernio::ApiError => e
|
|
41
|
+
puts "Error when calling ReachAndFrequencyApi->cancel_rf_reservation: #{e}"
|
|
42
|
+
end
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
#### Using the cancel_rf_reservation_with_http_info variant
|
|
46
|
+
|
|
47
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
48
|
+
|
|
49
|
+
> <Array(nil, Integer, Hash)> cancel_rf_reservation_with_http_info(prediction_id, account_id, ad_account_id)
|
|
50
|
+
|
|
51
|
+
```ruby
|
|
52
|
+
begin
|
|
53
|
+
# Cancel a Reach & Frequency reservation
|
|
54
|
+
data, status_code, headers = api_instance.cancel_rf_reservation_with_http_info(prediction_id, account_id, ad_account_id)
|
|
55
|
+
p status_code # => 2xx
|
|
56
|
+
p headers # => { ... }
|
|
57
|
+
p data # => nil
|
|
58
|
+
rescue Zernio::ApiError => e
|
|
59
|
+
puts "Error when calling ReachAndFrequencyApi->cancel_rf_reservation_with_http_info: #{e}"
|
|
60
|
+
end
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
### Parameters
|
|
64
|
+
|
|
65
|
+
| Name | Type | Description | Notes |
|
|
66
|
+
| ---- | ---- | ----------- | ----- |
|
|
67
|
+
| **prediction_id** | **String** | | |
|
|
68
|
+
| **account_id** | **String** | | |
|
|
69
|
+
| **ad_account_id** | **String** | | |
|
|
70
|
+
|
|
71
|
+
### Return type
|
|
72
|
+
|
|
73
|
+
nil (empty response body)
|
|
74
|
+
|
|
75
|
+
### Authorization
|
|
76
|
+
|
|
77
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
78
|
+
|
|
79
|
+
### HTTP request headers
|
|
80
|
+
|
|
81
|
+
- **Content-Type**: Not defined
|
|
82
|
+
- **Accept**: application/json
|
|
83
|
+
|
|
84
|
+
|
|
85
|
+
## create_rf_prediction
|
|
86
|
+
|
|
87
|
+
> <CreateRfPrediction201Response> create_rf_prediction(create_rf_prediction_request)
|
|
88
|
+
|
|
89
|
+
Create a Reach & Frequency prediction
|
|
90
|
+
|
|
91
|
+
Creates an R&F prediction — a QUOTE, nothing is bought and no ad entities are created. Provide a date range plus exactly one of `budgetAmount` (Meta predicts reach) or `reach` (Meta predicts the budget). The response carries the estimate and its allowed bounds (min/max budget and reach). Predictions expire on their own; to buy, reserve one via POST /v1/ads/rf-predictions/{predictionId}/reserve and pass the RESERVED id to POST /v1/ads/create with `buyingType: \"RESERVED\"`. Reservation campaigns reject automatic placements, so omitted `placements` default to Facebook feed (+ Instagram stream when a linked IG professional account resolves); Instagram placements require that IG account.
|
|
92
|
+
|
|
93
|
+
### Examples
|
|
94
|
+
|
|
95
|
+
```ruby
|
|
96
|
+
require 'time'
|
|
97
|
+
require 'zernio-sdk'
|
|
98
|
+
# setup authorization
|
|
99
|
+
Zernio.configure do |config|
|
|
100
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
101
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
102
|
+
end
|
|
103
|
+
|
|
104
|
+
api_instance = Zernio::ReachAndFrequencyApi.new
|
|
105
|
+
create_rf_prediction_request = Zernio::CreateRfPredictionRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example', start_date: Time.now, end_date: Time.now}) # CreateRfPredictionRequest |
|
|
106
|
+
|
|
107
|
+
begin
|
|
108
|
+
# Create a Reach & Frequency prediction
|
|
109
|
+
result = api_instance.create_rf_prediction(create_rf_prediction_request)
|
|
110
|
+
p result
|
|
111
|
+
rescue Zernio::ApiError => e
|
|
112
|
+
puts "Error when calling ReachAndFrequencyApi->create_rf_prediction: #{e}"
|
|
113
|
+
end
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
#### Using the create_rf_prediction_with_http_info variant
|
|
117
|
+
|
|
118
|
+
This returns an Array which contains the response data, status code and headers.
|
|
119
|
+
|
|
120
|
+
> <Array(<CreateRfPrediction201Response>, Integer, Hash)> create_rf_prediction_with_http_info(create_rf_prediction_request)
|
|
121
|
+
|
|
122
|
+
```ruby
|
|
123
|
+
begin
|
|
124
|
+
# Create a Reach & Frequency prediction
|
|
125
|
+
data, status_code, headers = api_instance.create_rf_prediction_with_http_info(create_rf_prediction_request)
|
|
126
|
+
p status_code # => 2xx
|
|
127
|
+
p headers # => { ... }
|
|
128
|
+
p data # => <CreateRfPrediction201Response>
|
|
129
|
+
rescue Zernio::ApiError => e
|
|
130
|
+
puts "Error when calling ReachAndFrequencyApi->create_rf_prediction_with_http_info: #{e}"
|
|
131
|
+
end
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
### Parameters
|
|
135
|
+
|
|
136
|
+
| Name | Type | Description | Notes |
|
|
137
|
+
| ---- | ---- | ----------- | ----- |
|
|
138
|
+
| **create_rf_prediction_request** | [**CreateRfPredictionRequest**](CreateRfPredictionRequest.md) | | |
|
|
139
|
+
|
|
140
|
+
### Return type
|
|
141
|
+
|
|
142
|
+
[**CreateRfPrediction201Response**](CreateRfPrediction201Response.md)
|
|
143
|
+
|
|
144
|
+
### Authorization
|
|
145
|
+
|
|
146
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
147
|
+
|
|
148
|
+
### HTTP request headers
|
|
149
|
+
|
|
150
|
+
- **Content-Type**: application/json
|
|
151
|
+
- **Accept**: application/json
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
## get_rf_prediction
|
|
155
|
+
|
|
156
|
+
> <CreateRfPrediction201Response> get_rf_prediction(prediction_id, account_id, ad_account_id)
|
|
157
|
+
|
|
158
|
+
Read a Reach & Frequency prediction
|
|
159
|
+
|
|
160
|
+
### Examples
|
|
161
|
+
|
|
162
|
+
```ruby
|
|
163
|
+
require 'time'
|
|
164
|
+
require 'zernio-sdk'
|
|
165
|
+
# setup authorization
|
|
166
|
+
Zernio.configure do |config|
|
|
167
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
168
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
169
|
+
end
|
|
170
|
+
|
|
171
|
+
api_instance = Zernio::ReachAndFrequencyApi.new
|
|
172
|
+
prediction_id = 'prediction_id_example' # String |
|
|
173
|
+
account_id = 'account_id_example' # String |
|
|
174
|
+
ad_account_id = 'ad_account_id_example' # String |
|
|
175
|
+
|
|
176
|
+
begin
|
|
177
|
+
# Read a Reach & Frequency prediction
|
|
178
|
+
result = api_instance.get_rf_prediction(prediction_id, account_id, ad_account_id)
|
|
179
|
+
p result
|
|
180
|
+
rescue Zernio::ApiError => e
|
|
181
|
+
puts "Error when calling ReachAndFrequencyApi->get_rf_prediction: #{e}"
|
|
182
|
+
end
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
#### Using the get_rf_prediction_with_http_info variant
|
|
186
|
+
|
|
187
|
+
This returns an Array which contains the response data, status code and headers.
|
|
188
|
+
|
|
189
|
+
> <Array(<CreateRfPrediction201Response>, Integer, Hash)> get_rf_prediction_with_http_info(prediction_id, account_id, ad_account_id)
|
|
190
|
+
|
|
191
|
+
```ruby
|
|
192
|
+
begin
|
|
193
|
+
# Read a Reach & Frequency prediction
|
|
194
|
+
data, status_code, headers = api_instance.get_rf_prediction_with_http_info(prediction_id, account_id, ad_account_id)
|
|
195
|
+
p status_code # => 2xx
|
|
196
|
+
p headers # => { ... }
|
|
197
|
+
p data # => <CreateRfPrediction201Response>
|
|
198
|
+
rescue Zernio::ApiError => e
|
|
199
|
+
puts "Error when calling ReachAndFrequencyApi->get_rf_prediction_with_http_info: #{e}"
|
|
200
|
+
end
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Parameters
|
|
204
|
+
|
|
205
|
+
| Name | Type | Description | Notes |
|
|
206
|
+
| ---- | ---- | ----------- | ----- |
|
|
207
|
+
| **prediction_id** | **String** | | |
|
|
208
|
+
| **account_id** | **String** | | |
|
|
209
|
+
| **ad_account_id** | **String** | | |
|
|
210
|
+
|
|
211
|
+
### Return type
|
|
212
|
+
|
|
213
|
+
[**CreateRfPrediction201Response**](CreateRfPrediction201Response.md)
|
|
214
|
+
|
|
215
|
+
### Authorization
|
|
216
|
+
|
|
217
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
218
|
+
|
|
219
|
+
### HTTP request headers
|
|
220
|
+
|
|
221
|
+
- **Content-Type**: Not defined
|
|
222
|
+
- **Accept**: application/json
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
## reserve_rf_prediction
|
|
226
|
+
|
|
227
|
+
> <ReserveRfPrediction201Response> reserve_rf_prediction(prediction_id, reserve_rf_prediction_request)
|
|
228
|
+
|
|
229
|
+
Reserve a Reach & Frequency prediction
|
|
230
|
+
|
|
231
|
+
Locks the quoted price + inventory until the returned `expiresAt` and mints a NEW prediction id — pass that RESERVED id (not the original) as `rfPredictionId` on POST /v1/ads/create. Release an unused reservation via DELETE.
|
|
232
|
+
|
|
233
|
+
### Examples
|
|
234
|
+
|
|
235
|
+
```ruby
|
|
236
|
+
require 'time'
|
|
237
|
+
require 'zernio-sdk'
|
|
238
|
+
# setup authorization
|
|
239
|
+
Zernio.configure do |config|
|
|
240
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
241
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
api_instance = Zernio::ReachAndFrequencyApi.new
|
|
245
|
+
prediction_id = 'prediction_id_example' # String |
|
|
246
|
+
reserve_rf_prediction_request = Zernio::ReserveRfPredictionRequest.new({account_id: 'account_id_example', ad_account_id: 'ad_account_id_example'}) # ReserveRfPredictionRequest |
|
|
247
|
+
|
|
248
|
+
begin
|
|
249
|
+
# Reserve a Reach & Frequency prediction
|
|
250
|
+
result = api_instance.reserve_rf_prediction(prediction_id, reserve_rf_prediction_request)
|
|
251
|
+
p result
|
|
252
|
+
rescue Zernio::ApiError => e
|
|
253
|
+
puts "Error when calling ReachAndFrequencyApi->reserve_rf_prediction: #{e}"
|
|
254
|
+
end
|
|
255
|
+
```
|
|
256
|
+
|
|
257
|
+
#### Using the reserve_rf_prediction_with_http_info variant
|
|
258
|
+
|
|
259
|
+
This returns an Array which contains the response data, status code and headers.
|
|
260
|
+
|
|
261
|
+
> <Array(<ReserveRfPrediction201Response>, Integer, Hash)> reserve_rf_prediction_with_http_info(prediction_id, reserve_rf_prediction_request)
|
|
262
|
+
|
|
263
|
+
```ruby
|
|
264
|
+
begin
|
|
265
|
+
# Reserve a Reach & Frequency prediction
|
|
266
|
+
data, status_code, headers = api_instance.reserve_rf_prediction_with_http_info(prediction_id, reserve_rf_prediction_request)
|
|
267
|
+
p status_code # => 2xx
|
|
268
|
+
p headers # => { ... }
|
|
269
|
+
p data # => <ReserveRfPrediction201Response>
|
|
270
|
+
rescue Zernio::ApiError => e
|
|
271
|
+
puts "Error when calling ReachAndFrequencyApi->reserve_rf_prediction_with_http_info: #{e}"
|
|
272
|
+
end
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
### Parameters
|
|
276
|
+
|
|
277
|
+
| Name | Type | Description | Notes |
|
|
278
|
+
| ---- | ---- | ----------- | ----- |
|
|
279
|
+
| **prediction_id** | **String** | | |
|
|
280
|
+
| **reserve_rf_prediction_request** | [**ReserveRfPredictionRequest**](ReserveRfPredictionRequest.md) | | |
|
|
281
|
+
|
|
282
|
+
### Return type
|
|
283
|
+
|
|
284
|
+
[**ReserveRfPrediction201Response**](ReserveRfPrediction201Response.md)
|
|
285
|
+
|
|
286
|
+
### Authorization
|
|
287
|
+
|
|
288
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
289
|
+
|
|
290
|
+
### HTTP request headers
|
|
291
|
+
|
|
292
|
+
- **Content-Type**: application/json
|
|
293
|
+
- **Accept**: application/json
|
|
294
|
+
|
data/docs/TrackingTagsApi.md
CHANGED
|
@@ -6,11 +6,13 @@ All URIs are relative to *https://zernio.com/api*
|
|
|
6
6
|
| ------ | ------------ | ----------- |
|
|
7
7
|
| [**add_tracking_tag_shared_account**](TrackingTagsApi.md#add_tracking_tag_shared_account) | **POST** /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Share with an ad account |
|
|
8
8
|
| [**create_tracking_tag**](TrackingTagsApi.md#create_tracking_tag) | **POST** /v1/accounts/{accountId}/tracking-tags | Create a tracking tag |
|
|
9
|
+
| [**get_ad_tracking_tags**](TrackingTagsApi.md#get_ad_tracking_tags) | **GET** /v1/ads/{adId}/tracking-tags | Get ad tracking tags |
|
|
9
10
|
| [**get_tracking_tag**](TrackingTagsApi.md#get_tracking_tag) | **GET** /v1/accounts/{accountId}/tracking-tags/{tagId} | Get a tracking tag |
|
|
10
11
|
| [**get_tracking_tag_stats**](TrackingTagsApi.md#get_tracking_tag_stats) | **GET** /v1/accounts/{accountId}/tracking-tags/{tagId}/stats | Get aggregated event stats |
|
|
11
12
|
| [**list_tracking_tag_shared_accounts**](TrackingTagsApi.md#list_tracking_tag_shared_accounts) | **GET** /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | List accounts it is shared with |
|
|
12
13
|
| [**list_tracking_tags**](TrackingTagsApi.md#list_tracking_tags) | **GET** /v1/accounts/{accountId}/tracking-tags | List tracking tags |
|
|
13
14
|
| [**remove_tracking_tag_shared_account**](TrackingTagsApi.md#remove_tracking_tag_shared_account) | **DELETE** /v1/accounts/{accountId}/tracking-tags/{tagId}/shared-accounts | Stop sharing with an account |
|
|
15
|
+
| [**update_ad_tracking_tags**](TrackingTagsApi.md#update_ad_tracking_tags) | **PATCH** /v1/ads/{adId}/tracking-tags | Set ad tracking tags |
|
|
14
16
|
| [**update_tracking_tag**](TrackingTagsApi.md#update_tracking_tag) | **PATCH** /v1/accounts/{accountId}/tracking-tags/{tagId} | Update a tracking tag |
|
|
15
17
|
|
|
16
18
|
|
|
@@ -158,6 +160,75 @@ end
|
|
|
158
160
|
- **Accept**: application/json
|
|
159
161
|
|
|
160
162
|
|
|
163
|
+
## get_ad_tracking_tags
|
|
164
|
+
|
|
165
|
+
> <GetAdTrackingTags200Response> get_ad_tracking_tags(ad_id)
|
|
166
|
+
|
|
167
|
+
Get ad tracking tags
|
|
168
|
+
|
|
169
|
+
Unified read of the platform's native click-URL tracking params. - Meta (facebook/instagram): the creative's `url_tags` (and template_url_spec). - Google (googleads): the campaign's `trackingUrlTemplate` + `finalUrlSuffix`. Subject to the Google Ads API access-tier daily quota; bulk audits need Standard access. - LinkedIn (linkedinads): the campaign's Dynamic UTM `dynamicValueParameters` + `customValueParameters`. Returns 405 for platforms without a click-URL tracking surface (TikTok, X, Pinterest).
|
|
170
|
+
|
|
171
|
+
### Examples
|
|
172
|
+
|
|
173
|
+
```ruby
|
|
174
|
+
require 'time'
|
|
175
|
+
require 'zernio-sdk'
|
|
176
|
+
# setup authorization
|
|
177
|
+
Zernio.configure do |config|
|
|
178
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
179
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
180
|
+
end
|
|
181
|
+
|
|
182
|
+
api_instance = Zernio::TrackingTagsApi.new
|
|
183
|
+
ad_id = 'ad_id_example' # String | Ad id (hex _id, platformAdId, or effective story/media id).
|
|
184
|
+
|
|
185
|
+
begin
|
|
186
|
+
# Get ad tracking tags
|
|
187
|
+
result = api_instance.get_ad_tracking_tags(ad_id)
|
|
188
|
+
p result
|
|
189
|
+
rescue Zernio::ApiError => e
|
|
190
|
+
puts "Error when calling TrackingTagsApi->get_ad_tracking_tags: #{e}"
|
|
191
|
+
end
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
#### Using the get_ad_tracking_tags_with_http_info variant
|
|
195
|
+
|
|
196
|
+
This returns an Array which contains the response data, status code and headers.
|
|
197
|
+
|
|
198
|
+
> <Array(<GetAdTrackingTags200Response>, Integer, Hash)> get_ad_tracking_tags_with_http_info(ad_id)
|
|
199
|
+
|
|
200
|
+
```ruby
|
|
201
|
+
begin
|
|
202
|
+
# Get ad tracking tags
|
|
203
|
+
data, status_code, headers = api_instance.get_ad_tracking_tags_with_http_info(ad_id)
|
|
204
|
+
p status_code # => 2xx
|
|
205
|
+
p headers # => { ... }
|
|
206
|
+
p data # => <GetAdTrackingTags200Response>
|
|
207
|
+
rescue Zernio::ApiError => e
|
|
208
|
+
puts "Error when calling TrackingTagsApi->get_ad_tracking_tags_with_http_info: #{e}"
|
|
209
|
+
end
|
|
210
|
+
```
|
|
211
|
+
|
|
212
|
+
### Parameters
|
|
213
|
+
|
|
214
|
+
| Name | Type | Description | Notes |
|
|
215
|
+
| ---- | ---- | ----------- | ----- |
|
|
216
|
+
| **ad_id** | **String** | Ad id (hex _id, platformAdId, or effective story/media id). | |
|
|
217
|
+
|
|
218
|
+
### Return type
|
|
219
|
+
|
|
220
|
+
[**GetAdTrackingTags200Response**](GetAdTrackingTags200Response.md)
|
|
221
|
+
|
|
222
|
+
### Authorization
|
|
223
|
+
|
|
224
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
225
|
+
|
|
226
|
+
### HTTP request headers
|
|
227
|
+
|
|
228
|
+
- **Content-Type**: Not defined
|
|
229
|
+
- **Accept**: application/json
|
|
230
|
+
|
|
231
|
+
|
|
161
232
|
## get_tracking_tag
|
|
162
233
|
|
|
163
234
|
> <CreateTrackingTag201Response> get_tracking_tag(account_id, tag_id)
|
|
@@ -526,6 +597,76 @@ nil (empty response body)
|
|
|
526
597
|
- **Accept**: application/json
|
|
527
598
|
|
|
528
599
|
|
|
600
|
+
## update_ad_tracking_tags
|
|
601
|
+
|
|
602
|
+
> update_ad_tracking_tags(ad_id, update_ad_tracking_tags_request)
|
|
603
|
+
|
|
604
|
+
Set ad tracking tags
|
|
605
|
+
|
|
606
|
+
Unified update. Send only the fields for the ad's platform: - Meta: `urlTags` (array of {key,value}). Meta creatives are immutable, so this rebuilds the creative and repoints the ad. By DEFAULT we PRESERVE the existing creative verbatim (re-post its object_story_spec + the new url_tags, reusing the image), so you send `urlTags` ALONE — no need to read back headline/body/CTA. `creative` (headline, body, callToAction, linkUrl, imageUrl) is OPTIONAL and only needed to rebuild explicitly, or for SHARE / page-post / dark / asset_feed creatives whose object_story_spec Meta strips (those return 422 asking for `creative`). - Google: `trackingUrlTemplate` and/or `finalUrlSuffix` (full template strings; account quota applies). - LinkedIn: `dynamicValueParameters` and/or `customValueParameters` (campaign-level Dynamic UTM).
|
|
607
|
+
|
|
608
|
+
### Examples
|
|
609
|
+
|
|
610
|
+
```ruby
|
|
611
|
+
require 'time'
|
|
612
|
+
require 'zernio-sdk'
|
|
613
|
+
# setup authorization
|
|
614
|
+
Zernio.configure do |config|
|
|
615
|
+
# Configure Bearer authorization (JWT): bearerAuth
|
|
616
|
+
config.access_token = 'YOUR_BEARER_TOKEN'
|
|
617
|
+
end
|
|
618
|
+
|
|
619
|
+
api_instance = Zernio::TrackingTagsApi.new
|
|
620
|
+
ad_id = 'ad_id_example' # String |
|
|
621
|
+
update_ad_tracking_tags_request = Zernio::UpdateAdTrackingTagsRequest.new # UpdateAdTrackingTagsRequest |
|
|
622
|
+
|
|
623
|
+
begin
|
|
624
|
+
# Set ad tracking tags
|
|
625
|
+
api_instance.update_ad_tracking_tags(ad_id, update_ad_tracking_tags_request)
|
|
626
|
+
rescue Zernio::ApiError => e
|
|
627
|
+
puts "Error when calling TrackingTagsApi->update_ad_tracking_tags: #{e}"
|
|
628
|
+
end
|
|
629
|
+
```
|
|
630
|
+
|
|
631
|
+
#### Using the update_ad_tracking_tags_with_http_info variant
|
|
632
|
+
|
|
633
|
+
This returns an Array which contains the response data (`nil` in this case), status code and headers.
|
|
634
|
+
|
|
635
|
+
> <Array(nil, Integer, Hash)> update_ad_tracking_tags_with_http_info(ad_id, update_ad_tracking_tags_request)
|
|
636
|
+
|
|
637
|
+
```ruby
|
|
638
|
+
begin
|
|
639
|
+
# Set ad tracking tags
|
|
640
|
+
data, status_code, headers = api_instance.update_ad_tracking_tags_with_http_info(ad_id, update_ad_tracking_tags_request)
|
|
641
|
+
p status_code # => 2xx
|
|
642
|
+
p headers # => { ... }
|
|
643
|
+
p data # => nil
|
|
644
|
+
rescue Zernio::ApiError => e
|
|
645
|
+
puts "Error when calling TrackingTagsApi->update_ad_tracking_tags_with_http_info: #{e}"
|
|
646
|
+
end
|
|
647
|
+
```
|
|
648
|
+
|
|
649
|
+
### Parameters
|
|
650
|
+
|
|
651
|
+
| Name | Type | Description | Notes |
|
|
652
|
+
| ---- | ---- | ----------- | ----- |
|
|
653
|
+
| **ad_id** | **String** | | |
|
|
654
|
+
| **update_ad_tracking_tags_request** | [**UpdateAdTrackingTagsRequest**](UpdateAdTrackingTagsRequest.md) | | |
|
|
655
|
+
|
|
656
|
+
### Return type
|
|
657
|
+
|
|
658
|
+
nil (empty response body)
|
|
659
|
+
|
|
660
|
+
### Authorization
|
|
661
|
+
|
|
662
|
+
[bearerAuth](../README.md#bearerAuth)
|
|
663
|
+
|
|
664
|
+
### HTTP request headers
|
|
665
|
+
|
|
666
|
+
- **Content-Type**: application/json
|
|
667
|
+
- **Accept**: application/json
|
|
668
|
+
|
|
669
|
+
|
|
529
670
|
## update_tracking_tag
|
|
530
671
|
|
|
531
672
|
> <CreateTrackingTag201Response> update_tracking_tag(account_id, tag_id, update_tracking_tag_request)
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
| **video_id** | **String** | The YouTube video ID | [optional] |
|
|
9
9
|
| **duration_seconds** | **Integer** | Video length in seconds (from YouTube contentDetails.duration) | [optional] |
|
|
10
10
|
| **date_range** | [**YouTubeDailyViewsResponseDateRange**](YouTubeDailyViewsResponseDateRange.md) | | [optional] |
|
|
11
|
+
| **provisional_since** | **Date** | Present only when the range reaches into YouTube's ~3-day processing window: the first date whose numbers are provisional and may still be revised by YouTube. | [optional] |
|
|
11
12
|
| **total_views** | **Integer** | Sum of views across all days in the range | [optional] |
|
|
12
13
|
| **daily_views** | [**Array<YouTubeDailyViewsResponseDailyViewsInner>**](YouTubeDailyViewsResponseDailyViewsInner.md) | | [optional] |
|
|
13
14
|
| **last_synced_at** | **Time** | When the data was last synced from YouTube | [optional] |
|
|
@@ -23,6 +24,7 @@ instance = Zernio::YouTubeDailyViewsResponse.new(
|
|
|
23
24
|
video_id: null,
|
|
24
25
|
duration_seconds: null,
|
|
25
26
|
date_range: null,
|
|
27
|
+
provisional_since: null,
|
|
26
28
|
total_views: null,
|
|
27
29
|
daily_views: null,
|
|
28
30
|
last_synced_at: null,
|