Banners
On this page:
THE BANNER OBJECT |
|
|
|
|
|
|
|
GET[base]/banners |
|
GET[base]/banners/{bannerId} |
|
POST[base]/banners |
|
PUT[base]/banners/{bannerId} |
|
DELETE[base]/banners/{bannerId} |
|
GET[base]/banners/filters |
|
GET[base]/banners/languages |
|
GET[base]/banners/languages{languageId} |
|
POST[base]/banners/languages |
|
PUT[base]/banners/languages{languageId} |
|
DELETE[base]/banners/languages{languageId} |
|
GET[base]/banners/sizes |
|
GET[base]/banners/sizes{sizeId} |
|
POST[base]/banners/sizes |
|
DELETE[base]/banners/sizes{sizeId} |
|
GET[base]/banners/themes |
|
GET[base]/banners/themes{themeId} |
|
POST[base]/banners/themes |
|
PUT[base]/banners/themes{themeId} |
|
DELETE[base]/banners/themes{themeId} |
The Banner object
- bannerId string
The banner identifier.
- bannerName string
The banner name.
- cdnFileUrl string
The URL of a banner CDN image.
- languageId string
The banner language identifier.
- languageName string
The banner language name.
- themeId string
The banner theme identifier.
- themeName string
The banner theme name.
- sizeId string
The banner size identifier.
- sizeName string
The banner size name.
- width integer
The banner width in pixels.
- height integer
The banner height in pixels.
- uuid string or null
The universally unique identifier of a banner.
- createTime dateTime
The date and time when the object has been created.
- updateTime dateTime
The date and time when the object has been last updated.
{
"bannerId": "6006dda272f002519c3eb505",
"bannerName": "Tight Spreads",
"cdnFileUrl": "https://s3.eu-west-2.amazonaws.com/my.stage.org/en/200x200/Tight+Spreads.png",
"languageId": "6006dda272f002519c3eb506",
"languageName": "English",
"themeId": "6006dda272f002519c3eb507",
"themeName": "Tight Spreads",
"sizeId": "6006dda272f002519c3eb508",
"sizeName": "200×200",
"width": 200,
"height": 200,
"uuid": "6006dda272f002519c3eb509",
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00"
}
The Banner language object
- languageId string
The identifier of a banner language.
- name string
The banner language name.
- createTime dateTime
The date and time when the object has been created.
- updateTime dateTime
The date and time when the object has been last updated.
{
"languageId": "6006dda272f002519c3eb505",
"name": "日本語",
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00"
}
The Banner size object
- sizeIdstring
The banner size identifier.
- widthinteger
The banner width, in pixels.
- heightinteger
The banner height, in pixels.
- createTime dateTime
The date and time when the object has been created.
- updateTime dateTime
The date and time when the object has been last updated.
{
"sizeId": "6006dda272f002519c3eb505",
"width": 200,
"height": 200,
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00"
}
The Banner theme object
- themeIdstring
The banner theme identifier.
- namestring
The banner theme name.
- createTime dateTime
The date and time when the object has been created.
- updateTime dateTime
The date and time when the object has been last updated.
{
"themeId": "6006dda272f002519c3eb505",
"name": "App Store",
"createTime": "2021-01-01T00:00:00+00:00",
"updateTime": "2021-01-01T00:00:00+00:00"
}
Get a banners list
Use this method to obtain information about all banners available in B2Core IB.
To obtain detailed information about a specified banner, use a separate method to get banner details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination, sorting, filtering, and query. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering, sorting, and query are listed below. For values description, refer to the Banner object.
Possible values for the filter
parameter:
cdnFileUrl
languageId
sizeId
themeId
bannerName
themeName
languageName
Possible values for the sort_by
parameter:
bannerName
createTime
(default)updateTime
Possible values for the query
parameter:
metrics
— the number of clicks and registrations and the click conversion rate of the banner
GET[base]/banners
curl --location -g --request GET 'https://your.base-url.here/banners?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[cdnFileUrl]=https://s3.eu-west-2.amazonaws.com/my.stage.org/en/200x200/Tight+Spreads.png&filter[languageId]=6006dda272f002519c3eb505&filter[sizeId]=6006dda272f002519c3eb505&filter[themeId]=6006dda272f002519c3eb505&filter[bannerName]=banner&filter[themeName]=Tight Spreads&filter[languageName]=English&query[metrics]=1' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Banner objects providing information about all banners that correspond to the query parameters specified in the request.
Additionally, the response body may contain the following information if it was specified in the query parameters of the request:
an array of
metrics
providing the number of clicks and registrations and the click conversion rate of the banner
Get banner details
Use this method to obtain detailed information about a specified banner.
To obtain a list of all banners available in B2Core IB, use a separate method to get a list of banners.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- bannerId required
The banner identifier.
Query parameters:
This method supports query. For details on applying the parameters, refer to the Query parameters section.
Possible values for the query
parameter:
metrics
— the number of clicks and registrations and the click conversion rate of the banner
GET[base]/banners/{bannerId}
curl --location -g --request GET 'https://your.base-url.here/banners/60ba407d15951453e60e49f8?query[metrics]=1' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Banner object providing information about the specified banner.
Additionally, the response body may contain the following information if it was specified in the query parameters of the request:
an array of
metrics
providing the number of clicks and registrations and the click conversion rate of the banner
Add a new banner
Use this method to add a new banner.
Before creating a new banner, make sure that required size, language, theme, and link are available.
To obtain a list of available values for these parameters, use the Get a list of banner filters method.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- cdnFileUrlrequired string
The URL of a banner CDN image.
The string value length can’t exceed 255 characters.
- namerequired string
The name of a new banner.
- sizeIdrequired string
The banner size identifier. To obtain a list of available size identifiers, use the Get a list of banner sizes method. If no required size is available, add a new one using the Add a new banner size method.
- languageIdrequired string
The banner language identifier. To obtain a list of available language identifiers, use the Get a list of banner languages method. If no required language is available, add a new one using the Add a new banner language method.
- themeIdrequired string
The banner theme identifier. To obtain a list of available banner theme identifiers, use the Get a list of banner themes method. If no required theme is available, add a new one using the Add a new theme method.
- linkIdrequired string
The identifier of a landing page the banner leads to. To obtain a list of available landing page identifiers, use the Get a list of banner filters method.
POST[base]/banners
curl --location -g --request POST 'https://your.base-url.here/banners' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"cdnFileUrl": "https://my.stage.org/en/200x200/spreads.png",
"name": "Tight Spreads",
"sizeId": "6006dda272f002519c3eb505",
"languageId": "6006dda272f002519c3eb505",
"themeId": "6006dda272f002519c3eb505"
}'
Response
Body:
In case of success, the response body contains a Banner object providing information about the newly created banner.
Update a banner
Use this method to update a specified banner.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- bannerId required
The banner identifier.
Body:
Values of the following fields can be updated:
- cdnFileUrlrequired string
The URL of a banner CDN image.
The string value length can’t exceed 255 characters.
- namerequired string
The name of a new banner.
- sizeIdrequired string
The banner size identifier. To obtain a list of available size identifiers, use the Get a list of banner sizes method. If no required size is available, add a new one using the Add a new banner size method.
- languageIdrequired string
The banner language identifier. To obtain a list of available language identifiers, use the Get a list of banner languages method. If no required language is available, add a new one using the Add a new banner language method.
- themeIdrequired string
The banner theme identifier. To obtain a list of available banner theme identifiers, use the Get a list of banner themes method. If no required theme is available, add a new one using the Add a new theme method.
- linkIdrequired string
The identifier of a landing page the banner leads to. To obtain a list of available landing page identifiers, use the Get a list of banner filters method.
PUT[base]/banners/{bannerId}
curl --location -g --request PUT 'https://your.base-url.here/banners/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"cdnFileUrl": "https://s3.eu-west-2.amazonaws.com/stage.org/en/200x200/Spreads.png",
"sizeId": "6006dda272f002519c3eb505",
"name": "Tight Spreads",
"languageId": "6006dda272f002519c3eb505",
"themeId": "6006dda272f002519c3eb505"
}'
Response
Body:
In case of success, the response body contains a Banner object providing information about the updated banner.
Delete a banner
Use this method to delete a specified banner.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- bannerId required
The banner identifier.
DELETE[base]/banners/{bannerId}
curl --location --request DELETE 'https://your.base-url.here/banners/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.
Get a list of banner filters
Use this method to obtain a list of available values of:
banner sizes
banner languages
banner themes
links
Request
Header parameters:
Authorization: Bearer <token>
GET[base]/banners/filters
curl --location --request GET 'https://your.base-url.here/banners/filters' \
--header 'Authorization: Bearer <token>'
Response
Body:
Language filters
- languageId string
The identifier of a banner language.
- name string
The name of a banner language.
Link filters
- linkId string
The identifier of a landing page the banner leads to.
- linkName string
The name of a landing page the banner leads to.
- linkUri string
The URI of a landing page the banner leads to.
Size filters
- sizeId string
The banner size identifier.
- sizeName string
The banner size name.
- width integer
The banner width, in pixels.
- heightinteger
The banner height, in pixels.
Theme filters
- themeId string
The banner theme identifier.
- themeName string
The banner theme name.
{
"languages": [
{
"languageId": "6006dda272f002519c3eb501",
"name": "English"
},
{
"languageId": "6006dda272f002519c3eb501",
"name": "Spanish"
}
],
"links": [
{
"linkId": "6006dda272f002519c3eb503",
"linkName": "Sign Up",
"linkUri": "https://my.stage.org/register"
}
],
"sizes": [
{
"sizeId": "6006dda272f002519c3eb504",
"sizeName": "200×200",
"width": 200,
"height": 200
},
{
"sizeId": "6006dda272f002519c3eb505",
"sizeName": "100×100",
"width": 100,
"height": 100
}
],
"themes": [
{
"themeId": "6006dda272f002519c3eb506",
"themeName": "Light"
},
{
"themeId": "6006dda272f002519c3eb507",
"themeName": "Dark"
}
]
}
Get a list of banner languages
Use this method to obtain a list of available banner languages.
To obtain detailed information about a specified banner language, use a separate method to get banner language details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Banner language object.
Possible values for the filter
parameter:
name
Possible values for the sort_by
parameter:
name
createTime
(default)updateTime
GET[base]/banners/languages
curl --location -g --request GET 'https://your.base-url.here/banners/languages?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[name]=English' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Banner language objects providing information about all banner languages that correspond to the query parameters specified in the request.
Get banner language details
Use this method to obtain detailed information about a specified banner language.
To obtain a list of available banner languages, use a separate method to get a list of banner languages.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- languageId required
The banner language identifier.
GET[base]/banners/languages/{languageId}
curl --location --request GET 'https://your.base-url.here/banners/languages/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Banner language object providing information about the specified banner language.
Add a new banner language
Use this method to add a new banner language.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- namestringrequired
The banner language name.
POST[base]/banners/languages
curl --location --request POST 'https://your.base-url.here/banners/languages' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "日本語"
}'
Response
Body:
In case of success, the response body contains a Banner language object providing information about the newly created banner language.
Update a banner language
Use this method to update a specified banner language.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- languageId required
The banner language identifier.
Body:
Values of the following fields can be updated:
- name string
The banner language name.
The string value length can’t exceed 255 characters.
PUT[base]/banners/languages/{languageId}
curl --location --request PUT 'https://your.base-url.here/banners/languages/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "日本語"
}'
Response
Body:
In case of success, the response body contains a Banner language object providing information about the updated banner language.
Delete a banner language
Use this method to delete a specified banner language.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- languageId required
The banner language identifier.
DELETE[base]/banners/languages/{languageId}
curl --location --request DELETE 'https://your.base-url.here/banners/languages/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.
Get a list of banner sizes
Use this method to obtain a list of available banner sizes.
To obtain detailed information about a specified banner size, use a separate method to get banner size details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Banner size object.
Possible values for the filter
parameter:
width
height
Possible values for the sort_by
parameter:
width
height
createTime
(default)updateTime
GET[base]/banners/sizes
curl --location -g --request GET 'https://your.base-url.here/banners/sizes?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[width]=200&filter[height]=200' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Banner size objects providing information about all banner sizes that correspond to the query parameters specified in the request.
Get banner size details
Use this method to obtain detailed information about a specified banner size.
To obtain a list of available banner sizes, use a separate method to get a list of banner sizes.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- sizeId required
The banner size identifier.
GET[base]/banners/sizes/{sizeId}
curl --location --request GET 'https://your.base-url.here/banners/sizes/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Banner size object providing information about the specified banner size.
Add a new banner size
Use this method to add a new banner size.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- width integer required
The banner width, in pixels.
- height integer required
The banner height, in pixels.
POST[base]/banners/sizes
curl --location --request POST 'https://your.base-url.here/banners/sizes' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"width": 200,
"height": 200
}'
Response
Body:
In case of success, the response body contains a Banner size object providing information about the newly created banner size.
Delete a banner size
Use this method to delete a specified banner size.
Path parameters
- sizeId required
The banner size identifier.
DELETE[base]/banners/sizess/{sizeId}
curl --location --request DELETE 'https://your.base-url.here/banners/sizes/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.
Get a list of banner themes
Use this method to obtain a list of available banner themes.
To obtain detailed information about a specified banner theme, use a separate method to get banner theme details.
Request
Header parameters:
Authorization: Bearer <token>
Query parameters:
This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Banner theme object.
Possible values for the filter
parameter:
name
Possible values for the sort_by
parameter:
name
createTime
(default)updateTime
GET[base]/banners/themes
curl --location -g --request GET 'https://your.base-url.here/banners/themes?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[name]=App Store' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains an array of Banner theme objects providing information about all banner themes that correspond to the query parameters specified in the request.
Get banner theme details
Use this method to obtain detailed information about a specified banner theme.
To obtain a list of available banner themes, use a separate method to get a list of banner themes.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- themeId required
The banner theme identifier.
GET[base]/banners/themes/{themeId}
curl --location --request GET 'https://your.base-url.here/banners/themes/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, the response body contains a Banner theme object providing information about the specified banner theme.
Add a new theme
Use this method to add a new banner theme.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Body:
- name string required
The name of a banner theme.
The string value length can’t exceed 1024 characters.
POST[base]/banners/themes
curl --location --request POST 'https://your.base-url.here/banners/themes' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "Light"
}'
Response
Body:
In case of success, the response body contains a Banner theme object providing information about the newly created banner theme.
Update a banner theme
Use this method to update a specified banner theme.
Note
Instead of the method described below, you can use a similar method that uses the HTTP verb PATCH.
Request
Header parameters:
Authorization: Bearer <token>
Content-Type: application/json
Path parameters:
- themeId required
The banner theme identifier.
Body:
Values of the following fields can be updated:
- name string
The banner theme name.
PUT[base]/banners/themes/{themeId}
curl --location --request PUT 'https://your.base-url.here/banners/themes/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
"name": "App Store"
}'
Response
Body:
In case of success, the response body contains a Banner theme object providing information about the updated banner theme.
Delete a banner theme
Use this method to delete a specified banner theme.
Request
Header parameters:
Authorization: Bearer <token>
Path parameters:
- themeId required
The banner theme identifier.
DELETE[base]/banners/themes/{themeId}
curl --location --request DELETE 'https://your.base-url.here/banners/themes/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'
Response
Body:
In case of success, no response body is returned.