Update theme builder settings
curl --request POST \
--url https://api.shoppex.io/dev/v1/themes/{id}/control/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"builder_settings": {
"version": 2,
"revision": 4503599627370495,
"theme": {
"content": {},
"layout": {},
"style_slots": {},
"style_presets": [],
"applied_theme_preset": "<string>",
"seed_background_cleared": true,
"custom_css": "<string>",
"pages": [],
"terms": {}
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
builder_settings: {
version: 2,
revision: 4503599627370495,
theme: {
content: {},
layout: {},
style_slots: {},
style_presets: [],
applied_theme_preset: '<string>',
seed_background_cleared: true,
custom_css: '<string>',
pages: [],
terms: {}
}
}
})
};
fetch('https://api.shoppex.io/dev/v1/themes/{id}/control/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/themes/{id}/control/settings"
payload = { "builder_settings": {
"version": 2,
"revision": 4503599627370495,
"theme": {
"content": {},
"layout": {},
"style_slots": {},
"style_presets": [],
"applied_theme_preset": "<string>",
"seed_background_cleared": True,
"custom_css": "<string>",
"pages": [],
"terms": {}
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/themes/{id}/control/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'builder_settings' => [
'version' => 2,
'revision' => 4503599627370495,
'theme' => [
'content' => [
],
'layout' => [
],
'style_slots' => [
],
'style_presets' => [
],
'applied_theme_preset' => '<string>',
'seed_background_cleared' => true,
'custom_css' => '<string>',
'pages' => [
],
'terms' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/themes/{id}/control/settings"
payload := strings.NewReader("{\n \"builder_settings\": {\n \"version\": 2,\n \"revision\": 4503599627370495,\n \"theme\": {\n \"content\": {},\n \"layout\": {},\n \"style_slots\": {},\n \"style_presets\": [],\n \"applied_theme_preset\": \"<string>\",\n \"seed_background_cleared\": true,\n \"custom_css\": \"<string>\",\n \"pages\": [],\n \"terms\": {}\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}Themes
Update theme builder settings
A page URL (/page/<slug>) that the theme does not store yet and a Content page of the shop already uses is refused with 409 CONFLICT, error.subcode page_slug_taken; nothing is saved.
POST
/
dev
/
v1
/
themes
/
{id}
/
control
/
settings
Update theme builder settings
curl --request POST \
--url https://api.shoppex.io/dev/v1/themes/{id}/control/settings \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"builder_settings": {
"version": 2,
"revision": 4503599627370495,
"theme": {
"content": {},
"layout": {},
"style_slots": {},
"style_presets": [],
"applied_theme_preset": "<string>",
"seed_background_cleared": true,
"custom_css": "<string>",
"pages": [],
"terms": {}
}
}
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
builder_settings: {
version: 2,
revision: 4503599627370495,
theme: {
content: {},
layout: {},
style_slots: {},
style_presets: [],
applied_theme_preset: '<string>',
seed_background_cleared: true,
custom_css: '<string>',
pages: [],
terms: {}
}
}
})
};
fetch('https://api.shoppex.io/dev/v1/themes/{id}/control/settings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.shoppex.io/dev/v1/themes/{id}/control/settings"
payload = { "builder_settings": {
"version": 2,
"revision": 4503599627370495,
"theme": {
"content": {},
"layout": {},
"style_slots": {},
"style_presets": [],
"applied_theme_preset": "<string>",
"seed_background_cleared": True,
"custom_css": "<string>",
"pages": [],
"terms": {}
}
} }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.shoppex.io/dev/v1/themes/{id}/control/settings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'builder_settings' => [
'version' => 2,
'revision' => 4503599627370495,
'theme' => [
'content' => [
],
'layout' => [
],
'style_slots' => [
],
'style_presets' => [
],
'applied_theme_preset' => '<string>',
'seed_background_cleared' => true,
'custom_css' => '<string>',
'pages' => [
],
'terms' => [
]
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoppex.io/dev/v1/themes/{id}/control/settings"
payload := strings.NewReader("{\n \"builder_settings\": {\n \"version\": 2,\n \"revision\": 4503599627370495,\n \"theme\": {\n \"content\": {},\n \"layout\": {},\n \"style_slots\": {},\n \"style_presets\": [],\n \"applied_theme_preset\": \"<string>\",\n \"seed_background_cleared\": true,\n \"custom_css\": \"<string>\",\n \"pages\": [],\n \"terms\": {}\n }\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}