Widgets
Create a Widget
POST /stores/{store_hash}/v3/content/widgets
Request
Creates a Widget.
Note: There is a limit of 100,000 widgets per store and 150 widgets per page. For more information, see Store Limits.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - stringrequired
The MIME type of the request body.
Body
namestring
requiredUser friendly name.
descriptionstring
The user-friendly description.
widget_configurationobject
The JSON data that populates the template.
widget_template_uuidstring
requiredThe widget template UUID.
channel_idinteger
The ID of the channel on which to create this widget. Defaults to the first channel created on the store.
example
Response
Body
data
metaobject
Response metadata.
response
Get All Widgets
GET /stores/{store_hash}/v3/content/widgets
Request
Returns a list of Widgets. Optional parameters can be passed in.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- page in query - integer
Specifies the page number in a limited (paginated) list of products.
- limit in query - integer
Controls the number of items per page in a limited (paginated) list of products.
- widget_template_kind in query - string
The kind of widget template.
- widget_template_uuid in query - string
The identifier for a specific widget template.
- name in query - string
The URL-encoded name of the widget.
- name:in in query - array
Use to pass in comma-separated list of widget names. Example:
/widgets?name:in=test-widget-name,header%20images
- channel_id:in in query - array
A comma-separated list of channel ids to filter the results by.
- site_id:in in query - array
A comma-separated list of site IDs to filter the results by.
example
Response
Body
dataarray[object]
metaobject
Data about the response, including pagination and collection totals.
response
Get a Widget
GET /stores/{store_hash}/v3/content/widgets/{uuid}
Request
Returns a single Widget.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequired
The MIME type of the response body.
- uuid in path - stringrequired
The identifier for a specific widget.
example
Response
Body
data
metaobject
Response metadata.
response
Update a Widget
PUT /stores/{store_hash}/v3/content/widgets/{uuid}
Request
Updates a Widget.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- Content-Type in header with default of application/json - stringrequired
The MIME type of the request body.
Body
namestring
The user-friendly name.
descriptionstring
The user-friendly description.
widget_configurationobject
The JSON data that populates the template.
widget_template_uuidstring
The widget template UUID.
channel_idinteger
upgradeboolean
Upgrade the Widget to latest version of the WidgetTemplate.
example
Response
Body
data
metaobject
Response metadata.
response
Delete a Widget
DELETE /stores/{store_hash}/v3/content/widgets/{uuid}
Request
Deletes a Widget.
Authentication
- X-Auth-Token in headerrequired
Parameters
- store_hash in path - string
- Accept in header with default of application/json - stringrequired
The MIME type of the response body.
- uuid in path - stringrequired
The identifier for a specific widget.
example
Response
An empty response.