Ad Group - Media Plan

The various methods for Product Content are listed below:

  1. Create auto media plan
  2. Get media plan by ID
  3. Fetch ad group details
  4. Get Product Content (content map)
  5. Update Product Content (content map)
  6. List Product/Category/Subcategory from Asset Source

Create auto media plan

Creates an auto media plan for a retail campaign. Validates allowed dimensions against the retailer's whitelist. Requires Campaigns_List permission.

Path Parameters

NameData TypeRequirementParameter TypeDescription
accountIdstringMandatorypathID of the account.

Parameters

FieldData TypeRequirementDescription
dimensionsarray of stringMandatoryList of ad dimensions to include (e.g. ["300x250", "728x90"]).
retailCampaignIdintegerMandatoryID of the retail campaign to associate with this media plan.
mediaChannelIdxintegerMandatoryIndex of the media channel to use.

Sample Request

HTTP
Copy

Request Body

JSON
Copy

Response

Returns a MediaPlanEditResponse JSON object.

FieldData TypeDescription
mediaPlanIdintegerID of the newly created media plan.
msgstringSuccess message.

Request Body

JSON
Copy

Get media plan by ID

Returns the details of a media plan by its ID. Response is controlled by ParamInfo (fields, pagination). Requires MediaPlan_View permission.

Path Parameters

NameData TypeRequirementParameter TypeDescription
accountIdstringMandatorypathID of the account.
mediaPlanIdstringMandatorypathID of the media plan to retrieve.

Query Parameters

NameData TypeRequirementParameter TypeDescription
fieldsstringOptionalqueryComma-separated list of fields to include in the response.
offsetintegerOptionalqueryPagination offset
limitintegerOptionalqueryNumber of items per page.

Sample Request

HTTP
Copy

Response

Returns a MediaPlanV2 JSON object serialized via the explicit mediaPlanV2Format writer.

FieldData TypeDescription
mediaPlanIdinteger/nullID of the media plan.
mediaPlanNamestring/nullName of the media plan.
adServersarrayList of ad server objects associated with this media plan.
adServers[].adServerNamestring/nullName of the ad server.
adServers[].adServerParamsobjectAd server parameters.
adServers[].placementsarrayList of placement objects under this ad server.

Request Body

JSON
Copy

Fetch ad group details

Returns all ad groups associated with a retail campaign, as a list of ID–name pairs. Requires MediaPlan_Tags_Create permission.

Path Parameters

NameData TypeRequirementParameter TypeDescription
accountIdstringMandatorypathID of the account.
retailCampaignIdxintegerMandatorypathIndex of the retail campaign to fetch ad groups for.

Sample Request

HTTP
Copy

Response

Returns an AdGroupDetails JSON object containing a list of AdGroupInfo items.

FieldData TypeDescription
adGroupDetailsarrayList of ad group objects.
adGroupDetails[].adGroupIdstringID of the ad group.
adGroupDetails[].adGroupNamestringName of the ad group.

Request Body

JSON
Copy

Get Product Content (content map)

Returns the product content (content map) for a retail campaign and media plan. The response varies based on whether content is mapped by placement (placementContentMap) or by ad group (adGroupPlacementCreativeMap). Requires MediaPlan_List permission.

Parameters

NameData TypeRequirementParameter TypeDescription
accountIdstringMandatorypathID of the account.
retailCampaignIdintegerMandatorypathIndex of the retail campaign.
mediaPlanIdintegerMandatorypathID of the media plan.

Query Parameters

NameData TypeRequirementParameter TypeDescription
offsetintegerOptionalqueryPagination offset
limitintegerOptionalqueryNumber of items per page.

Sample Request

HTTP
Copy

Response

Returns an RMAProductContent JSON object. Either placementContentMap or adGroupPlacementCreativeMap is populated depending on the campaign type.

FieldData TypeDescription
contentTypestring/nullContent type (e.g. Product, Creatives).
numOfCardsinteger/nullNumber of cards in the creative.
placementContentMaparray/nullList of placement-level content mappings (used for non-ad-group campaigns).
placementContentMap[].placementIdstring/nullID of the placement.
placementContentMap[].externalPlacementIdstring/nullExternal placement ID.
placementContentMap[].placementNamestring/nullName of the placement.
placementContentMap[].dimensionstring/nullAd dimension (e.g. 300x250).
placementContentMap[].contentarrayList of content preview items
placementContentMap[].content[].contentValuestring/nullRaw content value (e.g. SKU or creative name).
placementContentMap[].content[].displayValuestring/nullDisplay label for the content
placementContentMap[].content[].productImageUrlstring/nullProduct image URL (present when contentPreviews is available).
placementContentMap[].content[].previewUrlsarray/nullPer-ad-unit preview URLs.
placementContentMap[].content[].previewUrls[].adUnitIdintegerID of the ad unit.
placementContentMap[].content[].previewUrls[].urlstring/nullPreview URL for the ad unit.
adGroupPlacementCreativeMaparray/nullList of ad-group-level content mappings (used for ad-group-based campaigns).
adGroupPlacementCreativeMap[].adGroupIdstring/nullID of the ad group.
adGroupPlacementCreativeMap[].adGroupNamearray of stringName(s) of the ad group.
adGroupPlacementCreativeMap[].statusarrayStatus value(s) for the ad group.
adGroupPlacementCreativeMap[].placementCreativeMaparrayList of placement-level creative mappings within the ad group
adGroupPlacementCreativeMap[].placementCreativeMap[].placementIdstring/nullID of the placement
adGroupPlacementCreativeMap[].placementCreativeMap[].externalPlacementIdstring/nullExternal placement ID.
adGroupPlacementCreativeMap[].placementCreativeMap[].placementNamestring/nullName of the placement.
adGroupPlacementCreativeMap[].placementCreativeMap[].dimensionstring/nullAd dimension.
adGroupPlacementCreativeMap[].placementCreativeMap[].contentarrayList of content preview items (same structure as placementContentMap[].content).
nextstring/nullURL for the next page of results.
previousstring/nullURL for the previous page of results.

Sample Response

JSON
Copy

Update Product Content (content map)

Saves/updates the product content mapping for a retail campaign and media plan. Accepts ad-group-level content mapping. Requires MediaPlan_Edit permission.

Path Parameters

NameData TypeRequirementParameter TypeDescription
accountIdstringMandatorypathID of the account.
retailCampaignIdintegerMandatorypathIndex of the retail campaign.
mediaPlanIdintegerMandatorypathID of the media plan.

Sample Request

HTTP
Copy

Response

Field DataTypeRequirementDescription
contentTypeenum (string)MandatoryContent type. Values: Product, Sub-category, Category, Creatives, All, Brand.
dataServiceIdintegerOptionalID of the data service (asset source).
adGroupPlacementCreativeMaparrayMandatoryAd-group-level content mapping.
adGroupPlacementCreativeMap[].adGroupIdstringMandatoryID of the ad group
adGroupPlacementCreativeMap[].adGroupNamestringOptionalName of the ad group.
adGroupPlacementCreativeMap[].statusstringOptionalStatus of the ad group.
adGroupPlacementCreativeMap[].placementCreativeMaparrayMandatoryList of placement-level mappings within the ad group
adGroupPlacementCreativeMap[].placementCreativeMap[].placementIdstringMandatoryID of the placement
adGroupPlacementCreativeMap[].placementCreativeMap[].externalPlacementIdstringOptionalExternal placement ID.
adGroupPlacementCreativeMap[].placementCreativeMap[].placementNamestringOptionalName of the placement.
adGroupPlacementCreativeMap[].placementCreativeMap[].dimensionstringOptionalAd dimension (e.g. 300x250).
adGroupPlacementCreativeMap[].placementCreativeMap[].siteIdstringOptionalSite ID associated with the placement
adGroupPlacementCreativeMap[].placementCreativeMap[].contentarray of stringMandatoryList of content values (SKUs or creative names). Must be empty when contentType is All.

Note: contentType: All is only valid for the Meta ad server and non-SBT campaigns. Content list must be empty when using All

Sample Response

JSON
Copy

Response

FieldData TypeDescription
messagestringSave confirmation message.

Response

JSON
Copy

List Product/Category/Subcategory from Asset Source

This will list all the Product/Category/SubCategory from the Asset Source.

Parameters

NameData TypeRequirementParameter TypeDescription
accountIdstringMandatorypathID of the advertiser account created on the platform.

Sample Request

HTTP
Copy

The Parameter:

accountId - is the Current account Id

field: product/category/sub-category field

query: the search query input by the user

limit: the limit of elements in the list

offset: the no. of elements to skip

Sample Response

JSON
Copy
Type to search, ESC to discard
Type to search, ESC to discard
Type to search, ESC to discard