Widgets

Widget data and schema retrieval

Retrieve widget data

get

Returns widget template context data including attributes, name, slug, and template.

Path parameters
slugstringRequired

Widget slug identifier

Responses
200

Widget data retrieved

application/json
get
/widgets/{slug}/
GET /widgets/{slug}/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
  "name": "Featured Products",
  "slug": "featured-products",
  "template": "widgets/featured_products.html",
  "attributes": {
    "ANY_ADDITIONAL_PROPERTY": "anything"
  }
}

Retrieve widget schema

get

Returns the widget type schema for the specified widget slug.

Path parameters
slugstringRequired

Widget slug identifier

Responses
200

Widget schema retrieved

application/json
get
/widgets/{slug}/schema/
GET /widgets/{slug}/schema/ HTTP/1.1
Host: sandbox.akinon.com
Accept: */*
{
  "pk": 1,
  "name": "Product Carousel",
  "schema": {
    "title": {
      "type": "string",
      "required": true
    },
    "limit": {
      "type": "integer",
      "default": 10
    }
  }
}

Last updated

Was this helpful?