update

Changes the parameters of smart banner targeting filters.

Learn more

Restrictions

Maximum of 1000 filters per method call.

Request

Request structure in JSON format:

{
  "method": "update",
  "params": { /* params */
    "SmartAdTargets" : [{ /* SmartAdTargetUpdateItem */
      "Id": (long), /* required */
      "Name": (string),
      "AverageCpc": (long), /* nillable */
      "AverageCpa": (long), /* nillable */
      "StrategyPriority": ( "LOW" | "NORMAL" | "HIGH" ),
      "Audience": ( "INTERESTED_IN_SIMILAR_PRODUCTS" | "VISITED_PRODUCT_PAGE" | "ALL_SEGMENTS" ),
      "Conditions": { /* ConditionsArray */
        "Items": [{ /* ConditionsItem */
          "Operand": (string), /* required */
          "Operator": ( "GREATER_THAN" | "LESS_THAN" | "IN_RANGE" | "EXISTS" | "EQUALS_ANY" | "CONTAINS_ANY" | "NOT_CONTAINS_ALL" ), /* required */
          "Arguments": [(string), ... ] /* required */
        }, ... ] /* required */
      },
      "AvailableItemsOnly": ( "YES" | "NO" )
    }, ... ]  /* required */
  }
}

Parameter

Type

Description

Required

params structure (for JSON) / AddRequest structure (for SOAP)

SmartAdTargets

array of SmartAdTargetUpdateItem

Filters.

Yes

SmartAdTargetUpdateItem structure

Id

long

The ID of the filter.

Yes

Name

string

Name of the filter (maximum of 100 characters).

No

AverageCpc

long, nillable

Average CPC multiplied by 1,000,000. Integer.
Specified in the advertiser's currency. Restrictions are listed in the currency reference. To get it, use the Dictionaries.get method and specify the Currencies dictionary name in the request.

No

AverageCpa

long, nillable

Average CPC multiplied by 1,000,000. Integer.
Specified in the advertiser's currency. Restrictions are listed in the currency reference. To get it, use the Dictionaries.get method and specify the Currencies dictionary name in the request.

No

StrategyPriority

PriorityEnum

Priority: LOW, NORMAL or HIGH. Used only for the AVERAGE_ROI strategy.

No

Audience

AudienceEnum

Target audience:

  • INTERESTED_IN_SIMILAR_PRODUCTS —Users who showed interest in similar products online.
  • VISITED_PRODUCT_PAGE — Users who viewed products on the advertiser's site.
  • ALL_SEGMENTS — Both groups.

No

Conditions

ConditionsArray

Rules for selecting product offers. A product offer is selected for display if it meets all the selection rules at the same time.

If this parameter is omitted, the filter selects all product offers from the feed (ITEMS_ALL selection type).

Alert

If the type of feed in an ad group is FLIGHTS or RETAIL, selection rules are not used.

No

AvailableItemsOnly

YesNoEnum

Select only products in stock. The default value is NO. It can only be used in the "Yandex Market" type of feeds and is ignored in other feeds.

No


Items

array of ConditionsItem

Selection rules. No more than 30 filters in the array. The total length of the selection rules is a maximum of 65 KB (in JSON).

Yes


Operand

string

Feed parameter.

For a description of fields for each type of feed, see Configuring filtersConfiguring filters in Yandex Direct Help.

Yes

Operator

StringConditionOperatorEnum

Comparison operator. For information on the compatibility of feed fields and operators, as well as restrictions on values, see Selection rule.

Yes

Arguments

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)

UpdateResults

array of ActionResult

Results of changing filter parameters.

ActionResult structure

Id

long

The ID of the filter. 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.