Skip to content

Get Theme Customization

Retrieve a specific theme customization section by ID with all its translation data.

Endpoint

GET /api/shop/theme-customizations/{id}

Path Parameters

ParameterTypeRequiredDescriptionExample
idintegerYesTheme customization ID1

Request Headers

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

Response Fields (200 OK)

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

404 Not Found

json
{
  "message": "Theme customization not found",
  "errors": {
    "id": [
      "The specified theme customization does not exist"
    ]
  }
}

401 Unauthorized

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

Use Cases

  • Load specific theme section configuration
  • Fetch carousel images and metadata
  • Get HTML/CSS content for theme sections
  • Display theme element details
  • Manage theme content by section ID
  • Update individual theme sections

Released under the MIT License.