Banners

Use these methods to obtain information about banners available in the B2Core UI.

GET[host]/api/v2/my/banners

Get a list of banners

GET[host]/api/v2/my/banners/{bannerId}

Get banner details

Get a list of banners

Use this method to obtain a list of banners available in the B2Core UI.

Request

Header parameters:

  • accept-language: <string>

  • Accept: application/json

  • Authorization: Bearer <access_token>

Query parameters:

The following filter parameters are available for this method:

type

The banner type. Possible values:

  • desktop— banners of this type are displayed only in the B2Core UI.

  • mobile— banners of this type are displayed only in the mobile app.

enabled

If 1, a banner is displayed to clients in the B2Core UI or mobile app; otherwise, 0.

url

The URL of a page on which a banner is displayed in the B2Core UI.

The following sorting parameters are available for this method:

createTime

The date and time when a banner was created.

priority

The order in which banners are displayed in the B2Core UI or mobile app if more than one banner is configured.

Refer to the Query parameters section in the API Overview for details on applying filter and sorting parameters.

GET[host]/api/v2/my/banners

curl --location --request GET 'https://host.name/api/v2/my/banners?limit=10&offset=0&sort_order=desc&sort_by=createTime&filter[type]=desktop&filter[enabled]=1&filter[url]=https://example.com/dashboard' \
--header 'accept-language: <string>' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'

Response

A response includes an array of Banner objects providing information about the banners matching the request parameters.

Get banner details

Use this method to obtain detailed information about a specified banner.

Request

Header parameters:

  • accept-language: <string>

  • Accept: application/json

  • Authorization: Bearer <access_token>

Path parameters:

bannerId required

The banner identifier.

GET[host]/api/v2/my/banners/{bannerId}

curl --location --request GET 'https://host.name/api/v2/my/banners/1' \
--header 'accept-language: <string>' \
--header 'Accept: application/json' \
--header 'Authorization: Bearer <token>'

Response

A response includes a Banner object providing information about a specified banner.