Update the classic theme
Endpoint: https://api.youcan.shop/themes/classic
Method: PUT
Changes the customization of the classic theme. The change is live on the store at once, there is no draft.
Required Scopes
edit-themes
Parameters
Send only what changes, in the shape of the Get the classic theme settings:
| Param Name | Param Type | Description | Required |
|---|---|---|---|
store_settings | object | Header, notice bar, footer, fonts and breadcrumbs | no |
colors_settings | object | The nine theme colors | no |
product_settings | object | Product page toggles, texts and style colors | no |
checkout_settings | object | The checkout page look | no |
pages_settings | object | home: the full ordered list of homepage sections | no |
- An object merges key by key into the current settings.
- A list, such as
pages_settings.homeor a header items list, replaces the current list. Send every item of a list that you change. - A key must exist in the current settings, and its value keeps its type: a number stays a number,
true/falsestays a boolean, an object stays an object and a list stays a list. - A color is a hex value, such as
#1a2b3c, ortransparent. - Only the
contentfields (notice bar, footer, text sections) take HTML. No field can contain scripts, event handlers orjavascript:URLs. Fields other thancontentcannot contain{or}.
json
{
"colors_settings": { "primary": "#1a2b3c" },
"store_settings": { "breadcrumbs": { "global": true } }
}Response
[200]
The full settings after the change, in the same shape as Get the classic theme.
[409] Conflict
The store uses the new theme system.
[422] Unprocessable Entity
Each error has the exact path of the value:
json
{
"errors": {
"colors_settings.primary": ["must be a hex color such as #1a2b3c"],
"store_settings.made_up": ["unknown setting, GET /themes/classic lists every key"]
}
}