curl --request POST \
--url https://api.mercemur.com/api/v1/storefront-theme-translations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"index": "<string>",
"settings_data": "<string>",
"product": "<string>",
"collection": "<string>",
"header_group": "<string>",
"footer_group": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
index: '<string>',
settings_data: '<string>',
product: '<string>',
collection: '<string>',
header_group: '<string>',
footer_group: '<string>'
})
};
fetch('https://api.mercemur.com/api/v1/storefront-theme-translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/storefront-theme-translations"
payload = {
"index": "<string>",
"settings_data": "<string>",
"product": "<string>",
"collection": "<string>",
"header_group": "<string>",
"footer_group": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/storefront-theme-translations"
payload := strings.NewReader("{\n \"index\": \"<string>\",\n \"settings_data\": \"<string>\",\n \"product\": \"<string>\",\n \"collection\": \"<string>\",\n \"header_group\": \"<string>\",\n \"footer_group\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/storefront-theme-translations",
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([
'index' => '<string>',
'settings_data' => '<string>',
'product' => '<string>',
'collection' => '<string>',
'header_group' => '<string>',
'footer_group' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"global": {
"accent_color": "<string>",
"button_color": "<string>",
"font_family": "<string>",
"footer_background": "<string>",
"nav_background": "<string>",
"primary_color": "<string>",
"product_card_variant": "<string>",
"secondary_color": "<string>"
},
"sectionOrder": [
"<string>"
],
"sections": {
"announcement_bar": {
"text": "<string>"
},
"best_sellers": {
"title": "<string>"
},
"footer": {
"newsletter_enable": true
},
"header": {
"logo_width": 123
},
"hero_slider": {
"heading": "<string>"
}
},
"unmapped": [
{
"reason": "<string>",
"shopify_type": "<string>",
"source": "<string>"
}
],
"version": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}Translate a Shopify theme's configuration into a builder config
curl --request POST \
--url https://api.mercemur.com/api/v1/storefront-theme-translations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"index": "<string>",
"settings_data": "<string>",
"product": "<string>",
"collection": "<string>",
"header_group": "<string>",
"footer_group": "<string>"
}
'const options = {
method: 'POST',
headers: {
'Idempotency-Key': '<idempotency-key>',
Authorization: 'Bearer <token>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
index: '<string>',
settings_data: '<string>',
product: '<string>',
collection: '<string>',
header_group: '<string>',
footer_group: '<string>'
})
};
fetch('https://api.mercemur.com/api/v1/storefront-theme-translations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.mercemur.com/api/v1/storefront-theme-translations"
payload = {
"index": "<string>",
"settings_data": "<string>",
"product": "<string>",
"collection": "<string>",
"header_group": "<string>",
"footer_group": "<string>"
}
headers = {
"Idempotency-Key": "<idempotency-key>",
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mercemur.com/api/v1/storefront-theme-translations"
payload := strings.NewReader("{\n \"index\": \"<string>\",\n \"settings_data\": \"<string>\",\n \"product\": \"<string>\",\n \"collection\": \"<string>\",\n \"header_group\": \"<string>\",\n \"footer_group\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Idempotency-Key", "<idempotency-key>")
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))
}<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mercemur.com/api/v1/storefront-theme-translations",
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([
'index' => '<string>',
'settings_data' => '<string>',
'product' => '<string>',
'collection' => '<string>',
'header_group' => '<string>',
'footer_group' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json",
"Idempotency-Key: <idempotency-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}{
"data": {
"global": {
"accent_color": "<string>",
"button_color": "<string>",
"font_family": "<string>",
"footer_background": "<string>",
"nav_background": "<string>",
"primary_color": "<string>",
"product_card_variant": "<string>",
"secondary_color": "<string>"
},
"sectionOrder": [
"<string>"
],
"sections": {
"announcement_bar": {
"text": "<string>"
},
"best_sellers": {
"title": "<string>"
},
"footer": {
"newsletter_enable": true
},
"header": {
"logo_width": 123
},
"hero_slider": {
"heading": "<string>"
}
},
"unmapped": [
{
"reason": "<string>",
"shopify_type": "<string>",
"source": "<string>"
}
],
"version": 123
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"resource": "<string>",
"field": "<string>",
"reason": "malformed_json"
}
}Authorizations
A secret API key. Publishable keys cannot reach this API. A key may carry an expiry, and an expired key is refused exactly like an unknown one, with a 401 that names no reason; check the key's expires_at in the dashboard rather than inferring it from a response. When a merchant rolls a key's secret they choose a grace window of up to 3 days, and for its duration BOTH the new secret and the one it replaced authenticate, so an integration moves over on its own deploy schedule instead of at the instant the button is pressed. Move before the window closes: after it, the old secret is refused. Nothing else about this contract moves with a roll. The key keeps its id and its scopes, so the only thing an integration updates is the credential itself.
Headers
A unique key per logical write. Replaying a request with the same key returns the first response byte for byte instead of applying the write twice.
Body
templates/index.json, the homepage layout. Required.
config/settings_data.json, the theme's global settings.
templates/product.json. Read only to report what it contains.
templates/collection.json. Read only to report what it contains.
sections/header-group.json. The header and announcement bar live here, NOT in index.json; omitting it imports a store with no header.
sections/footer-group.json. The footer lives here, NOT in index.json.
Response
Success
Show child attributes
Show child attributes