late-sdk 0.0.930 → 0.0.931
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 +0 -2
- data/docs/AdCampaignsApi.md +6 -10
- data/docs/AdCreative.md +0 -4
- data/docs/AdCreativesApi.md +1 -1
- data/docs/BoostPostRequest.md +1 -1
- data/docs/CreateAdCreative201Response.md +1 -5
- data/docs/CreateAdCreativeRequest.md +2 -2
- data/docs/CreateStandaloneAdRequest.md +2 -2
- data/docs/CreateStandaloneAdRequestCreativesInner.md +0 -2
- data/docs/UpdateAdRequestCreative.md +2 -2
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +4 -7
- data/lib/zernio-sdk/api/ad_creatives_api.rb +2 -2
- data/lib/zernio-sdk/models/ad_creative.rb +1 -42
- data/lib/zernio-sdk/models/boost_post_request.rb +1 -1
- data/lib/zernio-sdk/models/create_ad_creative201_response.rb +4 -44
- data/lib/zernio-sdk/models/create_ad_creative_request.rb +3 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request.rb +3 -2
- data/lib/zernio-sdk/models/create_standalone_ad_request_creatives_inner.rb +1 -11
- data/lib/zernio-sdk/models/update_ad_request_creative.rb +4 -3
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +0 -2
- data/openapi.yaml +27 -71
- data/spec/api/ad_campaigns_api_spec.rb +2 -3
- data/spec/api/ad_creatives_api_spec.rb +1 -1
- data/spec/models/ad_creative_spec.rb +0 -12
- data/spec/models/create_ad_creative201_response_spec.rb +0 -12
- data/spec/models/create_standalone_ad_request_creatives_inner_spec.rb +0 -6
- data/zernio-sdk-0.0.931.gem +0 -0
- metadata +2 -10
- data/docs/MetaPromotion.md +0 -26
- data/docs/MetaPromotionStatus.md +0 -15
- data/lib/zernio-sdk/models/meta_promotion.rb +0 -275
- data/lib/zernio-sdk/models/meta_promotion_status.rb +0 -41
- data/spec/models/meta_promotion_spec.rb +0 -64
- data/spec/models/meta_promotion_status_spec.rb +0 -30
- data/zernio-sdk-0.0.930.gem +0 -0
|
@@ -14,11 +14,12 @@ require 'date'
|
|
|
14
14
|
require 'time'
|
|
15
15
|
|
|
16
16
|
module Zernio
|
|
17
|
-
# Replace or patch the ad's creative. Meta, TikTok, and LinkedIn. - **Meta**: patch-style. Pass any subset: fields you omit are preserved from the live creative, including media (`image_hash`/`video_id` are reused, no re-upload) and `url_tags`. Sending the full set (`headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`) rebuilds the creative from scratch instead. Partial patching reads the live `object_story_spec`, which Meta strips on SHARE / page-post / dark / asset_feed creatives. Those return 422 asking for the full set. A `videoUrl`/`videoId` on an image creative is a type change and also needs the full set. `existingCreativeId` repoints the ad at a creative from GET /v1/ads/creatives and ignores every other field. Meta creatives are immutable, so any change creates a new creative and repoints the ad; the old creative is retained on the ad account for historical reporting. `
|
|
17
|
+
# Replace or patch the ad's creative. Meta, TikTok, and LinkedIn. - **Meta**: patch-style. Pass any subset: fields you omit are preserved from the live creative, including media (`image_hash`/`video_id` are reused, no re-upload) and `url_tags`. Sending the full set (`headline`, `body`, `callToAction`, `linkUrl`, `imageUrl`) rebuilds the creative from scratch instead. Partial patching reads the live `object_story_spec`, which Meta strips on SHARE / page-post / dark / asset_feed creatives. Those return 422 asking for the full set. A `videoUrl`/`videoId` on an image creative is a type change and also needs the full set. `existingCreativeId` repoints the ad at a creative from GET /v1/ads/creatives and ignores every other field. Meta creatives are immutable, so any change creates a new creative and repoints the ad; the old creative is retained on the ad account for historical reporting. `creativeFeatures` is Meta-only. Omitted settings are preserved from the live creative, including full rebuilds. A supplied creativeFeatures map overrides individual existing keys. - **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes `landing_page_url`; `videoUrl` triggers a fresh upload. `description`, `videoId` and `existingCreativeId` are Meta-only and return 400. - **LinkedIn**: requires new media (image via `imageUrl` or video via `videoUrl`); a text-only creative update returns 400. Uploads the media, creates a new inline media creative on the same campaign, and pauses the old creative (best-effort). The old creative is retained for historical reporting. `videoId` and `existingCreativeId` are Meta-only and return 400.
|
|
18
18
|
class UpdateAdRequestCreative < ApiModelBase
|
|
19
|
+
# Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.
|
|
19
20
|
attr_accessor :promotion
|
|
20
21
|
|
|
21
|
-
# Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an enhancement
|
|
22
|
+
# Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. The deprecated standard_enhancements bundle is rejected by Meta.
|
|
22
23
|
attr_accessor :creative_features
|
|
23
24
|
|
|
24
25
|
# Meta and LinkedIn (TikTok has no headline slot)
|
|
@@ -107,7 +108,7 @@ module Zernio
|
|
|
107
108
|
# Attribute type mapping.
|
|
108
109
|
def self.openapi_types
|
|
109
110
|
{
|
|
110
|
-
:'promotion' => :'
|
|
111
|
+
:'promotion' => :'Null',
|
|
111
112
|
:'creative_features' => :'Hash<String, String>',
|
|
112
113
|
:'headline' => :'String',
|
|
113
114
|
:'long_headline' => :'String',
|
data/lib/zernio-sdk/version.rb
CHANGED
data/lib/zernio-sdk.rb
CHANGED
|
@@ -1256,8 +1256,6 @@ require 'zernio-sdk/models/meta_ads_platform_data'
|
|
|
1256
1256
|
require 'zernio-sdk/models/meta_instagram_identity_ref'
|
|
1257
1257
|
require 'zernio-sdk/models/meta_lead_form_platform_data'
|
|
1258
1258
|
require 'zernio-sdk/models/meta_lead_form_platform_data_context_card'
|
|
1259
|
-
require 'zernio-sdk/models/meta_promotion'
|
|
1260
|
-
require 'zernio-sdk/models/meta_promotion_status'
|
|
1261
1259
|
require 'zernio-sdk/models/money'
|
|
1262
1260
|
require 'zernio-sdk/models/money_amount'
|
|
1263
1261
|
require 'zernio-sdk/models/move_account_to_profile200_response'
|
data/openapi.yaml
CHANGED
|
@@ -9256,32 +9256,12 @@ components:
|
|
|
9256
9256
|
type: object
|
|
9257
9257
|
additionalProperties: { type: string, enum: [OPT_IN, OPT_OUT] }
|
|
9258
9258
|
propertyNames: { pattern: '^[a-z0-9_]+$' }
|
|
9259
|
-
description: 'Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an enhancement
|
|
9259
|
+
description: 'Meta Advantage+ creative enhancements. Map snake_case feature names to OPT_IN or OPT_OUT; Meta validates supported keys and unspecified features default to OPT_OUT. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting. The deprecated standard_enhancements bundle is rejected by Meta.'
|
|
9260
9260
|
example: { auto_promotion_tag: OPT_IN }
|
|
9261
9261
|
MetaPromotion:
|
|
9262
|
-
type:
|
|
9263
|
-
description: '
|
|
9264
|
-
|
|
9265
|
-
properties:
|
|
9266
|
-
type:
|
|
9267
|
-
type: string
|
|
9268
|
-
enum: [AMOUNT_OFF, FREE_RETURN, FREE_SHIPPING, PERCENTAGE_OFF, PROMO_CODE]
|
|
9269
|
-
description: 'Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100.'
|
|
9270
|
-
value: { type: number, minimum: 0, description: 'Nonnegative promotion value passed to Meta unchanged. AMOUNT_OFF units are not confirmed, including major versus minor currency units. For PERCENTAGE_OFF this is the percentage discount, at most 100.' }
|
|
9271
|
-
code: { type: string, minLength: 1, description: 'Optional promotion code.' }
|
|
9272
|
-
startDate: { type: string, format: date-time, description: 'Optional ISO 8601 start timestamp with a timezone offset or Z.' }
|
|
9273
|
-
endDate: { type: string, format: date-time, description: 'Optional ISO 8601 end timestamp with a timezone offset or Z. Must be after startDate when both are set.' }
|
|
9274
|
-
example:
|
|
9275
|
-
type: PERCENTAGE_OFF
|
|
9276
|
-
value: 20
|
|
9277
|
-
code: SAVE20
|
|
9278
|
-
startDate: '2026-10-01T00:00:00Z'
|
|
9279
|
-
endDate: '2026-10-31T23:59:59Z'
|
|
9280
|
-
MetaPromotionStatus:
|
|
9281
|
-
type: string
|
|
9282
|
-
enum: [applied, not_returned, unavailable]
|
|
9283
|
-
description: 'Meta creative readback result. applied means Meta returned promotion metadata; not_returned means the read succeeded without promotion metadata; unavailable means the read failed. Only applied confirms the returned offer. Missing metadata is not proof that Ads Manager displays the requested Promotion.'
|
|
9284
|
-
example: not_returned
|
|
9262
|
+
type: "null"
|
|
9263
|
+
description: 'Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.'
|
|
9264
|
+
example: null
|
|
9285
9265
|
GoogleSitelink:
|
|
9286
9266
|
type: object
|
|
9287
9267
|
required:
|
|
@@ -9745,10 +9725,6 @@ components:
|
|
|
9745
9725
|
imageUrl: { type: string, description: Alternative image URL }
|
|
9746
9726
|
videoId: { type: [string, "null"], description: "Meta video ID for VIDEO-type ads. Null for non-video ads. Callers that need an embeddable MP4 can call GET /{videoId}?fields=source with the page access token." }
|
|
9747
9727
|
videoUrl: { type: [string, "null"], description: "Public Facebook watch URL for VIDEO-type ads (https://www.facebook.com/watch/?v={videoId}). Null for non-video ads." }
|
|
9748
|
-
promotion:
|
|
9749
|
-
$ref: '#/components/schemas/MetaPromotion'
|
|
9750
|
-
description: 'Meta offer read from the live creative on creation or GET /v1/ads/{adId}. Null when metadata is not returned or cannot be read. Requested values are never echoed as applied.'
|
|
9751
|
-
promotionStatus: { $ref: '#/components/schemas/MetaPromotionStatus' }
|
|
9752
9728
|
creativeId: { type: [string, "null"], description: "Meta ad creative id backing this ad. Reusable via existingCreativeId on POST /v1/ads/create." }
|
|
9753
9729
|
objectType: { type: string, description: "Meta creative object_type (e.g. SHARE, VIDEO, PRIVACY_CHECK_FAIL, POST_DELETED). Use this to render state-aware previews: when Meta moderation strips image/video fields, only thumbnailUrl at 64x64 is available." }
|
|
9754
9730
|
objectStoryId: { type: [string, "null"], description: "Meta creative `object_story_id` (the SHARE reference). Frequently absent, because Meta omits it for SHARE creatives. Use effectiveObjectStoryId instead." }
|
|
@@ -45321,19 +45297,11 @@ paths:
|
|
|
45321
45297
|
- the creative's `effective_instagram_media_id` (Instagram side)
|
|
45322
45298
|
|
|
45323
45299
|
Any of the four resolve to the same ad. Caller doesn't need a translation step.
|
|
45324
|
-
|
|
45325
|
-
|
|
45326
|
-
Meta promotion metadata is read live and exposed as `ad.creative.promotion`
|
|
45327
|
-
with `promotionStatus`. Only `applied` confirms an offer; `not_returned` means the
|
|
45328
|
-
creative read succeeded without promotion metadata, and `unavailable` means it failed.
|
|
45300
|
+
`creative.creativeFeatures` holds the stored requested settings, which do not confirm
|
|
45301
|
+
platform application.
|
|
45329
45302
|
security:
|
|
45330
45303
|
- bearerAuth: []
|
|
45331
45304
|
parameters:
|
|
45332
|
-
- name: refreshPromotion
|
|
45333
|
-
in: query
|
|
45334
|
-
required: false
|
|
45335
|
-
schema: { type: boolean, default: false }
|
|
45336
|
-
description: 'Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call.'
|
|
45337
45305
|
- name: adId
|
|
45338
45306
|
in: path
|
|
45339
45307
|
required: true
|
|
@@ -45494,11 +45462,10 @@ paths:
|
|
|
45494
45462
|
longHeadline: Schedule social content from your app with Zernio
|
|
45495
45463
|
imageUrl: 'https://example.com/new-landscape.png'
|
|
45496
45464
|
squareImageUrl: 'https://example.com/new-square.png'
|
|
45497
|
-
|
|
45498
|
-
summary: "
|
|
45465
|
+
metaCreativeFeatures:
|
|
45466
|
+
summary: "Opt a Meta creative out of an Advantage+ enhancement."
|
|
45499
45467
|
value:
|
|
45500
45468
|
creative:
|
|
45501
|
-
promotion: null
|
|
45502
45469
|
creativeFeatures: { auto_promotion_tag: OPT_OUT }
|
|
45503
45470
|
schema:
|
|
45504
45471
|
type: object
|
|
@@ -45629,10 +45596,9 @@ paths:
|
|
|
45629
45596
|
GET /v1/ads/creatives and ignores every other field. Meta creatives are
|
|
45630
45597
|
immutable, so any change creates a new creative and repoints the ad; the old
|
|
45631
45598
|
creative is retained on the ad account for historical reporting.
|
|
45632
|
-
`
|
|
45633
|
-
|
|
45634
|
-
|
|
45635
|
-
A supplied creativeFeatures map overrides individual existing keys.
|
|
45599
|
+
`creativeFeatures` is Meta-only. Omitted settings are preserved from the
|
|
45600
|
+
live creative, including full rebuilds. A supplied creativeFeatures map
|
|
45601
|
+
overrides individual existing keys.
|
|
45636
45602
|
- **TikTok**: patch-style. Pass any subset; `headline` is ignored (TikTok creatives
|
|
45637
45603
|
have no headline slot). `body` becomes the in-feed `ad_text`; `linkUrl` becomes
|
|
45638
45604
|
`landing_page_url`; `videoUrl` triggers a fresh upload. `description`, `videoId`
|
|
@@ -45643,7 +45609,9 @@ paths:
|
|
|
45643
45609
|
The old creative is retained for historical reporting. `videoId` and
|
|
45644
45610
|
`existingCreativeId` are Meta-only and return 400.
|
|
45645
45611
|
properties:
|
|
45646
|
-
promotion:
|
|
45612
|
+
promotion:
|
|
45613
|
+
$ref: '#/components/schemas/MetaPromotion'
|
|
45614
|
+
description: 'Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.'
|
|
45647
45615
|
creativeFeatures: { $ref: '#/components/schemas/MetaCreativeFeatures' }
|
|
45648
45616
|
headline: { type: string, description: "Meta and LinkedIn (TikTok has no headline slot)" }
|
|
45649
45617
|
longHeadline: { type: string, minLength: 1, maxLength: 90, description: "Google Display only. Replaces the responsive display ad's long headline." }
|
|
@@ -48175,11 +48143,8 @@ paths:
|
|
|
48175
48143
|
`existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side),
|
|
48176
48144
|
`imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10
|
|
48177
48145
|
hand-built cards). The Page (and linked Instagram account, when present) is resolved
|
|
48178
|
-
from `accountId` as the story actor. `
|
|
48179
|
-
|
|
48180
|
-
read the creative back from Meta;
|
|
48181
|
-
`promotionStatus: not_returned` means Meta accepted creation but omitted promotion
|
|
48182
|
-
metadata, so the requested offer is not confirmed as applied.
|
|
48146
|
+
from `accountId` as the story actor. `creativeFeatures` configures Advantage+
|
|
48147
|
+
enhancements. `promotion` is not supported and any object is rejected with 400.
|
|
48183
48148
|
security:
|
|
48184
48149
|
- bearerAuth: []
|
|
48185
48150
|
requestBody:
|
|
@@ -48213,10 +48178,12 @@ paths:
|
|
|
48213
48178
|
description: { type: string, maxLength: 255 }
|
|
48214
48179
|
callToAction: { type: string }
|
|
48215
48180
|
urlTags: { type: string, description: "Appended to every outbound URL (e.g. utm_source=fb)." }
|
|
48216
|
-
promotion:
|
|
48181
|
+
promotion:
|
|
48182
|
+
$ref: '#/components/schemas/MetaPromotion'
|
|
48183
|
+
description: 'Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.'
|
|
48217
48184
|
creativeFeatures:
|
|
48218
48185
|
$ref: '#/components/schemas/MetaCreativeFeatures'
|
|
48219
|
-
description: 'Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement
|
|
48186
|
+
description: 'Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting.'
|
|
48220
48187
|
multiAdvertiser:
|
|
48221
48188
|
type: string
|
|
48222
48189
|
enum: [OPT_IN, OPT_OUT]
|
|
@@ -48228,7 +48195,6 @@ paths:
|
|
|
48228
48195
|
body: Use SAVE20 at checkout.
|
|
48229
48196
|
linkUrl: https://example.com/shop
|
|
48230
48197
|
imageUrl: https://example.com/ad.jpg
|
|
48231
|
-
promotion: { type: PERCENTAGE_OFF, value: 20, code: SAVE20 }
|
|
48232
48198
|
creativeFeatures: { auto_promotion_tag: OPT_OUT }
|
|
48233
48199
|
responses:
|
|
48234
48200
|
'409': { $ref: '#/components/responses/AccountConnectionRequired' }
|
|
@@ -48242,13 +48208,9 @@ paths:
|
|
|
48242
48208
|
properties:
|
|
48243
48209
|
adAccountId: { type: string }
|
|
48244
48210
|
creativeId: { type: string, description: "Platform creative id, reusable via existingCreativeId." }
|
|
48245
|
-
promotion: { $ref: '#/components/schemas/MetaPromotion' }
|
|
48246
|
-
promotionStatus: { $ref: '#/components/schemas/MetaPromotionStatus' }
|
|
48247
48211
|
example:
|
|
48248
48212
|
adAccountId: act_123456789
|
|
48249
48213
|
creativeId: '123456789012345'
|
|
48250
|
-
promotion: null
|
|
48251
|
-
promotionStatus: not_returned
|
|
48252
48214
|
'400': { description: "Invalid input, or Meta rejected the create" }
|
|
48253
48215
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
48254
48216
|
'422': { description: No Facebook Page found to act as the story actor }
|
|
@@ -51142,15 +51104,11 @@ paths:
|
|
|
51142
51104
|
- Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting.
|
|
51143
51105
|
- Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted.
|
|
51144
51106
|
|
|
51145
|
-
Meta accepts `
|
|
51146
|
-
|
|
51147
|
-
|
|
51107
|
+
Meta accepts `creativeFeatures` on the single and attach shapes and as defaults for
|
|
51108
|
+
`creatives[]`; an item replaces the whole feature map. `promotion` is not supported on any
|
|
51109
|
+
shape and any object is rejected with 400.
|
|
51148
51110
|
Reusing `existingCreativeId` uses the existing creative settings instead of new settings.
|
|
51149
51111
|
Requested settings are persisted for lists, exports, and default ad-detail reads.
|
|
51150
|
-
Only ads supplied a `promotion` receive live readback; multi-create batches those reads
|
|
51151
|
-
in groups of up to 50 IDs without per-ad fallback. Inspect `ad.creative.promotionStatus` (or
|
|
51152
|
-
`ads[].creative.promotionStatus`). `not_returned` means Meta omitted the metadata;
|
|
51153
|
-
successful creation does not by itself prove the offer was applied or will display.
|
|
51154
51112
|
|
|
51155
51113
|
Per-platform required fields, budget minimums, and video-ad rules are documented on each property below.
|
|
51156
51114
|
|
|
@@ -51205,10 +51163,12 @@ paths:
|
|
|
51205
51163
|
billingEvent: { type: string, description: "Meta only. Explicit ad-set `billing_event`. Defaults to `IMPRESSIONS`. Forwarded verbatim to Meta, which validates compatibility with the optimization goal." }
|
|
51206
51164
|
buyingType: { type: string, enum: [AUCTION, RESERVED], default: AUCTION, description: "Meta only. Defaults to AUCTION and is explicitly sent on new campaigns, including validateOnly. Reusing existingCampaignId does not change the campaign. 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)." }
|
|
51207
51165
|
rfPredictionId: { type: string, description: "Meta only. The RESERVED prediction id the R&F ad set runs on (reserving mints a new id, so pass that one). Requires buyingType RESERVED." }
|
|
51208
|
-
promotion:
|
|
51166
|
+
promotion:
|
|
51167
|
+
$ref: '#/components/schemas/MetaPromotion'
|
|
51168
|
+
description: 'Not supported. Meta validates creative_sourcing_spec.promotion_metadata_spec on the create call and then discards it, so a Promotion set through the Marketing API never reaches the creative. Any object is rejected with 400 invalid_field_value. Send null or omit the field, and set the Promotion on the ad in Ads Manager. Verified on 2026-09-11 across Graph v19.0 to v25.0 and every write path.'
|
|
51209
51169
|
creativeFeatures:
|
|
51210
51170
|
$ref: '#/components/schemas/MetaCreativeFeatures'
|
|
51211
|
-
description: 'Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an enhancement
|
|
51171
|
+
description: 'Meta only. Applied to each new creative, including standalone and attach shapes. With creatives[], these are defaults; an item replaces the whole feature map, including an empty map. auto_promotion_tag is an Advantage+ enhancement, not the Ads Manager Promotion setting.'
|
|
51212
51172
|
multiAdvertiser:
|
|
51213
51173
|
type: string
|
|
51214
51174
|
enum: [OPT_IN, OPT_OUT]
|
|
@@ -51308,9 +51268,6 @@ paths:
|
|
|
51308
51268
|
required: [headline, body, linkUrl, callToAction]
|
|
51309
51269
|
description: "Each creative must supply EXACTLY ONE of `imageUrl` (image creative) or `video` (video creative)."
|
|
51310
51270
|
properties:
|
|
51311
|
-
promotion:
|
|
51312
|
-
$ref: '#/components/schemas/MetaPromotion'
|
|
51313
|
-
description: 'Overrides the top-level offer for this item. Omit to inherit; null disables the inherited offer.'
|
|
51314
51271
|
creativeFeatures:
|
|
51315
51272
|
$ref: '#/components/schemas/MetaCreativeFeatures'
|
|
51316
51273
|
description: 'Replaces the entire top-level creativeFeatures map for this item. Omit to inherit; an empty map clears these defaults.'
|
|
@@ -52233,7 +52190,6 @@ paths:
|
|
|
52233
52190
|
callToAction: SHOP_NOW
|
|
52234
52191
|
linkUrl: https://example.com/shop
|
|
52235
52192
|
imageUrl: https://example.com/ad.jpg
|
|
52236
|
-
promotion: { type: PERCENTAGE_OFF, value: 20, code: SAVE20 }
|
|
52237
52193
|
creativeFeatures: { auto_promotion_tag: OPT_OUT }
|
|
52238
52194
|
responses:
|
|
52239
52195
|
'409': { $ref: '#/components/responses/AccountConnectionRequired' }
|
|
@@ -135,7 +135,7 @@ describe 'AdCampaignsApi' do
|
|
|
135
135
|
|
|
136
136
|
# unit tests for create_standalone_ad
|
|
137
137
|
# Create standalone ad
|
|
138
|
-
# Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads). Google Performance Max: set `campaignType: \"pmax\"` and supply `assetGroup` with text, images by role, business name and finalUrl. Creates a daily budget, PAUSED campaign and asset group atomically. `validateOnly: true` validates the complete request with Google without creating or persisting resources. Read assets with `GET /v1/ads/campaigns/{campaignId}/asset-groups`. The logo is required; video is optional via `assetGroup.youtubeVideoId`. Brand guidelines are disabled at creation. All supplied asset links are validated together against Google's minimum asset requirements. PMax rejects ACTIVE creation, portfolio bidding, bid caps, legacy creative fields and attach shapes. Geo and language targeting are supported; omitted geo targets all locations. PMax does not require top-level goal, headline, body or linkUrl. Supported bidding: omitted or LOWEST_COST_WITHOUT_CAP for Maximize Conversions, COST_CAP plus bidAmount for target CPA, LOWEST_COST_WITH_MIN_ROAS plus roasAverageFloor for Maximize Conversion Value with target ROAS. Other mutually-exclusive request shapes are selected by the body: - Legacy single-creative shape (all platforms, the default). - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting. - Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted. Meta accepts `
|
|
138
|
+
# Create a paid ad with custom creative across Meta, Google Ads, Pinterest, TikTok, X, LinkedIn, and OpenAI Ads (ChatGPT Ads). Google Performance Max: set `campaignType: \"pmax\"` and supply `assetGroup` with text, images by role, business name and finalUrl. Creates a daily budget, PAUSED campaign and asset group atomically. `validateOnly: true` validates the complete request with Google without creating or persisting resources. Read assets with `GET /v1/ads/campaigns/{campaignId}/asset-groups`. The logo is required; video is optional via `assetGroup.youtubeVideoId`. Brand guidelines are disabled at creation. All supplied asset links are validated together against Google's minimum asset requirements. PMax rejects ACTIVE creation, portfolio bidding, bid caps, legacy creative fields and attach shapes. Geo and language targeting are supported; omitted geo targets all locations. PMax does not require top-level goal, headline, body or linkUrl. Supported bidding: omitted or LOWEST_COST_WITHOUT_CAP for Maximize Conversions, COST_CAP plus bidAmount for target CPA, LOWEST_COST_WITH_MIN_ROAS plus roasAverageFloor for Maximize Conversion Value with target ROAS. Other mutually-exclusive request shapes are selected by the body: - Legacy single-creative shape (all platforms, the default). - Meta-only multi-creative shape via the creatives array: one ad set with N ads sharing budget and targeting. - Attach shape via adSetId: adds one new ad to an existing ad set, inheriting its budget, targeting, and schedule (Meta, Google Ads, TikTok, and LinkedIn). On LinkedIn adSetId is the existing Campaign id, and the budget, schedule, targeting and bidding fields must be omitted. Meta accepts `creativeFeatures` on the single and attach shapes and as defaults for `creatives[]`; an item replaces the whole feature map. `promotion` is not supported on any shape and any object is rejected with 400. Reusing `existingCreativeId` uses the existing creative settings instead of new settings. Requested settings are persisted for lists, exports, and default ad-detail reads. 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.
|
|
139
139
|
# @param create_standalone_ad_request
|
|
140
140
|
# @param [Hash] opts the optional parameters
|
|
141
141
|
# @option opts [String] :idempotency_key Optional client-generated unique key (e.g. a UUID) that makes retries safe. Same key + same body replays the original response; same key + different body → 422; key still processing → 409.
|
|
@@ -227,10 +227,9 @@ describe 'AdCampaignsApi' do
|
|
|
227
227
|
|
|
228
228
|
# unit tests for get_ad
|
|
229
229
|
# Get ad details
|
|
230
|
-
# Returns an ad with its creative, targeting, status, and performance metrics. Google Search ads include current creative.headlines, creative.descriptions and creative.finalUrls, preserving pinnedField. Top-level cachedAt and stale report cache freshness. Google mutations invalidate this read. RSA enrichment requires a stored advertisingChannelType of SEARCH. Ads with an unknown or other channel return their stored details without a Google read. If RSA enrichment fails, the stored ad is returned with HTTP 200 and without cache metadata. The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal `_id` (24-char hex) - Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`) - the creative's `effective_object_story_id` (`{pageId}_{postId}` shape, Facebook side) - the creative's `effective_instagram_media_id` (Instagram side) Any of the four resolve to the same ad. Caller doesn't need a translation step.
|
|
230
|
+
# Returns an ad with its creative, targeting, status, and performance metrics. Google Search ads include current creative.headlines, creative.descriptions and creative.finalUrls, preserving pinnedField. Top-level cachedAt and stale report cache freshness. Google mutations invalidate this read. RSA enrichment requires a stored advertisingChannelType of SEARCH. Ads with an unknown or other channel return their stored details without a Google read. If RSA enrichment fails, the stored ad is returned with HTTP 200 and without cache metadata. The `{adId}` path segment accepts any identifier dialect Zernio indexes for the ad: - the Zernio internal `_id` (24-char hex) - Meta's numeric `platformAdId` (the value shipped in `comment.received` webhooks as `comment.ad.id`) - the creative's `effective_object_story_id` (`{pageId}_{postId}` shape, Facebook side) - the creative's `effective_instagram_media_id` (Instagram side) Any of the four resolve to the same ad. Caller doesn't need a translation step. `creative.creativeFeatures` holds the stored requested settings, which do not confirm platform application.
|
|
231
231
|
# @param ad_id Zernio `_id` (hex), Meta `platformAdId` (numeric), or one of the creative's effective story/media IDs. See description for details.
|
|
232
232
|
# @param [Hash] opts the optional parameters
|
|
233
|
-
# @option opts [Boolean] :refresh_promotion Meta only. Read current promotion metadata from Meta and include promotionStatus. Omit for stored creative settings with no promotion-specific Graph call.
|
|
234
233
|
# @return [GetAd200Response]
|
|
235
234
|
describe 'get_ad test' do
|
|
236
235
|
it 'should work' do
|
|
@@ -34,7 +34,7 @@ describe 'AdCreativesApi' do
|
|
|
34
34
|
|
|
35
35
|
# unit tests for create_ad_creative
|
|
36
36
|
# Create a standalone creative
|
|
37
|
-
# Creates a creative in the library WITHOUT an ad, reusable on the create endpoints via `existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side), `imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10 hand-built cards). The Page (and linked Instagram account, when present) is resolved from `accountId` as the story actor. `
|
|
37
|
+
# Creates a creative in the library WITHOUT an ad, reusable on the create endpoints via `existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side), `imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10 hand-built cards). The Page (and linked Instagram account, when present) is resolved from `accountId` as the story actor. `creativeFeatures` configures Advantage+ enhancements. `promotion` is not supported and any object is rejected with 400.
|
|
38
38
|
# @param create_ad_creative_request
|
|
39
39
|
# @param [Hash] opts the optional parameters
|
|
40
40
|
# @return [CreateAdCreative201Response]
|
|
@@ -81,18 +81,6 @@ describe Zernio::AdCreative do
|
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
83
|
|
|
84
|
-
describe 'test attribute "promotion"' do
|
|
85
|
-
it 'should work' do
|
|
86
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
87
|
-
end
|
|
88
|
-
end
|
|
89
|
-
|
|
90
|
-
describe 'test attribute "promotion_status"' do
|
|
91
|
-
it 'should work' do
|
|
92
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
93
|
-
end
|
|
94
|
-
end
|
|
95
|
-
|
|
96
84
|
describe 'test attribute "creative_id"' do
|
|
97
85
|
it 'should work' do
|
|
98
86
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
@@ -39,16 +39,4 @@ describe Zernio::CreateAdCreative201Response do
|
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
41
|
|
|
42
|
-
describe 'test attribute "promotion"' 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
|
-
|
|
48
|
-
describe 'test attribute "promotion_status"' do
|
|
49
|
-
it 'should work' do
|
|
50
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
42
|
end
|
|
@@ -27,12 +27,6 @@ describe Zernio::CreateStandaloneAdRequestCreativesInner do
|
|
|
27
27
|
end
|
|
28
28
|
end
|
|
29
29
|
|
|
30
|
-
describe 'test attribute "promotion"' do
|
|
31
|
-
it 'should work' do
|
|
32
|
-
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
30
|
describe 'test attribute "creative_features"' do
|
|
37
31
|
it 'should work' do
|
|
38
32
|
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: late-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0.
|
|
4
|
+
version: 0.0.931
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- OpenAPI-Generator
|
|
@@ -1348,8 +1348,6 @@ files:
|
|
|
1348
1348
|
- docs/MetaInstagramIdentityRef.md
|
|
1349
1349
|
- docs/MetaLeadFormPlatformData.md
|
|
1350
1350
|
- docs/MetaLeadFormPlatformDataContextCard.md
|
|
1351
|
-
- docs/MetaPromotion.md
|
|
1352
|
-
- docs/MetaPromotionStatus.md
|
|
1353
1351
|
- docs/Money.md
|
|
1354
1352
|
- docs/MoneyAmount.md
|
|
1355
1353
|
- docs/MoveAccountToProfile200Response.md
|
|
@@ -3479,8 +3477,6 @@ files:
|
|
|
3479
3477
|
- lib/zernio-sdk/models/meta_instagram_identity_ref.rb
|
|
3480
3478
|
- lib/zernio-sdk/models/meta_lead_form_platform_data.rb
|
|
3481
3479
|
- lib/zernio-sdk/models/meta_lead_form_platform_data_context_card.rb
|
|
3482
|
-
- lib/zernio-sdk/models/meta_promotion.rb
|
|
3483
|
-
- lib/zernio-sdk/models/meta_promotion_status.rb
|
|
3484
3480
|
- lib/zernio-sdk/models/money.rb
|
|
3485
3481
|
- lib/zernio-sdk/models/money_amount.rb
|
|
3486
3482
|
- lib/zernio-sdk/models/move_account_to_profile200_response.rb
|
|
@@ -5577,8 +5573,6 @@ files:
|
|
|
5577
5573
|
- spec/models/meta_instagram_identity_ref_spec.rb
|
|
5578
5574
|
- spec/models/meta_lead_form_platform_data_context_card_spec.rb
|
|
5579
5575
|
- spec/models/meta_lead_form_platform_data_spec.rb
|
|
5580
|
-
- spec/models/meta_promotion_spec.rb
|
|
5581
|
-
- spec/models/meta_promotion_status_spec.rb
|
|
5582
5576
|
- spec/models/money_amount_spec.rb
|
|
5583
5577
|
- spec/models/money_spec.rb
|
|
5584
5578
|
- spec/models/move_account_to_profile200_response_spec.rb
|
|
@@ -6367,7 +6361,7 @@ files:
|
|
|
6367
6361
|
- spec/models/you_tube_video_retention_response_retention_curve_inner_spec.rb
|
|
6368
6362
|
- spec/models/you_tube_video_retention_response_spec.rb
|
|
6369
6363
|
- spec/spec_helper.rb
|
|
6370
|
-
- zernio-sdk-0.0.
|
|
6364
|
+
- zernio-sdk-0.0.931.gem
|
|
6371
6365
|
- zernio-sdk.gemspec
|
|
6372
6366
|
homepage: https://openapi-generator.tech
|
|
6373
6367
|
licenses:
|
|
@@ -7328,7 +7322,6 @@ test_files:
|
|
|
7328
7322
|
- spec/models/get_ad_comments200_response_meta_spec.rb
|
|
7329
7323
|
- spec/models/get_discord_guild_member200_response_spec.rb
|
|
7330
7324
|
- spec/models/on_verification_failed_request_spec.rb
|
|
7331
|
-
- spec/models/meta_promotion_status_spec.rb
|
|
7332
7325
|
- spec/models/money_amount_spec.rb
|
|
7333
7326
|
- spec/models/list_ad_campaigns200_response_spec.rb
|
|
7334
7327
|
- spec/models/search_tweets200_response_tweets_inner_author_spec.rb
|
|
@@ -8166,7 +8159,6 @@ test_files:
|
|
|
8166
8159
|
- spec/models/get_linked_in_bid_pricing200_response_spec.rb
|
|
8167
8160
|
- spec/models/purchase_phone_number202_response_spec.rb
|
|
8168
8161
|
- spec/models/boost_post_request_targeting_cities_inner_spec.rb
|
|
8169
|
-
- spec/models/meta_promotion_spec.rb
|
|
8170
8162
|
- spec/models/update_broadcast_request_template_variable_mapping_value_spec.rb
|
|
8171
8163
|
- spec/models/comment_automation_template_element_spec.rb
|
|
8172
8164
|
- spec/models/webhook_payload_call_ended_spec.rb
|
data/docs/MetaPromotion.md
DELETED
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
# Zernio::MetaPromotion
|
|
2
|
-
|
|
3
|
-
## Properties
|
|
4
|
-
|
|
5
|
-
| Name | Type | Description | Notes |
|
|
6
|
-
| ---- | ---- | ----------- | ----- |
|
|
7
|
-
| **type** | **String** | Promotion type accepted by Meta. PERCENTAGE_OFF values cannot exceed 100. | |
|
|
8
|
-
| **value** | **Float** | Nonnegative promotion value passed to Meta unchanged. AMOUNT_OFF units are not confirmed, including major versus minor currency units. For PERCENTAGE_OFF this is the percentage discount, at most 100. | |
|
|
9
|
-
| **code** | **String** | Optional promotion code. | [optional] |
|
|
10
|
-
| **start_date** | **Time** | Optional ISO 8601 start timestamp with a timezone offset or Z. | [optional] |
|
|
11
|
-
| **end_date** | **Time** | Optional ISO 8601 end timestamp with a timezone offset or Z. Must be after startDate when both are set. | [optional] |
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```ruby
|
|
16
|
-
require 'zernio-sdk'
|
|
17
|
-
|
|
18
|
-
instance = Zernio::MetaPromotion.new(
|
|
19
|
-
type: null,
|
|
20
|
-
value: null,
|
|
21
|
-
code: null,
|
|
22
|
-
start_date: null,
|
|
23
|
-
end_date: null
|
|
24
|
-
)
|
|
25
|
-
```
|
|
26
|
-
|
data/docs/MetaPromotionStatus.md
DELETED