Remove a translation
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/offers/{id}/translations/unsetCosts 2 rate-limit points · Rate limits
Remove a translation override (one locale, one field) from a preorder offer.
The storefront falls back to the default-language text (source_values on GET /preorders/offers/:id/translations). Unsetting a field that has no override succeeds, so it is safe to retry. Unknown fields, and payments.options.<kind> paths for a kind the offer doesn't offer, return 422 validation_failed. To drop every override for a language use POST /preorders/offers/:id/translations/clear_locale.
Also searched asunset translationremove translationclear translationdelete localized textremove localized override
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
localestringRequiredLanguage of the override to remove, such as fr or pt-BR.
fieldstringRequiredTranslatable field path whose override is removed, such as widget.button.text.
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.
Errors
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/unset" \
-H "X-Auth-Token: $STOQ_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"locale": "fr",
"field": "widget.badge.text"
}'const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/translations/unset", {
method: "POST",
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
"Content-Type": "application/json",
},
body: JSON.stringify({
"locale": "fr",
"field": "widget.badge.text"
}),
});
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/unset",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
json={
"locale": "fr",
"field": "widget.badge.text"
},
)
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/unset")
req = Net::HTTP::Post.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"], "Content-Type" => "application/json")
req.body = {
locale: "fr",
field: "widget.badge.text"
}.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": [
"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": {
"fr": {
"widget.button.text": "Précommander"
}
}
}{
"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
}
]
}