Widgets API Reference
Widgets (BETA)
Psst! Before you read further…
The following documentation is for our Gen 2.0 widgets only. If you wish to receive information regarding Gen 1.0 widgets, please contact your CSM representative or log a ticket through support.
Our Widgets API is currently running on a Beta version, as such this documentation is a work in progress. If you come across any errors, have requests or suggestions please contact us.
Widgets refer to any Stackla Social Visual that can be embedded onto a digital property that is made up of either an “In-Line” and possibly also an “Expanded Tile” view. This endpoint allows you to create widgets and returns an embed code.
Properties
Field | Type | Value | POST | PUT | Definition |
---|---|---|---|---|---|
id | integer | Widget ID | |||
widget_type_id | integer | Widget type id | |||
stack_id | integer | Widget stack Id | |||
guid | string | Widget GUID | |||
style | object | Widget style config | |||
config | object | Widget config | |||
filter_id | integer | Content filter for widget | |||
enabled | boolean | Enabled widget | |||
custom_css | string | Custom css for inline tile | |||
lightbox_custom_css | string | Custom css for lightbox | |||
custom_js | string | Custom javascript for inline tile | |||
lightbox_custom_js | string | Custom javascript for lightbox | |||
external_js | string | URL of external js to inject to parent page | |||
embed_code | string | The widget embed code | |||
gen | integer | Version of widget | |||
style_name | string | ||||
created | string | ISO Date Time string | |||
modified | string | ISO Date Time string | |||
created_at | timestamp | Moderationview’s creation time | |||
updated_at | timestamp | Moderationview’s modification time |
style
properties
Widget style:
- Gallery (base_gallery)
- Waterfall (base_waterfall)
- Carousel (base_carousel)
- Slideshow (base_slideshow)
- Billboard (base_billboard)
- Feed (base_feed)
- Blank Canvas (base_blankcanvas)
config
properties
GET widgets
Retrieves all widget available in the Stack.
Resource URL
https://api.stackla.com/api/widgets
Resource Details
Request Parameters
No additional request parameters are available.
POST widgets
Creates a new widget in the Stack.
Resource URL
https://api.stackla.com/api/widgets
Resource Details
Request Parameters
No additional request parameters are available.
GET widgets/:widgetId
Retrieves a specific widget available in the Stack by its ID.
Resource URL
https://api.stackla.com/api/widgets/:widgetId
Resource Details
Request Parameters
Name | Mandatory | Request type | Description |
---|---|---|---|
widgetId | Yes | endpoint |
ID of the widget |
PUT widgets/:widgetId
Updates a specific widget available in the Stack by its ID.
Resource URL
https://api.stackla.com/api/widgets/:widgetId
Resource Details
Request Parameters
Name | Mandatory | Request type | Description |
---|---|---|---|
widgetId | Yes | endpoint |
ID of the widget |
DELETE widgets/:widgetId
Deletes a specific widget available in the Stack by its ID.
Resource URL
https://api.stackla.com/api/widgets/:widgetId
Resource Details
Request Parameters
Name | Mandatory | Request type | Description |
---|---|---|---|
widgetId | Yes | endpoint |
ID of the widget |