banner

Edit banner parameters.

Request format

https://adfox.yandex.com/api/v1
  ? object=banner
  & action=modify
  & actionObject=banner
  & objectID=<integer>
  & [name=<string>]
  & [targetingProfileID=<integer>]
  & [dateStart=<YYYY-MM-DD HH:mm>]
  & [dateEnd=<YYYY-MM-DD HH:mm>]
  & [priority=<integer>]
  & [status=<integer>]
  & [isEvents=<integer>]
  & [isUnplaced=<integer>]
  & [backgroundColor=<string>]
  & [width=<string>]
  & [height=<string>]
  & [imageURL=<string>]
  & [hitURL=<string>]
  & [target=<string>]
  & [alt=<string>]
  & [userN=<string>]
  & [eventN=<string>]
  & [hitURLN=<string>]
  & [maxImpressions=<integer>]
  & [maxImpressionsPerDay=<integer>]
  & [maxImpressionsPerHour=<integer>]
  & [maxClicks=<integer>]
  & [maxClicksPerDay=<integer>]
  & [maxClicksPerHour=<integer>]
  & [trackingURL=<string>]
  & [showMenu=<integer>]
  & [adLabel=<integer>]
  & [domain=<string>]
  & [sendToErir=<integer>]
  & [token=<string>]
  & [creativeContentType=<integer>]
  & [okveds[]=<string>]
  & [markingDescription=<string>]
  & [targetURL=<string>]
  & [textData[]=<string>]
  & [mediaData[]=<{"url": "media data URL", "description": "string"}>]
  & [sendToErir<ParameterN>=<integer>]

objectID*

ID of the object that the action is performed on.

name

Banner name.

An entry can contain Russian and Latin letters, numbers, and any special characters.

targetingProfileID

Targeting profile ID.

You can use a targeting profile to combine the settings of several targeting types. When creating a campaign or banner, you can specify a targeting profile. This way, you don't waste time setting up every targeting type separately.

See also:

dateStart

Delivery start date.

Date and time format: YYYY-MM-DD HH:mm.

dateEnd

Delivery end date.

Date and time format: YYYY-MM-DD HH:mm.

priority

Priority.

Acceptable values: 1≤N≤1000, where N is a number from 1 to 1000 inclusive.

status

Object status. Only objects with the active status can be displayed.

Acceptable values:

  • 0: Active. The object is ready for delivery.
  • 1: Paused. The object is assumed to be temporarily disabled. by default, filters in the Adfox web interface show paused objects in the list.
  • 2: Completed. The object is assumed to be delivered in full. by default, filters in the Adfox web interface hide completed objects.

isEvents

Get links to events.

Acceptable values:

  • 0: Disabled.
  • 1: Enabled.

isUnplaced

Disable the banner on placements created after adding the banner.

Acceptable values:

  • 0: Disabled.
  • 1: Enabled.

The features depend on whether you connected the "Disable banner placement" module in the account.

Default value: 1. If the module is connected.

Default value: 0. If the module isn't connected.

backgroundColor

Background color in HEX format, for example: #FFFFFF.

width

Banner width.

height

Banner height.

imageURL

Link to the banner image or a flash banner placeholder.

hitURL

Link to the advertiser's website.

target

The target parameter for the link determines the window where the link opens.

Acceptable values:

  • _blank: Open the page in a new browser window.
  • _parent: Open the page in the current window.
  • _top: Open the page in a full browser window.

alt

The alt parameter value for the img tag represents an alternative text for the image.

userN

User parameters, where N is the parameter number from 1 to 25.

Every template contains a set of defined variables. Get a list of template variables used and pass values to these variables when you add or edit the banner.

For example, a template has two user parameters: user1 and user3 with the string data type.

When you add or edit the banner, you need to pass the following values:

user1=text1&user3=text3

eventN

Event names, where N is the event number from 1 to 30.

Every template contains a set of defined events. Get a list of template variables used and pass event names when you add or edit the banner.

hitURLN

Specify the click URL for events, where N in the parameter name is the event number from 1 to 30.

maxImpressions

Maximum number of banner impressions.

Acceptable values: an integer from 1 to 2,147,483,647.

maxImpressionsPerDay

Maximum number of impressions per day.

Acceptable values: an integer from 1 to 2,147,483,647.

maxImpressionsPerHour

Maximum number of impressions per hour.

Acceptable values: an integer from 1 to 2,147,483,647.

maxClicks

Maximum total number of clicks.

Acceptable values: an integer from 1 to 2,147,483,647.

maxClicksPerDay

Maximum number of clicks per day.

Acceptable values: an integer from 1 to 2,147,483,647.

maxClicksPerHour

Maximum number of clicks per hour.

Acceptable values: an integer from 1 to 2,147,483,647.

trackingURL

Tracking pixel link.

A pixel link usually has a variable that waits for a random number to be input. This number protects the link from caching in the browser.

In Adfox, there's a macro for substituting a random number to a variable: %random%.

For example, in links to the Adfox pixel, pr is the parameter for substituting a random number. Let's add a macro to it:

http://ads.adfox.com/166283/getCode?p1=borgd&p2=ezjv&
pfb=dwsey&pr=%random%

showMenu

Show the menu on the banner.

Acceptable values:

  • 0: Don't show the menu.
  • 1: Show the menu.

Default value: 0.

adLabel

Show the “Ad” or the “Social Ad” label on the banner.

Acceptable values:

  • 0: The “Ad” label is disabled.
  • 1: Show the “Ad” label.
  • 2: Show the “Social Ad” label.

Default value: 0.

domain

Domain next to the “Ad” label.

sendToErir

Submit data to the Russian state register.

Acceptable values:

  • 0: Don't submit data to the Russian state register.
  • 1: Submit data to the Russian state register (ad register is enabled).

Default value: 0.

token

Token of the banner what was received from a third-party advertising data operator (ORD) including Yandex advertising data operator (Yandex ORD) by API (not through the standard marking Adfox mechanism).

You can specify the token parameter value only if sendToErir=0.

To the Token field you can only add a token's value. Don't add other symbols.

creativeContentType

Creative type.

Acceptable values:

  • 0: Other.
  • 1: Banner.
  • 2: Text and image unit.
  • 3: Text unit.
  • 4: Video.
  • 5: Live video.
  • 6: Live audio.
  • 7: Audio.

Default value: 0.

okveds[]

List of OKVED codes of advertised products. The field is optional if one of the following conditions is met:

  • OKVED codes are specified at the campaign level.
  • The customer specified in the contract is a legal entity in Russia (resident).

To add an element, submit all previously used and all new elements.

If you want to delete an element from the array, submit all elements except the one that you need to delete.

You can also clear the array completely. To do this, submit an array with an empty value, for example, okveds[]=.

An example of transferring two OKVED values in one request: &okveds[]=88.33&okveds[]=77.54.

markingDescription

Description of a creative.

targetURL

Target URL.

textData[]

Array with text data of creatives. The field is required if the mediaData and sendToErir<ParameterN> parameters haven't been specified.

To add an element, submit all previously used and all new elements.

If you want to delete an element from the array, submit all elements except the one that you need to delete.

You can also clear the array completely. To do this, submit an array with an empty value, for example, textData[]=.

mediaData[]

Array with media data of creatives. The field is required if the textData and sendToErir<ParameterN> parameters haven't been specified.

URL: The link is checked for availability before saving.

The description field is optional.

Example:

mediaData[]={"url": "https://avatars.mds.yandex.net/
get-adfox-content/example.jpeg/example.we
bp", "description": "Text_string"}

To add an element, submit all previously used and all new elements.

If you want to delete an element from the array, submit all elements except the one that you need to delete.

You can also clear the array completely. To do this, submit an array with an empty value, for example, mediaData[]=.

sendToErir<ParameterN>

Enable/disable submitting a parameter (creative) value to the Russian state register for a certain variable. Where <ParameterN> is the name of the variable.

If you submit predefined variables, use the following parameter names:

  • sendToErirImageURL: For the Image variable.
  • sendToErirGetFLV: For the FLV video variable.

To enable custom variables (user1-user25), use <ParameterN>. Where N is a value from 1 to 25. For example, use sendToErirParameter2 for the additional variable user2.

Acceptable values:

  • 0: Disable submitting data to the Russian state register for the variable.
  • 1: Enable submitting data to the Russian state register for the variable.

The field is required if the mediaData and textData parameters haven't been specified.

If the parameter submission option is not enabled for the template (the Do not use in marking option is selected in the Marking column), the parameter won't be submitted (the Incorrect value (-6) error will occur). To manage data submission when creating a banner, go to the Adfox interface and enable the option in the template.

* Required

Response format

<response>
<status>
  <code>{integer}</code>
</status>
</response>

Response parameters

code

Request processing status. For the key, see Error handling.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=banner&action=modify&actionObject=banner&objectID=234532

Response:

<response>
<status>
  <code>0</code>
</status>
</response>

Other actions with the object

See more actions with the banner object:

Previous
Next