update

Changes the parameters of ad groups.

  1. Restrictions
  2. Request
  3. Response

Restrictions

Maximum of 1000 groups per method call.

You can't change groups in archived campaigns.

Request

Request structure in JSON format:

{
  "method": "update",
  "params": { /* params */
    "AdGroups": [{  /* AdGroupUpdateItem */
      "Id": (long), /* required */
      "Name": (string),
      "RegionIds": [(long), ... ],
      "NegativeKeywords": {  /* ArrayOfString */
        "Items": [(string), ... ] /* required */
      }, /* nillable */
      "NegativeKeywordSharedSetIds": { /* ArrayOfLong */
        "Items": [(long), ... ] /* required */
      }, /* nillable */
      "TrackingParams": (string),
      "MobileAppAdGroup": {  /* MobileAppAdGroupUpdate */
        "TargetDeviceType": [( "DEVICE_TYPE_MOBILE" | "DEVICE_TYPE_TABLET" ), ... ],
        "TargetCarrier": ( "WI_FI_ONLY" | "WI_FI_AND_CELLULAR" ),
        "TargetOperatingSystemVersion": (string)
      },
      "DynamicTextAdGroup": {  /* DynamicTextAdGroup */
        "DomainUrl": (string) /* required */
      }
    }, ... ] /* required */
  }
}
Parameter Type Description Mandatory
Params structure (for JSON) / UpdateRequest structure (for SOAP)
AdGroups array of AdGroupUpdateItem The groups to change the parameters for. Yes
AdGroupUpdateItem structure
Id long The ID of the group to update parameters for. Yes
Name string The name of the ad group (from 1 to 255 characters). No
RegionIds array of long

Array of IDs of regions where ad impressions are enabled or disabled. The array must contain at least one item.

The ID "0" indicates to display ads in all regions.

A minus sign before a region ID disables impressions in this region. For example, [1,-219] indicates to display for Moscow and the entire Moscow area, except Chernogolovka. Minus regions can't be used if 0 is set. The array must not consist of only minus regions.

To get the list of regions, use the Dictionaries.get method.
No
NegativeKeywords ArrayOfString, nillable

Array of negative keywords that are shared by all the keywords of an ad group.

Restriction. Negative keywords are not allowed in a group of display ads with targeting criteria based on a user profile.

A keyword should be specified without the minus sign before the first word.

Maximum of 7 words per keyword. The maximum length of each word is 35 characters. The maximum combined length of negative keywords in the array is 4096 characters. Spaces, dashes, and operators are not counted as part of the total length.

Note. Negative keywords that are shared for all a campaign's ad groups should preferably be set in the campaign parameter of the same name.
No
NegativeKeywordSharedSetIds ArrayOfLong, nillable

IDs of sets of negative keywords. Maximum of 3 items in the array.

To get the IDs of sets, use the NegativeKeywordSharedSets.get method.

Restriction. Negative keywords are not allowed in a group of display ads with targeting criteria based on a user profile.
No
TrackingParams string

GET parameters for tracking traffic sources that are added to the link of all ads in the group (maximum of 1024 characters). May contain substitution variables.

For example: from=direct&ad={ad_id}

The parameter can be specified for any type of group, but it is currently only used for groups of dynamic ads. For other types of groups, the specified GET parameters aren't added to links.

No
MobileAppAdGroup MobileAppAdGroupUpdate Parameters of ad groups for mobile app ads. No
DynamicTextAdGroup DynamicTextAdGroup Parameters of a group of dynamic ads. No
MobileAppAdGroupUpdate structure
TargetDeviceType array of DeviceTypeEnum Which devices to show ads on:
  • DEVICE_TYPE_MOBILE — smartphones

  • DEVICE_TYPE_TABLET — tablets

No
TargetCarrier CarrierEnum Which types of internet connections to show ads on:
  • WI_FI_ONLY — only Wi-Fi
  • WI_FI_AND_CELLULAR — cellular internet and Wi-Fi
No
TargetOperatingSystemVersion string The minimum OS version to display the ad on. For example, 2.3.
Note. If the minimum OS version in the app store is higher than the one set in this parameter, ads are displayed only for OS versions equal to or higher than the one in the app store.
No
DynamicTextAdGroup structure
DomainUrl string The domain name of the site to generate dynamic ads for (a maximum of 100 characters). The protocol can be omitted. Yes

Response

Response structure in JSON format:

{
  "result": {  /* result */
    "UpdateResults": [{  /* ActionResult */
      "Id": (long),
      "Warnings": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
       }, ...
      ],
      "Errors": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
       }, ...
      ] 
    }, ... ] /* required */
  }
}
Parameter Type Description
Result structure (for JSON) / UpdateResponse structure (for SOAP)
UpdateResults array of ActionResult Results of updating group parameters.
ActionResult structure
Id long Group ID. Returned if there aren't any errors. See the section Operations on object arrays.
Warnings array of ExceptionNotification

Warnings that occurred during the operation.

Errors array of ExceptionNotification

Errors that occurred during the operation.