toggle
Enables or disables a set of adjustments.
Learn more
Request
Request structure in JSON format:
{
"method": "toggle",
"params": { /* params */
"BidModifierToggleItems": [{ /* BidModifierToggleItem */
"CampaignId": (long),
"AdGroupId": (long),
"Type": ( "DEMOGRAPHICS_ADJUSTMENT" | "RETARGETING_ADJUSTMENT" | "REGIONAL_ADJUSTMENT" | "SERP_LAYOUT_ADJUSTMENT" | "INCOME_GRADE_ADJUSTMENT" ), /* required */
"Enabled": ( "YES" | "NO" ) /* required */
}, ... ] /* required */
}
}
Parameter |
Type |
Description |
Mandatory |
params structure (for JSON) / ToggleRequest structure (for SOAP) |
|||
|
array of BidModifierToggleItem |
Sets of adjustments to enable or disable. Maximum of 1000 items in the array. |
Yes |
BidModifierToggleItem structure |
|||
|
long |
The campaign ID. Specified when enabling or disabling adjustments at the campaign level. |
Use either |
|
long |
ID of the ad group. Specified when enabling or disabling adjustments at the group level. |
|
|
BidModifierTypeEnum |
Types of adjustments to be enabled or disabled: DEMOGRAPHICS_ADJUSTMENT, RETARGETING_ADJUSTMENT, REGIONAL_ADJUSTMENT, SERP_LAYOUT_ADJUSTMENT, or INCOME_GRADE_ADJUSTMENT. |
Yes |
|
YesNoEnum |
YES — enable the set of adjustments; NO — disable the set of adjustments. |
Yes |
Response
Response structure in JSON format:
{
"result": { /* result */
"ToggleResults": [{ /* ToggleResult */
"CampaignId": (long),
"AdGroupId": (long),
"Type": ( "DEMOGRAPHICS_ADJUSTMENT" | "RETARGETING_ADJUSTMENT" | "REGIONAL_ADJUSTMENT" | "SERP_LAYOUT_ADJUSTMENT" | "INCOME_GRADE_ADJUSTMENT" ), /* required */
"Warnings": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ... ],
"Errors": [{ /* ExceptionNotification */
"Code": (int), /* required */
"Message": (string), /* required */
"Details": (string)
}, ... ]
}, ... ]
}
}
Parameter |
Type |
Description |
result structure (for JSON) / ToggleResponse structure (for SOAP) |
||
|
array of ToggleResult |
Results of enabling or disabling adjustments. |
ToggleResult structure |
||
|
long |
The campaign ID. Returned if the operation completed successfully (if it was specified in the request). |
|
long |
ID of the ad group. Returned if the operation completed successfully (if it was specified in the request). |
|
BidModifierTypeEnum |
Type of adjustments that were enabled or disabled. |
|
array of ExceptionNotification |
Warnings that occurred during the operation. |
|
array of ExceptionNotification |
Errors that occurred during the operation. |
Examples
**Example of disabling gender and age adjustments on the campaign level **
{
"method": "toggle",
"params": {
"BidModifierToggleItems": [
{
"CampaignId": 10001,
"Type": "DEMOGRAPHICS_ADJUSTMENT",
"Enabled": "NO"
}
]
}
}