createBlock

Create a YAN ad unit and link it to a placement.

Request format

https://adfox.yandex.com/api/v1
  ? object=place
  & action=createBlock
  & objectID=<integer>
  & newBlockPageId=<integer>
  & newBlockName=<string>
  & newBlockType=<string>

objectID*

ID of the placement a YAN ad unit should be created on and linked to.

newBlockPageId*

ID of the Yandex Advertising Network platform where you want to create an ad unit.

newBlockName*

Ad unit name.

newBlockType*

Ad unit type. Depending on the type of ad inventory you're using to create an ad unit, specify:

  • For ads placed on sites:

    • BANNER
    • FULLSCREEN_DESKTOP
    • FULLSCREEN_MOBILE
    • FLOORAD_DESKTOP
    • FLOORAD_MOBILE
    • TOPAD
  • For mobile apps:

    • BANNER
    • INTERSTITIAL
    • NATIVE
    • REWARDED
    • APP_OPEN
    • FEED
  • For video platforms:

    • PRE
    • MID
    • POST
    • PAUSE
    • INROLL
    • POSTPAUSE

Response format

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

Response parameters

code

Request processing status. A value of 0 means the request was completed successfully. For the key, see Error handling.

Sample request and response

Request:

https://adfox.yandex.com/api/v1?object=place&action=createBlock&objectID=543&newBlockPageId=1623117&newBlockName=name&newBlockType=BANNER

Response:

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

Other actions with the object

Read about other actions with the place object:

ID of the placement a YAN ad unit should be created on and linked to.

ID of the Yandex Advertising Network platform where you want to create an ad unit.

Ad unit name.

Ad unit type. Depending on the type of ad inventory you're using to create an ad unit, specify:

  • For ads placed on sites:

    • BANNER
    • FULLSCREEN_DESKTOP
    • FULLSCREEN_MOBILE
    • FLOORAD_DESKTOP
    • FLOORAD_MOBILE
    • TOPAD
  • For mobile apps:

    • BANNER
    • INTERSTITIAL
    • NATIVE
    • REWARDED
    • APP_OPEN
    • FEED
  • For video platforms:

    • PRE
    • MID
    • POST
    • PAUSE
    • INROLL
    • POSTPAUSE

Required parameter.