Documentation

toggle

Enables or disables a set of adjustments.

Request

Request structure in JSON format:

{
  "method": "toggle",
  "params": { 
    "BidModifierToggleItems
[no-highlight[

Sets of adjustments to enable or disable. Maximum of 1000 items in the array.

Required

Yes

]no-highlight]
": [{ /* BidModifierToggleItem */ "CampaignId
[no-highlight[

The campaign ID. Specified when enabling or disabling adjustments at the campaign level.

Required

Either CampaignId or AdGroupId

]no-highlight]
": (long), "AdGroupId
[no-highlight[

ID of the ad group. Specified when enabling or disabling adjustments at the group level.

Required

Either CampaignId or AdGroupId

]no-highlight]
": (long), "Type
[no-highlight[

The type of adjustments to enable or disable: DEMOGRAPHICS_ADJUSTMENT, RETARGETING_ADJUSTMENT, or REGIONAL ADJUSTMENT.

Required

Yes

]no-highlight]
": ( "DEMOGRAPHICS_ADJUSTMENT" | "RETARGETING_ADJUSTMENT" | "REGIONAL_ADJUSTMENT" ), /* required */ "Enabled
[no-highlight[

YES — enable the set of adjustments; NO — disable the set of adjustments.

Required

Yes

]no-highlight]
": ( "YES" | "NO" ) /* required */ }, ... ] /* required */ } }
Parameter Type Description Required
params structure (for JSON) / ToggleRequest structure (for SOAP)
BidModifierToggleItems array of BidModifierToggleItemSets of adjustments to enable or disable. Maximum of 1000 items in the array.Yes
BidModifierToggleItem structure
CampaignId longThe campaign ID. Specified when enabling or disabling adjustments at the campaign level.Either CampaignId or AdGroupId
AdGroupId longID of the ad group. Specified when enabling or disabling adjustments at the group level.
Type BidModifierTypeEnumThe type of adjustments to enable or disable: DEMOGRAPHICS_ADJUSTMENT, RETARGETING_ADJUSTMENT, or REGIONAL ADJUSTMENT.Yes
Enabled YesNoEnumYES — enable the set of adjustments; NO — disable the set of adjustments.Yes

Response

Response structure in JSON format:

{
  "result": { 
    "ToggleResults
[no-highlight[

Results of enabling or disabling adjustments.

]no-highlight]
": [{ /* ToggleResult */ "CampaignId
[no-highlight[

The campaign ID. Returned when the operation was completed successfully (if it was specified in the request).

]no-highlight]
": (long), "AdGroupId
[no-highlight[

ID of the ad group. Returned when the operation was completed successfully (if it was specified in the request).

]no-highlight]
": (long), "Type
[no-highlight[

Type of adjustments that were enabled or disabled.

]no-highlight]
": ( "DEMOGRAPHICS_ADJUSTMENT" | "RETARGETING_ADJUSTMENT" | "REGIONAL_ADJUSTMENT" ), /* required */ "Warnings
[no-highlight[

Warnings that occurred during the operation.

]no-highlight]
": [{ /* ExceptionNotification */ "Code": (int), /* required */ "Message": (string), /* required */ "Details": (string) }, ... ], "Errors
[no-highlight[

Errors that occurred during the operation.

]no-highlight]
": [{ /* ExceptionNotification */ "Code": (int), /* required */ "Message": (string), /* required */ "Details": (string) }, ... ] }, ... ] } }
Parameter Type Description
result structure (for JSON) / ToggleResponse structure (for SOAP)
ToggleResults array of ToggleResultResults of enabling or disabling adjustments.
ToggleResult structure
CampaignId longThe campaign ID. Returned when the operation was completed successfully (if it was specified in the request).
AdGroupId longID of the ad group. Returned when the operation was completed successfully (if it was specified in the request).
Type BidModifierTypeEnumType 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"
      }
    ]
  }
}