Skip to navigation

Create Banner

Creates a Banner.

Required Fields

  • name
  • content
  • page
  • location
  • date_type

Read Only Fields

  • date_created
  • id

Authentication

X-Auth-Tokenstring

OAuth scopes

UI NamePermissionParameter
Marketingmodifystore_v2_marketing
Marketingread-onlystore_v2_marketing_read_only

Authentication header

HeaderArgumentDescription
X-Auth-Tokenaccess_tokenFor more about API accounts that generate access_tokens, see our Guide to API Accounts.

Further reading

For example requests and more information about authenticating BigCommerce APIs, see Authentication and Example Requests.

For more about BigCommerce OAuth scopes, see our Guide to API Accounts.

For a list of API status codes, see API Status Codes.

Path parameters

store_hashstringRequired
Permanent ID of the BigCommerce store.

Headers

AcceptstringRequiredDefaults to application/json

The MIME type of the response body.

Request

This endpoint expects an object.
namestringRequired
Name of the banner.
contentstringRequired
Contains the banner content. Returned as a string and includes HTML formatting.
pageenumRequired
Page the Banner is located on.
Allowed values:
locationenumRequired
Location on the page.
Allowed values:
date_typeenumRequired
This specifies whether the banner should be visible during a specific date range.
Allowed values:
date_fromstringOptional

If the datetype is set as ‘custom’, this field specifies the date when the banner should become visible on the storefront.

date_tostringOptional

If the datetype is set as ‘custom’, this field specifies the date when the banner should stop being visible on the storefront.

visiblestringOptional

Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visible

item_idstringOptional

If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.

Response

OK
contentstring
Contains the banner content. Returned as a string and includes HTML formatting.
date_typeenum
This specifies whether the banner should be visible during a specific date range.
Allowed values:
locationenum
Location on the page.
Allowed values:
namestring
Name of the banner.
pageenum
Page the Banner is located on.
Allowed values:
date_createdstringOptional
Date the banner is created.
date_fromstringOptional

If the datetype is set as ‘custom’, this field specifies the date when the banner should become visible on the storefront.

date_tostringOptional

If the datetype is set as ‘custom’, this field specifies the date when the banner should stop being visible on the storefront.

idintegerOptional

Id of the banner. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.

item_idstringOptional

If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.

visiblestringOptional

Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visible