bannerFields

Get a list of custom fields defined in the banner template.

Request format

https://adfox.yandex.com/api/v1
  ? object=banner
  & action=info
  & actionObject=bannerFields
  & objectID=<integer>
  & additionalID=<integer>

objectID*

ID of the object that the action is performed on.

additionalID*

Banner template ID.

* Required

Response format

<response>
<status>
  <code>{integer}</code>
</status>
<result>
<data>
  <row0>
    <dataType>{string}</dataType>
    <name>{string}</name>
    <length>{string}</length>   
    <inputType>{string}</inputType>
    <isRequired>{integer}</isRequired>
    <status>{string}</status>
    <defaultValue>{string}</defaultValue>
    <allowedTypes>{string}</allowedTypes>
    <width>{string}</width>
    <height>{string}</height>
  </row0>
</data>
</result>
</response>

Response parameters

code

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

rows

Number of items in the response tree.

rowN

The item number in the response tree, where N is a number from 0 to rows-1 (where rows is the total number of items in the response).

dataType

Variable type.

Acceptable values:

  • PredefinedParameters: A predefined variable that's created in the system and already has a name and properties (value length and data type). To use a variable in a template, add the variable and its name in the template code.
  • userParameters: An additional variable created by the system user. To use a variable in a template, you must specify its name and properties (value length, data type, default value, and whether it's required or optional) and add the variable name in the template code.

name

Variable name in the code.

length

Length of the field for the variable value.

inputType

Data type.

Acceptable values:

  • textarea: Text.
  • text: String.
  • file: File.

isRequired

Required/optional.

Acceptable values:

  • 0: Optional variable.
  • 1: Required variable.

status

Enable the default value for a predefined variable.

Acceptable values:

  • 0: Not set.
  • checked: Use the default value.

defaultValue

Enable the default value for an additional variable.

allowedTypes

Allowed file type for an additional variable.

Acceptable values:

  • 0: Not set.
  • .gif|.png|.jpg: Image.
  • .swf: Flash.
  • .flv: Video.

width

Image width.

height

Image height.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=banner&action=info&actionObject=bannerFields&objectID=474205&additionalID=23

Response:

<response>
<status>
  <code>0</code>
</status>
<result>
<data>
  <row0>
    <dataType>PredefinedParameters</dataType>
    <name>trackingURL</name>
    <length/>
    <inputType>text</inputType>
    <isRequired/>
    <status/>
    <defaultValue/>
    <allowedTypes/>
    <width/>
    <height/>
  </row0>
</data>
</result>
</response>

Banner template ID.

Required

ID of the object that the action is performed on.

Previous