Get storefront text
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/settings/storefront_textCosts 1 rate-limit point · Rate limits
The shop-wide preorder storefront text: the currency format, the button's out-of-stock and add-to-cart text, and the preorder modal's continue and cancel buttons and error heading. Shared by every preorder offer. ?locale= reads one language (omitted: the shop's default language).
Change it with PATCH /preorders/settings/storefront_text. A language with no translation of a field returns the shop default's text for it, and locale echoes the language asked for. currency_format is the same in every language. The Preorder button's own text and the offer's messages are set per offer (PATCH /preorders/offers/:id/widget).
Also searched aspreorder currency formatpreorder out of stock textpreorder add to cart textpreorder modal button textpreorder error headingpreorder storefront text
Query parameters
localestringLanguage of the text, such as fr or pt-BR. Omit for the shop's default language.
Returns
currency_formatstringExample:stringbuttonobjectShow 2 child attributesHide child attributes
out_of_stock_textstringExample:stringadd_to_cart_textstringExample:string
modalobjectShow 3 child attributesHide child attributes
continue_button_textstringExample:stringcancel_button_textstringExample:stringerror_headingstringExample:string
localestringExample:string
Errors
not_foundThe path is valid but nothing with that id exists in this store.
invalid_paramsOne or more fields failed the action's schema.
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/preorders/settings/storefront_text" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/settings/storefront_text", {
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/preorders/settings/storefront_text",
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/preorders/settings/storefront_text")
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)curl "https://app.stoqapp.com/api/v2/external/preorders/settings/storefront_text?locale=fr" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/settings/storefront_text?locale=fr", {
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/preorders/settings/storefront_text?locale=fr",
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/preorders/settings/storefront_text?locale=fr")
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){
"currency_format": "string",
"button": {
"out_of_stock_text": "string",
"add_to_cart_text": "string"
},
"modal": {
"continue_button_text": "string",
"cancel_button_text": "string",
"error_heading": "string"
},
"locale": "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
}
]
}