Reset translations to defaults
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/offers/{id}/translations/reset_to_defaultsCosts 2 rate-limit points · Rate limits
Reset a preorder offer's storefront text for one language to STOQ's default translations, as the offer translator's "Load default translations" does.
locale is optional and defaults to the shop's default language. Overwrites the shipping text, billing title and description (the deposit or full-payment default, by the offer's payment type), discount text, badge, button and disclaimer text, preorder shipping text, quantity limit text, mixed cart error and the four countdown unit labels with STOQ's defaults in that language. Other translated fields and payment-option text are unchanged.
Also searched asreset translationsload default translationsreset all translationsrestore default textreset offer copy to defaults
Path parameters
idstringRequiredThe offer's ID, from
GET /preorders/offers.
Headers
Idempotency-KeystringA fresh unique key for every write (a new UUID, say); reuse it only to retry that write. Keys are remembered for 1 hour: the same key and the same request within that hour returns the first result, with
Idempotent-Replayed: true, without running again; the same key with a different method, path or body is refused (422idempotency_key_reused); a retry while the first is still running gets 409idempotency_key_in_progress. Keys are per store. Server errors and rate limits are not kept, so their retry runs.
Request body
localestringLanguage to reset, e.g. fr or pt-BR (any case). A regional locale with no STOQ defaults of its own (e.g. ro-RO) uses its base language's (ro). Omit for the shop's default language.
Returns
default_localestringThe shop's primary language, which the offer's own text is in.
localesarray of stringsLanguages with at least one saved translation on this offer.
published_localesarray of stringsLanguages worth checking for gaps: those published in the shop's Shopify markets plus the default language.
multi_language_enabledbooleanWhether translations reach the storefront. Turned on with PATCH /account/languages.
fieldsarray of stringsEvery translatable field path, such as widget.button.text.
source_valuesobjectThe offer's text in the default language, keyed by field path. Null where the field is empty.
Show 26 child attributesHide child attributes
widget.button.textstringPreorder button label (widget.button.button_text on the offer).
widget.disclaimer.textstringDisclaimer line under the button (widget.disclaimer.disclaimer_text).
widget.badge.textstringPreorder badge label (widget.badge.badge_text).
widget.billing_widget.titlestringPayment widget title stored on the offer itself, which is also the title of the payment option the offer row holds.
widget.billing_widget.descriptionstringPayment widget description stored on the offer itself, which is also the description of the payment option the offer row holds.
shipping.shipping_textstringShip date text, the {{ date }} value (shipping.timeline.variant_shipping_text).
shipping.preorder_shipping_textstringShipping line under the button (shipping.timeline.shipping_text).
payments.discount_textstringDiscount text stored on the offer itself, for the payment option the offer row holds.
limits.quantity_limit_textstringText printed with the remaining-units count (limits.limit_text).
limits.progress_bar_textstringProgress bar text (limits.progress_bar.progress_text).
checkout.terms.textstringWording beside the terms checkbox (limits.terms.terms_text).
checkout.mixed_cart.error_messagestringError shown when a blocked mixed cart reaches checkout (limits.cart.error_message).
countdown.textnullCountdown heading; the same text as countdown.ends_text.
countdown.starts_textnullCountdown heading shown before launch (countdown.starts_text).
countdown.ends_textnullCountdown heading shown during the preorder (countdown.ends_text).
countdown.unit_labels.daysstringCountdown days label (countdown.labels.days).
countdown.unit_labels.hoursstringCountdown hours label (countdown.labels.hours).
countdown.unit_labels.minutesstringCountdown minutes label (countdown.labels.minutes).
countdown.unit_labels.secondsstringCountdown seconds label (countdown.labels.seconds).
advanced.line_item_properties.custom_textnullFree text added to every preorder cart line (advanced.cart_attributes.custom_text).
payments.options.full.billing_titlestringTitle of the full-payment option (payments.full.option_title). Null when the offer has no full-payment option.
payments.options.full.billing_descriptionstringDescription of the full-payment option (payments.full.option_description).
payments.options.full.discount_textstringDiscount text of the full-payment option (payments.full.discount_text).
payments.options.partial.billing_titlenullTitle of the partial-payment option (payments.partial.option_title). Null when the offer has no partial-payment option.
payments.options.partial.billing_descriptionnullDescription of the partial-payment option (payments.partial.option_description).
payments.options.partial.discount_textnullDiscount text of the partial-payment option (payments.partial.discount_text).
translationsobjectSaved translations keyed by locale, then by field path. Only locales and fields with saved text appear.
Show 4 child attributesHide child attributes
frobjectSaved fr translations, keyed by field path.
Show 18 child attributesHide child attributes
widget.button.textstringSaved fr text for widget.button.text.
widget.disclaimer.textstringSaved fr text for widget.disclaimer.text.
widget.badge.textstringSaved fr text for widget.badge.text.
widget.billing_widget.titlestringSaved fr text for widget.billing_widget.title.
widget.billing_widget.descriptionstringSaved fr text for widget.billing_widget.description.
shipping.shipping_textstringSaved fr text for shipping.shipping_text.
shipping.preorder_shipping_textstringSaved fr text for shipping.preorder_shipping_text.
payments.discount_textstringSaved fr text for payments.discount_text.
limits.quantity_limit_textstringSaved fr text for limits.quantity_limit_text.
checkout.terms.textstringSaved fr text for checkout.terms.text.
checkout.mixed_cart.error_messagestringSaved fr text for checkout.mixed_cart.error_message.
countdown.unit_labels.daysstringSaved fr text for countdown.unit_labels.days.
countdown.unit_labels.hoursstringSaved fr text for countdown.unit_labels.hours.
countdown.unit_labels.minutesstringSaved fr text for countdown.unit_labels.minutes.
countdown.unit_labels.secondsstringSaved fr text for countdown.unit_labels.seconds.
payments.options.full.billing_titlestringSaved fr text for payments.options.full.billing_title.
payments.options.full.billing_descriptionstringSaved fr text for payments.options.full.billing_description.
payments.options.full.discount_textstringSaved fr text for payments.options.full.discount_text.
enobjectSaved en translations, keyed by field path.
Show 1 child attributeHide child attributes
widget.button.textstringSaved en text for widget.button.text.
pt_brobjectSaved pt_br translations, keyed by field path.
Show 17 child attributesHide child attributes
widget.button.textstringSaved pt_br text for widget.button.text.
widget.disclaimer.textstringSaved pt_br text for widget.disclaimer.text.
widget.badge.textstringSaved pt_br text for widget.badge.text.
widget.billing_widget.titlestringSaved pt_br text for widget.billing_widget.title.
widget.billing_widget.descriptionstringSaved pt_br text for widget.billing_widget.description.
shipping.shipping_textstringSaved pt_br text for shipping.shipping_text.
shipping.preorder_shipping_textstringSaved pt_br text for shipping.preorder_shipping_text.
payments.discount_textstringSaved pt_br text for payments.discount_text.
limits.quantity_limit_textstringSaved pt_br text for limits.quantity_limit_text.
checkout.mixed_cart.error_messagestringSaved pt_br text for checkout.mixed_cart.error_message.
countdown.unit_labels.daysstringSaved pt_br text for countdown.unit_labels.days.
countdown.unit_labels.hoursstringSaved pt_br text for countdown.unit_labels.hours.
countdown.unit_labels.minutesstringSaved pt_br text for countdown.unit_labels.minutes.
countdown.unit_labels.secondsstringSaved pt_br text for countdown.unit_labels.seconds.
payments.options.full.billing_titlestringSaved pt_br text for payments.options.full.billing_title.
payments.options.full.billing_descriptionstringSaved pt_br text for payments.options.full.billing_description.
payments.options.full.discount_textstringSaved pt_br text for payments.options.full.discount_text.
ro_roobjectSaved ro_ro translations, keyed by field path.
Show 17 child attributesHide child attributes
widget.button.textstringSaved ro_ro text for widget.button.text.
widget.disclaimer.textstringSaved ro_ro text for widget.disclaimer.text.
widget.badge.textstringSaved ro_ro text for widget.badge.text.
widget.billing_widget.titlestringSaved ro_ro text for widget.billing_widget.title.
widget.billing_widget.descriptionstringSaved ro_ro text for widget.billing_widget.description.
shipping.shipping_textstringSaved ro_ro text for shipping.shipping_text.
shipping.preorder_shipping_textstringSaved ro_ro text for shipping.preorder_shipping_text.
payments.discount_textstringSaved ro_ro text for payments.discount_text.
limits.quantity_limit_textstringSaved ro_ro text for limits.quantity_limit_text.
checkout.mixed_cart.error_messagestringSaved ro_ro text for checkout.mixed_cart.error_message.
countdown.unit_labels.daysstringSaved ro_ro text for countdown.unit_labels.days.
countdown.unit_labels.hoursstringSaved ro_ro text for countdown.unit_labels.hours.
countdown.unit_labels.minutesstringSaved ro_ro text for countdown.unit_labels.minutes.
countdown.unit_labels.secondsstringSaved ro_ro text for countdown.unit_labels.seconds.
payments.options.full.billing_titlestringSaved ro_ro text for payments.options.full.billing_title.
payments.options.full.billing_descriptionstringSaved ro_ro text for payments.options.full.billing_description.
payments.options.full.discount_textstringSaved ro_ro text for payments.options.full.discount_text.
Errors
forbiddenThe credential is valid, but the store's plan or settings do not allow this operation.
plan_requiredThe change uses a feature that is only available on a paid STOQ plan. Connecting a paid-only integration returns 403; a write that sets paid-only fields returns 422 and saves nothing.
not_foundThe path is valid but nothing with that id exists in this store.
idempotency_key_in_progressAn earlier request with the same Idempotency-Key is still running. Wait, then resend the same request with the same key.
invalid_paramsOne or more fields failed the action's schema.
validation_failedThe action refused the request for a reason that is not a single bad field.
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 -X POST "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/translations/reset_to_defaults" \
-H "X-Auth-Token: $STOQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "de"
}'const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/translations/reset_to_defaults", {
method: "POST",
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"locale": "de"
}),
});
const data = await res.json();import os
import requests
res = requests.post(
"https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/translations/reset_to_defaults",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
json={
"locale": "de"
},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/translations/reset_to_defaults")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"], "Content-Type" => "application/json")
req.body = {
locale: "de"
}.to_json
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"default_locale": "en",
"locales": [
"de",
"fr"
],
"published_locales": [
"en",
"fr",
"de"
],
"multi_language_enabled": true,
"fields": [
"widget.button.text",
"widget.disclaimer.text",
"widget.badge.text"
],
"source_values": {
"widget.button.text": "Preorder Now",
"widget.disclaimer.text": "Expected to ship by August 2026",
"widget.badge.text": "Pre-Order"
},
"translations": {
"de": {
"widget.button.text": "Vorbestellen",
"widget.disclaimer.text": "Hinweis: Dies ist eine Vorbestellung. Artikel werden basierend auf dem geschätzten Lieferdatum versandt.",
"widget.badge.text": "Vorbestellen"
},
"fr": {
"widget.button.text": "Précommander",
"widget.badge.text": "Précommande"
}
}
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Offer not found"
],
"code": "not_found",
"details": [
{
"code": "not_found",
"message": "Offer not found",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"A request with this Idempotency-Key is still running"
],
"code": "idempotency_key_in_progress",
"details": [
{
"code": "idempotency_key_in_progress",
"message": "A request with this Idempotency-Key is still running",
"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
}
]
}