Get Theme Customizations
Retrieve all storefront theme customization sections including sliders, static content, and other theme elements.
Endpoint
GET /api/shop/theme-customizationsQuery Parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
page | integer | No | Pagination page number | 1 |
per_page | integer | No | Items per page (max: 100) | 10 |
type | string | No | Filter by customization type | image_carousel |
Request Headers
| Header | Type | Required | Description | Example |
|---|---|---|---|---|
X-STOREFRONT-KEY | string | Yes | Storefront API key for authentication | pk_storefront_PvlE42nWGsKRVIf8bDlJngTPAdWAZbIy |
Accept | string | No | Response format | application/json |
Response Fields (200 OK)
The response is an array of theme customization objects with the following structure:
| Field | Type | Description |
|---|---|---|
id | integer | Customization section ID |
themeCode | string | Theme code (e.g., "default") |
type | string | Section type (image_carousel, static_content, etc.) |
name | string | Human-readable name |
sortOrder | integer | Display order |
status | integer | Status (1=active, 0=inactive) |
channelId | integer | Associated channel ID |
createdAt | string | ISO 8601 creation timestamp |
updatedAt | string | ISO 8601 update timestamp |
code | string | Unique code identifier |
translation | object | Current locale translation data |
translations | array | All available locale translations |
Translation Object Fields
| Field | Type | Description |
|---|---|---|
id | integer | Translation ID |
themeCustomizationId | integer | Parent customization ID |
locale | string | Language locale (e.g., "en") |
options | string | JSON string with customization options |
Customization Types
| Type | Description | Options |
|---|---|---|
image_carousel | Image slider/carousel | images array with link, image, title |
static_content | HTML/CSS content | html, css strings |
product_section | Featured products | products array |
category_section | Featured categories | categories 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
| Header | Description |
|---|---|
Content-Type | application/json; charset=utf-8 |
X-RateLimit-Limit | Maximum requests allowed per minute |
X-RateLimit-Remaining | Remaining requests in current window |
X-RateLimit-Reset | Unix timestamp when limit resets |
X-Built-With | Bagisto |
Cache-Control | no-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"
]
}
}
