POST/creatives/
Registers or changes creative content.
Request format
POST https://distribution.yandex.net/api/v2/creatives/
Format of the request body
{
"clid": {integer},
"form": {string},
"text_data": [
{string}
],
"media_data": [
{
"media_url": {string},
"media_url_file_type" : {string},
"description": {string}
}
],
"description": {string}
}
Parameters of the request body
Required parameters
These parameters correspond to fields from the creative content creation interface. You only have to fill in one of the text_data and media_data fields.
|
|
CLID for which the creative content will be registered. |
|
|
Ad distribution format. Acceptable values:
|
|
|
Creative text. |
|
|
List of media items in the ad unit. |
|
|
Link to a media item. |
|
|
Media type. Possible values: |
Optional parameters
These parameters do not correspond to interface fields and are populated using default values.
|
|
The service for which the creative content is registered. Only used if the creative content couldn't be identified from the CLID. For Yandex Market, for example, the value should be |
|
|
Campaign type: |
|
|
Creative content token. Pass the parameter to change the creative content. |
|
|
List of target links. |
|
|
List of OKVED codes for what's being advertised. |
|
|
Unique FIAS IDs for display regions. If the array is empty, the display region is considered to be all of Russia. |
|
|
Social ad flag. |
|
|
Native ad flag. |
Response format
{
"data": {
"clid": {integer},
"service": {string},
"type": {string},
"token": {string},
"form": {string},
"urls": [
{string}
],
"okveds": [
{string}
],
"text_data": [
{string}
],
"media_data": [
{
"media_url": {string},
"description": {string}
}
],
"description": {string},
"is_social": {boolean},
"is_native": {boolean}
},
"result": {string}
}
Response parameters
|
|
CLID for which the creative content will be registered. |
|
|
The service for which the creative content is registered. Only used if the creative content couldn't be identified from the CLID. For Yandex Market, for example, the value should be |
|
|
Campaign type: |
|
|
List of target links. |
|
|
List of OKVED codes for what's being advertised. |
|
|
Unique FIAS IDs for display regions. If the array is empty, the display region is considered to be all of Russia. |
|
|
Social ad flag. |
|
|
Native ad flag. |
Example for JSON
Request:
{
"clid": 123456,
"form": "banner",
"text_data": [
"Test content"
],
"media_data": [
{
"media_url": "https://ya.cc/123123",
"description": "Test media data"
}
],
"description": "Test description"
}
Response:
{
"data": {
"clid": 123456,
"service": "market",
"type": "other",
"token": "4CQwVszL78Gt5cHA6pP",
"form": "banner",
"urls": [
"https://market.yandex.ru/"
],
"okveds": [
"62.01"
],
"text_data": [
"Test content"
],
"media_data": [
{
"media_url": "https://ya.cc/123123",
"description": "Test media data"
}
],
"description": "Test description",
"is_social": false,
"is_native": false
},
"result": "ok"
}