Create Branding Theme
Create a branding theme for the selected store. name is required. The
server mints id. Omit is_default to store false. Setting
is_default: true clears the previous default — see
Default.
Request
POST /branding-themes
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Label, 1–255 characters. |
is_default | boolean | No | Defaults to false. |
font | string | No | Font name, max 255. null clears. |
logo_url | string | No | HTTP logo URL, max 2048. |
logo_square_url | string | No | HTTP square logo URL, max 2048. |
brand_color | string | No | Hex colour. See Colours. |
background_color | string | No | Hex colour. |
text_color | string | No | Hex colour. |
card_background_color | string | No | Hex colour. |
card_text_color | string | No | Hex colour. |
border_color | string | No | Hex colour. |
Unknown keys return 422.
Example Request
curl -X POST "https://cart.easy.tools/api/v1/branding-themes" \
-H "Authorization: Bearer YOUR_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Studio",
"brand_color": "#101828",
"background_color": "#f9fafb",
"text_color": "#101828",
"card_background_color": "#ffffff",
"card_text_color": "#101828",
"border_color": "#d0d5dd"
}'
Response
Success Response (201)
Returns the Branding Theme Object.
{
"id": "f670a72a-7a46-4853-9ebb-91ddf691358e",
"name": "Studio",
"is_default": false,
"font": null,
"logo_url": null,
"logo_square_url": null,
"brand_color": "#101828",
"background_color": "#f9fafb",
"text_color": "#101828",
"card_background_color": "#ffffff",
"card_text_color": "#101828",
"border_color": "#d0d5dd"
}
Error Responses
Validation Error (422 Unprocessable Entity)
Missing name:
{
"message": "The given data was invalid.",
"errors": {
"name": [
"This field is required."
]
}
}
A 3-digit colour:
{
"message": "The given data was invalid.",
"errors": {
"brand_color": [
"The brand color format is invalid."
]
}
}
Unknown keys also return 422 on that path.
Unauthorized Error (401)
{
"message": "Unauthenticated."
}
Forbidden Error (403)
{
"message": "You do not have API access to the requested store."
}