Widget Template
Create a Widget Template
POST https://api.bigcommerce.com/stores/{store_hash}/v3/content/widget-templatesRequest
Creates a Widget Template.
Note: There is a limit of 1000 custom widget templates per store.
Required Fields
- name
- template
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
object | application/json
namestring
requiredUser-friendly name.
schemaarray[]
The schema for the widget’s merchant-facing UI. For more information on the available schema settings, see Widget UI Schema.
templatestring
requiredHandlebars HTML content. Also has access to Stencil Paper helpers.
storefront_api_querystring
The GraphQL Storefront API query that provides widget data.
channel_idinteger
The id of the channel on which to create this template. Defaults to the first channel created on the store.
example
Response
Body
object | application/json
data
response
Get All Widget Templates
GET https://api.bigcommerce.com/stores/{store_hash}/v3/content/widget-templatesRequest
Returns a list of Widget Templates.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
object | application/json
dataarray[]
response
Render a Widget Template
POST https://api.bigcommerce.com/stores/{store_hash}/v3/content/widget-templates/{uuid}/previewRequest
Render a widget template and return the widget html.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
object | application/json
example
Response
Success
Body
object | application/json
dataobject
example
Get a Widget Template
GET https://api.bigcommerce.com/stores/{store_hash}/v3/content/widget-templates/{uuid}Request
Returns a single Widget Template.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
Body
object | application/json
data
response
Update a Widget Template
PUT https://api.bigcommerce.com/stores/{store_hash}/v3/content/widget-templates/{uuid}Request
Updates a Widget Template.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
Body
application/json
example
Response
Body
object | application/json
data
response
Delete A Widget Template
DELETE https://api.bigcommerce.com/stores/{store_hash}/v3/content/widget-templates/{uuid}Request
Deletes a Widget Template.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
example
Response
An empty response.
Did you find what you were looking for?