update

Changes the parameters of advertisers who are agency clients, and user settings for chief representatives of advertisers.

  1. Restrictions
  2. Request
  3. Response
Note. For requests to the AgencyClients service:
  • In the Authorization header, specify the access token you received for the agency representative.
  • Don't specify the Client-Login header.

Restrictions

Maximum of 1000 clients per method call.

Request

Note. The ClientInfo, Notification, and Phone parameters belong to the advertiser's chief representative (see Roles and access of Yandex.Direct users). The ClientId, Grants, and Settings parameters belong to the advertiser.

Request structure in JSON format:

{
  "method": "update",
  "params": { /* params */
    "Clients": [{ /* AgencyClientUpdateItem */
      "ClientId": (long), /* required */
      "ClientInfo": (string),
      "Grants": [{  /* GrantItem */
        "Privilege": ( "EDIT_CAMPAIGNS" | "IMPORT_XLS" | "TRANSFER_MONEY" ), /* required */
        "Value": ( "YES" | "NO" ) /* required */
      }, ... ],
      "Notification": { /* NotificationUpdate */
        "Lang": ( "RU" | "UK" | "EN" | "TR" ),
        "Email": (string),
        "EmailSubscriptions": [{  /* EmailSubscriptionItem */
          "Option": ( "RECEIVE_RECOMMENDATIONS" | "TRACK_MANAGED_CAMPAIGNS" | "TRACK_POSITION_CHANGES" ), /* required */
          "Value": ( "YES" | "NO" ) /* required */
        }, ... ]
      },
      "Phone": (string),
      "Settings": [{ /* ClientSettingUpdateItem */
        "Option": ( "DISPLAY_STORE_RATING" | "CORRECT_TYPOS_AUTOMATICALLY" ),
        "Value": ( "YES" | "NO" )
      }, ... ]
    }] /* required */
  } 
}
ParameterTypeDescriptionRequired
Params structure (for JSON) / UpdateRequest structure (for SOAP)
Clientsarray of AgencyClientUpdateItemThe parameters (for agency client advertisers) and user settings (for chief representatives of advertisers) that you need to change.Yes
AgencyClientUpdateItem structure
ClientIdlongAdvertiser ID.Yes
ClientInfostringClient name (maximum of 255 characters).No
Grantsarray of GrantItemThe advertiser's permissions for campaign management.No
NotificationNotificationUpdate

The Yandex.Direct user's settings for SMS and email notifications.

No
Phonestring

Phone number of the Yandex.Direct user (255 characters maximum).

No
Settingsarray of ClientSettingUpdateItemAdvertiser settings that only allow YES or NO values.No
GrantItem structure
PrivilegePrivilegeEnum

Name of the permission:

For the IMPORT_XLS permission, you can only set the YES value if the EDIT_CAMPAIGNS permission is also set to YES. Otherwise, an error is returned.

For the EDIT_CAMPAIGNS permission, you can only set the NO value if the IMPORT_XLS permission is set to NO. Otherwise, an error is returned.

Yes
ValueYesNoEnumWhether the client has this permission.Yes
NotificationUpdate structure
LangLangEnumLanguage for notifications.No
Emailstring

The email address for sending notifications related to the account (no more than 255 characters).

No
EmailSubscriptionsarray of EmailSubscriptionItemTypes of notifications to send by email.No
EmailSubscriptionItem structure
OptionEmailSubscriptionEnum

Type of notification:

  • RECEIVE_RECOMMENDATIONS — Yandex.Direct news and recommendations.

  • TRACK_MANAGED_CAMPAIGNS — Notifications for campaigns that have a personal manager.

  • TRACK_POSITION_CHANGES — Warnings about traffic forecasts falling lower than the bid provided at the time of configuration.

Yes
ValueYesNoEnumWhether to send this type of notification.Yes
ClientSettingUpdateItem structure
OptionClientSettingUpdateEnum

Setting name:

  • CORRECT_TYPOS_AUTOMATICALLY — Automatically fix errors and typos.

  • DISPLAY_STORE_RATING — Add data from external sources to the ad (see Data from third parties in the Help for Yandex.Direct).

Yes
ValueYesNoEnumSetting value.Yes

Response

Response structure in JSON format:

{
  "result": {  /* result */
    "UpdateResults": [{  /* ClientsActionResult */
      "ClientId": (long),
      "Warnings": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
       }, ...
      ],
      "Errors": [{  /* ExceptionNotification */
        "Code": (int), /* required */
        "Message": (string), /* required */
        "Details": (string)
       }, ...
      ] 
    }, ... ] /* required */
  }
}
ParameterTypeDescription
Result structure (for JSON) / UpdateResponse structure (for SOAP)
UpdateResultsarray of ClientsActionResultThe result of changing parameters for agency client advertisers and user settings for chief representatives of advertisers.
ClientsActionResult structure
ClientIdlongAdvertiser ID. Returned if there aren't any errors. See the section Operations on object arrays.
Warningsarray of ExceptionNotification

Warnings that occurred during the operation.

Errorsarray of ExceptionNotification

Errors that occurred during the operation.