Banners
Get All Banners
GET https://api.bigcommerce.com/stores/{store_hash}/v2/bannersRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- min_id in query - integerOptional filter param
/api/v2/banners?min_id={value}
- max_id in query - integerOptional filter param
/api/v2/banners?max_id={value}
- page in query - numberOptional filter param
/api/v2/banners?page={number}
- limit in query - numberOptional filter param
/api/v2/banners?limit={count}
example
Response
Body
idinteger
Id of the banner. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.
Example: 1date_createdstring
Date the banner is created.namestring
requiredName of the banner.Example: Sale Bannercontentstring
requiredContains the banner content. Returned as a string and includes HTML formatting.Example: <p> Sale! Tuesday at 9am! </p>pagestring
requiredPage the Banner is located on.Allowed: home_page | category_page | brand_page | search_page
locationstring
requiredLocation on the page.Allowed: top | bottom
Example: topdate_typestring
requiredThis specifies whether the banner should be visible during a specific date range.Allowed: always | custom
date_fromstring
If the datetype is set as 'custom’, this field specifies the date when the banner should become visible on the storefront.Example: 0date_tostring
If the datetype is set as 'custom’, this field specifies the date when the banner should stop being visible on the storefront.Example: 0visiblestring
Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visibleExample: 1item_idstring
If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.Example: 35
example
Create a Banner
POST https://api.bigcommerce.com/stores/{store_hash}/v2/bannersRequest
Creates a Banner.
Required Fields
- name
- content
- page
- location
- date_type
Read Only Fields
- date_created
- id
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
namestring
requiredName of the banner.Example: Sale Bannercontentstring
requiredContains the banner content. Returned as a string and includes HTML formatting.Example: <p> Sale! Tuesday at 9am! </p>pagestring
requiredPage the Banner is located on.Allowed: home_page | category_page | brand_page | search_page
locationstring
requiredLocation on the page.Allowed: top | bottom
Example: topdate_typestring
requiredThis specifies whether the banner should be visible during a specific date range.Allowed: always | custom
date_fromstring
If the datetype is set as 'custom’, this field specifies the date when the banner should become visible on the storefront.Example: 0date_tostring
If the datetype is set as 'custom’, this field specifies the date when the banner should stop being visible on the storefront.Example: 0visiblestring
Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visibleExample: 1item_idstring
If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.Example: 35
example
Response
Body
idinteger
Id of the banner. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.
Example: 1date_createdstring
Date the banner is created.namestring
requiredName of the banner.Example: Sale Bannercontentstring
requiredContains the banner content. Returned as a string and includes HTML formatting.Example: <p> Sale! Tuesday at 9am! </p>pagestring
requiredPage the Banner is located on.Allowed: home_page | category_page | brand_page | search_page
locationstring
requiredLocation on the page.Allowed: top | bottom
Example: topdate_typestring
requiredThis specifies whether the banner should be visible during a specific date range.Allowed: always | custom
date_fromstring
If the datetype is set as 'custom’, this field specifies the date when the banner should become visible on the storefront.Example: 0date_tostring
If the datetype is set as 'custom’, this field specifies the date when the banner should stop being visible on the storefront.Example: 0visiblestring
Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visibleExample: 1item_idstring
If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.Example: 35
example
Delete All Banners
DELETE https://api.bigcommerce.com/stores/{store_hash}/v2/bannersRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
example
Response
Get a Banner
GET https://api.bigcommerce.com/stores/{store_hash}/v2/banners/{id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the banner.
example
Response
Body
idinteger
Id of the banner. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.
Example: 1date_createdstring
Date the banner is created.namestring
requiredName of the banner.Example: Sale Bannercontentstring
requiredContains the banner content. Returned as a string and includes HTML formatting.Example: <p> Sale! Tuesday at 9am! </p>pagestring
requiredPage the Banner is located on.Allowed: home_page | category_page | brand_page | search_page
locationstring
requiredLocation on the page.Allowed: top | bottom
Example: topdate_typestring
requiredThis specifies whether the banner should be visible during a specific date range.Allowed: always | custom
date_fromstring
If the datetype is set as 'custom’, this field specifies the date when the banner should become visible on the storefront.Example: 0date_tostring
If the datetype is set as 'custom’, this field specifies the date when the banner should stop being visible on the storefront.Example: 0visiblestring
Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visibleExample: 1item_idstring
If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.Example: 35
example
Update a Banner
PUT https://api.bigcommerce.com/stores/{store_hash}/v2/banners/{id}Request
Updates a Banner.
Read Only Fields
- date_created
- id
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the banner.
- Content-Type in header with default of application/json - stringrequiredThe MIME type of the request body.
Body
namestring
requiredName of the banner.Example: Sale Bannercontentstring
requiredContains the banner content. Returned as a string and includes HTML formatting.Example: <p> Sale! Tuesday at 9am! </p>pagestring
requiredPage the Banner is located on.Allowed: home_page | category_page | brand_page | search_page
locationstring
requiredLocation on the page.Allowed: top | bottom
Example: topdate_typestring
requiredThis specifies whether the banner should be visible during a specific date range.Allowed: always | custom
date_fromstring
If the datetype is set as 'custom’, this field specifies the date when the banner should become visible on the storefront.Example: 0date_tostring
If the datetype is set as 'custom’, this field specifies the date when the banner should stop being visible on the storefront.Example: 0visiblestring
Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visibleExample: 1item_idstring
If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.Example: 35
example
Response
Body
idinteger
Id of the banner. This is a READ-ONLY field; do not set or modify its value in a POST or PUT request.
Example: 1date_createdstring
Date the banner is created.namestring
requiredName of the banner.Example: Sale Bannercontentstring
requiredContains the banner content. Returned as a string and includes HTML formatting.Example: <p> Sale! Tuesday at 9am! </p>pagestring
requiredPage the Banner is located on.Allowed: home_page | category_page | brand_page | search_page
locationstring
requiredLocation on the page.Allowed: top | bottom
Example: topdate_typestring
requiredThis specifies whether the banner should be visible during a specific date range.Allowed: always | custom
date_fromstring
If the datetype is set as 'custom’, this field specifies the date when the banner should become visible on the storefront.Example: 0date_tostring
If the datetype is set as 'custom’, this field specifies the date when the banner should stop being visible on the storefront.Example: 0visiblestring
Integer value denoting whether or not the banner is visible on the storefront: 1 = visible; 0 = not visibleExample: 1item_idstring
If the banner is on a specific category or brand page, then the item_id will correspond the category or brand ID.Example: 35
example
Delete a Banner
DELETE https://api.bigcommerce.com/stores/{store_hash}/v2/banners/{id}Request
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
- id in path - integerrequiredID of the banner.
example
Response
Get a Count of Store Banners
GET https://api.bigcommerce.com/stores/{store_hash}/v2/banners/countRequest
Authentication
- X-Auth-Token in header
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequiredThe MIME type of the response body.
example
Response
Body
countinteger
Min: 0