Skip to content

Get Theme Customizations

Retrieve all storefront theme customization sections including sliders, static content, and other theme elements.

Endpoint

GET /api/shop/theme-customizations

Query Parameters

ParameterTypeRequiredDescriptionExample
pageintegerNoPagination page number1
per_pageintegerNoItems per page (max: 100)10
typestringNoFilter by customization typeimage_carousel

Request Headers

HeaderTypeRequiredDescriptionExample
X-STOREFRONT-KEYstringYesStorefront API key for authenticationpk_storefront_PvlE42nWGsKRVIf8bDlJngTPAdWAZbIy
AcceptstringNoResponse formatapplication/json

Response Fields (200 OK)

The response is an array of theme customization objects with the following structure:

FieldTypeDescription
idintegerCustomization section ID
themeCodestringTheme code (e.g., "default")
typestringSection type (image_carousel, static_content, etc.)
namestringHuman-readable name
sortOrderintegerDisplay order
statusintegerStatus (1=active, 0=inactive)
channelIdintegerAssociated channel ID
createdAtstringISO 8601 creation timestamp
updatedAtstringISO 8601 update timestamp
codestringUnique code identifier
translationobjectCurrent locale translation data
translationsarrayAll available locale translations

Translation Object Fields

FieldTypeDescription
idintegerTranslation ID
themeCustomizationIdintegerParent customization ID
localestringLanguage locale (e.g., "en")
optionsstringJSON string with customization options

Customization Types

TypeDescriptionOptions
image_carouselImage slider/carouselimages array with link, image, title
static_contentHTML/CSS contenthtml, css strings
product_sectionFeatured productsproducts array
category_sectionFeatured categoriescategories array

Options Structure

Depending on the type, the options field contains different data (stored as JSON string):

Image Carousel Options:

json
{
  "images": [
    {
      "link": "https://example.com/product",
      "image": "storage/theme/1/image.webp",
      "title": "Get Ready For New Collection"
    }
  ]
}

Static Content Options:

json
{
  "css": ".home-offer h1 { display: block; }",
  "html": "<div class=\"home-offer\"><h1>Special Offer</h1></div>"
}

Response Headers

HeaderDescription
Content-Typeapplication/json; charset=utf-8
X-RateLimit-LimitMaximum requests allowed per minute
X-RateLimit-RemainingRemaining requests in current window
X-RateLimit-ResetUnix timestamp when limit resets
X-Built-WithBagisto
Cache-Controlno-cache,private

Error Responses

401 Unauthorized

json
{
  "message": "Unauthorized",
  "errors": {
    "X-STOREFRONT-KEY": [
      "The X-STOREFRONT-KEY header is missing or invalid"
    ]
  }
}

400 Bad Request

json
{
  "message": "Invalid parameters",
  "errors": {
    "page": [
      "The page parameter must be a valid integer"
    ]
  }
}

Released under the MIT License.