toggle
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 | Required |
Params structure (for JSON) / ToggleRequest structure (for SOAP) | |||
---|---|---|---|
BidModifierToggleItems | array of BidModifierToggleItem | Sets of adjustments to enable or disable. Maximum of 1000 items in the array. | Yes |
BidModifierToggleItem structure | |||
CampaignId | long | The campaign ID. Specified when enabling or disabling adjustments at the campaign level. | Either CampaignId or AdGroupId |
AdGroupId | long | ID of the ad group. Specified when enabling or disabling adjustments at the group level. | |
Type | BidModifierTypeEnum | Types of adjustments to be enabled or disabled: DEMOGRAPHICS_ADJUSTMENT, RETARGETING_ADJUSTMENT, REGIONAL_ADJUSTMENT, SERP_LAYOUT_ADJUSTMENT, or INCOME_GRADE_ADJUSTMENT. | Yes |
Enabled | YesNoEnum | YES — enable the set of adjustments; NO — disable the set of adjustments. | Yes |
Parameter | Type | Description | Required |
Params structure (for JSON) / ToggleRequest structure (for SOAP) | |||
---|---|---|---|
BidModifierToggleItems | array of BidModifierToggleItem | Sets of adjustments to enable or disable. Maximum of 1000 items in the array. | Yes |
BidModifierToggleItem structure | |||
CampaignId | long | The campaign ID. Specified when enabling or disabling adjustments at the campaign level. | Either CampaignId or AdGroupId |
AdGroupId | long | ID of the ad group. Specified when enabling or disabling adjustments at the group level. | |
Type | BidModifierTypeEnum | Types of adjustments to be enabled or disabled: DEMOGRAPHICS_ADJUSTMENT, RETARGETING_ADJUSTMENT, REGIONAL_ADJUSTMENT, SERP_LAYOUT_ADJUSTMENT, or INCOME_GRADE_ADJUSTMENT. | Yes |
Enabled | 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) | ||
---|---|---|
ToggleResults | array of ToggleResult | Results of enabling or disabling adjustments. |
ToggleResult structure | ||
CampaignId | long | The campaign ID. Returned if the operation completed successfully (if it was specified in the request). |
AdGroupId | long | ID of the ad group. Returned if the operation completed successfully (if it was specified in the request). |
Type | BidModifierTypeEnum | Type of adjustments that were enabled or disabled. |
Warnings | array of ExceptionNotification | Warnings that occurred during the operation. |
Errors | array of ExceptionNotification | Errors that occurred during the operation. |
Parameter | Type | Description |
Result structure (for JSON) / ToggleResponse structure (for SOAP) | ||
---|---|---|
ToggleResults | array of ToggleResult | Results of enabling or disabling adjustments. |
ToggleResult structure | ||
CampaignId | long | The campaign ID. Returned if the operation completed successfully (if it was specified in the request). |
AdGroupId | long | ID of the ad group. Returned if the operation completed successfully (if it was specified in the request). |
Type | BidModifierTypeEnum | Type of adjustments that were enabled or disabled. |
Warnings | array of ExceptionNotification | Warnings that occurred during the operation. |
Errors | 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" } ] } }