late-sdk 0.0.678 → 0.0.680
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/AccountWithFollowerStats.md +1 -1
- data/docs/CreateStandaloneAdRequest.md +1 -1
- data/docs/CreateStandaloneAdRequestPromotedObject.md +2 -0
- data/docs/SocialAccount.md +1 -1
- data/docs/UpdateAdSetRequestPlatformSpecificDataPromotedObject.md +2 -0
- data/lib/zernio-sdk/models/account_with_follower_stats.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +1 -1
- data/lib/zernio-sdk/models/create_standalone_ad_request_promoted_object.rb +12 -2
- data/lib/zernio-sdk/models/social_account.rb +1 -1
- data/lib/zernio-sdk/models/update_ad_set_request_platform_specific_data_promoted_object.rb +11 -1
- data/lib/zernio-sdk/version.rb +1 -1
- data/openapi.yaml +17 -2
- data/spec/models/create_standalone_ad_request_promoted_object_spec.rb +6 -0
- data/spec/models/update_ad_set_request_platform_specific_data_promoted_object_spec.rb +6 -0
- data/zernio-sdk-0.0.680.gem +0 -0
- metadata +1560 -1560
- data/zernio-sdk-0.0.678.gem +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7192b40ba2d723418ab7b3bec05c108b7f7f1f9dbdded7085d814ea8461abb86
|
|
4
|
+
data.tar.gz: 46f41c0d6c8310ddddde2f35cd67537a077b6f9736b96802033cfedf1b1a36e7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6e6587c8536d1a40b17c78b74393d0506f687e243ef20eadaf346accea7b13d66d9ee71ab7a05b90f6d5df5a22720bdbf2f6fa4b316ff0590fcfadfee8782e50
|
|
7
|
+
data.tar.gz: e6a22768fc8d1bc8b5de383d035816bc1bcc8ad89a4e000da619b6c53b83c74ac42c79d340e16dc4a15777e863758f0e9416150cdc31414bd5ca8dc84e554a6f
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| **followers_last_updated** | **Time** | Last time follower count was updated (only included if user has analytics add-on) | [optional] |
|
|
18
18
|
| **parent_account_id** | **String** | Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account's OAuth token. null for standalone ads (Google Ads) and all posting accounts. | [optional] |
|
|
19
19
|
| **enabled** | **Boolean** | Whether the user explicitly activated this account. false means the account was created as a side effect (e.g., posting account auto-created when user connected ads first). Posting UI and scheduler ignore accounts with enabled: false. | [optional] |
|
|
20
|
-
| **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID | [optional] |
|
|
20
|
+
| **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot: - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one. - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName. | [optional] |
|
|
21
21
|
| **current_followers** | **Float** | Current follower count | [optional] |
|
|
22
22
|
| **last_updated** | **Time** | | [optional] |
|
|
23
23
|
| **growth** | **Float** | Follower change over period | [optional] |
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
| **ad_set_name** | **String** | Meta only. Exact ad set name. Overrides the default `<name> - Ad Set`. (For per-ad names on the multi-creative shape, set `name` on each `creatives[]` entry.) | [optional] |
|
|
12
12
|
| **ad_name** | **String** | Meta only. Exact ad name (the single-creative ad object's name). Overrides the default, which is `name`. (For per-ad names on the multi-creative shape, set `name` on each `creatives[]` entry instead.) | [optional] |
|
|
13
13
|
| **tracking** | [**CreateStandaloneAdRequestTracking**](CreateStandaloneAdRequestTracking.md) | | [optional] |
|
|
14
|
-
| **goal** | **String** | Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion
|
|
14
|
+
| **goal** | **String** | Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or `promotedObject.customConversionId` to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets. **TikTok** - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead. **LinkedIn** - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `job_applicants` requires a `platformSpecificData.jobs` creative. - For `lead_generation` or `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. **OpenAI Ads** - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422. | [optional] |
|
|
15
15
|
| **optimization_goal** | **String** | Meta only. Explicit ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`). Overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations. | [optional] |
|
|
16
16
|
| **billing_event** | **String** | Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal. | [optional] |
|
|
17
17
|
| **buying_type** | **String** | Meta only. RESERVED = Reach & Frequency: requires `rfPredictionId` (a RESERVED prediction from /v1/ads/rf-predictions + /reserve). Budget, schedule and pricing come from the reservation, so budgetAmount/budgetType are not required and bid fields are ignored. Only the plain single-ad shape (no creatives[], adSetId, existingCampaignId or dynamicCreative). | [optional] |
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **pixel_id** | **String** | Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`. **TikTok:** TikTok Pixel ID, required for `goal: conversions`. To discover the pixels an ad account can use, call `GET /v1/accounts/{accountId}/tracking-tags?adAccountId=act_...` (each entry carries `kind` and `ownerAdAccountId`), or `GET /v1/accounts/{accountId}/conversion-destinations`. Note this is a different resource from `GET /v1/ads/{adId}/tracking-tags`, which reads an ad's click-URL params (`url_tags`), not pixels. | [optional] |
|
|
8
8
|
| **custom_event_type** | **String** | The event the campaign/ad group optimises against. **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`, `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required for `goal: conversions`. **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary and not PascalCase), OR the exact event name shown in TikTok Events Manager (auto-resolved to its code). Must be one of the event types your TikTok Pixel tracks; custom events are not optimizable. Current taxonomy: `SHOPPING` (Purchase), `ON_WEB_CART` (Add to Cart), `INITIATE_ORDER` (Initiate Checkout), `FORM` (Lead), `ON_WEB_REGISTER` (Complete Registration), `ON_WEB_DETAIL` (View Content). `ON_WEB_ORDER` is deprecated. On rejection the error lists the event types your pixel actually tracks. Optional for `goal: conversions`. | [optional] |
|
|
9
|
+
| **custom_event_str** | **String** | Meta only. Pixel custom-event name to optimise against (Meta's `custom_event_str`), exactly as it appears in Events Manager and in your CAPI payloads (case-sensitive, not uppercased). Requires `customEventType: OTHER`, and `OTHER` requires this field (400 either way). The same as picking a custom event in Ads Manager's conversion-event dropdown. For rule-based Custom Conversions use `customConversionId` instead. | [optional] |
|
|
9
10
|
| **page_id** | **String** | Facebook Page ID. Used by `goal: lead_generation`. Auto-filled from the connected Page when omitted. | [optional] |
|
|
10
11
|
| **application_id** | **String** | App ID. Required for `goal: app_promotion`. | [optional] |
|
|
11
12
|
| **object_store_url** | **String** | App Store / Play Store listing URL. Required for `goal: app_promotion`. | [optional] |
|
|
@@ -23,6 +24,7 @@ require 'zernio-sdk'
|
|
|
23
24
|
instance = Zernio::CreateStandaloneAdRequestPromotedObject.new(
|
|
24
25
|
pixel_id: null,
|
|
25
26
|
custom_event_type: null,
|
|
27
|
+
custom_event_str: null,
|
|
26
28
|
page_id: null,
|
|
27
29
|
application_id: null,
|
|
28
30
|
object_store_url: null,
|
data/docs/SocialAccount.md
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
| **followers_last_updated** | **Time** | Last time follower count was updated (only included if user has analytics add-on) | [optional] |
|
|
18
18
|
| **parent_account_id** | **String** | Reference to the parent posting SocialAccount. Set for ads accounts that share or derive from a posting account's OAuth token. null for standalone ads (Google Ads) and all posting accounts. | [optional] |
|
|
19
19
|
| **enabled** | **Boolean** | Whether the user explicitly activated this account. false means the account was created as a side effect (e.g., posting account auto-created when user connected ads first). Posting UI and scheduler ignore accounts with enabled: false. | [optional] |
|
|
20
|
-
| **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID | [optional] |
|
|
20
|
+
| **metadata** | **Object** | Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot: - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one. - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName. | [optional] |
|
|
21
21
|
|
|
22
22
|
## Example
|
|
23
23
|
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
| ---- | ---- | ----------- | ----- |
|
|
7
7
|
| **pixel_id** | **String** | | [optional] |
|
|
8
8
|
| **custom_event_type** | **String** | | [optional] |
|
|
9
|
+
| **custom_event_str** | **String** | Pixel custom-event name (custom_event_str); requires customEventType OTHER. Same pairing rules as /v1/ads/create. | [optional] |
|
|
9
10
|
| **page_id** | **String** | | [optional] |
|
|
10
11
|
| **application_id** | **String** | | [optional] |
|
|
11
12
|
| **object_store_url** | **String** | | [optional] |
|
|
@@ -23,6 +24,7 @@ require 'zernio-sdk'
|
|
|
23
24
|
instance = Zernio::UpdateAdSetRequestPlatformSpecificDataPromotedObject.new(
|
|
24
25
|
pixel_id: null,
|
|
25
26
|
custom_event_type: null,
|
|
27
|
+
custom_event_str: null,
|
|
26
28
|
page_id: null,
|
|
27
29
|
application_id: null,
|
|
28
30
|
object_store_url: null,
|
|
@@ -48,7 +48,7 @@ module Zernio
|
|
|
48
48
|
# Whether the user explicitly activated this account. false means the account was created as a side effect (e.g., posting account auto-created when user connected ads first). Posting UI and scheduler ignore accounts with enabled: false.
|
|
49
49
|
attr_accessor :enabled
|
|
50
50
|
|
|
51
|
-
# Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID
|
|
51
|
+
# Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot: - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one. - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName.
|
|
52
52
|
attr_accessor :metadata
|
|
53
53
|
|
|
54
54
|
# Current follower count
|
|
@@ -32,7 +32,7 @@ module Zernio
|
|
|
32
32
|
|
|
33
33
|
attr_accessor :tracking
|
|
34
34
|
|
|
35
|
-
# Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion
|
|
35
|
+
# Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform. **Meta** - `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event. - `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or `promotedObject.customConversionId` to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under `conversions`. - `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page. - `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`. - `catalog_sales`: Advantage+ catalog ads, for example vehicle inventory. Requires `promotedObject.productSetId`, `promotedObject.pixelId` and `promotedObject.customEventType`. Builds a catalog TEMPLATE creative from the copy fields, which may carry template tags like {{product.name}} or {{vehicle.make}}. No imageUrl or video is sent; Meta renders the visuals per catalog item. Discover catalogs via GET /v1/ads/catalogs and product sets via GET /v1/ads/catalogs/{catalogId}/product-sets. Single shape only, no creatives[], adSetId, dynamicCreative or placementAssets. **TikTok** - `conversions`: website-conversion ad group. Requires `promotedObject.pixelId`, your TikTok Pixel ID. Accepts an optional `promotedObject.customEventType` with a TikTok optimization_event code your pixel tracks (newer pixels use e.g. SHOPPING for purchase events; legacy pixels use ON_WEB_ORDER, INITIATE_ORDER, ON_WEB_REGISTER or FORM). To inherit pixel and event from an existing ad group, pass `adSetId` instead. **LinkedIn** - `engagement`, `traffic`, `awareness` and `video_views` create standalone Direct Sponsored Content ads. `traffic` requires `linkUrl`; `video_views` requires `video`. - `job_applicants` requires a `platformSpecificData.jobs` creative. - For `lead_generation` or `conversions` on LinkedIn, or to promote an existing post, use POST /v1/ads/boost. **OpenAI Ads** - Only `traffic`, `awareness`, and `conversions` are supported (other goals return 400). Maps to OpenAI's `bidding_type` (clicks, impressions, conversions respectively). `conversions` requires an active conversion event setting on the account; create a tracking tag with `defaultEventType` via the tracking-tags API (`POST /v1/accounts/{accountId}/tracking-tags`), or configure a conversion event in OpenAI Ads Manager, or the request returns 422.
|
|
36
36
|
attr_accessor :goal
|
|
37
37
|
|
|
38
38
|
# Meta only. Explicit ad-set `optimization_goal` (e.g. `LANDING_PAGE_VIEWS`, `LINK_CLICKS`, `REACH`, `IMPRESSIONS`, `OFFSITE_CONVERSIONS`, `THRUPLAY`, `LEAD_GENERATION`). Overrides the default derived from `goal` (e.g. `traffic` defaults to `LINK_CLICKS`). Forwarded verbatim to Meta, which validates compatibility with the campaign objective and rejects incompatible combinations.
|
|
@@ -14,7 +14,7 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# What the ad optimises against. Behaviour depends on the platform. **Meta**: forwarded to the ad set's `promoted_object` (snake-cased). Required for goals whose ad-set optimization_goal points at a specific event/page/app (without it Meta rejects the ad-set create with `error_subcode: 1815430` \"Please select a promoted object for your ad set\"): - `goal: conversions` / `lead_conversion` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`, or `customConversionId` when optimising against a Custom Conversion (the conversion carries its own event definition) - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl` - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted Other Meta goals (engagement, traffic, awareness, video_views) ignore this field. **TikTok**: only `goal: conversions` uses it. - `pixelId` maps to the ad group's `pixel_id`. Required: a TikTok website-conversion ad group without a pixel is rejected with `40002: Please select a pixel`. - `customEventType` maps to the ad group's `optimization_event` (the pixel event to optimise for). Optional: TikTok accepts a pixel-only auto-bid conversion ad group. See the `customEventType` field below for the valid TikTok codes. The remaining `promotedObject.*` fields are Meta-only. Platforms other than Meta and TikTok ignore `promotedObject` entirely.
|
|
17
|
+
# What the ad optimises against. Behaviour depends on the platform. **Meta**: forwarded to the ad set's `promoted_object` (snake-cased). Required for goals whose ad-set optimization_goal points at a specific event/page/app (without it Meta rejects the ad-set create with `error_subcode: 1815430` \"Please select a promoted object for your ad set\"): - `goal: conversions` / `lead_conversion` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`, or `customConversionId` when optimising against a Custom Conversion (the conversion carries its own event definition). For a pixel CUSTOM event (one you named yourself in CAPI/Events Manager), send `customEventType: OTHER` + `customEventStr` with the event name. - `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl` - `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted Other Meta goals (engagement, traffic, awareness, video_views) ignore this field. **TikTok**: only `goal: conversions` uses it. - `pixelId` maps to the ad group's `pixel_id`. Required: a TikTok website-conversion ad group without a pixel is rejected with `40002: Please select a pixel`. - `customEventType` maps to the ad group's `optimization_event` (the pixel event to optimise for). Optional: TikTok accepts a pixel-only auto-bid conversion ad group. See the `customEventType` field below for the valid TikTok codes. The remaining `promotedObject.*` fields are Meta-only. Platforms other than Meta and TikTok ignore `promotedObject` entirely.
|
|
18
18
|
class CreateStandaloneAdRequestPromotedObject < ApiModelBase
|
|
19
19
|
# Pixel ID. **Meta:** Facebook Pixel ID, required for `goal: conversions`. **TikTok:** TikTok Pixel ID, required for `goal: conversions`. To discover the pixels an ad account can use, call `GET /v1/accounts/{accountId}/tracking-tags?adAccountId=act_...` (each entry carries `kind` and `ownerAdAccountId`), or `GET /v1/accounts/{accountId}/conversion-destinations`. Note this is a different resource from `GET /v1/ads/{adId}/tracking-tags`, which reads an ad's click-URL params (`url_tags`), not pixels.
|
|
20
20
|
attr_accessor :pixel_id
|
|
@@ -22,6 +22,9 @@ module Zernio
|
|
|
22
22
|
# The event the campaign/ad group optimises against. **Meta:** standard event like `PURCHASE`, `LEAD`, `COMPLETE_REGISTRATION`, `ADD_TO_CART`. Uppercased internally so callers can pass any case. Required for `goal: conversions`. **TikTok:** an `optimization_event` code (UPPER_SNAKE, not Meta's vocabulary and not PascalCase), OR the exact event name shown in TikTok Events Manager (auto-resolved to its code). Must be one of the event types your TikTok Pixel tracks; custom events are not optimizable. Current taxonomy: `SHOPPING` (Purchase), `ON_WEB_CART` (Add to Cart), `INITIATE_ORDER` (Initiate Checkout), `FORM` (Lead), `ON_WEB_REGISTER` (Complete Registration), `ON_WEB_DETAIL` (View Content). `ON_WEB_ORDER` is deprecated. On rejection the error lists the event types your pixel actually tracks. Optional for `goal: conversions`.
|
|
23
23
|
attr_accessor :custom_event_type
|
|
24
24
|
|
|
25
|
+
# Meta only. Pixel custom-event name to optimise against (Meta's `custom_event_str`), exactly as it appears in Events Manager and in your CAPI payloads (case-sensitive, not uppercased). Requires `customEventType: OTHER`, and `OTHER` requires this field (400 either way). The same as picking a custom event in Ads Manager's conversion-event dropdown. For rule-based Custom Conversions use `customConversionId` instead.
|
|
26
|
+
attr_accessor :custom_event_str
|
|
27
|
+
|
|
25
28
|
# Facebook Page ID. Used by `goal: lead_generation`. Auto-filled from the connected Page when omitted.
|
|
26
29
|
attr_accessor :page_id
|
|
27
30
|
|
|
@@ -51,6 +54,7 @@ module Zernio
|
|
|
51
54
|
{
|
|
52
55
|
:'pixel_id' => :'pixelId',
|
|
53
56
|
:'custom_event_type' => :'customEventType',
|
|
57
|
+
:'custom_event_str' => :'customEventStr',
|
|
54
58
|
:'page_id' => :'pageId',
|
|
55
59
|
:'application_id' => :'applicationId',
|
|
56
60
|
:'object_store_url' => :'objectStoreUrl',
|
|
@@ -77,6 +81,7 @@ module Zernio
|
|
|
77
81
|
{
|
|
78
82
|
:'pixel_id' => :'String',
|
|
79
83
|
:'custom_event_type' => :'String',
|
|
84
|
+
:'custom_event_str' => :'String',
|
|
80
85
|
:'page_id' => :'String',
|
|
81
86
|
:'application_id' => :'String',
|
|
82
87
|
:'object_store_url' => :'String',
|
|
@@ -118,6 +123,10 @@ module Zernio
|
|
|
118
123
|
self.custom_event_type = attributes[:'custom_event_type']
|
|
119
124
|
end
|
|
120
125
|
|
|
126
|
+
if attributes.key?(:'custom_event_str')
|
|
127
|
+
self.custom_event_str = attributes[:'custom_event_str']
|
|
128
|
+
end
|
|
129
|
+
|
|
121
130
|
if attributes.key?(:'page_id')
|
|
122
131
|
self.page_id = attributes[:'page_id']
|
|
123
132
|
end
|
|
@@ -173,6 +182,7 @@ module Zernio
|
|
|
173
182
|
self.class == o.class &&
|
|
174
183
|
pixel_id == o.pixel_id &&
|
|
175
184
|
custom_event_type == o.custom_event_type &&
|
|
185
|
+
custom_event_str == o.custom_event_str &&
|
|
176
186
|
page_id == o.page_id &&
|
|
177
187
|
application_id == o.application_id &&
|
|
178
188
|
object_store_url == o.object_store_url &&
|
|
@@ -192,7 +202,7 @@ module Zernio
|
|
|
192
202
|
# Calculates hash code according to all attributes.
|
|
193
203
|
# @return [Integer] Hash code
|
|
194
204
|
def hash
|
|
195
|
-
[pixel_id, custom_event_type, page_id, application_id, object_store_url, custom_conversion_id, product_catalog_id, product_set_id, offline_conversion_data_set_id, whatsapp_phone_number].hash
|
|
205
|
+
[pixel_id, custom_event_type, custom_event_str, page_id, application_id, object_store_url, custom_conversion_id, product_catalog_id, product_set_id, offline_conversion_data_set_id, whatsapp_phone_number].hash
|
|
196
206
|
end
|
|
197
207
|
|
|
198
208
|
# Builds the object from hash
|
|
@@ -48,7 +48,7 @@ module Zernio
|
|
|
48
48
|
# Whether the user explicitly activated this account. false means the account was created as a side effect (e.g., posting account auto-created when user connected ads first). Posting UI and scheduler ignore accounts with enabled: false.
|
|
49
49
|
attr_accessor :enabled
|
|
50
50
|
|
|
51
|
-
# Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID
|
|
51
|
+
# Platform-specific metadata. Fields vary by platform. For WhatsApp accounts, includes: - qualityRating: Phone number quality rating from Meta (GREEN, YELLOW, RED, or UNKNOWN) - nameStatus: Display name review status (APPROVED, PENDING_REVIEW, DECLINED, or NONE). A declined or pending display name does not by itself block sending; sendability is reported separately via health_status (can_send_message). - messagingLimitTier: Maximum unique business-initiated conversations per 24h rolling window (TIER_250, TIER_1K, TIER_10K, TIER_100K, or TIER_UNLIMITED). Scales automatically as quality rating improves. - verifiedName: Meta-verified business display name - displayPhoneNumber: Formatted phone number (e.g., \"+1 555-123-4567\") - wabaId: WhatsApp Business Account ID - phoneNumberId: Meta phone number ID For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot: - profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one. - profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName.
|
|
52
52
|
attr_accessor :metadata
|
|
53
53
|
|
|
54
54
|
class EnumAttributeValidator
|
|
@@ -20,6 +20,9 @@ module Zernio
|
|
|
20
20
|
|
|
21
21
|
attr_accessor :custom_event_type
|
|
22
22
|
|
|
23
|
+
# Pixel custom-event name (custom_event_str); requires customEventType OTHER. Same pairing rules as /v1/ads/create.
|
|
24
|
+
attr_accessor :custom_event_str
|
|
25
|
+
|
|
23
26
|
attr_accessor :page_id
|
|
24
27
|
|
|
25
28
|
attr_accessor :application_id
|
|
@@ -41,6 +44,7 @@ module Zernio
|
|
|
41
44
|
{
|
|
42
45
|
:'pixel_id' => :'pixelId',
|
|
43
46
|
:'custom_event_type' => :'customEventType',
|
|
47
|
+
:'custom_event_str' => :'customEventStr',
|
|
44
48
|
:'page_id' => :'pageId',
|
|
45
49
|
:'application_id' => :'applicationId',
|
|
46
50
|
:'object_store_url' => :'objectStoreUrl',
|
|
@@ -67,6 +71,7 @@ module Zernio
|
|
|
67
71
|
{
|
|
68
72
|
:'pixel_id' => :'String',
|
|
69
73
|
:'custom_event_type' => :'String',
|
|
74
|
+
:'custom_event_str' => :'String',
|
|
70
75
|
:'page_id' => :'String',
|
|
71
76
|
:'application_id' => :'String',
|
|
72
77
|
:'object_store_url' => :'String',
|
|
@@ -108,6 +113,10 @@ module Zernio
|
|
|
108
113
|
self.custom_event_type = attributes[:'custom_event_type']
|
|
109
114
|
end
|
|
110
115
|
|
|
116
|
+
if attributes.key?(:'custom_event_str')
|
|
117
|
+
self.custom_event_str = attributes[:'custom_event_str']
|
|
118
|
+
end
|
|
119
|
+
|
|
111
120
|
if attributes.key?(:'page_id')
|
|
112
121
|
self.page_id = attributes[:'page_id']
|
|
113
122
|
end
|
|
@@ -163,6 +172,7 @@ module Zernio
|
|
|
163
172
|
self.class == o.class &&
|
|
164
173
|
pixel_id == o.pixel_id &&
|
|
165
174
|
custom_event_type == o.custom_event_type &&
|
|
175
|
+
custom_event_str == o.custom_event_str &&
|
|
166
176
|
page_id == o.page_id &&
|
|
167
177
|
application_id == o.application_id &&
|
|
168
178
|
object_store_url == o.object_store_url &&
|
|
@@ -182,7 +192,7 @@ module Zernio
|
|
|
182
192
|
# Calculates hash code according to all attributes.
|
|
183
193
|
# @return [Integer] Hash code
|
|
184
194
|
def hash
|
|
185
|
-
[pixel_id, custom_event_type, page_id, application_id, object_store_url, custom_conversion_id, product_catalog_id, product_set_id, offline_conversion_data_set_id, whatsapp_phone_number].hash
|
|
195
|
+
[pixel_id, custom_event_type, custom_event_str, page_id, application_id, object_store_url, custom_conversion_id, product_catalog_id, product_set_id, offline_conversion_data_set_id, whatsapp_phone_number].hash
|
|
186
196
|
end
|
|
187
197
|
|
|
188
198
|
# Builds the object from hash
|
data/lib/zernio-sdk/version.rb
CHANGED
data/openapi.yaml
CHANGED
|
@@ -5796,6 +5796,10 @@ components:
|
|
|
5796
5796
|
- displayPhoneNumber: Formatted phone number (e.g., "+1 555-123-4567")
|
|
5797
5797
|
- wabaId: WhatsApp Business Account ID
|
|
5798
5798
|
- phoneNumberId: Meta phone number ID
|
|
5799
|
+
|
|
5800
|
+
For LinkedIn accounts, profileData carries the profile details refreshed on each daily snapshot:
|
|
5801
|
+
- profileData.bio: The member's headline for personal accounts, or the organization description for organization accounts. null when the member has not set one.
|
|
5802
|
+
- profileData.extraData.vanityName: The member's profile slug, i.e. the /in/{vanityName} segment of profileUrl. Personal accounts only; an organization's own slug is in metadata.organizationInfo.vanityName.
|
|
5799
5803
|
AccountWithFollowerStats:
|
|
5800
5804
|
allOf:
|
|
5801
5805
|
- $ref: '#/components/schemas/SocialAccount'
|
|
@@ -36800,6 +36804,7 @@ paths:
|
|
|
36800
36804
|
properties:
|
|
36801
36805
|
pixelId: { type: string }
|
|
36802
36806
|
customEventType: { type: string }
|
|
36807
|
+
customEventStr: { type: string, description: 'Pixel custom-event name (custom_event_str); requires customEventType OTHER. Same pairing rules as /v1/ads/create.' }
|
|
36803
36808
|
pageId: { type: string }
|
|
36804
36809
|
applicationId: { type: string }
|
|
36805
36810
|
objectStoreUrl: { type: string }
|
|
@@ -39329,7 +39334,7 @@ paths:
|
|
|
39329
39334
|
Required on legacy and multi-creative shapes; the attach shape inherits it from the ad set. Available goals vary by platform.
|
|
39330
39335
|
|
|
39331
39336
|
**Meta**
|
|
39332
|
-
- `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion
|
|
39337
|
+
- `conversions`: OUTCOME_SALES. Requires `promotedObject.pixelId` and `promotedObject.customEventType` with a commerce event such as PURCHASE or START_TRIAL, or `promotedObject.customConversionId` to optimise against a Custom Conversion, or `customEventType: OTHER` + `customEventStr` to optimise against a pixel custom event.
|
|
39333
39338
|
- `lead_conversion`: OUTCOME_LEADS optimizing website pixel leads. Same pixel and event fields, but with a leads-class event such as LEAD, SUBMIT_APPLICATION, SCHEDULE or CONTACT (or `promotedObject.customConversionId` to optimise against a Custom Conversion instead). Meta gates conversion events by objective, so leads-class events are rejected under `conversions`.
|
|
39334
39339
|
- `lead_generation`: OUTCOME_LEADS with instant forms. Requires `leadGenFormId`. `promotedObject.pageId` is optional and auto-filled from the connected Page.
|
|
39335
39340
|
- `app_promotion`: requires `promotedObject.applicationId` and `promotedObject.objectStoreUrl`.
|
|
@@ -40023,7 +40028,7 @@ paths:
|
|
|
40023
40028
|
Required for goals whose ad-set optimization_goal points at a specific
|
|
40024
40029
|
event/page/app (without it Meta rejects the ad-set create with
|
|
40025
40030
|
`error_subcode: 1815430` "Please select a promoted object for your ad set"):
|
|
40026
|
-
- `goal: conversions` / `lead_conversion` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`, or `customConversionId` when optimising against a Custom Conversion (the conversion carries its own event definition)
|
|
40031
|
+
- `goal: conversions` / `lead_conversion` (OFFSITE_CONVERSIONS): requires `pixelId` + `customEventType`, or `customConversionId` when optimising against a Custom Conversion (the conversion carries its own event definition). For a pixel CUSTOM event (one you named yourself in CAPI/Events Manager), send `customEventType: OTHER` + `customEventStr` with the event name.
|
|
40027
40032
|
- `goal: app_promotion` (APP_INSTALLS): requires `applicationId` + `objectStoreUrl`
|
|
40028
40033
|
- `goal: lead_generation` (LEAD_GENERATION): `pageId` is auto-filled from the connected Page when omitted
|
|
40029
40034
|
|
|
@@ -40068,6 +40073,16 @@ paths:
|
|
|
40068
40073
|
Registration), `ON_WEB_DETAIL` (View Content). `ON_WEB_ORDER` is
|
|
40069
40074
|
deprecated. On rejection the error lists the event types your pixel
|
|
40070
40075
|
actually tracks. Optional for `goal: conversions`.
|
|
40076
|
+
customEventStr:
|
|
40077
|
+
type: string
|
|
40078
|
+
description: |
|
|
40079
|
+
Meta only. Pixel custom-event name to optimise against (Meta's
|
|
40080
|
+
`custom_event_str`), exactly as it appears in Events Manager and in your
|
|
40081
|
+
CAPI payloads (case-sensitive, not uppercased). Requires
|
|
40082
|
+
`customEventType: OTHER`, and `OTHER` requires this field (400 either way).
|
|
40083
|
+
The same as picking a custom event in Ads Manager's conversion-event
|
|
40084
|
+
dropdown. For rule-based Custom Conversions use `customConversionId`
|
|
40085
|
+
instead.
|
|
40071
40086
|
pageId:
|
|
40072
40087
|
type: string
|
|
40073
40088
|
description: |
|
|
@@ -39,6 +39,12 @@ describe Zernio::CreateStandaloneAdRequestPromotedObject do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "custom_event_str"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
42
48
|
describe 'test attribute "page_id"' do
|
|
43
49
|
it 'should work' do
|
|
44
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,6 +39,12 @@ describe Zernio::UpdateAdSetRequestPlatformSpecificDataPromotedObject do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
+
describe 'test attribute "custom_event_str"' do
|
|
43
|
+
it 'should work' do
|
|
44
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
|
|
42
48
|
describe 'test attribute "page_id"' do
|
|
43
49
|
it 'should work' do
|
|
44
50
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
Binary file
|