update
Changes ad parameters.
Learn more
Restrictions
To manage product ads, use the URL: https://api.direct.yandex.com/v501/
.
Maximum of 1000 ads per method call.
You can't edit ads with the ARCHIVED status. See Ad status and state.
Request
Request structure in JSON format:
{
"method": "update",
"params": { /* params */
"Ads": [{ /* AdUpdateItem */
"Id": (long), /* required */
"TextAd": { /* TextAdUpdate */
"Title": (string),
"Title2": (string), /* nillable */
"Text": (string),
"Href": (string), /* nillable */
"AgeLabel": ( "AGE_0" | ... | "MONTHS_12" ),
"DisplayUrlPath": (string), /* nillable */
"VCardId": (long), /* nillable */
"AdImageHash": (string), /* nillable */
"SitelinkSetId": (long), /* nillable */
"CalloutSetting": { /* AdExtensionSetting */
"AdExtensions": [{ /* AdExtensionSettingItem */
"AdExtensionId": (long), /* required */
"Operation": ( "ADD" | "REMOVE" | "SET" ) /* required */
}, ... ] /* required */
}, /* nillable */
"VideoExtension": { /* VideoExtensionUpdateItem */
"CreativeId": (long) /* nillable */
},
"PriceExtension": { /* PriceExtensionUpdateItem */
"Price": (long),
"OldPrice": (long), /* nillable */
"PriceQualifier": ( "FROM" | "UP_TO" | "NONE" ),
"PriceCurrency": ( "RUB" | "BYN" | "CHF" | "EUR" | "KZT" | "TRY" | "UAH" | "USD" | "UZS" )
}, /* nillable */
"TurboPageId": (long), /* nillable */
"BusinessId": (long), /* nillable */
"PreferVCardOverBusiness": ( "YES" | "NO" ),
"ErirAdDescription" : (string) /* nillable */
},
"DynamicTextAd": { /* DynamicTextAdUpdate */
"VCardId": (long), /* nillable */
"AdImageHash": (string), /* nillable */
"SitelinkSetId": (long), /* nillable */
"CalloutSetting": { /* AdExtensionSetting */
"AdExtensions": [{ /* AdExtensionSettingItem */
"AdExtensionId": (long), /* required */
"Operation": ( "ADD" | "REMOVE" | "SET" ) /* required */
}, ... ] /* required */
}, /* nillable */
"Text": (string)
},
"MobileAppAd": { /* MobileAppAdUpdate */
"Title": (string),
"Text": (string),
"TrackingUrl": (string), /* nillable */
"Action": ( "DOWNLOAD" | "GET" | "INSTALL" | "MORE" | "OPEN" | "UPDATE" | "PLAY" | "BUY_AUTODETECT" ),
"AdImageHash": (string), /* nillable */
"Features": [{ /* MobileAppAdFeatureItem */
"Feature": ( "PRICE" | "ICON" | "CUSTOMER_RATING" | "RATINGS" ), /* required */
"Enabled": ( "YES" | "NO" ) /* required */
}, ... ],
"AgeLabel": ( "AGE_0" | ... | "AGE_18" ),
"VideoExtension": { /* VideoExtensionUpdateItem */
"CreativeId": (long) /* nillable */
},
"ErirAdDescription" : (string) /* nillable */
},
"TextImageAd": { /* TextImageAdUpdate */
"AdImageHash": (string),
"Href": (string), /* nillable */
"TurboPageId": (long), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"MobileAppImageAd": { /* MobileAppImageAdUpdate */
"AdImageHash": (string),
"TrackingUrl": (string), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"MobileAppCpcVideoAdBuilderAd" : { /* MobileAppCpcVideoAdBuilderAdUpdate */
"Creative" : { /* AdBuilderAdUpdateItem */
"CreativeId" : (long) /* required */
},
"TrackingUrl" : (string), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"TextAdBuilderAd": { /* TextAdBuilderAdUpdate */
"Creative": { /* AdBuilderAdUpdateItem */
"CreativeId": (long) /* required */
},
"Href": (string), /* nillable */
"TurboPageId": (long), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"MobileAppAdBuilderAd": { /* MobileAppAdBuilderAdUpdate */
"Creative": { /* AdBuilderAdUpdateItem */
"CreativeId": (long) /* required */
},
"TrackingUrl": (string), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"CpcVideoAdBuilderAd": { /* CpcVideoAdBuilderAdUpdate */
"Creative": { /* AdBuilderAdUpdateItem */
"CreativeId": (long) /* required */
},
"Href": (string), /* nillable */
"TurboPageId": (long), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"CpmBannerAdBuilderAd": { /* CpmBannerAdBuilderAdUpdate */
"Creative": { /* AdBuilderAdUpdateItem */
"CreativeId": (long) /* required */
},
"Href": (string), /* nillable */
"TrackingPixels": { /* ArrayOfString */
"Items": [(string), ... ] /* required */
}, /* nillable */
"TurboPageId": (long), /* nillable */
"ErirAdDescription" : (string) /* nillable */
},
"CpmVideoAdBuilderAd": { /* CpmVideoAdBuilderAdUpdate */
"Creative": { /* AdBuilderAdUpdateItem */
"CreativeId": (long) /* required */
},
"Href": (string), /* nillable */
"TrackingPixels": { /* ArrayOfString */
"Items": [(string), ... ] /* required */
}, /* nillable */
"TurboPageId": (long),
"ErirAdDescription" : (string) /* nillable */
},
"SmartAdBuilderAd": { /* SmartAdBuilderAdUpdate */
"Creative": { /* AdBuilderAdUpdateItem */
"CreativeId": (long) /* required */
},
"ErirAdDescription" : (string)
},
"ShoppingAd" : {
"SitelinkSetId" : (long) /* nillable */,
"CalloutSetting" : { /* nillable */
"AdExtensions" : [{ /* required */
"AdExtensionId" : (long) /* required */,
"Operation" : ("ADD"|"REMOVE"|"SET") /* required */
}, ... ]
},
"BusinessId" : (long) /* nillable */,
"FeedFilterConditions" : { /* nillable */
"Items" : [{ /* required */
"Operand" : (string) /* required */,
"Operator" : ("CONTAINS_ANY"|"EQUALS_ANY"|"EXISTS"|"GREATER_THAN"|"IN_RANGE"|"LESS_THAN"|"NOT_CONTAINS_ALL") /* required */,
"Arguments" : [ (string) ] /* required */
}, ... ]
},
"TitleSources" : { /* nillable */
"Items" : [ (string) ] /* required */
},
"TextSources" : { /* nillable */
"Items" : [ (string) ] /* required */
},
"DefaultTexts" : [ (string) ]
},
"ListingAd" : {
"SitelinkSetId" : (long) /* nillable */,
"CalloutSetting" : { /* nillable */
"AdExtensions" : [{ /* required */
"AdExtensionId" : (long) /* required */,
"Operation" : ("ADD"|"REMOVE"|"SET") /* required */
}, ... ]
},
"BusinessId" : (long) /* nillable */,
"FeedFilterConditions" : { /* nillable */
"Items" : [{ /* required */
"Operand" : (string) /* required */,
"Operator" : ("CONTAINS_ANY"|"EQUALS_ANY"|"EXISTS"|"GREATER_THAN"|"IN_RANGE"|"LESS_THAN"|"NOT_CONTAINS_ALL") /* required */,
"Arguments" : [ (string) ] /* required */
}, ... ]
},
"TitleSources" : { /* nillable */
"Items" : [ (string) ] /* required */
},
"TextSources" : { /* nillable */
"Items" : [ (string) ] /* required */
},
"DefaultTexts" : [ (string) ]
}
}, ... ] /* required */
}
}
Parameter |
Type |
Description |
Required |
params structure (for JSON) / UpdateRequest structure (for SOAP) |
|||
|
array of AdUpdateItem |
Ads to change parameters for. |
Yes |
AdUpdateItem structure |
|||
|
long |
The ID of the ad to change parameters for. |
Yes |
|
TextAdUpdate |
Parameters of a text and image ad. See Ad type. |
Use either |
|
DynamicTextAdUpdate |
Parameters of a dynamic ad. |
|
|
MobileAppAdUpdate |
Parameters of a mobile app ad. |
|
|
TextImageAdUpdate |
Parameters of an image ad that was created from an image (in a group of text and image ads). |
|
|
MobileAppImageAdUpdate |
Parameters of an image ad that was created from an image (in a group of mobile app ads). |
|
|
MobileAppCpcVideoAdBuilderAdUpdate |
Parameters of a video ad that was created from an image (in a group of ads for mobile apps). |
|
|
TextAdBuilderAdUpdate |
Parameters of an image ad that was created from a creative (in a group of text and image ads). |
|
|
MobileAppAdBuilderAdUpdate |
Parameters of an image ad that was created from a creative (in a group of mobile app ads). |
|
|
CpcVideoAdBuilderAdUpdate |
Video ad parameters in a “Text & Image ads” campaign. |
|
|
CpmBannerAdBuilderAdUpdate |
Display ad parameters. |
|
|
CpmVideoAdBuilderAdUpdate |
Parameters of a display video ad in a display campaign. |
|
|
SmartAdBuilderAdUpdate |
Smart banner parameters. |
|
|
ShoppingAdUpdate |
Product ad parameters. |
|
|
ListingAdUpdate |
Parameters of an ad for catalog pages. |
|
TextAdUpdate structure |
|||
|
string |
Title 1. Maximum of 56 characters, counting "narrow" characters. Maximum of 22 characters per word. When using a template, the # character doesn't count towards the length. Note "Narrow" characters are: |
No |
|
string, nillable |
Title 2. A maximum of 30 characters not counting “narrow” characters, plus up to 15 “narrow” characters. Maximum of 22 characters per word. When using a template, the # character doesn't count towards the length. Note "Narrow" characters are: |
No |
|
string |
Ad text. Maximum of 81 characters not counting "narrow" characters, plus up to 15 "narrow" characters. Maximum of 23 characters per word. When using a template, the # character doesn't count towards the length. Note "Narrow" characters are: |
No |
|
string, nillable |
Link to the advertiser's website. Maximum of 1024 characters. When using a template, the # character doesn't count towards the length. It must include the protocol and domain name. May contain substitution variables. |
No |
|
AgeLabelEnum |
Age category. |
No |
|
string, nillable |
Display link. Allowed only with the It may contain letters, numbers, and the symbols -, №, /, %, #. Spaces, underscores (_), and double characters -- and // are not allowed. See Display link in the Yandex Direct Help. |
No |
|
long, nillable |
ID of the vCard. The vCard must belong to the same campaign as the ad. |
No |
|
string, nillable |
Hash of the image. |
No |
|
long, nillable |
ID of a set of sitelinks. Allowed only with the |
No |
|
AdExtensionSetting, nillable |
Callouts for an ad:
|
No |
|
VideoExtensionUpdateItem |
Video extension. See Video extensions in the Yandex Direct Help. |
No |
|
PriceExtensionUpdateItem, nillable |
Price in the ad. |
No |
|
long, nillable |
ID of the Turbo page. |
No |
|
long, nillable |
ID of the business profile on Yandex. To get data from business profiles, use the Businesses.get method. A business profile can be linked to an ad only if the YES value is returned for the Note The business profile is available at |
No |
|
YesNoEnum |
Indicates which data source takes priority when displaying an ad: YES — vCard, NO — business profile. Alert This parameter is used if the |
No |
|
string |
Ad object description. |
No |
AdExtensionSetting structure |
|||
|
array of AdExtensionSettingItem |
Extensions to assign to the ad or unassign from the ad. |
Yes |
AdExtensionSettingItem structure |
|||
|
long |
Extension ID. |
Yes |
|
AdExtensionTypeEnum |
Type of action with the set of extensions:
See the examples. |
Yes |
VideoExtensionUpdateItem structure |
|||
|
long, nillable |
ID of the creative. |
Yes |
PriceExtensionUpdateItem structure |
|||
|
long |
The price of a product or service multiplied by 1,000,000. An integer that is a multiple of 10,000 (the price with two digits after the decimal point). Maximum value: 10,000,000,000,000,000. |
No |
|
long, nillable |
The previous price of a product or service multiplied by 1,000,000. An integer that is a multiple of 10,000. The old price must be higher than the current price. |
No |
|
PriceQualifierEnum |
Text explanation of the price:
|
No |
|
PriceCurrencyEnum |
The currency that the price is shown in. |
No |
DynamicTextAdUpdate structure |
|||
|
long, nillable |
ID of the vCard. The vCard must belong to the same campaign as the ad. |
No |
|
string, nillable |
Hash of the image. For dynamic ads, only images of the REGULAR or WIDE type are acceptable. See Type of image. |
No |
|
long, nillable |
ID of a set of sitelinks. |
No |
|
AdExtensionSetting, nillable |
Callouts for an ad:
|
No |
|
string |
Ad text. Maximum of 81 characters not counting "narrow" characters, plus up to 15 "narrow" characters. Maximum of 23 characters per word. When using a template, the # character doesn't count towards the length. Note "Narrow" characters are: |
No |
MobileAppAdUpdate structure |
|||
|
string |
Title. Maximum of 56 characters, counting "narrow" characters. Maximum of 22 characters per word. When using a template, the # character doesn't count towards the length. |
No |
|
string |
Ad text. Maximum of 75 characters, counting "narrow" characters. Maximum of 23 characters per word. When using a template, the # character doesn't count towards the length. |
No |
|
string, nillable |
Tracking link for tracking app installations. Maximum of 1024 characters. It must include the protocol and domain name. |
No |
|
MobileAppAdActionEnum |
The button label:
|
No |
|
string, nillable |
Hash of the image. For mobile app ads, only images of the WIDE type are acceptable. See Type of image. |
No |
|
array of MobileAppAdFeatureItem |
Add-ons that need to be automatically downloaded from the app store and displayed in the ad. |
No |
|
MobAppAgeLabelEnum |
Age restriction. |
No |
|
VideoExtensionUpdateItem |
Video extension. See Video extensions in the Yandex Direct Help. |
No |
|
string |
Ad object description. |
No |
MobileAppAdFeatureItem structure |
|||
|
MobileAppFeatureEnum |
Type of extension:
If the add-on type is omitted from the |
Yes |
|
YesNoEnum |
Whether to display an add-on in the ad. Note
|
Yes |
TextImageAdUpdate structure |
|||
|
string |
Hash of the image. For image ads, only images of the FIXED_IMAGE type are acceptable. See Type of image. |
No |
|
string, nillable |
Link to the advertiser's website. Maximum of 1024 characters. When using a template, the # character doesn't count towards the length. It must include the protocol and domain name. May contain substitution variables. |
No |
|
long, nillable |
ID of the Turbo page. |
No |
|
string |
Ad object description. |
No |
MobileAppImageAdUpdate structure |
|||
|
string |
Hash of the image. For image ads, only images of the FIXED_IMAGE type are acceptable. See Type of image. |
No |
|
string, nillable |
Tracking link for tracking app installations. Maximum of 1024 characters. It must include the protocol and domain name. |
No |
|
string |
Ad object description. |
No |
MobileAppCpcVideoAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was created in the Ad Builder. See Creative Ad Builder for video extensions in Yandex Direct Help. |
No |
|
string, nillable |
Tracking link for tracking app installations. Maximum of 1024 characters. It must include the protocol and domain name. |
No |
|
string |
Ad object description. |
No |
TextAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was created in the Ad Builder. See Creative Ad Builder for image ads in the Yandex Direct Help. |
No |
|
string, nillable |
Link to the advertiser's website. Maximum of 1024 characters. When using a template, the # character doesn't count towards the length. It must include the protocol and domain name. May contain substitution variables. |
No |
|
long, nillable |
ID of the Turbo page. |
No |
|
string |
Ad object description. |
No |
MobileAppAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was created in the Ad Builder. See Creative Ad Builder for image ads in the Yandex Direct Help. |
No |
|
string, nillable |
Tracking link for tracking app installations. Maximum of 1024 characters. It must include the protocol and domain name. |
No |
|
string |
Ad object description. |
No |
CpcVideoAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was created in the Ad Builder. See the section Video ads / Creative Ad Builder in the Help for Yandex Direct. |
No |
|
string, nillable |
Link to the advertiser's website. Maximum of 1024 characters. When using a template, the # character doesn't count towards the length. It must include the protocol and domain name. May contain substitution variables. |
No |
|
long, nillable |
ID of the Turbo page. |
No |
|
string |
Ad object description. |
No |
CpmBannerAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was uploaded in the web interface or created in the Ad Builder. See Creating a display campaign in the Yandex Direct Help. |
No |
|
string, nillable |
Link to the advertiser's website. Maximum of 1024 characters. When using a template, the # character doesn't count towards the length. It must include the protocol and domain name. May contain substitution variables. |
No |
|
ArrayOfString, nillable |
Can contain a maximum of two strings:
The maximum length of each string is 1024 characters. |
No |
|
long, nillable |
ID of the Turbo page. |
No |
|
string |
Ad object description. |
No |
CpmVideoAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was created in the Ad Builder. See Video advertising / How to launch in Yandex Direct Help. |
No |
|
string, nillable |
Link to the advertiser's website. Maximum of 1024 characters. When using a template, the # character doesn't count towards the length. It must include the protocol and domain name. May contain substitution variables. |
No |
|
long, nillable |
ID of the Turbo page. |
No |
|
ArrayOfString, nillable |
An ADFOX tracking tag. The tag must have the |
No |
|
string |
Ad object description. |
No |
SmartAdBuilderAdUpdate structure |
|||
|
AdBuilderAdUpdateItem |
A creative that was created in the Ad Builder. See Creative Ad Builder for smart banners in the Help for Yandex Direct. |
No |
|
string |
Ad object description. |
No |
AdBuilderAdUpdateItem structure |
|||
|
long |
ID of the creative. |
Yes |
ShoppingAdUpdate structure |
|||
|
long |
ID of a set of sitelinks. |
No |
|
CalloutSetting |
CalloutSetting |
No |
|
long |
ID of the business profile on Yandex. To get data from business profiles, use the Businesses.get method. A business profile can be linked to an ad only if the YES value is returned for the Note The business profile is available at |
No |
|
FeedFilterConditionsItem |
Rules for selecting product offers. No more than 30 filters in the array. The total length of the selection rules is a maximum of 65 KB (in JSON). A product offer is selected for ad generation if it meets all the selection rules at the same time. If this parameter is omitted, all product offers from the feed are used for ad generation. |
No |
|
array of string |
Names of feed fields used to generate ad titles. You can retrieve the acceptable field names through the |
No |
|
array of string |
Names of feed fields used to generate ad texts. You can retrieve the acceptable field names through the |
No |
|
array of string |
Default texts. You can specify only one value. |
Yes |
ListingAdUpdate structure |
|||
|
long |
ID of a set of sitelinks. |
No |
|
CalloutSetting |
CalloutSetting |
No |
|
long |
ID of the business profile on Yandex. To get data from business profiles, use the Businesses.get method. A business profile can be linked to an ad only if the YES value is returned for the Note The business profile is available at |
No |
|
FeedFilterConditionsItem |
Rules for selecting product offers. No more than 30 filters in the array. The total length of the selection rules is a maximum of 65 KB (in JSON). A product offer is selected for ad generation if it meets all the selection rules at the same time. If this parameter is omitted, all product offers from the feed are used for ad generation. |
No |
|
array of string |
Names of feed fields used to generate ad titles. You can retrieve the acceptable field names through the |
No |
|
array of string |
Names of feed fields used to generate ad texts. You can retrieve the acceptable field names through the |
No |
|
array of string |
Default texts. You can specify only one value. |
Yes |
CalloutSetting structure |
|||
|
AdExtensions |
Extensions for an ad. |
Yes |
AdExtensions structure |
|||
|
long |
Extension ID. |
Yes |
|
string |
Action.
|
Yes |
FeedFilterConditionsItem structure |
|||
|
string |
Feed parameter. For a description of the fields for each feed type, see Configuring filters in the Yandex Direct Help. |
Yes |
|
StringConditionOperatorEnum |
Comparison operator. For information on the compatibility of feed fields and operators, as well as restrictions on values, see Rules for selecting product ads. |
Yes |
|
array of string |
An array of strings to compare the operand to. |
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) |
||
|
array of ActionResult |
Results of updating ad parameters. |
ActionResult structure |
||
|
long |
The ad ID. Returned if there aren't any errors. See the section Operations on object arrays. |
|
array of ExceptionNotification |
Warnings that occurred during the operation. |
|
array of ExceptionNotification |
Errors that occurred during the operation. |
Examples
Making changes to the set of ad extensions
The callouts with the IDs 111, 112, and 113 were assigned to the ad.
Executing the request will assign the callouts with the IDs 111, 112, 114, and 115 to the ad.
{
"method": "update",
"params": {
"Ads": [{
"Id": 7654321,
"TextAd": {
"CalloutSetting": {
"AdExtensions": [{
"AdExtensionId": 114,
"Operation": "ADD"
},
{
"AdExtensionId": 115,
"Operation": "ADD"
},
{
"AdExtensionId": 113,
"Operation": "REMOVE"
}]
}
}
}]
}
}
Replacing the set of extensions
The callouts with the IDs 111, 112, and 113 were assigned to the ad.
Executing the request will assign the callouts with the IDs 113 and 114 to the ad.
{
"method": "update",
"params": {
"Ads": [{
"Id": 7654321,
"TextAd": {
"CalloutSetting": {
"AdExtensions": [{
"AdExtensionId": 113,
"Operation": "SET"
},
{
"AdExtensionId": 114,
"Operation": "SET"
}]
}
}
}]
}
}