younifyd
Menu

Create Widget Template

Create a Widget Template

POST/content/widget-templates

Use it in a workflow

  1. Add a step and choose the BigCommerce Content connector.
  2. Pick the Create Widget Template action (under Widgets).
  3. Fill in the fields below, then reference the result from later steps as {{createWidgetTemplate.response.data}}.

Request

Headers

Acceptstringrequired

The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the response body.

Default "application/json"

Content-Typestringrequired

The [MIME type](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types) of the request body.

Default "application/json"

Request body

Enter the body as JSON in the step's Body field.

namestringrequired

User-friendly name.

schemaarray<oneOf>

The schema for the widget’s merchant-facing UI. For more information on the available schema settings, see [Widget UI Schema](/docs/storefront/widgets/input-reference/schema).

templatestring (html)required

Handlebars 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.

json
{
  "name": "string",
  "template": "string",
  "schema": [
    null
  ],
  "storefront_api_query": "string",
  "channel_id": 0
}

Response

Returns 200 with a any. Read it in later steps with {{createWidgetTemplate.response.data.<field>}}.

Need more? See the BigCommerce Content guide for connection setup and behaviour shared by every action.

Was this page helpful?