late-sdk 0.0.536 → 0.0.538
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 +29 -1
- data/docs/AdAudiencesApi.md +5 -5
- data/docs/AdCampaignsApi.md +142 -0
- data/docs/AdsApi.md +715 -33
- data/docs/CreateAdCampaign201Response.md +24 -0
- data/docs/CreateAdCampaignRequest.md +32 -0
- data/docs/CreateAdCreative201Response.md +20 -0
- data/docs/CreateAdCreativeRequest.md +38 -0
- data/docs/CreateAdCreativeRequestCarouselCardsInner.md +26 -0
- data/docs/DeleteAdCreative200Response.md +20 -0
- data/docs/DuplicateAd200Response.md +22 -0
- data/docs/DuplicateAdRequest.md +28 -0
- data/docs/DuplicateAdSet200Response.md +22 -0
- data/docs/DuplicateAdSetRequest.md +36 -0
- data/docs/GetAdCreative200Response.md +18 -0
- data/docs/ListAdCreatives200Response.md +22 -0
- data/docs/ListAdImages200Response.md +22 -0
- data/docs/ListAdLabels200Response.md +22 -0
- data/docs/ListHighDemandPeriods200Response.md +22 -0
- data/docs/UpdateAdCreative200Response.md +22 -0
- data/docs/UpdateAdCreativeRequest.md +20 -0
- data/lib/zernio-sdk/api/ad_audiences_api.rb +4 -4
- data/lib/zernio-sdk/api/ad_campaigns_api.rb +142 -0
- data/lib/zernio-sdk/api/ads_api.rb +748 -48
- data/lib/zernio-sdk/models/create_ad_campaign201_response.rb +210 -0
- data/lib/zernio-sdk/models/create_ad_campaign_request.rb +343 -0
- data/lib/zernio-sdk/models/create_ad_creative201_response.rb +157 -0
- data/lib/zernio-sdk/models/create_ad_creative_request.rb +390 -0
- data/lib/zernio-sdk/models/create_ad_creative_request_carousel_cards_inner.rb +255 -0
- data/lib/zernio-sdk/models/delete_ad_creative200_response.rb +156 -0
- data/lib/zernio-sdk/models/duplicate_ad200_response.rb +200 -0
- data/lib/zernio-sdk/models/duplicate_ad_request.rb +243 -0
- data/lib/zernio-sdk/models/duplicate_ad_set200_response.rb +201 -0
- data/lib/zernio-sdk/models/duplicate_ad_set_request.rb +302 -0
- data/lib/zernio-sdk/models/get_ad_creative200_response.rb +148 -0
- data/lib/zernio-sdk/models/list_ad_creatives200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_ad_images200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_ad_labels200_response.rb +167 -0
- data/lib/zernio-sdk/models/list_high_demand_periods200_response.rb +168 -0
- data/lib/zernio-sdk/models/update_ad_creative200_response.rb +165 -0
- data/lib/zernio-sdk/models/update_ad_creative_request.rb +200 -0
- data/lib/zernio-sdk/version.rb +1 -1
- data/lib/zernio-sdk.rb +17 -0
- data/openapi.yaml +445 -7
- data/spec/api/ad_audiences_api_spec.rb +2 -2
- data/spec/api/ad_campaigns_api_spec.rb +25 -0
- data/spec/api/ads_api_spec.rb +128 -0
- data/spec/models/create_ad_campaign201_response_spec.rb +58 -0
- data/spec/models/create_ad_campaign_request_spec.rb +94 -0
- data/spec/models/create_ad_creative201_response_spec.rb +42 -0
- data/spec/models/create_ad_creative_request_carousel_cards_inner_spec.rb +60 -0
- data/spec/models/create_ad_creative_request_spec.rb +96 -0
- data/spec/models/delete_ad_creative200_response_spec.rb +42 -0
- data/spec/models/duplicate_ad200_response_spec.rb +52 -0
- data/spec/models/duplicate_ad_request_spec.rb +74 -0
- data/spec/models/duplicate_ad_set200_response_spec.rb +52 -0
- data/spec/models/duplicate_ad_set_request_spec.rb +102 -0
- data/spec/models/get_ad_creative200_response_spec.rb +36 -0
- data/spec/models/list_ad_creatives200_response_spec.rb +48 -0
- data/spec/models/list_ad_images200_response_spec.rb +48 -0
- data/spec/models/list_ad_labels200_response_spec.rb +48 -0
- data/spec/models/list_high_demand_periods200_response_spec.rb +48 -0
- data/spec/models/update_ad_creative200_response_spec.rb +48 -0
- data/spec/models/update_ad_creative_request_spec.rb +42 -0
- data/zernio-sdk-0.0.538.gem +0 -0
- metadata +71 -3
- data/zernio-sdk-0.0.536.gem +0 -0
data/openapi.yaml
CHANGED
|
@@ -33030,6 +33030,54 @@ paths:
|
|
|
33030
33030
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
33031
33031
|
'403':
|
|
33032
33032
|
description: Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.
|
|
33033
|
+
post:
|
|
33034
|
+
operationId: createAdCampaign
|
|
33035
|
+
tags: [Ad Campaigns]
|
|
33036
|
+
summary: Create a standalone campaign (Meta)
|
|
33037
|
+
description: |-
|
|
33038
|
+
Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it
|
|
33039
|
+
later via `existingCampaignId` on the create endpoints. A budget here is campaign-level
|
|
33040
|
+
(CBO) by definition; omit it for ABO (each ad set carries its own budget). Created
|
|
33041
|
+
`PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the
|
|
33042
|
+
next sync discovery pass. Meta only.
|
|
33043
|
+
security:
|
|
33044
|
+
- bearerAuth: []
|
|
33045
|
+
requestBody:
|
|
33046
|
+
required: true
|
|
33047
|
+
content:
|
|
33048
|
+
application/json:
|
|
33049
|
+
schema:
|
|
33050
|
+
type: object
|
|
33051
|
+
required: [accountId, adAccountId, name, goal]
|
|
33052
|
+
properties:
|
|
33053
|
+
accountId: { type: string, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
33054
|
+
adAccountId: { type: string, description: "Meta ad account id (act_<n>)." }
|
|
33055
|
+
name: { type: string, maxLength: 255 }
|
|
33056
|
+
goal:
|
|
33057
|
+
type: string
|
|
33058
|
+
enum: [engagement, traffic, awareness, video_views, lead_generation, lead_conversion, job_applicants, conversions, app_promotion, catalog_sales]
|
|
33059
|
+
description: Mapped to the ODAX objective (same mapping as POST /v1/ads/create).
|
|
33060
|
+
specialAdCategories:
|
|
33061
|
+
type: array
|
|
33062
|
+
items: { type: string, enum: [HOUSING, EMPLOYMENT, CREDIT, ISSUES_ELECTIONS_POLITICS, FINANCIAL_PRODUCTS_SERVICES, ONLINE_GAMBLING_AND_GAMING] }
|
|
33063
|
+
budgetAmount: { type: number, description: "Campaign-level (CBO) budget in whole currency units. Requires budgetType." }
|
|
33064
|
+
budgetType: { type: string, enum: [daily, lifetime] }
|
|
33065
|
+
status: { type: string, enum: [ACTIVE, PAUSED], default: PAUSED }
|
|
33066
|
+
responses:
|
|
33067
|
+
'201':
|
|
33068
|
+
description: Campaign created
|
|
33069
|
+
content:
|
|
33070
|
+
application/json:
|
|
33071
|
+
schema:
|
|
33072
|
+
type: object
|
|
33073
|
+
properties:
|
|
33074
|
+
adAccountId: { type: string }
|
|
33075
|
+
campaignId: { type: string, description: Platform id of the new campaign }
|
|
33076
|
+
objective: { type: string, description: "Resolved ODAX objective (e.g. OUTCOME_SALES)." }
|
|
33077
|
+
status: { type: string, enum: [ACTIVE, PAUSED] }
|
|
33078
|
+
'400': { description: "Invalid input, or Meta rejected the create" }
|
|
33079
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
33080
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
33033
33081
|
|
|
33034
33082
|
/v1/ads/campaigns/{campaignId}/status:
|
|
33035
33083
|
put:
|
|
@@ -33318,6 +33366,98 @@ paths:
|
|
|
33318
33366
|
'404': { description: Source campaign not found }
|
|
33319
33367
|
'501': { description: Operation not supported on this platform }
|
|
33320
33368
|
|
|
33369
|
+
/v1/ads/ad-sets/{adSetId}/duplicate:
|
|
33370
|
+
post:
|
|
33371
|
+
operationId: duplicateAdSet
|
|
33372
|
+
tags: [Ad Campaigns]
|
|
33373
|
+
summary: Duplicate an ad set (Meta)
|
|
33374
|
+
description: |-
|
|
33375
|
+
Duplicates an ad set, including its ads and creatives by default (`deepCopy: true`),
|
|
33376
|
+
via Meta's native `POST /{adset-id}/copies`. The copy is created paused so callers can
|
|
33377
|
+
review before launching. `campaignId` retargets the copy into another campaign; omitted
|
|
33378
|
+
= the source's own campaign. The new hierarchy materializes asynchronously — sync
|
|
33379
|
+
discovery is triggered automatically (`syncAfter: false` to skip). Meta only.
|
|
33380
|
+
security:
|
|
33381
|
+
- bearerAuth: []
|
|
33382
|
+
parameters:
|
|
33383
|
+
- { name: adSetId, in: path, required: true, schema: { type: string }, description: Source platform ad set ID }
|
|
33384
|
+
requestBody:
|
|
33385
|
+
required: true
|
|
33386
|
+
content:
|
|
33387
|
+
application/json:
|
|
33388
|
+
schema:
|
|
33389
|
+
type: object
|
|
33390
|
+
required: [platform]
|
|
33391
|
+
properties:
|
|
33392
|
+
platform: { type: string, enum: [facebook, instagram] }
|
|
33393
|
+
campaignId: { type: string, description: Destination platform campaign id (defaults to the source's campaign) }
|
|
33394
|
+
deepCopy: { type: boolean, default: true, description: Copy child ads + creatives }
|
|
33395
|
+
statusOption: { type: string, enum: [ACTIVE, PAUSED, INHERITED_FROM_SOURCE], default: PAUSED }
|
|
33396
|
+
startTime: { type: string, format: date-time, description: Reschedule the copy's start time }
|
|
33397
|
+
endTime: { type: string, format: date-time }
|
|
33398
|
+
renameStrategy: { type: string, enum: [DEEP_RENAME, ONLY_TOP_LEVEL_RENAME, NO_RENAME] }
|
|
33399
|
+
renamePrefix: { type: string }
|
|
33400
|
+
renameSuffix: { type: string }
|
|
33401
|
+
syncAfter: { type: boolean, default: true }
|
|
33402
|
+
responses:
|
|
33403
|
+
'200':
|
|
33404
|
+
description: Ad set duplicated
|
|
33405
|
+
content:
|
|
33406
|
+
application/json:
|
|
33407
|
+
schema:
|
|
33408
|
+
type: object
|
|
33409
|
+
properties:
|
|
33410
|
+
copiedAdSetId: { type: string, description: Platform ID of the new ad set }
|
|
33411
|
+
discovery: { type: string, enum: [triggered, skipped, failed] }
|
|
33412
|
+
raw: { type: object, description: Meta's native copy response (includes ad_object_ids for child copies) }
|
|
33413
|
+
'400': { description: Invalid input }
|
|
33414
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
33415
|
+
'404': { description: Source ad set not found }
|
|
33416
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
33417
|
+
|
|
33418
|
+
/v1/ads/{adId}/duplicate:
|
|
33419
|
+
post:
|
|
33420
|
+
operationId: duplicateAd
|
|
33421
|
+
tags: [Ads]
|
|
33422
|
+
summary: Duplicate an ad (Meta)
|
|
33423
|
+
description: |-
|
|
33424
|
+
Duplicates a single ad via Meta's native `POST /{ad-id}/copies`. The copy is created
|
|
33425
|
+
paused. `adSetId` retargets the copy into another ad set; omitted = the source's own ad
|
|
33426
|
+
set. Accepts the Zernio ad id or the platform ad id. Sync discovery is triggered
|
|
33427
|
+
automatically (`syncAfter: false` to skip). Meta only.
|
|
33428
|
+
security:
|
|
33429
|
+
- bearerAuth: []
|
|
33430
|
+
parameters:
|
|
33431
|
+
- { name: adId, in: path, required: true, schema: { type: string }, description: Zernio ad ID or platform ad ID }
|
|
33432
|
+
requestBody:
|
|
33433
|
+
required: false
|
|
33434
|
+
content:
|
|
33435
|
+
application/json:
|
|
33436
|
+
schema:
|
|
33437
|
+
type: object
|
|
33438
|
+
properties:
|
|
33439
|
+
adSetId: { type: string, description: Destination platform ad set id (defaults to the source's ad set) }
|
|
33440
|
+
statusOption: { type: string, enum: [ACTIVE, PAUSED, INHERITED_FROM_SOURCE], default: PAUSED }
|
|
33441
|
+
renameStrategy: { type: string, enum: [DEEP_RENAME, ONLY_TOP_LEVEL_RENAME, NO_RENAME] }
|
|
33442
|
+
renamePrefix: { type: string }
|
|
33443
|
+
renameSuffix: { type: string }
|
|
33444
|
+
syncAfter: { type: boolean, default: true }
|
|
33445
|
+
responses:
|
|
33446
|
+
'200':
|
|
33447
|
+
description: Ad duplicated
|
|
33448
|
+
content:
|
|
33449
|
+
application/json:
|
|
33450
|
+
schema:
|
|
33451
|
+
type: object
|
|
33452
|
+
properties:
|
|
33453
|
+
copiedAdId: { type: string, description: Platform ID of the new ad }
|
|
33454
|
+
discovery: { type: string, enum: [triggered, skipped, failed] }
|
|
33455
|
+
raw: { type: object }
|
|
33456
|
+
'400': { description: Invalid input }
|
|
33457
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
33458
|
+
'404': { description: Ad not found }
|
|
33459
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
33460
|
+
|
|
33321
33461
|
/v1/ads/ad-sets/{adSetId}:
|
|
33322
33462
|
get:
|
|
33323
33463
|
operationId: getAdSetDetails
|
|
@@ -34640,6 +34780,263 @@ paths:
|
|
|
34640
34780
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
34641
34781
|
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
34642
34782
|
|
|
34783
|
+
/v1/ads/labels:
|
|
34784
|
+
get:
|
|
34785
|
+
operationId: listAdLabels
|
|
34786
|
+
tags: [Ads]
|
|
34787
|
+
summary: Ad labels (Meta)
|
|
34788
|
+
description: |-
|
|
34789
|
+
Lists the ad account's organizational labels (Meta's `/act_X/adlabels`), rows returned
|
|
34790
|
+
verbatim (id, name, created/updated time). Meta only.
|
|
34791
|
+
security:
|
|
34792
|
+
- bearerAuth: []
|
|
34793
|
+
parameters:
|
|
34794
|
+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
34795
|
+
- { name: adAccountId, in: query, required: true, schema: { type: string }, description: "Meta ad account id (act_<n>)." }
|
|
34796
|
+
- { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 25 }, description: Rows per page }
|
|
34797
|
+
- { name: after, in: query, schema: { type: string }, description: "Cursor from paging.after of the previous page." }
|
|
34798
|
+
responses:
|
|
34799
|
+
'200':
|
|
34800
|
+
description: Ad labels (raw Meta shape)
|
|
34801
|
+
content:
|
|
34802
|
+
application/json:
|
|
34803
|
+
schema:
|
|
34804
|
+
type: object
|
|
34805
|
+
properties:
|
|
34806
|
+
adAccountId: { type: string }
|
|
34807
|
+
data:
|
|
34808
|
+
type: array
|
|
34809
|
+
items: { type: object, description: "Raw Meta ad label row (id, name, created_time, updated_time)." }
|
|
34810
|
+
paging:
|
|
34811
|
+
type: object
|
|
34812
|
+
properties:
|
|
34813
|
+
after: { type: [string, "null"], description: "Cursor for the next page; null when exhausted." }
|
|
34814
|
+
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
34815
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
34816
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
34817
|
+
|
|
34818
|
+
/v1/ads/high-demand-periods:
|
|
34819
|
+
get:
|
|
34820
|
+
operationId: listHighDemandPeriods
|
|
34821
|
+
tags: [Ads]
|
|
34822
|
+
summary: High demand periods / budget schedules (Meta)
|
|
34823
|
+
description: |-
|
|
34824
|
+
Scheduled budget increases (Meta's budget-scheduling API). The Graph edge lives on the
|
|
34825
|
+
campaign and ad-set nodes only, so exactly one of `campaignId` / `adSetId` (platform
|
|
34826
|
+
ids) is required. Rows returned verbatim (budget_value, budget_value_type, time window,
|
|
34827
|
+
recurrence). Meta only.
|
|
34828
|
+
security:
|
|
34829
|
+
- bearerAuth: []
|
|
34830
|
+
parameters:
|
|
34831
|
+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
34832
|
+
- { name: campaignId, in: query, schema: { type: string }, description: "Platform campaign id. Exactly one of campaignId / adSetId." }
|
|
34833
|
+
- { name: adSetId, in: query, schema: { type: string }, description: "Platform ad set id. Exactly one of campaignId / adSetId." }
|
|
34834
|
+
- { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 25 }, description: Rows per page }
|
|
34835
|
+
- { name: after, in: query, schema: { type: string }, description: "Cursor from paging.after of the previous page." }
|
|
34836
|
+
responses:
|
|
34837
|
+
'200':
|
|
34838
|
+
description: Budget schedules (raw Meta shape)
|
|
34839
|
+
content:
|
|
34840
|
+
application/json:
|
|
34841
|
+
schema:
|
|
34842
|
+
type: object
|
|
34843
|
+
properties:
|
|
34844
|
+
objectId: { type: string, description: "The campaign / ad set id the schedules belong to." }
|
|
34845
|
+
data:
|
|
34846
|
+
type: array
|
|
34847
|
+
items: { type: object, description: "Raw Meta high-demand-period row." }
|
|
34848
|
+
paging:
|
|
34849
|
+
type: object
|
|
34850
|
+
properties:
|
|
34851
|
+
after: { type: [string, "null"], description: "Cursor for the next page; null when exhausted." }
|
|
34852
|
+
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
34853
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
34854
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
34855
|
+
|
|
34856
|
+
/v1/ads/creatives:
|
|
34857
|
+
get:
|
|
34858
|
+
operationId: listAdCreatives
|
|
34859
|
+
tags: [Ads]
|
|
34860
|
+
summary: Creative library (Meta)
|
|
34861
|
+
description: |-
|
|
34862
|
+
Lists the ad account's creative library (Meta's `/act_X/adcreatives`), rows returned
|
|
34863
|
+
verbatim. The default projection covers id, name, status, object type, thumbnail,
|
|
34864
|
+
object_story_spec / asset_feed_spec and url_tags; `fields` is a raw-passthrough
|
|
34865
|
+
override. Any creative id here is reusable on the create endpoints via
|
|
34866
|
+
`existingCreativeId`. Meta only.
|
|
34867
|
+
security:
|
|
34868
|
+
- bearerAuth: []
|
|
34869
|
+
parameters:
|
|
34870
|
+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
34871
|
+
- { name: adAccountId, in: query, required: true, schema: { type: string }, description: "Meta ad account id (act_<n>)." }
|
|
34872
|
+
- { name: fields, in: query, schema: { type: string }, description: "Comma-separated Graph field override (supports nested {} projections)." }
|
|
34873
|
+
- { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 25 }, description: Rows per page }
|
|
34874
|
+
- { name: after, in: query, schema: { type: string }, description: "Cursor from paging.after of the previous page." }
|
|
34875
|
+
responses:
|
|
34876
|
+
'200':
|
|
34877
|
+
description: Creatives (raw Meta shape)
|
|
34878
|
+
content:
|
|
34879
|
+
application/json:
|
|
34880
|
+
schema:
|
|
34881
|
+
type: object
|
|
34882
|
+
properties:
|
|
34883
|
+
adAccountId: { type: string }
|
|
34884
|
+
data:
|
|
34885
|
+
type: array
|
|
34886
|
+
items: { type: object, description: "Raw Meta creative row." }
|
|
34887
|
+
paging:
|
|
34888
|
+
type: object
|
|
34889
|
+
properties:
|
|
34890
|
+
after: { type: [string, "null"], description: "Cursor for the next page; null when exhausted." }
|
|
34891
|
+
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
34892
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
34893
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
34894
|
+
post:
|
|
34895
|
+
operationId: createAdCreative
|
|
34896
|
+
tags: [Ads]
|
|
34897
|
+
summary: Create a standalone creative (Meta)
|
|
34898
|
+
description: |-
|
|
34899
|
+
Creates a creative in the library WITHOUT an ad, reusable on the create endpoints via
|
|
34900
|
+
`existingCreativeId`. Provide exactly one of `imageUrl` (uploaded server-side),
|
|
34901
|
+
`imageHash` (from POST /v1/ads/images or the library list), or `carouselCards` (2-10
|
|
34902
|
+
hand-built cards). The Page (and linked Instagram account, when present) is resolved
|
|
34903
|
+
from `accountId` as the story actor. Meta only.
|
|
34904
|
+
security:
|
|
34905
|
+
- bearerAuth: []
|
|
34906
|
+
requestBody:
|
|
34907
|
+
required: true
|
|
34908
|
+
content:
|
|
34909
|
+
application/json:
|
|
34910
|
+
schema:
|
|
34911
|
+
type: object
|
|
34912
|
+
required: [accountId, adAccountId, headline, body, linkUrl]
|
|
34913
|
+
properties:
|
|
34914
|
+
accountId: { type: string, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token and Page." }
|
|
34915
|
+
adAccountId: { type: string, description: "Meta ad account id (act_<n>)." }
|
|
34916
|
+
headline: { type: string, maxLength: 255 }
|
|
34917
|
+
body: { type: string, description: Primary text }
|
|
34918
|
+
description: { type: string, maxLength: 255, description: "Link description below the headline; omitted = Meta scrapes the destination's OG description." }
|
|
34919
|
+
callToAction: { type: string, default: LEARN_MORE, description: "CTA type (same whitelist as POST /v1/ads/create)." }
|
|
34920
|
+
linkUrl: { type: string, format: uri }
|
|
34921
|
+
imageUrl: { type: string, format: uri, description: "Publicly reachable image; uploaded to the account's library server-side." }
|
|
34922
|
+
imageHash: { type: string, description: "Existing library image hash (POST /v1/ads/images or GET /v1/ads/images)." }
|
|
34923
|
+
carouselCards:
|
|
34924
|
+
type: array
|
|
34925
|
+
minItems: 2
|
|
34926
|
+
maxItems: 10
|
|
34927
|
+
items:
|
|
34928
|
+
type: object
|
|
34929
|
+
required: [imageUrl, linkUrl]
|
|
34930
|
+
properties:
|
|
34931
|
+
imageUrl: { type: string, format: uri }
|
|
34932
|
+
linkUrl: { type: string, format: uri }
|
|
34933
|
+
headline: { type: string, maxLength: 255 }
|
|
34934
|
+
description: { type: string, maxLength: 255 }
|
|
34935
|
+
callToAction: { type: string }
|
|
34936
|
+
urlTags: { type: string, description: "Appended to every outbound URL (e.g. utm_source=fb)." }
|
|
34937
|
+
responses:
|
|
34938
|
+
'201':
|
|
34939
|
+
description: Creative created
|
|
34940
|
+
content:
|
|
34941
|
+
application/json:
|
|
34942
|
+
schema:
|
|
34943
|
+
type: object
|
|
34944
|
+
properties:
|
|
34945
|
+
adAccountId: { type: string }
|
|
34946
|
+
creativeId: { type: string, description: "Platform creative id, reusable via existingCreativeId." }
|
|
34947
|
+
'400': { description: "Invalid input, or Meta rejected the create" }
|
|
34948
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
34949
|
+
'422': { description: No Facebook Page found to act as the story actor }
|
|
34950
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
34951
|
+
|
|
34952
|
+
/v1/ads/creatives/{creativeId}:
|
|
34953
|
+
get:
|
|
34954
|
+
operationId: getAdCreative
|
|
34955
|
+
tags: [Ads]
|
|
34956
|
+
summary: Creative details (Meta)
|
|
34957
|
+
description: |-
|
|
34958
|
+
One creative's details, verbatim from Meta. `fields` is a raw-passthrough override of
|
|
34959
|
+
the default projection. Meta only.
|
|
34960
|
+
security:
|
|
34961
|
+
- bearerAuth: []
|
|
34962
|
+
parameters:
|
|
34963
|
+
- { name: creativeId, in: path, required: true, schema: { type: string }, description: Platform creative id }
|
|
34964
|
+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
34965
|
+
- { name: fields, in: query, schema: { type: string }, description: "Comma-separated Graph field override (supports nested {} projections)." }
|
|
34966
|
+
responses:
|
|
34967
|
+
'200':
|
|
34968
|
+
description: Creative details
|
|
34969
|
+
content:
|
|
34970
|
+
application/json:
|
|
34971
|
+
schema:
|
|
34972
|
+
type: object
|
|
34973
|
+
properties:
|
|
34974
|
+
creative: { type: object, description: Raw Meta creative node }
|
|
34975
|
+
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
34976
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
34977
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
34978
|
+
put:
|
|
34979
|
+
operationId: updateAdCreative
|
|
34980
|
+
tags: [Ads]
|
|
34981
|
+
summary: Rename a creative (Meta)
|
|
34982
|
+
description: |-
|
|
34983
|
+
Renames a creative. Creatives are immutable on Meta beyond `name` — for content changes
|
|
34984
|
+
create a new creative (POST /v1/ads/creatives) and swap it onto the ad
|
|
34985
|
+
(PUT /v1/ads/{adId} with `creative`). Meta only.
|
|
34986
|
+
security:
|
|
34987
|
+
- bearerAuth: []
|
|
34988
|
+
parameters:
|
|
34989
|
+
- { name: creativeId, in: path, required: true, schema: { type: string }, description: Platform creative id }
|
|
34990
|
+
requestBody:
|
|
34991
|
+
required: true
|
|
34992
|
+
content:
|
|
34993
|
+
application/json:
|
|
34994
|
+
schema:
|
|
34995
|
+
type: object
|
|
34996
|
+
required: [accountId, name]
|
|
34997
|
+
properties:
|
|
34998
|
+
accountId: { type: string, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
34999
|
+
name: { type: string, maxLength: 255 }
|
|
35000
|
+
responses:
|
|
35001
|
+
'200':
|
|
35002
|
+
description: Creative renamed
|
|
35003
|
+
content:
|
|
35004
|
+
application/json:
|
|
35005
|
+
schema:
|
|
35006
|
+
type: object
|
|
35007
|
+
properties:
|
|
35008
|
+
creativeId: { type: string }
|
|
35009
|
+
name: { type: string }
|
|
35010
|
+
message: { type: string }
|
|
35011
|
+
'400': { description: "Invalid input, or Meta rejected the update" }
|
|
35012
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
35013
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
35014
|
+
delete:
|
|
35015
|
+
operationId: deleteAdCreative
|
|
35016
|
+
tags: [Ads]
|
|
35017
|
+
summary: Delete a creative (Meta)
|
|
35018
|
+
description: |-
|
|
35019
|
+
Deletes a creative from the library. Meta only allows deleting creatives not referenced
|
|
35020
|
+
by any ad — otherwise its 400 surfaces verbatim.
|
|
35021
|
+
security:
|
|
35022
|
+
- bearerAuth: []
|
|
35023
|
+
parameters:
|
|
35024
|
+
- { name: creativeId, in: path, required: true, schema: { type: string }, description: Platform creative id }
|
|
35025
|
+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
35026
|
+
responses:
|
|
35027
|
+
'200':
|
|
35028
|
+
description: Creative deleted
|
|
35029
|
+
content:
|
|
35030
|
+
application/json:
|
|
35031
|
+
schema:
|
|
35032
|
+
type: object
|
|
35033
|
+
properties:
|
|
35034
|
+
creativeId: { type: string }
|
|
35035
|
+
message: { type: string }
|
|
35036
|
+
'400': { description: "Invalid input, the creative is in use, or Meta rejected the delete" }
|
|
35037
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
35038
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
35039
|
+
|
|
34643
35040
|
/v1/ads/accounts/finance:
|
|
34644
35041
|
get:
|
|
34645
35042
|
operationId: getAdAccountFinance
|
|
@@ -36086,6 +36483,42 @@ paths:
|
|
|
36086
36483
|
'400': { description: "Invalid input, or Meta rejected the image" }
|
|
36087
36484
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
36088
36485
|
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
36486
|
+
get:
|
|
36487
|
+
operationId: listAdImages
|
|
36488
|
+
tags: [Ads]
|
|
36489
|
+
summary: Ad image library (Meta)
|
|
36490
|
+
description: |-
|
|
36491
|
+
Lists the ad account's image library (Meta's `/act_X/adimages`), rows returned verbatim.
|
|
36492
|
+
The default projection covers hash, url, name, dimensions and status; `fields` is a
|
|
36493
|
+
raw-passthrough override. Any `hash` here is reusable wherever Meta accepts
|
|
36494
|
+
`image_hash` (e.g. `imageHash` on POST /v1/ads/creatives). Meta only.
|
|
36495
|
+
security:
|
|
36496
|
+
- bearerAuth: []
|
|
36497
|
+
parameters:
|
|
36498
|
+
- { name: accountId, in: query, required: true, schema: { type: string }, description: "Zernio SocialAccount id (posting or ads variant) used to resolve the Meta token." }
|
|
36499
|
+
- { name: adAccountId, in: query, required: true, schema: { type: string }, description: "Meta ad account id (act_<n>)." }
|
|
36500
|
+
- { name: fields, in: query, schema: { type: string }, description: "Comma-separated Graph field override (supports nested {} projections)." }
|
|
36501
|
+
- { name: limit, in: query, schema: { type: integer, minimum: 1, maximum: 100, default: 25 }, description: Rows per page }
|
|
36502
|
+
- { name: after, in: query, schema: { type: string }, description: "Cursor from paging.after of the previous page." }
|
|
36503
|
+
responses:
|
|
36504
|
+
'200':
|
|
36505
|
+
description: Ad images (raw Meta shape)
|
|
36506
|
+
content:
|
|
36507
|
+
application/json:
|
|
36508
|
+
schema:
|
|
36509
|
+
type: object
|
|
36510
|
+
properties:
|
|
36511
|
+
adAccountId: { type: string }
|
|
36512
|
+
data:
|
|
36513
|
+
type: array
|
|
36514
|
+
items: { type: object, description: "Raw Meta ad image row (hash, url, name, width, height, status)." }
|
|
36515
|
+
paging:
|
|
36516
|
+
type: object
|
|
36517
|
+
properties:
|
|
36518
|
+
after: { type: [string, "null"], description: "Cursor for the next page; null when exhausted." }
|
|
36519
|
+
'400': { description: "Invalid input, or Meta rejected the query" }
|
|
36520
|
+
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
36521
|
+
'501': { description: Only supported on Meta (facebook/instagram) }
|
|
36089
36522
|
|
|
36090
36523
|
/v1/ads/interests:
|
|
36091
36524
|
get:
|
|
@@ -36657,12 +37090,15 @@ paths:
|
|
|
36657
37090
|
put:
|
|
36658
37091
|
operationId: updateAdAudience
|
|
36659
37092
|
tags: [Ad Audiences]
|
|
36660
|
-
summary: Update
|
|
37093
|
+
summary: Update an audience
|
|
36661
37094
|
description: |
|
|
36662
|
-
Update
|
|
36663
|
-
|
|
36664
|
-
|
|
36665
|
-
|
|
37095
|
+
Update an audience. `saved_targeting` audiences accept `name`, `description`, and `spec`
|
|
37096
|
+
(full replacement, no merge, Zernio-only, no platform call). Platform audiences
|
|
37097
|
+
(uploaded/website/lookalike) accept `name` and `description` only, updated on the
|
|
37098
|
+
platform first and then mirrored locally; their rules are immutable, so `spec` returns
|
|
37099
|
+
400 for them. Platform audience updates are Meta-only for now (other platforms return
|
|
37100
|
+
501). Ads already created from a saved_targeting audience are unaffected, they snapshot
|
|
37101
|
+
the targeting at creation.
|
|
36666
37102
|
security:
|
|
36667
37103
|
- bearerAuth: []
|
|
36668
37104
|
parameters:
|
|
@@ -36691,13 +37127,15 @@ paths:
|
|
|
36691
37127
|
audience: { type: object }
|
|
36692
37128
|
message: { type: string }
|
|
36693
37129
|
'400':
|
|
36694
|
-
description: Invalid body (no fields provided or
|
|
37130
|
+
description: 'Invalid body (no fields provided, malformed spec, or spec on a platform audience)'
|
|
36695
37131
|
'401': { $ref: '#/components/responses/Unauthorized' }
|
|
36696
37132
|
'403':
|
|
36697
37133
|
description: Ads access required. Legacy plans need the Ads add-on; included by default on usage-based plans.
|
|
36698
37134
|
'404': { $ref: '#/components/responses/NotFound' }
|
|
36699
37135
|
'422':
|
|
36700
|
-
description: The audience
|
|
37136
|
+
description: The audience has no platform counterpart to update
|
|
37137
|
+
'501':
|
|
37138
|
+
description: Platform audience updates are only supported on Meta
|
|
36701
37139
|
delete:
|
|
36702
37140
|
operationId: deleteAdAudience
|
|
36703
37141
|
tags: [Ad Audiences]
|
|
@@ -97,8 +97,8 @@ describe 'AdAudiencesApi' do
|
|
|
97
97
|
end
|
|
98
98
|
|
|
99
99
|
# unit tests for update_ad_audience
|
|
100
|
-
# Update
|
|
101
|
-
# Update
|
|
100
|
+
# Update an audience
|
|
101
|
+
# Update an audience. `saved_targeting` audiences accept `name`, `description`, and `spec` (full replacement, no merge, Zernio-only, no platform call). Platform audiences (uploaded/website/lookalike) accept `name` and `description` only, updated on the platform first and then mirrored locally; their rules are immutable, so `spec` returns 400 for them. Platform audience updates are Meta-only for now (other platforms return 501). Ads already created from a saved_targeting audience are unaffected, they snapshot the targeting at creation.
|
|
102
102
|
# @param audience_id
|
|
103
103
|
# @param update_ad_audience_request
|
|
104
104
|
# @param [Hash] opts the optional parameters
|
|
@@ -44,6 +44,18 @@ describe 'AdCampaignsApi' do
|
|
|
44
44
|
end
|
|
45
45
|
end
|
|
46
46
|
|
|
47
|
+
# unit tests for create_ad_campaign
|
|
48
|
+
# Create a standalone campaign (Meta)
|
|
49
|
+
# Creates a campaign WITHOUT its first ad set / ad (the ODAX shell only). Ad sets join it later via `existingCampaignId` on the create endpoints. A budget here is campaign-level (CBO) by definition; omit it for ABO (each ad set carries its own budget). Created `PAUSED` unless `status: ACTIVE`. The campaign materializes in `/v1/ads/tree` via the next sync discovery pass. Meta only.
|
|
50
|
+
# @param create_ad_campaign_request
|
|
51
|
+
# @param [Hash] opts the optional parameters
|
|
52
|
+
# @return [CreateAdCampaign201Response]
|
|
53
|
+
describe 'create_ad_campaign test' do
|
|
54
|
+
it 'should work' do
|
|
55
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
|
|
47
59
|
# unit tests for delete_ad_campaign
|
|
48
60
|
# Delete a campaign
|
|
49
61
|
# Deletes the whole campaign on the platform, cascading to its ad sets and ads. Locally, all Ad documents for this campaign are marked `status: cancelled`. Meta-only for now. Other platforms return 501 Not Implemented — fall back to DELETE /v1/ads/{adId} per ad in the meantime.
|
|
@@ -70,6 +82,19 @@ describe 'AdCampaignsApi' do
|
|
|
70
82
|
end
|
|
71
83
|
end
|
|
72
84
|
|
|
85
|
+
# unit tests for duplicate_ad_set
|
|
86
|
+
# Duplicate an ad set (Meta)
|
|
87
|
+
# Duplicates an ad set, including its ads and creatives by default (`deepCopy: true`), via Meta's native `POST /{adset-id}/copies`. The copy is created paused so callers can review before launching. `campaignId` retargets the copy into another campaign; omitted = the source's own campaign. The new hierarchy materializes asynchronously — sync discovery is triggered automatically (`syncAfter: false` to skip). Meta only.
|
|
88
|
+
# @param ad_set_id Source platform ad set ID
|
|
89
|
+
# @param duplicate_ad_set_request
|
|
90
|
+
# @param [Hash] opts the optional parameters
|
|
91
|
+
# @return [DuplicateAdSet200Response]
|
|
92
|
+
describe 'duplicate_ad_set test' do
|
|
93
|
+
it 'should work' do
|
|
94
|
+
# assertion here. ref: https://rspec.info/features/3-12/rspec-expectations/built-in-matchers/
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
73
98
|
# unit tests for get_ad_set_details
|
|
74
99
|
# Live ad-set details incl. learning phase (Meta)
|
|
75
100
|
# Reads the ad set live from Meta, returned verbatim. The default projection includes `learning_stage_info` (learning-phase status: LEARNING / SUCCESS / FAIL / WAIVING — Meta omits its `status` key on paused ad sets), delivery settings, budgets, schedule and targeting. `fields` is a raw-passthrough override; unknown fields return Meta's 400 verbatim. Meta only.
|