Create a dev theme
Creates a new development theme by cloning the current production theme. If a dev theme already exists it is returned unchanged.
POST
/shops/{id}/themesAuthorization
AuthorizationBearer token (JWT) · headerrequiredPath parameters
idintegerrequiredShop ID
Request body
application/jsontitlestringOptional title for the new dev theme
Responses
201Dev theme created
_linksHalLinksidstringOpaque theme identifier
linkedbooleanWhether this is a linked (inherited) theme
parent_idstring | nullproductionboolean`true` for the live/public theme
publicbooleanAlias for `production`
accessiblebooleantitlestringsettingsstringRaw JSON string of theme settings
created_onstring<date-time>updated_onstring<date-time>_embeddedobjectShow propertiesHide properties
templatesThemeTemplate[]Show propertiesHide properties
Array of
ThemeTemplate_linksHalLinksidstringfile_namestringpathstringbodystringFull template source code
is_sectionbooleanschemaobjectPresent only when `is_section` is true — the section's configurable schema.
parent_commitstring | nullupdated_onstring<date-time>assetsThemeAsset[]Show propertiesHide properties
Array of
ThemeAsset_linksHalLinksidstringfile_namestringcontent_typestringfile_sizeintegerdigeststringurlstringCDN URL for this asset
updated_onstring<date-time>401Unauthorized
403Access denied
Request
curl -X POST "https://api.onbolder.com/v2/shops/1/themes" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"title": "My Dev Theme"
}'const response = await fetch("https://api.onbolder.com/v2/shops/1/themes", {
method: "POST",
headers: {
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
body: JSON.stringify({
"title": "My Dev Theme"
})
});import requests
response = requests.post(
"https://api.onbolder.com/v2/shops/1/themes",
headers={
"Authorization": "Bearer YOUR_TOKEN",
"Content-Type": "application/json"
},
json={
"title": "My Dev Theme"
},
)Response
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": "string",
"linked": true,
"parent_id": "string",
"production": true,
"public": true,
"accessible": true,
"title": "string",
"settings": "string",
"created_on": "2019-08-24T14:15:22Z",
"updated_on": "2019-08-24T14:15:22Z",
"_embedded": {
"templates": [
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": "string",
"file_name": "layout.html",
"path": "string",
"body": "string",
"is_section": true,
"schema": {},
"parent_commit": "string",
"updated_on": "2019-08-24T14:15:22Z"
}
],
"assets": [
{
"_links": {
"property1": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
},
"property2": {
"href": "string",
"templated": true,
"method": "get",
"title": "string",
"type": "string"
}
},
"id": "string",
"file_name": "logo.png",
"content_type": "image/png",
"file_size": 0,
"digest": "string",
"url": "string",
"updated_on": "2019-08-24T14:15:22Z"
}
]
}
}Unauthorized
Access denied