Get storefront translations
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/account/translationsCosts 1 rate-limit point · Rate limits
Read every translation override on the shop's notify-me button, signup form, and preorder button/modal text, plus the full enumeration of translatable field paths, each field's default-locale source text, and every locale the shop has actually published.
Read only. To write a translation, pass locale to PATCH /back_in_stock/settings/widget (Notify me button, signup form, opt-in email) or PATCH /preorders/settings/storefront_text (preorder button and modal). translations holds only the fields with an override, by locale, and is {} when there are none. published_locales always includes the alert language and can lag a change in Shopify by a few minutes.
Also searched asget widget translationssignup form translationsnotify me translationsshop translations
Returns
default_localestringExample:stringlocalesarray of stringspublished_localesarray of stringsfieldsarray of stringssource_valuesobjectShow 31 child attributesHide child attributes
notify_button.textstringExample:stringnotify_button.resubscribe_textstringExample:stringnotify_button.email_button_textnullpreorder_button.out_of_stock_textstringExample:stringpreorder_button.add_to_cart_textstringExample:stringpreorder_button.modal_continue_textstringExample:stringpreorder_button.modal_cancel_textstringExample:stringsignup_form.headerstringExample:stringsignup_form.descriptionstringExample:stringsignup_form.customer_name_placeholderstringExample:stringsignup_form.customer_name_errorstringExample:stringsignup_form.email_labelstringExample:stringsignup_form.email_placeholderstringExample:stringsignup_form.errorstringExample:stringsignup_form.phone_labelstringExample:stringsignup_form.phone_placeholderstringExample:stringsignup_form.phone_errorstringExample:stringsignup_form.quantity_labelstringExample:stringsignup_form.promotion_consent_labelstringExample:stringsignup_form.termsstringExample:stringsignup_form.successstringExample:stringsignup_form.button_textstringExample:stringsignup_form.empty_errorstringExample:stringsignup_form.duplicate_errorstringExample:stringsignup_form.did_you_mean_errorstringExample:stringsignup_form.mixed_cart_errorstringExample:stringsignup_form.error_headingstringExample:stringoptin.email_subjectstringExample:stringoptin.email_bodystringExample:stringoptin.success_textstringExample:stringreview_trigger.textnull
translationsobjectShow 2 child attributesHide child attributes
frobjectShow 1 child attributeHide child attributes
notify_button.textstringExample:string
enobjectShow 1 child attributeHide child attributes
notify_button.textstringExample:string
Errors
not_foundThe path is valid but nothing with that id exists in this store.
validation_failedThe request failed validation.
Any request can also fail with auth_invalid (401) or rate_limited (429).
Every error has the same shape: see Errors and the list of error codes.
curl "https://app.stoqapp.com/api/v2/external/account/translations" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/account/translations", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/account/translations",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/account/translations")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"default_locale": "string",
"locales": [
"string"
],
"published_locales": [
"string"
],
"fields": [
"string"
],
"source_values": {
"notify_button.text": "string",
"notify_button.resubscribe_text": "string",
"notify_button.email_button_text": null,
"preorder_button.out_of_stock_text": "string",
"preorder_button.add_to_cart_text": "string",
"preorder_button.modal_continue_text": "string",
"preorder_button.modal_cancel_text": "string",
"signup_form.header": "string",
"signup_form.description": "string",
"signup_form.customer_name_placeholder": "string",
"signup_form.customer_name_error": "string",
"signup_form.email_label": "string",
"signup_form.email_placeholder": "string",
"signup_form.error": "string",
"signup_form.phone_label": "string",
"signup_form.phone_placeholder": "string",
"signup_form.phone_error": "string",
"signup_form.quantity_label": "string",
"signup_form.promotion_consent_label": "string",
"signup_form.terms": "string",
"signup_form.success": "string",
"signup_form.button_text": "string",
"signup_form.empty_error": "string",
"signup_form.duplicate_error": "string",
"signup_form.did_you_mean_error": "string",
"signup_form.mixed_cart_error": "string",
"signup_form.error_heading": "string",
"optin.email_subject": "string",
"optin.email_body": "string",
"optin.success_text": "string",
"review_trigger.text": null
},
"translations": {
"fr": {
"notify_button.text": "string"
},
"en": {
"notify_button.text": "string"
}
}
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}