Skip to content

Update the classic theme ​

Last updated View as Markdown

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 NameParam TypeDescriptionRequired
store_settingsobjectHeader, notice bar, footer, fonts and breadcrumbsno
colors_settingsobjectThe nine theme colorsno
product_settingsobjectProduct page toggles, texts and style colorsno
checkout_settingsobjectThe checkout page lookno
pages_settingsobjecthome: the full ordered list of homepage sectionsno
  • An object merges key by key into the current settings.
  • A list, such as pages_settings.home or 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/false stays a boolean, an object stays an object and a list stays a list.
  • A color is a hex value, such as #1a2b3c, or transparent.
  • Only the content fields (notice bar, footer, text sections) take HTML. No field can contain scripts, event handlers or javascript: URLs. Fields other than content cannot 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"]
    }
}