zernio-sdk 0.0.552 → 0.0.554
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 +4 -0
- data/docs/AdCampaignsApi.md +3 -3
- data/docs/ConnectApi.md +70 -0
- data/docs/ConnectOpenAIAdsCredentials200Response.md +22 -0
- data/docs/ConnectOpenAIAdsCredentialsRequest.md +24 -0
- data/docs/ConversionEvent.md +1 -1
- data/docs/ConversionsApi.md +5 -5
- data/docs/CreateStandaloneAdRequest.md +8 -8
- data/docs/CreateTrackingTagRequest.md +1 -1
- data/docs/GetTrackingTag200Response.md +20 -0
- data/docs/ListConversionDestinations200ResponseDestinationsInner.md +1 -1
- data/docs/SendConversions200Response.md +1 -1
- data/docs/SendConversionsRequest.md +3 -3
- data/docs/TrackingTagsApi.md +17 -17
- data/docs/UpdateAdRequestBudget.md +1 -1
- data/docs/UpdateAdSetRequest.md +3 -3
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +10 -10
- data/lib/zernio-sdk/api/connect_api.rb +68 -0
- data/lib/zernio-sdk/api/conversions_api.rb +8 -8
- data/lib/zernio-sdk/api/tracking_tags_api.rb +18 -18
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +2 -2
- data/lib/zernio-sdk/models/ad.rb +2 -2
- data/lib/zernio-sdk/models/ad_campaign.rb +2 -2
- data/lib/zernio-sdk/models/ad_tree_campaign.rb +2 -2
- data/lib/zernio-sdk/models/bulk_update_ad_campaign_status_request_campaigns_inner.rb +2 -2
- data/lib/zernio-sdk/models/connect_open_ai_ads_credentials200_response.rb +165 -0
- data/lib/zernio-sdk/models/connect_open_ai_ads_credentials_request.rb +212 -0
- data/lib/zernio-sdk/models/conversion_event.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +8 -8
- data/lib/zernio-sdk/models/create_tracking_tag201_response.rb +2 -2
- data/lib/zernio-sdk/models/create_tracking_tag_request.rb +1 -1
- data/lib/zernio-sdk/models/get_tracking_tag200_response.rb +190 -0
- data/lib/zernio-sdk/models/list_conversion_destinations200_response.rb +2 -2
- data/lib/zernio-sdk/models/list_conversion_destinations200_response_destinations_inner.rb +1 -1
- data/lib/zernio-sdk/models/list_tracking_tags200_response.rb +2 -2
- data/lib/zernio-sdk/models/send_conversions200_response.rb +3 -3
- data/lib/zernio-sdk/models/send_conversions_request.rb +3 -3
- data/lib/zernio-sdk/models/social_account.rb +2 -2
- data/lib/zernio-sdk/models/update_ad_campaign_status_request.rb +2 -2
- data/lib/zernio-sdk/models/update_ad_request_budget.rb +1 -0
- data/lib/zernio-sdk/models/update_ad_set_request.rb +5 -5
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +3 -0
- data/openapi.yaml +176 -71
- data/spec/api/ad_campaigns_api_spec.rb +3 -3
- data/spec/api/connect_api_spec.rb +12 -0
- data/spec/api/conversions_api_spec.rb +4 -4
- data/spec/api/tracking_tags_api_spec.rb +8 -8
- data/spec/models/account_with_follower_stats_spec.rb +1 -1
- data/spec/models/ad_campaign_spec.rb +1 -1
- data/spec/models/ad_spec.rb +1 -1
- data/spec/models/ad_tree_campaign_spec.rb +1 -1
- data/spec/models/bulk_update_ad_campaign_status_request_campaigns_inner_spec.rb +1 -1
- data/spec/models/connect_open_ai_ads_credentials200_response_spec.rb +48 -0
- data/spec/models/connect_open_ai_ads_credentials_request_spec.rb +54 -0
- data/spec/models/create_tracking_tag201_response_spec.rb +1 -1
- data/spec/models/get_tracking_tag200_response_spec.rb +46 -0
- data/spec/models/list_conversion_destinations200_response_spec.rb +1 -1
- data/spec/models/list_tracking_tags200_response_spec.rb +1 -1
- data/spec/models/send_conversions200_response_spec.rb +1 -1
- data/spec/models/social_account_spec.rb +1 -1
- data/spec/models/update_ad_campaign_status_request_spec.rb +1 -1
- data/spec/models/update_ad_set_request_spec.rb +1 -1
- metadata +1494 -1482
|
@@ -224,7 +224,7 @@ module Zernio
|
|
|
224
224
|
end
|
|
225
225
|
|
|
226
226
|
# Create standalone ad
|
|
227
|
-
# Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, and
|
|
227
|
+
# Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, LinkedIn, and OpenAI Ads (ChatGPT Ads). Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
228
228
|
# @param create_standalone_ad_request [CreateStandaloneAdRequest]
|
|
229
229
|
# @param [Hash] opts the optional parameters
|
|
230
230
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -235,7 +235,7 @@ module Zernio
|
|
|
235
235
|
end
|
|
236
236
|
|
|
237
237
|
# Create standalone ad
|
|
238
|
-
# Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, and
|
|
238
|
+
# Creates a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X/Twitter, LinkedIn, and OpenAI Ads (ChatGPT Ads). Supports three mutually-exclusive request shapes selected by the body, a legacy single-creative shape (all platforms, default), a Meta-only multi-creative shape via the creatives array (one ad set with N ads sharing budget and targeting), and a Meta-only attach shape via adSetId (adds one new ad to an existing ad set). Per-platform required fields, budget minimums, and video-ad rules are documented on each property below. LinkedIn creates a Single Image or Single Video Ad backed by a Direct Sponsored Content \"dark post\" authored by a Company Page (see `organizationId`); supported goals are engagement, traffic, awareness, and video_views (video ads use the `video` field; video_views requires a video), and traffic ads require `linkUrl`. **Idempotency:** this endpoint is not idempotent at the platform level (a blind retry creates a second campaign/ad set/ad). Send an `Idempotency-Key` header to make retries safe: the first request with a given key creates the ad and we store the response; a retry with the same key replays that exact response (with `Idempotent-Replayed: true`) instead of creating duplicates. Reusing a key with a different body returns 422; a key whose first request is still in flight returns 409 (retry after a short backoff). Keys are scoped to your credential and expire after 24h.
|
|
239
239
|
# @param create_standalone_ad_request [CreateStandaloneAdRequest]
|
|
240
240
|
# @param [Hash] opts the optional parameters
|
|
241
241
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes create retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -299,7 +299,7 @@ module Zernio
|
|
|
299
299
|
end
|
|
300
300
|
|
|
301
301
|
# Cancel an ad
|
|
302
|
-
# Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history.
|
|
302
|
+
# Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent).
|
|
303
303
|
# @param ad_id [String]
|
|
304
304
|
# @param [Hash] opts the optional parameters
|
|
305
305
|
# @return [DeleteAccountGroup200Response]
|
|
@@ -309,7 +309,7 @@ module Zernio
|
|
|
309
309
|
end
|
|
310
310
|
|
|
311
311
|
# Cancel an ad
|
|
312
|
-
# Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history.
|
|
312
|
+
# Cancels the ad on the platform and marks it as cancelled in the database. The ad is preserved for history. OpenAI Ads has no delete API; the ad is archived instead (a terminal state, the closest equivalent).
|
|
313
313
|
# @param ad_id [String]
|
|
314
314
|
# @param [Hash] opts the optional parameters
|
|
315
315
|
# @return [Array<(DeleteAccountGroup200Response, Integer, Hash)>] DeleteAccountGroup200Response data, response status code and response headers
|
|
@@ -850,7 +850,7 @@ module Zernio
|
|
|
850
850
|
if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
|
|
851
851
|
fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
|
|
852
852
|
end
|
|
853
|
-
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"]
|
|
853
|
+
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
|
|
854
854
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
855
855
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
856
856
|
end
|
|
@@ -951,7 +951,7 @@ module Zernio
|
|
|
951
951
|
if @api_client.config.client_side_validation && account_id.nil?
|
|
952
952
|
fail ArgumentError, "Missing the required parameter 'account_id' when calling AdCampaignsApi.get_ads_timeline"
|
|
953
953
|
end
|
|
954
|
-
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"]
|
|
954
|
+
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
|
|
955
955
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
956
956
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
957
957
|
end
|
|
@@ -1053,7 +1053,7 @@ module Zernio
|
|
|
1053
1053
|
if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
|
|
1054
1054
|
fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
|
|
1055
1055
|
end
|
|
1056
|
-
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"]
|
|
1056
|
+
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
|
|
1057
1057
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
1058
1058
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
1059
1059
|
end
|
|
@@ -1168,7 +1168,7 @@ module Zernio
|
|
|
1168
1168
|
if @api_client.config.client_side_validation && opts[:'source'] && !allowable_values.include?(opts[:'source'])
|
|
1169
1169
|
fail ArgumentError, "invalid value for \"source\", must be one of #{allowable_values}"
|
|
1170
1170
|
end
|
|
1171
|
-
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"]
|
|
1171
|
+
allowable_values = ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"]
|
|
1172
1172
|
if @api_client.config.client_side_validation && opts[:'platform'] && !allowable_values.include?(opts[:'platform'])
|
|
1173
1173
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{allowable_values}"
|
|
1174
1174
|
end
|
|
@@ -1227,7 +1227,7 @@ module Zernio
|
|
|
1227
1227
|
end
|
|
1228
1228
|
|
|
1229
1229
|
# Update ad
|
|
1230
|
-
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google**: status + budget only. Sending
|
|
1230
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below).
|
|
1231
1231
|
# @param ad_id [String]
|
|
1232
1232
|
# @param update_ad_request [UpdateAdRequest]
|
|
1233
1233
|
# @param [Hash] opts the optional parameters
|
|
@@ -1238,7 +1238,7 @@ module Zernio
|
|
|
1238
1238
|
end
|
|
1239
1239
|
|
|
1240
1240
|
# Update ad
|
|
1241
|
-
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google**: status + budget only. Sending
|
|
1241
|
+
# Patch one or more fields on an ad. Status, budget, targeting, and creative changes are propagated to the platform. Per-platform support: - **Meta** (Facebook + Instagram): all fields supported. - **TikTok**: status, budget, targeting (via `/v2/adgroup/update/`), and creative (via `/v2/ad/update/` patch-style — `headline` is ignored, `body` becomes `ad_text`). - **Pinterest / X / LinkedIn / Google / OpenAI Ads**: status + budget only. Sending `targeting` or `creative` returns 501 with code `unsupported_platform_operation`. OpenAI Ads budget is lifetime-only (see `budget.type` below).
|
|
1242
1242
|
# @param ad_id [String]
|
|
1243
1243
|
# @param update_ad_request [UpdateAdRequest]
|
|
1244
1244
|
# @param [Hash] opts the optional parameters
|
|
@@ -457,6 +457,74 @@ module Zernio
|
|
|
457
457
|
return data, status_code, headers
|
|
458
458
|
end
|
|
459
459
|
|
|
460
|
+
# Connect an OpenAI Ads account
|
|
461
|
+
# Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
|
|
462
|
+
# @param connect_open_ai_ads_credentials_request [ConnectOpenAIAdsCredentialsRequest]
|
|
463
|
+
# @param [Hash] opts the optional parameters
|
|
464
|
+
# @return [ConnectOpenAIAdsCredentials200Response]
|
|
465
|
+
def connect_open_ai_ads_credentials(connect_open_ai_ads_credentials_request, opts = {})
|
|
466
|
+
data, _status_code, _headers = connect_open_ai_ads_credentials_with_http_info(connect_open_ai_ads_credentials_request, opts)
|
|
467
|
+
data
|
|
468
|
+
end
|
|
469
|
+
|
|
470
|
+
# Connect an OpenAI Ads account
|
|
471
|
+
# Connect an OpenAI Ads account using an API key from ChatGPT Ads Manager. The key grants full campaign write access on OpenAI's side (OpenAI does not offer a read-only key scope). Zernio uses it to read ads and performance, and to create and manage campaigns you set up through Zernio (create, status, budget, and cancel). Campaigns created directly in ChatGPT Ads Manager can still be managed there.
|
|
472
|
+
# @param connect_open_ai_ads_credentials_request [ConnectOpenAIAdsCredentialsRequest]
|
|
473
|
+
# @param [Hash] opts the optional parameters
|
|
474
|
+
# @return [Array<(ConnectOpenAIAdsCredentials200Response, Integer, Hash)>] ConnectOpenAIAdsCredentials200Response data, response status code and response headers
|
|
475
|
+
def connect_open_ai_ads_credentials_with_http_info(connect_open_ai_ads_credentials_request, opts = {})
|
|
476
|
+
if @api_client.config.debugging
|
|
477
|
+
@api_client.config.logger.debug 'Calling API: ConnectApi.connect_open_ai_ads_credentials ...'
|
|
478
|
+
end
|
|
479
|
+
# verify the required parameter 'connect_open_ai_ads_credentials_request' is set
|
|
480
|
+
if @api_client.config.client_side_validation && connect_open_ai_ads_credentials_request.nil?
|
|
481
|
+
fail ArgumentError, "Missing the required parameter 'connect_open_ai_ads_credentials_request' when calling ConnectApi.connect_open_ai_ads_credentials"
|
|
482
|
+
end
|
|
483
|
+
# resource path
|
|
484
|
+
local_var_path = '/v1/connect/openai-ads/credentials'
|
|
485
|
+
|
|
486
|
+
# query parameters
|
|
487
|
+
query_params = opts[:query_params] || {}
|
|
488
|
+
|
|
489
|
+
# header parameters
|
|
490
|
+
header_params = opts[:header_params] || {}
|
|
491
|
+
# HTTP header 'Accept' (if needed)
|
|
492
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
493
|
+
# HTTP header 'Content-Type'
|
|
494
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
495
|
+
if !content_type.nil?
|
|
496
|
+
header_params['Content-Type'] = content_type
|
|
497
|
+
end
|
|
498
|
+
|
|
499
|
+
# form parameters
|
|
500
|
+
form_params = opts[:form_params] || {}
|
|
501
|
+
|
|
502
|
+
# http body (model)
|
|
503
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(connect_open_ai_ads_credentials_request)
|
|
504
|
+
|
|
505
|
+
# return_type
|
|
506
|
+
return_type = opts[:debug_return_type] || 'ConnectOpenAIAdsCredentials200Response'
|
|
507
|
+
|
|
508
|
+
# auth_names
|
|
509
|
+
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
510
|
+
|
|
511
|
+
new_options = opts.merge(
|
|
512
|
+
:operation => :"ConnectApi.connect_open_ai_ads_credentials",
|
|
513
|
+
:header_params => header_params,
|
|
514
|
+
:query_params => query_params,
|
|
515
|
+
:form_params => form_params,
|
|
516
|
+
:body => post_body,
|
|
517
|
+
:auth_names => auth_names,
|
|
518
|
+
:return_type => return_type
|
|
519
|
+
)
|
|
520
|
+
|
|
521
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
522
|
+
if @api_client.config.debugging
|
|
523
|
+
@api_client.config.logger.debug "API called: ConnectApi#connect_open_ai_ads_credentials\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
524
|
+
end
|
|
525
|
+
return data, status_code, headers
|
|
526
|
+
end
|
|
527
|
+
|
|
460
528
|
# Connect WhatsApp via credentials
|
|
461
529
|
# Connect a WhatsApp Business Account by providing Meta credentials directly. This is the headless alternative to the Embedded Signup browser flow. To get the required credentials: 1. Go to Meta Business Suite (business.facebook.com) 2. Create or select a WhatsApp Business Account 3. In Business Settings > System Users, create a System User 4. Assign it the whatsapp_business_management and whatsapp_business_messaging permissions 5. Generate a permanent access token 6. Get the WABA ID from WhatsApp Manager > Account Tools > Phone Numbers 7. Get the Phone Number ID from the same page (click on the number)
|
|
462
530
|
# @param connect_whats_app_credentials_request [ConnectWhatsAppCredentialsRequest]
|
|
@@ -168,7 +168,7 @@ module Zernio
|
|
|
168
168
|
end
|
|
169
169
|
|
|
170
170
|
# Create a conversion destination
|
|
171
|
-
# Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta
|
|
171
|
+
# Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta and OpenAI Ads pixels are created via their own tracking-tags flow instead (`POST /v1/accounts/{accountId}/tracking-tags`); this endpoint returns 405 for both. **LinkedIn:** creation is NOT idempotent. A retry creates a second destination. Deduplicate before retrying. **Google Ads:** calling with a name that already exists reuses the existing conversion action transparently (the response is identical to a fresh create). Calling with the same name but a different category returns a typed `IDEMPOTENCY_CONFLICT` (409) rather than silently returning the mismatched action. **LinkedIn:** the rule is created with `conversionMethod=CONVERSIONS_API` and (by default) auto-associated with all of the ad account's campaigns via `autoAssociationType=ALL_CAMPAIGNS`. Pass `autoAssociationType: NONE` to opt out and manage associations explicitly via the associations endpoints below. 365-day attribution windows are only valid for `SUBMIT_APPLICATION`, `PURCHASE`, `ADD_TO_CART`, `QUALIFIED_LEAD`, and `LEAD` rule types; the API rejects other combinations locally. **Google Ads:** the conversion action is created with `type=UPLOAD_CLICKS` (required for API-uploaded offline conversions, immutable after creation). The `type` field carries the Google `ConversionActionCategory` enum value, e.g. `PURCHASE`, `SUBSCRIBE_PAID`, `SIGNUP`, `IMPORTED_LEAD`, `BOOK_APPOINTMENT`. Unified standard event names (e.g. `Purchase`, `Subscribe`, `CompleteRegistration`, `Lead`, `Schedule`) are resolved to their Google category equivalents automatically. The action defaults to secondary (non-primary) to avoid immediately steering Smart Bidding; pass `primaryForGoal: true` to opt in.
|
|
172
172
|
# @param account_id [String] SocialAccount ID (linkedinads or googleads).
|
|
173
173
|
# @param create_conversion_destination_request [CreateConversionDestinationRequest]
|
|
174
174
|
# @param [Hash] opts the optional parameters
|
|
@@ -179,7 +179,7 @@ module Zernio
|
|
|
179
179
|
end
|
|
180
180
|
|
|
181
181
|
# Create a conversion destination
|
|
182
|
-
# Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta
|
|
182
|
+
# Create a new conversion destination on the platform. Supported for LinkedIn (conversion rule) and Google Ads (conversion action). Meta and OpenAI Ads pixels are created via their own tracking-tags flow instead (`POST /v1/accounts/{accountId}/tracking-tags`); this endpoint returns 405 for both. **LinkedIn:** creation is NOT idempotent. A retry creates a second destination. Deduplicate before retrying. **Google Ads:** calling with a name that already exists reuses the existing conversion action transparently (the response is identical to a fresh create). Calling with the same name but a different category returns a typed `IDEMPOTENCY_CONFLICT` (409) rather than silently returning the mismatched action. **LinkedIn:** the rule is created with `conversionMethod=CONVERSIONS_API` and (by default) auto-associated with all of the ad account's campaigns via `autoAssociationType=ALL_CAMPAIGNS`. Pass `autoAssociationType: NONE` to opt out and manage associations explicitly via the associations endpoints below. 365-day attribution windows are only valid for `SUBMIT_APPLICATION`, `PURCHASE`, `ADD_TO_CART`, `QUALIFIED_LEAD`, and `LEAD` rule types; the API rejects other combinations locally. **Google Ads:** the conversion action is created with `type=UPLOAD_CLICKS` (required for API-uploaded offline conversions, immutable after creation). The `type` field carries the Google `ConversionActionCategory` enum value, e.g. `PURCHASE`, `SUBSCRIBE_PAID`, `SIGNUP`, `IMPORTED_LEAD`, `BOOK_APPOINTMENT`. Unified standard event names (e.g. `Purchase`, `Subscribe`, `CompleteRegistration`, `Lead`, `Schedule`) are resolved to their Google category equivalents automatically. The action defaults to secondary (non-primary) to avoid immediately steering Smart Bidding; pass `primaryForGoal: true` to opt in.
|
|
183
183
|
# @param account_id [String] SocialAccount ID (linkedinads or googleads).
|
|
184
184
|
# @param create_conversion_destination_request [CreateConversionDestinationRequest]
|
|
185
185
|
# @param [Hash] opts the optional parameters
|
|
@@ -640,8 +640,8 @@ module Zernio
|
|
|
640
640
|
end
|
|
641
641
|
|
|
642
642
|
# List conversion destinations
|
|
643
|
-
# Returns the list of pixels (Meta), conversion actions (Google),
|
|
644
|
-
# @param account_id [String] SocialAccount ID (metaads, googleads, linkedinads, or
|
|
643
|
+
# Returns the list of pixels (Meta), conversion actions (Google), conversion rules (LinkedIn), or pixels (OpenAI Ads) accessible to the connected ads account. Use the returned `id` as `destinationId` when posting to `POST /v1/ads/conversions`. For Google and LinkedIn, each destination's `type` reflects the conversion type (PURCHASE, LEAD, SIGN_UP, etc.) — the event type is locked to the destination. For Meta and OpenAI Ads, `type` is absent: pixels accept any event name per request. For LinkedIn, destinations are returned across every sponsored ad account the connected token can access; the `adAccountId` field on each destination identifies the parent ad account and is required for subsequent CRUD calls (update, delete, associations, metrics).
|
|
644
|
+
# @param account_id [String] SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
|
|
645
645
|
# @param [Hash] opts the optional parameters
|
|
646
646
|
# @return [ListConversionDestinations200Response]
|
|
647
647
|
def list_conversion_destinations(account_id, opts = {})
|
|
@@ -650,8 +650,8 @@ module Zernio
|
|
|
650
650
|
end
|
|
651
651
|
|
|
652
652
|
# List conversion destinations
|
|
653
|
-
# Returns the list of pixels (Meta), conversion actions (Google),
|
|
654
|
-
# @param account_id [String] SocialAccount ID (metaads, googleads, linkedinads, or
|
|
653
|
+
# Returns the list of pixels (Meta), conversion actions (Google), conversion rules (LinkedIn), or pixels (OpenAI Ads) accessible to the connected ads account. Use the returned `id` as `destinationId` when posting to `POST /v1/ads/conversions`. For Google and LinkedIn, each destination's `type` reflects the conversion type (PURCHASE, LEAD, SIGN_UP, etc.) — the event type is locked to the destination. For Meta and OpenAI Ads, `type` is absent: pixels accept any event name per request. For LinkedIn, destinations are returned across every sponsored ad account the connected token can access; the `adAccountId` field on each destination identifies the parent ad account and is required for subsequent CRUD calls (update, delete, associations, metrics).
|
|
654
|
+
# @param account_id [String] SocialAccount ID (metaads, googleads, linkedinads, tiktokads, or openaiads).
|
|
655
655
|
# @param [Hash] opts the optional parameters
|
|
656
656
|
# @return [Array<(ListConversionDestinations200Response, Integer, Hash)>] ListConversionDestinations200Response data, response status code and response headers
|
|
657
657
|
def list_conversion_destinations_with_http_info(account_id, opts = {})
|
|
@@ -786,7 +786,7 @@ module Zernio
|
|
|
786
786
|
end
|
|
787
787
|
|
|
788
788
|
# Send conversion events
|
|
789
|
-
# Relay one or more conversion events to the target ad platform's native Conversions API. Platform is inferred from the provided `accountId`. Requires the Ads add-on. Supported platforms: - Meta (`metaads`) via Graph API - Google Ads (`googleads`) via Data Manager API `ingestEvents` - LinkedIn (`linkedinads`) via `/rest/conversionEvents` - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` — OFFLINE conversions only `destinationId` semantics differ per platform: - Meta: pixel (dataset) ID, e.g. `123456789012345` - Google: conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012` - TikTok: Offline Event Set ID, e.g. `7057103914977558530` TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one). The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect. Callers can list valid destinations via `GET /v1/accounts/{accountId}/conversion-destinations`. All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext. LinkedIn `externalIds` are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed. For LinkedIn, the connected account must have been authorized after the Conversions API rollout (i.e. the OAuth grant must include `rw_conversions`). Older accounts must reconnect. Batching is handled automatically. Meta caps at 1000 events per request and rejects the entire batch if any event is malformed. Google caps at 2000. LinkedIn caps at 5000 and is also all-or-nothing per chunk. Dedup: pass a stable `eventId` on every event. Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events; Google maps it to `transactionId`. Per-platform `eventName` semantics: - Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted. - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it. - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it.
|
|
789
|
+
# Relay one or more conversion events to the target ad platform's native Conversions API. Platform is inferred from the provided `accountId`. Requires the Ads add-on. Supported platforms: - Meta (`metaads`) via Graph API - Google Ads (`googleads`) via Data Manager API `ingestEvents` - LinkedIn (`linkedinads`) via `/rest/conversionEvents` - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` — OFFLINE conversions only - OpenAI Ads (`openaiads`) via its Conversions API (a separate host, `bzr.openai.com`) `destinationId` semantics differ per platform: - Meta: pixel (dataset) ID, e.g. `123456789012345` - Google: conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012` - TikTok: Offline Event Set ID, e.g. `7057103914977558530` - OpenAI Ads: pixel wire id (numeric `pixel_id`, distinct from the internal pixel id), as returned by `GET /v1/accounts/{accountId}/conversion-destinations` TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one). The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect. OpenAI Ads notes: requires a tracking tag (pixel) to already exist on the account — returns 422 with code `TRACKING_TAG_REQUIRED` if `POST /v1/accounts/{accountId}/tracking-tags` hasn't been called yet. Callers can list valid destinations via `GET /v1/accounts/{accountId}/conversion-destinations`. All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext. LinkedIn `externalIds` are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed. For LinkedIn, the connected account must have been authorized after the Conversions API rollout (i.e. the OAuth grant must include `rw_conversions`). Older accounts must reconnect. Batching is handled automatically. Meta caps at 1000 events per request and rejects the entire batch if any event is malformed. Google caps at 2000. LinkedIn caps at 5000 and is also all-or-nothing per chunk. OpenAI Ads caps at 1000 per request; larger submissions are split into 1000-event chunks, each all-or-nothing (a malformed event fails every event in that chunk, not the whole request). Dedup: pass a stable `eventId` on every event. Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events; Google maps it to `transactionId`. Per-platform `eventName` semantics: - Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted. - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it. - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it. - OpenAI Ads: a fixed subset of standard names (Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule) maps 1:1 onto OpenAI's own event-type enum; any other standard name or custom string is sent as `type: custom` with the name preserved.
|
|
790
790
|
# @param send_conversions_request [SendConversionsRequest]
|
|
791
791
|
# @param [Hash] opts the optional parameters
|
|
792
792
|
# @return [SendConversions200Response]
|
|
@@ -796,7 +796,7 @@ module Zernio
|
|
|
796
796
|
end
|
|
797
797
|
|
|
798
798
|
# Send conversion events
|
|
799
|
-
# Relay one or more conversion events to the target ad platform's native Conversions API. Platform is inferred from the provided `accountId`. Requires the Ads add-on. Supported platforms: - Meta (`metaads`) via Graph API - Google Ads (`googleads`) via Data Manager API `ingestEvents` - LinkedIn (`linkedinads`) via `/rest/conversionEvents` - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` — OFFLINE conversions only `destinationId` semantics differ per platform: - Meta: pixel (dataset) ID, e.g. `123456789012345` - Google: conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012` - TikTok: Offline Event Set ID, e.g. `7057103914977558530` TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one). The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect. Callers can list valid destinations via `GET /v1/accounts/{accountId}/conversion-destinations`. All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext. LinkedIn `externalIds` are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed. For LinkedIn, the connected account must have been authorized after the Conversions API rollout (i.e. the OAuth grant must include `rw_conversions`). Older accounts must reconnect. Batching is handled automatically. Meta caps at 1000 events per request and rejects the entire batch if any event is malformed. Google caps at 2000. LinkedIn caps at 5000 and is also all-or-nothing per chunk. Dedup: pass a stable `eventId` on every event. Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events; Google maps it to `transactionId`. Per-platform `eventName` semantics: - Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted. - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it. - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it.
|
|
799
|
+
# Relay one or more conversion events to the target ad platform's native Conversions API. Platform is inferred from the provided `accountId`. Requires the Ads add-on. Supported platforms: - Meta (`metaads`) via Graph API - Google Ads (`googleads`) via Data Manager API `ingestEvents` - LinkedIn (`linkedinads`) via `/rest/conversionEvents` - TikTok (`tiktokads`) via the Offline Events API `/offline/batch/` — OFFLINE conversions only - OpenAI Ads (`openaiads`) via its Conversions API (a separate host, `bzr.openai.com`) `destinationId` semantics differ per platform: - Meta: pixel (dataset) ID, e.g. `123456789012345` - Google: conversion action resource name, e.g. `customers/1234567890/conversionActions/987654321` - LinkedIn: conversion rule ID or URN, e.g. `104012` or `urn:lla:llaPartnerConversion:104012` - TikTok: Offline Event Set ID, e.g. `7057103914977558530` - OpenAI Ads: pixel wire id (numeric `pixel_id`, distinct from the internal pixel id), as returned by `GET /v1/accounts/{accountId}/conversion-destinations` TikTok notes: this path sends OFFLINE conversions (in-store / CRM / call-center), not web-pixel events. Each event must carry an email or phone (TikTok requires at least one). The connected TikTok ads account must have granted the Offline Events permission; older grants must reconnect. OpenAI Ads notes: requires a tracking tag (pixel) to already exist on the account — returns 422 with code `TRACKING_TAG_REQUIRED` if `POST /v1/accounts/{accountId}/tracking-tags` hasn't been called yet. Callers can list valid destinations via `GET /v1/accounts/{accountId}/conversion-destinations`. All PII (email, phone, names, external IDs) is hashed with SHA-256 server-side per each platform's normalization spec, including Google's Gmail-specific dot/plus-suffix stripping. Send plaintext. LinkedIn `externalIds` are passed through as plaintext per LinkedIn's spec; only emails and phones are hashed. For LinkedIn, the connected account must have been authorized after the Conversions API rollout (i.e. the OAuth grant must include `rw_conversions`). Older accounts must reconnect. Batching is handled automatically. Meta caps at 1000 events per request and rejects the entire batch if any event is malformed. Google caps at 2000. LinkedIn caps at 5000 and is also all-or-nothing per chunk. OpenAI Ads caps at 1000 per request; larger submissions are split into 1000-event chunks, each all-or-nothing (a malformed event fails every event in that chunk, not the whole request). Dedup: pass a stable `eventId` on every event. Meta and LinkedIn use it to dedupe against browser-side pixel/Insight Tag events; Google maps it to `transactionId`. Per-platform `eventName` semantics: - Meta: free-form. Standard names (Purchase, Lead, ...) match Meta's built-in events; custom strings are accepted. - Google: ignored. The conversion action's category determines the event type. Send the standard name closest to your action for documentation, but the platform will not branch on it. - LinkedIn: ignored. The conversion rule's `type` (LEAD, PURCHASE, etc.) is locked to the destination at rule-creation time. Send the standard name for documentation; LinkedIn does not branch on it. - OpenAI Ads: a fixed subset of standard names (Purchase, Lead, AddToCart, ViewContent, InitiateCheckout, CompleteRegistration, Subscribe, StartTrial, Schedule) maps 1:1 onto OpenAI's own event-type enum; any other standard name or custom string is sent as `type: custom` with the name preserved.
|
|
800
800
|
# @param send_conversions_request [SendConversionsRequest]
|
|
801
801
|
# @param [Hash] opts the optional parameters
|
|
802
802
|
# @return [Array<(SendConversions200Response, Integer, Hash)>] SendConversions200Response data, response status code and response headers
|
|
@@ -100,8 +100,8 @@ module Zernio
|
|
|
100
100
|
end
|
|
101
101
|
|
|
102
102
|
# Create a tracking tag
|
|
103
|
-
#
|
|
104
|
-
# @param account_id [String]
|
|
103
|
+
# 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.
|
|
104
|
+
# @param account_id [String] Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
105
105
|
# @param create_tracking_tag_request [CreateTrackingTagRequest]
|
|
106
106
|
# @param [Hash] opts the optional parameters
|
|
107
107
|
# @return [CreateTrackingTag201Response]
|
|
@@ -111,8 +111,8 @@ module Zernio
|
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
# Create a tracking tag
|
|
114
|
-
#
|
|
115
|
-
# @param account_id [String]
|
|
114
|
+
# 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.
|
|
115
|
+
# @param account_id [String] Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
116
116
|
# @param create_tracking_tag_request [CreateTrackingTagRequest]
|
|
117
117
|
# @param [Hash] opts the optional parameters
|
|
118
118
|
# @return [Array<(CreateTrackingTag201Response, Integer, Hash)>] CreateTrackingTag201Response data, response status code and response headers
|
|
@@ -237,22 +237,22 @@ module Zernio
|
|
|
237
237
|
end
|
|
238
238
|
|
|
239
239
|
# Get a tracking tag
|
|
240
|
-
# Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405.
|
|
240
|
+
# Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405. OpenAI Ads has no get-by-id endpoint, so it 405s here too — use `GET /v1/accounts/{accountId}/tracking-tags` (list) instead.
|
|
241
241
|
# @param account_id [String]
|
|
242
242
|
# @param tag_id [String] Pixel id.
|
|
243
243
|
# @param [Hash] opts the optional parameters
|
|
244
|
-
# @return [
|
|
244
|
+
# @return [GetTrackingTag200Response]
|
|
245
245
|
def get_tracking_tag(account_id, tag_id, opts = {})
|
|
246
246
|
data, _status_code, _headers = get_tracking_tag_with_http_info(account_id, tag_id, opts)
|
|
247
247
|
data
|
|
248
248
|
end
|
|
249
249
|
|
|
250
250
|
# Get a tracking tag
|
|
251
|
-
# Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405.
|
|
251
|
+
# Returns the full tag record including the base-code `code` snippet, `lastFiredTime`, `ownerBusinessId`, `isUnavailable`, etc. Meta only (platform `metaads`); other platforms return 405. OpenAI Ads has no get-by-id endpoint, so it 405s here too — use `GET /v1/accounts/{accountId}/tracking-tags` (list) instead.
|
|
252
252
|
# @param account_id [String]
|
|
253
253
|
# @param tag_id [String] Pixel id.
|
|
254
254
|
# @param [Hash] opts the optional parameters
|
|
255
|
-
# @return [Array<(
|
|
255
|
+
# @return [Array<(GetTrackingTag200Response, Integer, Hash)>] GetTrackingTag200Response data, response status code and response headers
|
|
256
256
|
def get_tracking_tag_with_http_info(account_id, tag_id, opts = {})
|
|
257
257
|
if @api_client.config.debugging
|
|
258
258
|
@api_client.config.logger.debug 'Calling API: TrackingTagsApi.get_tracking_tag ...'
|
|
@@ -283,7 +283,7 @@ module Zernio
|
|
|
283
283
|
post_body = opts[:debug_body]
|
|
284
284
|
|
|
285
285
|
# return_type
|
|
286
|
-
return_type = opts[:debug_return_type] || '
|
|
286
|
+
return_type = opts[:debug_return_type] || 'GetTrackingTag200Response'
|
|
287
287
|
|
|
288
288
|
# auth_names
|
|
289
289
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -457,10 +457,10 @@ module Zernio
|
|
|
457
457
|
end
|
|
458
458
|
|
|
459
459
|
# List tracking tags
|
|
460
|
-
# Returns the tracking tags (Meta Pixels) the connected ads account can see. Pass `?adAccountId=act_...` to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail
|
|
461
|
-
# @param account_id [String]
|
|
460
|
+
# Returns the tracking tags (Meta Pixels, or OpenAI Ads pixels) the connected ads account can see. Pass `?adAccountId=act_...` (Meta only) to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail (Meta only; OpenAI Ads has no get-by-id endpoint). Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405. The `accountId` must be the ads SocialAccount created by the Ads add-on connect flow (Meta) or the OpenAI Ads connect flow, not a Facebook/Instagram posting account. Get your Meta `act_...` ids from `GET /v1/ads/accounts`; `adAccountId` is ignored for OpenAI Ads (one API key maps to exactly one ad account).
|
|
461
|
+
# @param account_id [String] Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
462
462
|
# @param [Hash] opts the optional parameters
|
|
463
|
-
# @option opts [String] :ad_account_id Optional. Scope to one ad account, e.g. `act_123456789`.
|
|
463
|
+
# @option opts [String] :ad_account_id Optional, Meta only. Scope to one ad account, e.g. `act_123456789`. Ignored for OpenAI Ads.
|
|
464
464
|
# @return [ListTrackingTags200Response]
|
|
465
465
|
def list_tracking_tags(account_id, opts = {})
|
|
466
466
|
data, _status_code, _headers = list_tracking_tags_with_http_info(account_id, opts)
|
|
@@ -468,10 +468,10 @@ module Zernio
|
|
|
468
468
|
end
|
|
469
469
|
|
|
470
470
|
# List tracking tags
|
|
471
|
-
# Returns the tracking tags (Meta Pixels) the connected ads account can see. Pass `?adAccountId=act_...` to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail
|
|
472
|
-
# @param account_id [String]
|
|
471
|
+
# Returns the tracking tags (Meta Pixels, or OpenAI Ads pixels) the connected ads account can see. Pass `?adAccountId=act_...` (Meta only) to scope the list to a single ad account; omit it to list every pixel reachable by the token (the name is then suffixed with the ad account it was discovered on, for disambiguation). The list view omits `code` — call `getTrackingTag` for the install snippet and full detail (Meta only; OpenAI Ads has no get-by-id endpoint). Meta (platform `metaads`) and OpenAI Ads (platform `openaiads`); other platforms return 405. The `accountId` must be the ads SocialAccount created by the Ads add-on connect flow (Meta) or the OpenAI Ads connect flow, not a Facebook/Instagram posting account. Get your Meta `act_...` ids from `GET /v1/ads/accounts`; `adAccountId` is ignored for OpenAI Ads (one API key maps to exactly one ad account).
|
|
472
|
+
# @param account_id [String] Ads SocialAccount id (platform `metaads` or `openaiads`).
|
|
473
473
|
# @param [Hash] opts the optional parameters
|
|
474
|
-
# @option opts [String] :ad_account_id Optional. Scope to one ad account, e.g. `act_123456789`.
|
|
474
|
+
# @option opts [String] :ad_account_id Optional, Meta only. Scope to one ad account, e.g. `act_123456789`. Ignored for OpenAI Ads.
|
|
475
475
|
# @return [Array<(ListTrackingTags200Response, Integer, Hash)>] ListTrackingTags200Response data, response status code and response headers
|
|
476
476
|
def list_tracking_tags_with_http_info(account_id, opts = {})
|
|
477
477
|
if @api_client.config.debugging
|
|
@@ -674,7 +674,7 @@ module Zernio
|
|
|
674
674
|
# @param tag_id [String] Pixel id.
|
|
675
675
|
# @param update_tracking_tag_request [UpdateTrackingTagRequest]
|
|
676
676
|
# @param [Hash] opts the optional parameters
|
|
677
|
-
# @return [
|
|
677
|
+
# @return [GetTrackingTag200Response]
|
|
678
678
|
def update_tracking_tag(account_id, tag_id, update_tracking_tag_request, opts = {})
|
|
679
679
|
data, _status_code, _headers = update_tracking_tag_with_http_info(account_id, tag_id, update_tracking_tag_request, opts)
|
|
680
680
|
data
|
|
@@ -686,7 +686,7 @@ module Zernio
|
|
|
686
686
|
# @param tag_id [String] Pixel id.
|
|
687
687
|
# @param update_tracking_tag_request [UpdateTrackingTagRequest]
|
|
688
688
|
# @param [Hash] opts the optional parameters
|
|
689
|
-
# @return [Array<(
|
|
689
|
+
# @return [Array<(GetTrackingTag200Response, Integer, Hash)>] GetTrackingTag200Response data, response status code and response headers
|
|
690
690
|
def update_tracking_tag_with_http_info(account_id, tag_id, update_tracking_tag_request, opts = {})
|
|
691
691
|
if @api_client.config.debugging
|
|
692
692
|
@api_client.config.logger.debug 'Calling API: TrackingTagsApi.update_tracking_tag ...'
|
|
@@ -726,7 +726,7 @@ module Zernio
|
|
|
726
726
|
post_body = opts[:debug_body] || @api_client.object_to_http_body(update_tracking_tag_request)
|
|
727
727
|
|
|
728
728
|
# return_type
|
|
729
|
-
return_type = opts[:debug_return_type] || '
|
|
729
|
+
return_type = opts[:debug_return_type] || 'GetTrackingTag200Response'
|
|
730
730
|
|
|
731
731
|
# auth_names
|
|
732
732
|
auth_names = opts[:debug_auth_names] || ['bearerAuth']
|
|
@@ -299,7 +299,7 @@ module Zernio
|
|
|
299
299
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
300
300
|
return false if @_id.nil?
|
|
301
301
|
return false if @platform.nil?
|
|
302
|
-
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
|
|
302
|
+
platform_validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
|
|
303
303
|
return false unless platform_validator.valid?(@platform)
|
|
304
304
|
return false if @profile_id.nil?
|
|
305
305
|
return false if @is_active.nil?
|
|
@@ -319,7 +319,7 @@ module Zernio
|
|
|
319
319
|
# Custom attribute writer method checking allowed values (enum).
|
|
320
320
|
# @param [Object] platform Object to be assigned
|
|
321
321
|
def platform=(platform)
|
|
322
|
-
validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads"])
|
|
322
|
+
validator = EnumAttributeValidator.new('String', ["tiktok", "instagram", "facebook", "youtube", "linkedin", "twitter", "threads", "pinterest", "reddit", "bluesky", "googlebusiness", "telegram", "snapchat", "discord", "whatsapp", "linkedinads", "metaads", "pinterestads", "tiktokads", "xads", "googleads", "openaiads"])
|
|
323
323
|
unless validator.valid?(platform)
|
|
324
324
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
325
325
|
end
|
data/lib/zernio-sdk/models/ad.rb
CHANGED
|
@@ -343,7 +343,7 @@ module Zernio
|
|
|
343
343
|
# @return true if the model is valid
|
|
344
344
|
def valid?
|
|
345
345
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
346
|
-
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
346
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
347
347
|
return false unless platform_validator.valid?(@platform)
|
|
348
348
|
ad_type_validator = EnumAttributeValidator.new('String', ["boost", "standalone"])
|
|
349
349
|
return false unless ad_type_validator.valid?(@ad_type)
|
|
@@ -355,7 +355,7 @@ module Zernio
|
|
|
355
355
|
# Custom attribute writer method checking allowed values (enum).
|
|
356
356
|
# @param [Object] platform Object to be assigned
|
|
357
357
|
def platform=(platform)
|
|
358
|
-
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
358
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
359
359
|
unless validator.valid?(platform)
|
|
360
360
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
361
361
|
end
|
|
@@ -339,7 +339,7 @@ module Zernio
|
|
|
339
339
|
# @return true if the model is valid
|
|
340
340
|
def valid?
|
|
341
341
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
342
|
-
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
342
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
343
343
|
return false unless platform_validator.valid?(@platform)
|
|
344
344
|
review_status_validator = EnumAttributeValidator.new('String', ["in_review", "approved", "rejected", "with_issues"])
|
|
345
345
|
return false unless review_status_validator.valid?(@review_status)
|
|
@@ -351,7 +351,7 @@ module Zernio
|
|
|
351
351
|
# Custom attribute writer method checking allowed values (enum).
|
|
352
352
|
# @param [Object] platform Object to be assigned
|
|
353
353
|
def platform=(platform)
|
|
354
|
-
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
354
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
355
355
|
unless validator.valid?(platform)
|
|
356
356
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
357
357
|
end
|
|
@@ -354,7 +354,7 @@ module Zernio
|
|
|
354
354
|
# @return true if the model is valid
|
|
355
355
|
def valid?
|
|
356
356
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
357
|
-
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
357
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
358
358
|
return false unless platform_validator.valid?(@platform)
|
|
359
359
|
review_status_validator = EnumAttributeValidator.new('String', ["in_review", "approved", "rejected", "with_issues"])
|
|
360
360
|
return false unless review_status_validator.valid?(@review_status)
|
|
@@ -366,7 +366,7 @@ module Zernio
|
|
|
366
366
|
# Custom attribute writer method checking allowed values (enum).
|
|
367
367
|
# @param [Object] platform Object to be assigned
|
|
368
368
|
def platform=(platform)
|
|
369
|
-
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
369
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
370
370
|
unless validator.valid?(platform)
|
|
371
371
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
372
372
|
end
|
|
@@ -124,7 +124,7 @@ module Zernio
|
|
|
124
124
|
warn '[DEPRECATED] the `valid?` method is obsolete'
|
|
125
125
|
return false if @platform_campaign_id.nil?
|
|
126
126
|
return false if @platform.nil?
|
|
127
|
-
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
127
|
+
platform_validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
128
128
|
return false unless platform_validator.valid?(@platform)
|
|
129
129
|
true
|
|
130
130
|
end
|
|
@@ -142,7 +142,7 @@ module Zernio
|
|
|
142
142
|
# Custom attribute writer method checking allowed values (enum).
|
|
143
143
|
# @param [Object] platform Object to be assigned
|
|
144
144
|
def platform=(platform)
|
|
145
|
-
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter"])
|
|
145
|
+
validator = EnumAttributeValidator.new('String', ["facebook", "instagram", "tiktok", "linkedin", "pinterest", "google", "twitter", "openai"])
|
|
146
146
|
unless validator.valid?(platform)
|
|
147
147
|
fail ArgumentError, "invalid value for \"platform\", must be one of #{validator.allowable_values}."
|
|
148
148
|
end
|