late-sdk 0.0.854 → 0.0.856
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/docs/AdCampaignsApi.md +1 -1
- data/docs/AdDailyMetrics.md +2 -0
- data/docs/AdMetrics.md +2 -0
- data/docs/AdsTimelineResponseRowsInner.md +2 -0
- data/docs/CampaignAnalyticsResponseAnalyticsDailyInner.md +2 -0
- data/docs/ConnectApi.md +2 -2
- data/docs/CreatePostRequest.md +6 -6
- data/docs/CreateTrackingTagRequest.md +3 -1
- data/docs/PostsApi.md +1 -1
- data/docs/TrackingTagsApi.md +1 -1
- data/docs/WebhooksApi.md +2 -2
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +2 -2
- data/lib/zernio-sdk/api/connect_api.rb +2 -2
- data/lib/zernio-sdk/api/posts_api.rb +2 -2
- data/lib/zernio-sdk/api/tracking_tags_api.rb +2 -2
- data/lib/zernio-sdk/api/webhooks_api.rb +4 -4
- data/lib/zernio-sdk/models/ad_daily_metrics.rb +11 -1
- data/lib/zernio-sdk/models/ad_metrics.rb +11 -1
- data/lib/zernio-sdk/models/ads_timeline_response_rows_inner.rb +11 -1
- data/lib/zernio-sdk/models/campaign_analytics_response_analytics_daily_inner.rb +11 -1
- data/lib/zernio-sdk/models/create_post_request.rb +6 -0
- data/lib/zernio-sdk/models/create_tracking_tag_request.rb +48 -4
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +62 -11
- data/spec/api/ad_campaigns_api_spec.rb +1 -1
- data/spec/api/connect_api_spec.rb +1 -1
- data/spec/api/posts_api_spec.rb +1 -1
- data/spec/api/tracking_tags_api_spec.rb +1 -1
- data/spec/api/webhooks_api_spec.rb +2 -2
- data/spec/models/ad_daily_metrics_spec.rb +6 -0
- data/spec/models/ad_metrics_spec.rb +6 -0
- data/spec/models/ads_timeline_response_rows_inner_spec.rb +6 -0
- data/spec/models/campaign_analytics_response_analytics_daily_inner_spec.rb +6 -0
- data/spec/models/create_tracking_tag_request_spec.rb +10 -0
- data/zernio-sdk-0.0.856.gem +0 -0
- metadata +2 -2
- data/zernio-sdk-0.0.854.gem +0 -0
|
@@ -41,6 +41,9 @@ module Zernio
|
|
|
41
41
|
# Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07).
|
|
42
42
|
attr_accessor :conversions
|
|
43
43
|
|
|
44
|
+
# All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
45
|
+
attr_accessor :all_conversions
|
|
46
|
+
|
|
44
47
|
attr_accessor :cost_per_conversion
|
|
45
48
|
|
|
46
49
|
# Per-action-type counts merged across all ads on this day. Keys are platform-native action types.
|
|
@@ -68,6 +71,7 @@ module Zernio
|
|
|
68
71
|
:'cpc' => :'cpc',
|
|
69
72
|
:'cpm' => :'cpm',
|
|
70
73
|
:'conversions' => :'conversions',
|
|
74
|
+
:'all_conversions' => :'allConversions',
|
|
71
75
|
:'cost_per_conversion' => :'costPerConversion',
|
|
72
76
|
:'actions' => :'actions',
|
|
73
77
|
:'action_values' => :'actionValues',
|
|
@@ -99,6 +103,7 @@ module Zernio
|
|
|
99
103
|
:'cpc' => :'Float',
|
|
100
104
|
:'cpm' => :'Float',
|
|
101
105
|
:'conversions' => :'Float',
|
|
106
|
+
:'all_conversions' => :'Float',
|
|
102
107
|
:'cost_per_conversion' => :'Float',
|
|
103
108
|
:'actions' => :'Hash<String, Float>',
|
|
104
109
|
:'action_values' => :'Hash<String, Float>',
|
|
@@ -169,6 +174,10 @@ module Zernio
|
|
|
169
174
|
self.conversions = attributes[:'conversions']
|
|
170
175
|
end
|
|
171
176
|
|
|
177
|
+
if attributes.key?(:'all_conversions')
|
|
178
|
+
self.all_conversions = attributes[:'all_conversions']
|
|
179
|
+
end
|
|
180
|
+
|
|
172
181
|
if attributes.key?(:'cost_per_conversion')
|
|
173
182
|
self.cost_per_conversion = attributes[:'cost_per_conversion']
|
|
174
183
|
end
|
|
@@ -224,6 +233,7 @@ module Zernio
|
|
|
224
233
|
cpc == o.cpc &&
|
|
225
234
|
cpm == o.cpm &&
|
|
226
235
|
conversions == o.conversions &&
|
|
236
|
+
all_conversions == o.all_conversions &&
|
|
227
237
|
cost_per_conversion == o.cost_per_conversion &&
|
|
228
238
|
actions == o.actions &&
|
|
229
239
|
action_values == o.action_values &&
|
|
@@ -240,7 +250,7 @@ module Zernio
|
|
|
240
250
|
# Calculates hash code according to all attributes.
|
|
241
251
|
# @return [Integer] Hash code
|
|
242
252
|
def hash
|
|
243
|
-
[date, spend, impressions, reach, clicks, engagement, ctr, cpc, cpm, conversions, cost_per_conversion, actions, action_values, purchase_value, roas].hash
|
|
253
|
+
[date, spend, impressions, reach, clicks, engagement, ctr, cpc, cpm, conversions, all_conversions, cost_per_conversion, actions, action_values, purchase_value, roas].hash
|
|
244
254
|
end
|
|
245
255
|
|
|
246
256
|
# Builds the object from hash
|
|
@@ -38,6 +38,9 @@ module Zernio
|
|
|
38
38
|
# Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired.
|
|
39
39
|
attr_accessor :conversions
|
|
40
40
|
|
|
41
|
+
# All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.
|
|
42
|
+
attr_accessor :all_conversions
|
|
43
|
+
|
|
41
44
|
# Derived spend / conversions in the same currency as spend. 0 when conversions is 0.
|
|
42
45
|
attr_accessor :cost_per_conversion
|
|
43
46
|
|
|
@@ -125,6 +128,7 @@ module Zernio
|
|
|
125
128
|
:'cpm' => :'cpm',
|
|
126
129
|
:'engagement' => :'engagement',
|
|
127
130
|
:'conversions' => :'conversions',
|
|
131
|
+
:'all_conversions' => :'allConversions',
|
|
128
132
|
:'cost_per_conversion' => :'costPerConversion',
|
|
129
133
|
:'actions' => :'actions',
|
|
130
134
|
:'action_values' => :'actionValues',
|
|
@@ -176,6 +180,7 @@ module Zernio
|
|
|
176
180
|
:'cpm' => :'Float',
|
|
177
181
|
:'engagement' => :'Integer',
|
|
178
182
|
:'conversions' => :'Float',
|
|
183
|
+
:'all_conversions' => :'Float',
|
|
179
184
|
:'cost_per_conversion' => :'Float',
|
|
180
185
|
:'actions' => :'Hash<String, Integer>',
|
|
181
186
|
:'action_values' => :'Hash<String, Float>',
|
|
@@ -270,6 +275,10 @@ module Zernio
|
|
|
270
275
|
self.conversions = attributes[:'conversions']
|
|
271
276
|
end
|
|
272
277
|
|
|
278
|
+
if attributes.key?(:'all_conversions')
|
|
279
|
+
self.all_conversions = attributes[:'all_conversions']
|
|
280
|
+
end
|
|
281
|
+
|
|
273
282
|
if attributes.key?(:'cost_per_conversion')
|
|
274
283
|
self.cost_per_conversion = attributes[:'cost_per_conversion']
|
|
275
284
|
end
|
|
@@ -410,6 +419,7 @@ module Zernio
|
|
|
410
419
|
cpm == o.cpm &&
|
|
411
420
|
engagement == o.engagement &&
|
|
412
421
|
conversions == o.conversions &&
|
|
422
|
+
all_conversions == o.all_conversions &&
|
|
413
423
|
cost_per_conversion == o.cost_per_conversion &&
|
|
414
424
|
actions == o.actions &&
|
|
415
425
|
action_values == o.action_values &&
|
|
@@ -447,7 +457,7 @@ module Zernio
|
|
|
447
457
|
# Calculates hash code according to all attributes.
|
|
448
458
|
# @return [Integer] Hash code
|
|
449
459
|
def hash
|
|
450
|
-
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
|
|
460
|
+
[spend, impressions, reach, clicks, ctr, cpc, cpm, engagement, conversions, all_conversions, cost_per_conversion, actions, action_values, purchase_value, roas, cost_per_action, outbound_clicks, outbound_clicks_ctr, inline_link_clicks, inline_link_click_ctr, unique_clicks, unique_ctr, video_play_actions, video30_sec_watched_actions, video_thruplay_watched_actions, video_p25_watched_actions, video_p50_watched_actions, video_p75_watched_actions, video_p95_watched_actions, video_p100_watched_actions, video_avg_time_watched_actions, cost_per_thruplay, funnel, engagement_breakdown, last_synced_at, date].hash
|
|
451
461
|
end
|
|
452
462
|
|
|
453
463
|
# Builds the object from hash
|
|
@@ -21,18 +21,22 @@ module Zernio
|
|
|
21
21
|
# Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.
|
|
22
22
|
attr_accessor :content
|
|
23
23
|
|
|
24
|
+
# Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.
|
|
24
25
|
attr_accessor :media_items
|
|
25
26
|
|
|
26
27
|
# Target platforms and accounts for this post. Required for non-draft posts (returns 400 if empty). Drafts can omit platforms.
|
|
27
28
|
attr_accessor :platforms
|
|
28
29
|
|
|
30
|
+
# When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.
|
|
29
31
|
attr_accessor :scheduled_for
|
|
30
32
|
|
|
33
|
+
# Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.
|
|
31
34
|
attr_accessor :publish_now
|
|
32
35
|
|
|
33
36
|
# When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
34
37
|
attr_accessor :is_draft
|
|
35
38
|
|
|
39
|
+
# IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.
|
|
36
40
|
attr_accessor :timezone
|
|
37
41
|
|
|
38
42
|
# Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed.
|
|
@@ -44,8 +48,10 @@ module Zernio
|
|
|
44
48
|
# Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field.
|
|
45
49
|
attr_accessor :mentions
|
|
46
50
|
|
|
51
|
+
# Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.
|
|
47
52
|
attr_accessor :crossposting_enabled
|
|
48
53
|
|
|
54
|
+
# Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.
|
|
49
55
|
attr_accessor :metadata
|
|
50
56
|
|
|
51
57
|
# Root-level TikTok settings applied to the TikTok platforms sent in the same request. Merged into each platform's platformSpecificData, with platform-specific settings taking precedence.
|
|
@@ -20,11 +20,37 @@ module Zernio
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :name
|
|
22
22
|
|
|
23
|
+
# OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.
|
|
24
|
+
attr_accessor :default_event_type
|
|
25
|
+
|
|
26
|
+
class EnumAttributeValidator
|
|
27
|
+
attr_reader :datatype
|
|
28
|
+
attr_reader :allowable_values
|
|
29
|
+
|
|
30
|
+
def initialize(datatype, allowable_values)
|
|
31
|
+
@allowable_values = allowable_values.map do |value|
|
|
32
|
+
case datatype.to_s
|
|
33
|
+
when /Integer/i
|
|
34
|
+
value.to_i
|
|
35
|
+
when /Float/i
|
|
36
|
+
value.to_f
|
|
37
|
+
else
|
|
38
|
+
value
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def valid?(value)
|
|
44
|
+
!value || allowable_values.include?(value)
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
23
48
|
# Attribute mapping from ruby-style variable name to JSON key.
|
|
24
49
|
def self.attribute_map
|
|
25
50
|
{
|
|
26
51
|
:'ad_account_id' => :'adAccountId',
|
|
27
|
-
:'name' => :'name'
|
|
52
|
+
:'name' => :'name',
|
|
53
|
+
:'default_event_type' => :'defaultEventType'
|
|
28
54
|
}
|
|
29
55
|
end
|
|
30
56
|
|
|
@@ -42,7 +68,8 @@ module Zernio
|
|
|
42
68
|
def self.openapi_types
|
|
43
69
|
{
|
|
44
70
|
:'ad_account_id' => :'String',
|
|
45
|
-
:'name' => :'String'
|
|
71
|
+
:'name' => :'String',
|
|
72
|
+
:'default_event_type' => :'String'
|
|
46
73
|
}
|
|
47
74
|
end
|
|
48
75
|
|
|
@@ -79,6 +106,10 @@ module Zernio
|
|
|
79
106
|
else
|
|
80
107
|
self.name = nil
|
|
81
108
|
end
|
|
109
|
+
|
|
110
|
+
if attributes.key?(:'default_event_type')
|
|
111
|
+
self.default_event_type = attributes[:'default_event_type']
|
|
112
|
+
end
|
|
82
113
|
end
|
|
83
114
|
|
|
84
115
|
# Show invalid properties with the reasons. Usually used together with valid?
|
|
@@ -113,6 +144,8 @@ module Zernio
|
|
|
113
144
|
return false if @name.nil?
|
|
114
145
|
return false if @name.to_s.length > 200
|
|
115
146
|
return false if @name.to_s.length < 1
|
|
147
|
+
default_event_type_validator = EnumAttributeValidator.new('String', ["order_created", "lead_created", "items_added", "contents_viewed", "checkout_started", "registration_completed", "subscription_created", "trial_started", "appointment_scheduled", "page_viewed", "app_installed", "app_opened"])
|
|
148
|
+
return false unless default_event_type_validator.valid?(@default_event_type)
|
|
116
149
|
true
|
|
117
150
|
end
|
|
118
151
|
|
|
@@ -144,13 +177,24 @@ module Zernio
|
|
|
144
177
|
@name = name
|
|
145
178
|
end
|
|
146
179
|
|
|
180
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
181
|
+
# @param [Object] default_event_type Object to be assigned
|
|
182
|
+
def default_event_type=(default_event_type)
|
|
183
|
+
validator = EnumAttributeValidator.new('String', ["order_created", "lead_created", "items_added", "contents_viewed", "checkout_started", "registration_completed", "subscription_created", "trial_started", "appointment_scheduled", "page_viewed", "app_installed", "app_opened"])
|
|
184
|
+
unless validator.valid?(default_event_type)
|
|
185
|
+
fail ArgumentError, "invalid value for \"default_event_type\", must be one of #{validator.allowable_values}."
|
|
186
|
+
end
|
|
187
|
+
@default_event_type = default_event_type
|
|
188
|
+
end
|
|
189
|
+
|
|
147
190
|
# Checks equality by comparing each attribute.
|
|
148
191
|
# @param [Object] Object to be compared
|
|
149
192
|
def ==(o)
|
|
150
193
|
return true if self.equal?(o)
|
|
151
194
|
self.class == o.class &&
|
|
152
195
|
ad_account_id == o.ad_account_id &&
|
|
153
|
-
name == o.name
|
|
196
|
+
name == o.name &&
|
|
197
|
+
default_event_type == o.default_event_type
|
|
154
198
|
end
|
|
155
199
|
|
|
156
200
|
# @see the `==` method
|
|
@@ -162,7 +206,7 @@ module Zernio
|
|
|
162
206
|
# Calculates hash code according to all attributes.
|
|
163
207
|
# @return [Integer] Hash code
|
|
164
208
|
def hash
|
|
165
|
-
[ad_account_id, name].hash
|
|
209
|
+
[ad_account_id, name, default_event_type].hash
|
|
166
210
|
end
|
|
167
211
|
|
|
168
212
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -31,7 +31,7 @@ info:
|
|
|
31
31
|
|
|
32
32
|
Key features: Unified posting to 16 platforms, ads management on 7 ad networks (via /v1/ads), aggregated analytics, unified inbox (DMs, comments, reviews), webhooks, OAuth connect, queue scheduling, and white-label support for agencies managing unlimited accounts.
|
|
33
33
|
|
|
34
|
-
Supported posting platforms: Twitter/X, Instagram, WhatsApp, Facebook, LinkedIn, TikTok, YouTube, Pinterest, Reddit, Bluesky, Threads, Google Business, Telegram, Snapchat, Discord, Slack. Supported ad platforms: Meta Ads, Google Ads, TikTok Ads, LinkedIn Ads, Pinterest Ads, X Ads, OpenAI Ads.
|
|
34
|
+
Supported posting platforms: Twitter/X, Instagram, WhatsApp, Facebook, LinkedIn, TikTok, YouTube, Pinterest, Reddit, Bluesky, Threads, Google Business, Telegram, Snapchat, Discord, Slack. Supported ad platforms: Meta Ads, Google Ads, TikTok Ads, LinkedIn Ads, Pinterest Ads, X Ads, OpenAI Ads. Snapchat is a closed beta with no public release date: connections are gated behind approval and return 403 `PLATFORM_BETA_RESTRICTED` until then.
|
|
35
35
|
x-category: Social
|
|
36
36
|
x-website: https://zernio.com
|
|
37
37
|
x-thumbnail: https://rapidapi-prod-apis.s3.amazonaws.com/b24d3df5-563c-4a50-9e1e-1ad3eb1fce69.png
|
|
@@ -121,6 +121,8 @@ x-documentation:
|
|
|
121
121
|
| Telegram | Yes | - | - | - |
|
|
122
122
|
| Snapchat | Yes | - | - | - |
|
|
123
123
|
|
|
124
|
+
> **Snapchat Note:** Snapchat is a closed beta with no public release date. Connecting a Snapchat account is gated behind approval and returns 403 `PLATFORM_BETA_RESTRICTED` until then.
|
|
125
|
+
|
|
124
126
|
> **LinkedIn Analytics Note:** For personal LinkedIn accounts, analytics are only available for posts published through Zernio. This is a LinkedIn API limitation: the `memberCreatorPostAnalytics` endpoint only returns metrics for posts authored by the authenticated user. Company/organization page analytics are not affected and work for all posts.
|
|
125
127
|
|
|
126
128
|
> **Google Business Analytics Note:** Per-post analytics for Google Business Profile are deprecated by Google with no replacement, so Google Business posts always report `syncStatus: "unavailable"` with an explanatory `errorMessage`. Location-level metrics (impressions, clicks, calls, directions, bookings) are available via the dedicated `/v1/analytics/googlebusiness/performance` endpoint.
|
|
@@ -8175,6 +8177,9 @@ components:
|
|
|
8175
8177
|
cpc: { type: number, description: "Cost per click in native currency." }
|
|
8176
8178
|
cpm: { type: number, description: "Cost per 1000 impressions in native currency." }
|
|
8177
8179
|
conversions: { type: number, description: "Sum of conversion events over the range. Fractional values are normal (attribution splitting + Google modeled conversions). Meta: events matching the campaign optimization goal. Google: tracked conversions. X / LinkedIn: reported website/lead conversions (added 2026-07)." }
|
|
8180
|
+
allConversions:
|
|
8181
|
+
type: number
|
|
8182
|
+
description: 'All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.'
|
|
8178
8183
|
costPerConversion: { type: number }
|
|
8179
8184
|
actions:
|
|
8180
8185
|
type: object
|
|
@@ -8268,6 +8273,9 @@ components:
|
|
|
8268
8273
|
conversions:
|
|
8269
8274
|
type: number
|
|
8270
8275
|
description: "Count of conversion events over the requested date range. FRACTIONAL: attribution splits one conversion across touchpoints and Google additionally reports modeled conversions, so values like 0.347 are normal. Meta: events matching the campaign's promoted_object.custom_event_type (PURCHASE, LEAD, etc.). Google: the account's tracked conversions. X and LinkedIn: their reported website/lead conversions (added 2026-07). 0 for non-conversion campaigns or when no events have fired."
|
|
8276
|
+
allConversions:
|
|
8277
|
+
type: number
|
|
8278
|
+
description: 'All conversions, including actions excluded from the Conversions column (Google metrics.all_conversions). 0 on platforms without the concept.'
|
|
8271
8279
|
costPerConversion:
|
|
8272
8280
|
type: number
|
|
8273
8281
|
description: "Derived spend / conversions in the same currency as spend. 0 when conversions is 0."
|
|
@@ -15012,6 +15020,10 @@ paths:
|
|
|
15012
15020
|
Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response.
|
|
15013
15021
|
Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn text-free reshare (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints.
|
|
15014
15022
|
|
|
15023
|
+
## Scheduling
|
|
15024
|
+
|
|
15025
|
+
Pick one of `scheduledFor` (schedule), `publishNow: true` (publish synchronously) or `queuedFromProfile` (next queue slot). With none of them and `isDraft` unset, the post is saved as a draft. `platforms` is required unless the post is a draft. `isDraft: true` wins over `publishNow` and `scheduledFor` (the post is saved, never published); `publishNow: true` wins over `scheduledFor`. A `scheduledFor` already in the past is not rejected: the post is published synchronously in the same request, exactly like `publishNow`.
|
|
15026
|
+
|
|
15015
15027
|
## Idempotency
|
|
15016
15028
|
|
|
15017
15029
|
Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post.
|
|
@@ -15049,6 +15061,7 @@ paths:
|
|
|
15049
15061
|
description: 'Post caption/text. Optional when media is attached, all platforms have customContent, every platform entry is an X Article (platformSpecificData.article), or every platform entry is a LinkedIn text-free reshare (platformSpecificData.reshareUrl with no text). Required for other text-only posts.'
|
|
15050
15062
|
mediaItems:
|
|
15051
15063
|
type: array
|
|
15064
|
+
description: 'Media attached to every platform in the request (a platform entry can override it with `customMedia`). Each entry needs a publicly reachable HTTPS `url`; `type` (image, video, gif, document) is inferred from the URL extension when omitted and a `type` that contradicts the extension is rejected with 400. Upload files with `POST /v1/media/presign` first; per-platform size, duration and format limits are listed on each platform schema.'
|
|
15052
15065
|
items: { $ref: '#/components/schemas/MediaItem' }
|
|
15053
15066
|
platforms:
|
|
15054
15067
|
type: array
|
|
@@ -15086,13 +15099,22 @@ paths:
|
|
|
15086
15099
|
- $ref: '#/components/schemas/BlueskyPlatformData'
|
|
15087
15100
|
- $ref: '#/components/schemas/DiscordPlatformData'
|
|
15088
15101
|
- $ref: '#/components/schemas/SlackPlatformData'
|
|
15089
|
-
scheduledFor:
|
|
15090
|
-
|
|
15102
|
+
scheduledFor:
|
|
15103
|
+
type: string
|
|
15104
|
+
format: date-time
|
|
15105
|
+
description: 'When to publish. Required unless `publishNow` is true, `queuedFromProfile` is set, or the post is a draft. An ISO 8601 value with a `Z` or offset (`2026-01-15T10:00:00Z`, `2026-01-15T11:00:00+01:00`) is taken as-is; a value without one (`2026-01-15T10:00:00` or `2026-01-15 10:00`) is read as local time in `timezone`. A value already in the past is published synchronously in the same request. Ignored when `publishNow` is true.'
|
|
15106
|
+
publishNow:
|
|
15107
|
+
type: boolean
|
|
15108
|
+
default: false
|
|
15109
|
+
description: 'Publish to every platform synchronously in this request instead of scheduling; the response then carries each platform result and `platformPostUrl`, with HTTP 207 when some platforms failed. Takes precedence over `scheduledFor`; ignored when `isDraft` is true.'
|
|
15091
15110
|
isDraft:
|
|
15092
15111
|
type: boolean
|
|
15093
15112
|
default: false
|
|
15094
15113
|
description: When true, saves the post as a draft. When none of scheduledFor, publishNow, or queuedFromProfile are provided, the post defaults to draft automatically.
|
|
15095
|
-
timezone:
|
|
15114
|
+
timezone:
|
|
15115
|
+
type: string
|
|
15116
|
+
default: UTC
|
|
15117
|
+
description: 'IANA timezone (`Europe/Madrid`, `America/New_York`) used to interpret a `scheduledFor` (root or per-platform) that carries no `Z` or offset. Has no effect on values that already carry one. An unknown name returns 400 when `scheduledFor` is set.'
|
|
15096
15118
|
tags:
|
|
15097
15119
|
type: array
|
|
15098
15120
|
description: "Tags/keywords. YouTube constraints: each tag max 100 chars, combined max 500 chars, duplicates auto-removed."
|
|
@@ -15105,8 +15127,14 @@ paths:
|
|
|
15105
15127
|
type: array
|
|
15106
15128
|
description: "Stored for reference only. This field does NOT automatically create @mentions when publishing. For LinkedIn @mentions, use the /v1/accounts/{accountId}/linkedin-mentions endpoint to resolve profile URLs to URNs, then embed the returned mentionFormat directly in the post content field."
|
|
15107
15129
|
items: { type: string }
|
|
15108
|
-
crosspostingEnabled:
|
|
15109
|
-
|
|
15130
|
+
crosspostingEnabled:
|
|
15131
|
+
type: boolean
|
|
15132
|
+
default: true
|
|
15133
|
+
description: 'Stored on the post and echoed back on reads. Publishing does not branch on it: every entry in `platforms` is published regardless, so treat it as a label for your own tooling.'
|
|
15134
|
+
metadata:
|
|
15135
|
+
type: object
|
|
15136
|
+
additionalProperties: true
|
|
15137
|
+
description: 'Free-form key/value pairs of your own, stored on the post and returned on reads and in webhook payloads. Zernio also writes the bookkeeping keys `usageCounted`, `usageRefunded` and `hidden` into this object; do not set them, and they are stripped from webhook payloads.'
|
|
15110
15138
|
tiktokSettings:
|
|
15111
15139
|
$ref: '#/components/schemas/TikTokPlatformData'
|
|
15112
15140
|
description: 'Root-level TikTok settings applied to the TikTok platforms sent in the same request. Merged into each platform''s platformSpecificData, with platform-specific settings taking precedence.'
|
|
@@ -18005,7 +18033,7 @@ paths:
|
|
|
18005
18033
|
schema:
|
|
18006
18034
|
type: string
|
|
18007
18035
|
enum: [facebook, instagram, linkedin, twitter, tiktok, youtube, threads, reddit, pinterest, bluesky, googlebusiness, telegram, snapchat, discord, slack, whatsapp]
|
|
18008
|
-
description: Social media platform to connect
|
|
18036
|
+
description: 'Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.'
|
|
18009
18037
|
- name: profileId
|
|
18010
18038
|
in: query
|
|
18011
18039
|
required: true
|
|
@@ -18120,7 +18148,7 @@ paths:
|
|
|
18120
18148
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
18121
18149
|
'402': { $ref: '#/components/responses/PaymentRequired' }
|
|
18122
18150
|
'403':
|
|
18123
|
-
description: "No access to profile,
|
|
18151
|
+
description: "No access to profile, BYOK required for AppSumo Twitter, or Snapchat closed beta (code PLATFORM_BETA_RESTRICTED)"
|
|
18124
18152
|
'404':
|
|
18125
18153
|
description: Profile not found
|
|
18126
18154
|
post:
|
|
@@ -21728,6 +21756,10 @@ paths:
|
|
|
21728
21756
|
value:
|
|
21729
21757
|
error: "Cannot connect to this profile. It exceeds your Pro plan limit of 5 profiles."
|
|
21730
21758
|
code: "PROFILE_LIMIT_EXCEEDED"
|
|
21759
|
+
betaRestricted:
|
|
21760
|
+
value:
|
|
21761
|
+
error: "Snapchat integration is currently in beta. Please wait until it is publicly released."
|
|
21762
|
+
code: "PLATFORM_BETA_RESTRICTED"
|
|
21731
21763
|
'500':
|
|
21732
21764
|
description: Failed to connect Snapchat account
|
|
21733
21765
|
|
|
@@ -25953,7 +25985,7 @@ paths:
|
|
|
25953
25985
|
|
|
25954
25986
|
`name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
|
|
25955
25987
|
|
|
25956
|
-
Webhooks are
|
|
25988
|
+
Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`.
|
|
25957
25989
|
|
|
25958
25990
|
A restricted (zrk_) API key can only subscribe to events whose resource group
|
|
25959
25991
|
the key holds; an event outside the key's groups is rejected with 403, so a
|
|
@@ -26065,7 +26097,7 @@ paths:
|
|
|
26065
26097
|
|
|
26066
26098
|
When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation.
|
|
26067
26099
|
|
|
26068
|
-
Webhooks are
|
|
26100
|
+
Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`.
|
|
26069
26101
|
|
|
26070
26102
|
A restricted (zrk_) API key can only set `events` to events whose resource
|
|
26071
26103
|
group the key holds; an event outside the key's groups is rejected with 403.
|
|
@@ -30092,6 +30124,18 @@ paths:
|
|
|
30092
30124
|
type: "platform_error"
|
|
30093
30125
|
code: "platform_api_error"
|
|
30094
30126
|
platform: "instagram"
|
|
30127
|
+
declinedByMeta:
|
|
30128
|
+
summary: "Meta declined the private reply on this media (subcode 2534066, reply NOT consumed)"
|
|
30129
|
+
value:
|
|
30130
|
+
error: "Instagram declined this private reply (Meta error 2534066). Despite Meta's wording, the token and permissions are fine and the comment ID is valid, so reconnecting the account or retrying this comment will not change the result."
|
|
30131
|
+
type: "platform_error"
|
|
30132
|
+
code: "platform_api_error"
|
|
30133
|
+
platform: "instagram"
|
|
30134
|
+
platformError:
|
|
30135
|
+
code: 200
|
|
30136
|
+
error_subcode: 2534066
|
|
30137
|
+
type: "IGApiException"
|
|
30138
|
+
message: "Please check if access token has enough IG permissions granular scopes for IG private reply. Or, verify if the comment ID is valid"
|
|
30095
30139
|
missingMessage:
|
|
30096
30140
|
summary: Missing message
|
|
30097
30141
|
value:
|
|
@@ -42283,6 +42327,8 @@ paths:
|
|
|
42283
42327
|
than the ingested history return a `202` immediately with the covered part
|
|
42284
42328
|
and `backfillPending: true` while the rest is backfilled in the background;
|
|
42285
42329
|
repeat the request shortly until it returns 200 with full data.
|
|
42330
|
+
|
|
42331
|
+
With adAccountId set to a Google customer id this is the customer-level performance report (clicks, cost, impressions, conversions, all conversions per day).
|
|
42286
42332
|
security:
|
|
42287
42333
|
- bearerAuth: []
|
|
42288
42334
|
parameters:
|
|
@@ -48990,7 +49036,8 @@ paths:
|
|
|
48990
49036
|
pixel.
|
|
48991
49037
|
|
|
48992
49038
|
NOT idempotent on either platform: each call creates a new pixel (and,
|
|
48993
|
-
for OpenAI, a new Conversions API key
|
|
49039
|
+
for OpenAI, a new Conversions API key plus, with `defaultEventType`, a
|
|
49040
|
+
new conversion event setting). Do not retry blindly on
|
|
48994
49041
|
timeout. Meta (platform `metaads`) and OpenAI Ads (platform
|
|
48995
49042
|
`openaiads`); other platforms return 405.
|
|
48996
49043
|
security:
|
|
@@ -49007,6 +49054,10 @@ paths:
|
|
|
49007
49054
|
properties:
|
|
49008
49055
|
adAccountId: { type: string, description: 'Meta ad account id, e.g. `act_123456789`. Required by this endpoint but ignored for OpenAI Ads.' }
|
|
49009
49056
|
name: { type: string, minLength: 1, maxLength: 200 }
|
|
49057
|
+
defaultEventType:
|
|
49058
|
+
type: string
|
|
49059
|
+
enum: [order_created, lead_created, items_added, contents_viewed, checkout_started, registration_completed, subscription_created, trial_started, appointment_scheduled, page_viewed, app_installed, app_opened]
|
|
49060
|
+
description: 'OpenAI Ads only (ignored by Meta). When set, also provisions a standard conversion event setting wired to the new pixel, so `goal: conversions` ad creates on `POST /v1/ads/create` have an event to reference immediately.'
|
|
49010
49061
|
responses:
|
|
49011
49062
|
'201':
|
|
49012
49063
|
description: Tracking tag created
|
|
@@ -231,7 +231,7 @@ describe 'AdCampaignsApi' do
|
|
|
231
231
|
|
|
232
232
|
# unit tests for get_ads_timeline
|
|
233
233
|
# Get daily account metrics
|
|
234
|
-
# Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling `/v1/ads/tree` once per day. `accountId` is required. The lookup is sibling-expanded so passing the `metaads` ID also includes ads under the linked `facebook` / `instagram` posting account (and vice-versa) — same convention as `/v1/ads/tree` and `/v1/ads`. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a `202` immediately with the covered part and `backfillPending: true` while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data.
|
|
234
|
+
# Returns daily aggregate metrics across all ads in a SocialAccount as a single time series — one row per calendar day in the requested range. Use this for dashboards that draw a daily-spend or daily-conversions chart, instead of calling `/v1/ads/tree` once per day. `accountId` is required. The lookup is sibling-expanded so passing the `metaads` ID also includes ads under the linked `facebook` / `instagram` posting account (and vice-versa) — same convention as `/v1/ads/tree` and `/v1/ads`. Date range defaults to the last 90 days. Capped at 730 days. Ranges older than the ingested history return a `202` immediately with the covered part and `backfillPending: true` while the rest is backfilled in the background; repeat the request shortly until it returns 200 with full data. With adAccountId set to a Google customer id this is the customer-level performance report (clicks, cost, impressions, conversions, all conversions per day).
|
|
235
235
|
# @param account_id Social account ID. Sibling-expanded to its linked posting↔ads pair.
|
|
236
236
|
# @param [Hash] opts the optional parameters
|
|
237
237
|
# @option opts [String] :ad_account_id Optional platform-native ad account ID (e.g. Meta `act_…`, TikTok advertiser ID). Use when the connection wraps multiple platform ad accounts and the chart should show one only. Note: rows ingested before 2026-05-13 don't carry this column; the recurring 7-day re-sync repopulates them naturally.
|
|
@@ -201,7 +201,7 @@ describe 'ConnectApi' do
|
|
|
201
201
|
# unit tests for get_connect_url
|
|
202
202
|
# Get OAuth connect URL
|
|
203
203
|
# Initiate an OAuth connection flow. Returns an authUrl to redirect the user to. Standard flow: Zernio hosts the selection UI, then redirects to your redirect_url. Headless mode (headless=true): user is redirected to your redirect_url with OAuth data for custom UI. Use the platform-specific selection endpoints to complete.
|
|
204
|
-
# @param platform Social media platform to connect
|
|
204
|
+
# @param platform Social media platform to connect. `snapchat` is a closed beta with no public release date: it returns 403 `PLATFORM_BETA_RESTRICTED` until the account is approved.
|
|
205
205
|
# @param profile_id Your Zernio profile ID (get from /v1/profiles). For WhatsApp, a Zernio-provisioned number can only be connected on the profile it was provisioned to; connecting from any other profile is rejected with a 409.
|
|
206
206
|
# @param [Hash] opts the optional parameters
|
|
207
207
|
# @option opts [String] :redirect_url Your custom redirect URL after connection completes. MUST be an absolute http(s) URL or a custom app scheme for mobile deeplinks (e.g. myapp://callback); a relative path is rejected with 400 INVALID_REDIRECT_URL. Result params are appended with the URL API, so an existing query string is preserved. Standard mode appends connected={platform}&profileId=X&accountId=Y&username=Z. Headless mode appends OAuth data params for platforms requiring selection (e.g. LinkedIn orgs, Facebook pages). If no selection is needed, the account is created directly and the redirect includes accountId. On failure, the browser is sent to the same redirect_url with `error` and `platform` appended. `error` and `platform` are always present. `error_message`, `is_user_fixable`, `reason` and `dashboard_url` are conditional and must be treated as optional. This list is NOT exhaustive and new values may be added at any time. Treat an unrecognized value as a generic failure rather than matching it exhaustively. Existing values are not renamed or removed without notice. OAuth and callback: oauth_denied, invalid_callback, invalid_state, unsupported_platform, connection_failed, internal_error, token_exchange_failed, byok_config_error, personal_account_not_supported, missing_google_permissions, platform_requires_destination, reconnect_account_mismatch, invalid_request Access and limits: profile_not_found, invalid_profile_id, access_denied, account_limit_exceeded, profile_limit_exceeded, payment_required Destination selection: no_facebook_pages, facebook_pages_error, no_google_locations, google_locations_error, google_permission_denied, no_snapchat_public_profiles, snapchat_profiles_error, discord_no_guild, slack_no_team WhatsApp: whatsapp_error, one_whatsapp_per_profile, whatsapp_number_already_connected, whatsapp_number_pinned_to_profile, connection_cancelled Google Ads (platform=googleads): google_ads_auth_failed, google_ads_invalid_state, google_ads_config_error, google_ads_token_failed, google_ads_quota_exhausted, google_ads_callback_error TikTok Ads (platform=tiktokads): tiktok_ads_auth_failed, tiktok_ads_invalid_state, tiktok_ads_access_denied, tiktok_ads_config_error, tiktok_ads_token_failed, tiktok_ads_account_not_found, tiktok_ads_callback_error X Ads (platform=xads): x_ads_denied, x_ads_auth_failed, x_ads_config_error, x_ads_account_not_found, x_ads_state_error, x_ads_token_failed, x_ads_token_missing, x_ads_callback_error Shopify (platform=shopify): shopify_auth_failed, shopify_config_error, shopify_invalid_state, shopify_invalid_hmac, shopify_invalid_shop, shopify_missing_scopes, shopify_callback_error 1. On this endpoint every upstream OAuth error is collapsed into `oauth_denied`. The provider's own value (for example Meta's `access_denied`) is not forwarded. The dedicated ads flows below are different: they use their own denial slugs and `google_ads_auth_failed` and `tiktok_ads_auth_failed` may carry the provider's raw error string in `error_message`. 2. On the tiktok and twitter ads flows `platform` carries the ads platform id (`tiktokads`, `xads`), not the value used in the request path. The googleads and shopify flows report `googleads` and `shopify`.
|
data/spec/api/posts_api_spec.rb
CHANGED
|
@@ -47,7 +47,7 @@ describe 'PostsApi' do
|
|
|
47
47
|
|
|
48
48
|
# unit tests for create_post
|
|
49
49
|
# Create post
|
|
50
|
-
# Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response. Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn text-free reshare (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints. ## Idempotency Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post. **1. Same-request idempotency (5-minute window).** Pass an `x-request-id` header to mark a logical request. If a second request arrives with the same `x-request-id` while the first is in-flight (or within ~5 minutes of completion), we return **HTTP 200** with the original post in the `existingPost` field — no new post is created. The official Zernio SDKs auto-generate a unique `x-request-id` per call. If you're using a generic HTTP client (curl, n8n's HTTP node, Zapier, custom code), either: - Set a unique `x-request-id` per logical call (recommended — UUIDv4 is fine) - Or simply omit the header — we'll treat each request as new **Common pitfall**: if your workflow tool uses a single execution-level request ID and reuses it across multiple HTTP nodes (e.g. one ID for the whole run, shared across 6 different platform calls), every call after the first will look like a retry of the first and return its post. Generate a fresh ID per node. **2. Content-hash dedup (24-hour window).** Independently, we hash `(platform, accountId, content + media URLs)` and reject duplicates within 24 hours with **HTTP 409**. This catches genuine \"same content posted twice to the same account\" cases regardless of `x-request-id`. Returns `error`, `accountId`, `platform`, and `existingPostId` so you can find the original. To intentionally re-post identical content within 24h, change something (the caption, the media, the account) — the dedup is keyed on the full content fingerprint. Order: same-`x-request-id` retries (200) are checked first; if no idempotency match, the content-hash dedup (409) runs.
|
|
50
|
+
# Create and optionally publish a post. Immediate posts (`publishNow: true`) include `platformPostUrl` in the response. Content is optional when media is attached, all platforms have `customContent`, every platform entry is an X Article (`platformSpecificData.article`), or every platform entry is a LinkedIn text-free reshare (`platformSpecificData.reshareUrl` with no text). See each platform's schema for media constraints. ## Scheduling Pick one of `scheduledFor` (schedule), `publishNow: true` (publish synchronously) or `queuedFromProfile` (next queue slot). With none of them and `isDraft` unset, the post is saved as a draft. `platforms` is required unless the post is a draft. `isDraft: true` wins over `publishNow` and `scheduledFor` (the post is saved, never published); `publishNow: true` wins over `scheduledFor`. A `scheduledFor` already in the past is not rejected: the post is published synchronously in the same request, exactly like `publishNow`. ## Idempotency Two layers of duplicate-protection apply, so safe-to-retry callers (network blips, n8n / Zapier retries, etc.) don't accidentally double-post. **1. Same-request idempotency (5-minute window).** Pass an `x-request-id` header to mark a logical request. If a second request arrives with the same `x-request-id` while the first is in-flight (or within ~5 minutes of completion), we return **HTTP 200** with the original post in the `existingPost` field — no new post is created. The official Zernio SDKs auto-generate a unique `x-request-id` per call. If you're using a generic HTTP client (curl, n8n's HTTP node, Zapier, custom code), either: - Set a unique `x-request-id` per logical call (recommended — UUIDv4 is fine) - Or simply omit the header — we'll treat each request as new **Common pitfall**: if your workflow tool uses a single execution-level request ID and reuses it across multiple HTTP nodes (e.g. one ID for the whole run, shared across 6 different platform calls), every call after the first will look like a retry of the first and return its post. Generate a fresh ID per node. **2. Content-hash dedup (24-hour window).** Independently, we hash `(platform, accountId, content + media URLs)` and reject duplicates within 24 hours with **HTTP 409**. This catches genuine \"same content posted twice to the same account\" cases regardless of `x-request-id`. Returns `error`, `accountId`, `platform`, and `existingPostId` so you can find the original. To intentionally re-post identical content within 24h, change something (the caption, the media, the account) — the dedup is keyed on the full content fingerprint. Order: same-`x-request-id` retries (200) are checked first; if no idempotency match, the content-hash dedup (409) runs.
|
|
51
51
|
# @param create_post_request
|
|
52
52
|
# @param [Hash] opts the optional parameters
|
|
53
53
|
# @option opts [String] :x_request_id Optional client-generated request identifier for safe retry (idempotency). When two requests carry the same value, the second is treated as a retry of the first and returns the original post (HTTP 200) instead of creating a duplicate. Window is ~5 minutes from the first request. Generate a UUID per logical call. SDKs do this automatically; HTTP clients should set it themselves or omit it. See the operation description for the full idempotency contract.
|
|
@@ -48,7 +48,7 @@ describe 'TrackingTagsApi' do
|
|
|
48
48
|
|
|
49
49
|
# unit tests for create_tracking_tag
|
|
50
50
|
# Create a tracking tag
|
|
51
|
-
# Meta: creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a Meta pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. OpenAI Ads: creates an OpenAI pixel AND provisions a Conversions API key for it in the same call (`adAccountId` is required by this endpoint but ignored — one API key maps to exactly one ad account, so there's nothing to select). Returns 422 (`FEATURE_NOT_AVAILABLE`) if the ad account isn't enabled for pixel management; contact your OpenAI partner representative to enable it. There is no delete API for OpenAI pixels. If the pixel is created but the Conversions API key provisioning then fails, the pixel is left live on OpenAI (it cannot be cleaned up) and the error message names the surviving pixel id and warns against retrying, since a retry would create a second, orphaned pixel. NOT idempotent on either platform: each call creates a new pixel (and, for OpenAI, a new Conversions API key). Do not retry blindly on timeout. Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405.
|
|
51
|
+
# Meta: creates a Meta Pixel on the given ad account (`POST /act_{id}/adspixels` — `name` is the only input). Returns the created tag including its install `code`. The pixel is owned by the Business Manager that owns the ad account; a pixel created on a personal (non-BM) ad account ends up with `ownerBusinessId: null` and can't be shared with other ad accounts. Creating a Meta pixel does NOT install it — install the returned `code` snippet on the site, or send events server-side via `POST /v1/ads/conversions`. The check `installed` is derived from `lastFiredTime`. OpenAI Ads: creates an OpenAI pixel AND provisions a Conversions API key for it in the same call (`adAccountId` is required by this endpoint but ignored — one API key maps to exactly one ad account, so there's nothing to select). Returns 422 (`FEATURE_NOT_AVAILABLE`) if the ad account isn't enabled for pixel management; contact your OpenAI partner representative to enable it. There is no delete API for OpenAI pixels. If the pixel is created but the Conversions API key provisioning then fails, the pixel is left live on OpenAI (it cannot be cleaned up) and the error message names the surviving pixel id and warns against retrying, since a retry would create a second, orphaned pixel. NOT idempotent on either platform: each call creates a new pixel (and, for OpenAI, a new Conversions API key plus, with `defaultEventType`, a new conversion event setting). Do not retry blindly on timeout. Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405.
|
|
52
52
|
# @param account_id Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
53
53
|
# @param create_tracking_tag_request
|
|
54
54
|
# @param [Hash] opts the optional parameters
|
|
@@ -34,7 +34,7 @@ describe 'WebhooksApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_webhook_settings
|
|
36
36
|
# Create webhook
|
|
37
|
-
# Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are
|
|
37
|
+
# Create a new webhook configuration. Maximum 50 webhooks per user. `name`, `url` and `events` are required. `url` must be a valid URL and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only subscribe to events whose resource group the key holds; an event outside the key's groups is rejected with 403, so a restricted key can never create a subscription broader than itself. `disabledResourceGroups` restricts the subscription itself, independently of which key or session later reads it. Events in a disabled group are dropped before delivery to this endpoint, on live delivery and on every replay path (test fire, redelivery, dead-letter requeue), even if they are listed in `events`. Omit it to receive everything in `events`, which is how existing subscriptions behave. A restricted key's own disabled groups are always unioned in.
|
|
38
38
|
# @param create_webhook_settings_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [UpdateWebhookSettings200Response]
|
|
@@ -110,7 +110,7 @@ describe 'WebhooksApi' do
|
|
|
110
110
|
|
|
111
111
|
# unit tests for update_webhook_settings
|
|
112
112
|
# Update webhook
|
|
113
|
-
# Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are
|
|
113
|
+
# Update an existing webhook configuration. All fields except `_id` are optional; only provided fields will be updated. When provided, `name` must be 1-50 characters, `url` must be a valid URL, and `events` must contain at least one event. Whitespace is trimmed from `url` before validation. Webhooks are auto-disabled only once the endpoint has had no successful delivery for 3 days AND has either reached 20 consecutive terminal failures (each one an event that exhausted the full retry ladder) or been failing continuously for 3 days. The owner is emailed; re-enable it with `isActive: true`. A restricted (zrk_) API key can only set `events` to events whose resource group the key holds; an event outside the key's groups is rejected with 403. It also cannot widen an existing subscription past its own groups. `disabledResourceGroups` replaces the subscription's own denylist, which applies to delivery regardless of which key or session created it. Send an empty array to clear it. A restricted key's own disabled groups are unioned into the stored value on every update, so repointing a legacy unrestricted subscription with a restricted key also narrows it. Timing: the new denylist applies to every event emitted after the update. Events already queued for delivery when the update landed were filtered against the previous denylist and can still arrive at your endpoint for up to five minutes after they were enqueued, because the delivery worker trusts a five-minute enqueue-time snapshot before re-checking the subscription. Retries beyond that window, dead-letter replays, test fires, and redeliveries are all checked against the current denylist.
|
|
114
114
|
# @param update_webhook_settings_request
|
|
115
115
|
# @param [Hash] opts the optional parameters
|
|
116
116
|
# @return [UpdateWebhookSettings200Response]
|
|
@@ -81,6 +81,12 @@ describe Zernio::AdDailyMetrics do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "all_conversions"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "cost_per_conversion"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -81,6 +81,12 @@ describe Zernio::AdMetrics do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "all_conversions"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "cost_per_conversion"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -87,6 +87,12 @@ describe Zernio::AdsTimelineResponseRowsInner do
|
|
|
87
87
|
end
|
|
88
88
|
end
|
|
89
89
|
|
|
90
|
+
describe 'test attribute "all_conversions"' do
|
|
91
|
+
it 'should work' do
|
|
92
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
|
+
end
|
|
94
|
+
end
|
|
95
|
+
|
|
90
96
|
describe 'test attribute "cost_per_conversion"' do
|
|
91
97
|
it 'should work' do
|
|
92
98
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -81,6 +81,12 @@ describe Zernio::CampaignAnalyticsResponseAnalyticsDailyInner do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
+
describe 'test attribute "all_conversions"' do
|
|
85
|
+
it 'should work' do
|
|
86
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
84
90
|
describe 'test attribute "cost_per_conversion"' do
|
|
85
91
|
it 'should work' do
|
|
86
92
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,4 +39,14 @@ describe Zernio::CreateTrackingTagRequest do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "default_event_type"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
# validator = Petstore::EnumTest::EnumAttributeValidator.new('String', ["order_created", "lead_created", "items_added", "contents_viewed", "checkout_started", "registration_completed", "subscription_created", "trial_started", "appointment_scheduled", "page_viewed", "app_installed", "app_opened"])
|
|
46
|
+
# validator.allowable_values.each do |value|
|
|
47
|
+
# expect { instance.default_event_type = value }.not_to raise_error
|
|
48
|
+
# end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
|
|
42
52
|
end
|
|
Binary file
|