Create/Update Ad Set
The Create/Update Ad Set API is designed to configure or update ad sets within a specific campaign. This endpoint allows for detailed customization of advertising strategies to target specific audiences and placements effectively.
-
Method:
POST
-
URL:
https://<PA_RM_END_POINT>/rm/1.0/adset
-
Headers:
Content-Type: application/json
Authorization: Bearer ACCESS_TOKEN
-
Request Body Parameters:
-
name (string)
[REQUIRED]: The name assigned to the Ad Set. -
campaignId (GUID)
[REQUIRED]: The unique identifier for the campaign to which the Ad Set belongs. -
adSetType (integer)
[REQUIRED]: Determines the Ad Set Type. -
strategyType (integer)
[REQUIRED]: Determines the strategy of the Ad Set. -
startDate (dateTime)
[CONDITIONALLY REQUIRED]: The start date and hour of the Ad Set.infoRequired only for
strategyType=4
(Fixed). -
endDate (dateTime)
[CONDITIONALLY REQUIRED]: The end date and hour of the Ad Set.infoRequired only for
strategyType=4
(Fixed). -
placementIds (array of GUIDs)
[REQUIRED]: List of specific placement IDs targeted by the Ad Set. -
applyOnSpecificSlots (boolean)
[REQUIRED]: Set totrue
if targeting specific slots; otherwise,false
. -
slot (string)
: Slot identifier used if specific slots are being targeted. -
maxCPC (decimal)
[CONDITIONALLY REQUIRED]: Maximum Cost Per Click. Required forstrategyType=1,2,3
.infoMaximum CPC is not applicable for
strategyType=4
. -
fixedCost (decimal)
[CONDITIONALLY REQUIRED]: Fixed cost for an ad set placement.infoRequired only for
strategyType=4
(Fixed). -
totalCost (decimal)
[CONDITIONALLY REQUIRED]: Total cost of the Fixed ad set placement.infoRequired only for
strategyType=4
(Fixed), calculated as the product of fixedCost and the duration of the Ad Set. -
creativeSettings (object)
[CONDITIONALLY REQUIRED]: The content information for Banner Ad:infoRequired only for
adSetType=3
(Banner)-
bannerTitle (string)
: The title of the banner. -
termsAndConditionsUrl (string)
: The URL for the terms and conditions. -
bannerCopy (string)
: The copy of the banner. -
ctaText (string)
: The call-to-action text. -
ctaRedirectUrl (string)
: The URL to redirect when the call-to-action is clicked. -
bannerImageUrl (string)
: The URL of the banner image.
-
-
customerSegmentId (array of GUIDs)
: Used only forstrategyType=3
to target specific customer segments. -
productAttributeFilter (array of objects)
[CONDITIONALLY REQUIRED]: Array of Attribute objects for relevance affinity targeting:infoRequired for
adSetType=3
andstrategyType=1,2
-
attribute (string)
: The attribute name. -
attributeValues (string)
: The attribute values.
-
-
-
Response Codes:
-
200 OK
Successful request. The response body will include the details of the created/updated Ad Set:
{
"message": "Ad Set created/updated successfully.",
"adSet": {
"id": "xxxxxxxxxxxxxxxxxxxxxxx",
"name": "Name of the Ad Set"
}
} -
Non-200 Responses
If an error occurs (e.g., bad request, unauthorized access), the server will respond with an appropriate non-200 status code and include an error message in the response body:
{
"error": "Error message"
}noteEnsure that Ad Set data is accessed securely and only by authorized users to maintain confidentiality and integrity of the information.
-