Lab - Widget Template
Lesson 9 of 23 · 15 min
In this lab you will
- Create a widget template using Postman
Prerequisites
- BC Sandbox
- API credentials for the store (Content: Modify)
- Postman installed
- Widgets API collection
Create a Widget Template
Create a widget template using Postman
- Navigate to the ‘Widget Templates’ folder in the ‘Widgets API Labs’ collection in the ‘Collections’ pane on the left side of the Postman window
- Click the ‘Create Widget Template’ post request
- Select the ‘Body’ tab in the main content window in Postman
- Confirm the content in the body is the following:
Templates are submitted in JSON format. When creating your own templates, make sure your HTML, CSS, and JavaScript are properly escaped.
- Click the ‘Send’ button at the top right of the Postman window
- Observe the Widget Template UUID in the response section at the bottom of the Postman window. The request saves it to the
widget_template_uuidenvironment variable for later requests
This template has no schema settings and no Handlebars variables — it renders the same static markup every time. Later modules build on this by adding schema settings and Handlebars variables to make a widget template’s content configurable.