Impression
Contains data for displaying sponsored content. Can take different forms, depending on the value of acceptContent, that passed in request.
Values of acceptContent:
- string
- productIds
- banners
- sharedBanners
StringImpression
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Impression id |
contentType | Yes | string | Content type. Always has string |
content | Yes | StringImpressionContent | Impression content |
StringImpressionContent
Строковое Impression content
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Content id |
string | Yes | string | Custom text |
Examples
An object of Impression type with a content field of type "string".
{
"id": "impression identifier",
"contentType": "string",
"content": {
"id": "content identifier",
"string": "any string"
}
}
ProductIdsImpression
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Impression id |
contentType | Yes | string | Content type. Always has productIds |
content | Yes | ProductIdsImpressionContent | Impression content |
ProductIdsImpressionContent
Impression content for product shelf.
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Content id |
productIds | Yes | number array | Array of product identifiers for impression |
Examples
An object of Impression type with a content field of type "product shelf".
{
"id": "impression identifier",
"contentType": "productIds",
"content": {
"id": "content identifier",
"productIds": [123, 321]
}
}
BannersImpression
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Impression id |
contentType | Yes | string | Content type. Always has banners |
content | Yes | BannersImpressionContent | Impression content |
BannersImpressionContent
Content for banner impression
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Content id |
banners | Yes | Banner array | Banners for impression |
Banner
Banner information
Field name | Mandatory | Type | Description |
---|---|---|---|
targetUrl | No | string | URL for redirecting after click on banner |
pictureURl | Yes | string | Image URL |
Examples
An object of Impression type with a content field of type "banners".
{
"id": "impression identifier",
"contentType": "banners",
"content": {
"id": "content identifier",
"banners": [
{
"targetUrl" : "http://host/path",
"pictureUrl": "http://host/path/image.png"
},
{
"targetUrl" : "http://host/path",
"pictureUrl": "http://host/path/image.png"
},
]
}
}
SharedBannersImpression
Impression content for shared banners. It differs from BannersImpression in that there can be banners from different advertisers.
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Impression id |
contentType | Yes | string | Content type. Always has sharedBanners |
content | Yes | BannersImpressionContent array | Impression content |
BannerImpressionContent
Content for banner impression
Field name | Mandatory | Type | Description |
---|---|---|---|
id | Yes | string | Content id |
banner | Yes | Banner | Banner for impression |
Examples
An object of Impression type with a content field of type "shared banners".
{
"id": "impression identifier",
"contentType": "sharedBanners",
"content": [
{
"id": "content identifier",
"banner": {
"targetUrl" : "http://host/path",
"pictureUrl": "http://host/path/image.png"
}
},
{
"id": "content identifier",
"banner": {
"targetUrl" : "http://host/path",
"pictureUrl": "http://host/path/image.png"
}
}
]
}