Skip to content

Reset translations to defaults

API v2 is in public beta: endpoints and fields can change before general availability. See the changelog

POST/preorders/offers/{id}/translations/reset_to_defaults

Costs 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

Headers

  • Idempotency-Keystring

    A 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 (422 idempotency_key_reused); a retry while the first is still running gets 409 idempotency_key_in_progress. Keys are per store. Server errors and rate limits are not kept, so their retry runs.

Request body

  • localestring

    Language 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_localestring

    The shop's primary language, which the offer's own text is in.

  • localesarray of strings

    Languages with at least one saved translation on this offer.

  • published_localesarray of strings

    Languages worth checking for gaps: those published in the shop's Shopify markets plus the default language.

  • multi_language_enabledboolean

    Whether translations reach the storefront. Turned on with PATCH /account/languages.

  • fieldsarray of strings

    Every translatable field path, such as widget.button.text.

  • source_valuesobject

    The 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.textstring

      Preorder button label (widget.button.button_text on the offer).

    • widget.disclaimer.textstring

      Disclaimer line under the button (widget.disclaimer.disclaimer_text).

    • widget.badge.textstring

      Preorder badge label (widget.badge.badge_text).

    • widget.billing_widget.titlestring

      Payment widget title stored on the offer itself, which is also the title of the payment option the offer row holds.

    • widget.billing_widget.descriptionstring

      Payment widget description stored on the offer itself, which is also the description of the payment option the offer row holds.

    • shipping.shipping_textstring

      Ship date text, the {{ date }} value (shipping.timeline.variant_shipping_text).

    • shipping.preorder_shipping_textstring

      Shipping line under the button (shipping.timeline.shipping_text).

    • payments.discount_textstring

      Discount text stored on the offer itself, for the payment option the offer row holds.

    • limits.quantity_limit_textstring

      Text printed with the remaining-units count (limits.limit_text).

    • limits.progress_bar_textstring

      Progress bar text (limits.progress_bar.progress_text).

    • checkout.terms.textstring

      Wording beside the terms checkbox (limits.terms.terms_text).

    • checkout.mixed_cart.error_messagestring

      Error shown when a blocked mixed cart reaches checkout (limits.cart.error_message).

    • countdown.textnull

      Countdown heading; the same text as countdown.ends_text.

    • countdown.starts_textnull

      Countdown heading shown before launch (countdown.starts_text).

    • countdown.ends_textnull

      Countdown heading shown during the preorder (countdown.ends_text).

    • countdown.unit_labels.daysstring

      Countdown days label (countdown.labels.days).

    • countdown.unit_labels.hoursstring

      Countdown hours label (countdown.labels.hours).

    • countdown.unit_labels.minutesstring

      Countdown minutes label (countdown.labels.minutes).

    • countdown.unit_labels.secondsstring

      Countdown seconds label (countdown.labels.seconds).

    • advanced.line_item_properties.custom_textnull

      Free text added to every preorder cart line (advanced.cart_attributes.custom_text).

    • payments.options.full.billing_titlestring

      Title of the full-payment option (payments.full.option_title). Null when the offer has no full-payment option.

    • payments.options.full.billing_descriptionstring

      Description of the full-payment option (payments.full.option_description).

    • payments.options.full.discount_textstring

      Discount text of the full-payment option (payments.full.discount_text).

    • payments.options.partial.billing_titlenull

      Title of the partial-payment option (payments.partial.option_title). Null when the offer has no partial-payment option.

    • payments.options.partial.billing_descriptionnull

      Description of the partial-payment option (payments.partial.option_description).

    • payments.options.partial.discount_textnull

      Discount text of the partial-payment option (payments.partial.discount_text).

  • translationsobject

    Saved translations keyed by locale, then by field path. Only locales and fields with saved text appear.

    Show 4 child attributesHide child attributes
    • frobject

      Saved fr translations, keyed by field path.

      Show 18 child attributesHide child attributes
      • widget.button.textstring

        Saved fr text for widget.button.text.

      • widget.disclaimer.textstring

        Saved fr text for widget.disclaimer.text.

      • widget.badge.textstring

        Saved fr text for widget.badge.text.

      • widget.billing_widget.titlestring

        Saved fr text for widget.billing_widget.title.

      • widget.billing_widget.descriptionstring

        Saved fr text for widget.billing_widget.description.

      • shipping.shipping_textstring

        Saved fr text for shipping.shipping_text.

      • shipping.preorder_shipping_textstring

        Saved fr text for shipping.preorder_shipping_text.

      • payments.discount_textstring

        Saved fr text for payments.discount_text.

      • limits.quantity_limit_textstring

        Saved fr text for limits.quantity_limit_text.

      • checkout.terms.textstring

        Saved fr text for checkout.terms.text.

      • checkout.mixed_cart.error_messagestring

        Saved fr text for checkout.mixed_cart.error_message.

      • countdown.unit_labels.daysstring

        Saved fr text for countdown.unit_labels.days.

      • countdown.unit_labels.hoursstring

        Saved fr text for countdown.unit_labels.hours.

      • countdown.unit_labels.minutesstring

        Saved fr text for countdown.unit_labels.minutes.

      • countdown.unit_labels.secondsstring

        Saved fr text for countdown.unit_labels.seconds.

      • payments.options.full.billing_titlestring

        Saved fr text for payments.options.full.billing_title.

      • payments.options.full.billing_descriptionstring

        Saved fr text for payments.options.full.billing_description.

      • payments.options.full.discount_textstring

        Saved fr text for payments.options.full.discount_text.

    • enobject

      Saved en translations, keyed by field path.

      Show 1 child attributeHide child attributes
      • widget.button.textstring

        Saved en text for widget.button.text.

    • pt_brobject

      Saved pt_br translations, keyed by field path.

      Show 17 child attributesHide child attributes
      • widget.button.textstring

        Saved pt_br text for widget.button.text.

      • widget.disclaimer.textstring

        Saved pt_br text for widget.disclaimer.text.

      • widget.badge.textstring

        Saved pt_br text for widget.badge.text.

      • widget.billing_widget.titlestring

        Saved pt_br text for widget.billing_widget.title.

      • widget.billing_widget.descriptionstring

        Saved pt_br text for widget.billing_widget.description.

      • shipping.shipping_textstring

        Saved pt_br text for shipping.shipping_text.

      • shipping.preorder_shipping_textstring

        Saved pt_br text for shipping.preorder_shipping_text.

      • payments.discount_textstring

        Saved pt_br text for payments.discount_text.

      • limits.quantity_limit_textstring

        Saved pt_br text for limits.quantity_limit_text.

      • checkout.mixed_cart.error_messagestring

        Saved pt_br text for checkout.mixed_cart.error_message.

      • countdown.unit_labels.daysstring

        Saved pt_br text for countdown.unit_labels.days.

      • countdown.unit_labels.hoursstring

        Saved pt_br text for countdown.unit_labels.hours.

      • countdown.unit_labels.minutesstring

        Saved pt_br text for countdown.unit_labels.minutes.

      • countdown.unit_labels.secondsstring

        Saved pt_br text for countdown.unit_labels.seconds.

      • payments.options.full.billing_titlestring

        Saved pt_br text for payments.options.full.billing_title.

      • payments.options.full.billing_descriptionstring

        Saved pt_br text for payments.options.full.billing_description.

      • payments.options.full.discount_textstring

        Saved pt_br text for payments.options.full.discount_text.

    • ro_roobject

      Saved ro_ro translations, keyed by field path.

      Show 17 child attributesHide child attributes
      • widget.button.textstring

        Saved ro_ro text for widget.button.text.

      • widget.disclaimer.textstring

        Saved ro_ro text for widget.disclaimer.text.

      • widget.badge.textstring

        Saved ro_ro text for widget.badge.text.

      • widget.billing_widget.titlestring

        Saved ro_ro text for widget.billing_widget.title.

      • widget.billing_widget.descriptionstring

        Saved ro_ro text for widget.billing_widget.description.

      • shipping.shipping_textstring

        Saved ro_ro text for shipping.shipping_text.

      • shipping.preorder_shipping_textstring

        Saved ro_ro text for shipping.preorder_shipping_text.

      • payments.discount_textstring

        Saved ro_ro text for payments.discount_text.

      • limits.quantity_limit_textstring

        Saved ro_ro text for limits.quantity_limit_text.

      • checkout.mixed_cart.error_messagestring

        Saved ro_ro text for checkout.mixed_cart.error_message.

      • countdown.unit_labels.daysstring

        Saved ro_ro text for countdown.unit_labels.days.

      • countdown.unit_labels.hoursstring

        Saved ro_ro text for countdown.unit_labels.hours.

      • countdown.unit_labels.minutesstring

        Saved ro_ro text for countdown.unit_labels.minutes.

      • countdown.unit_labels.secondsstring

        Saved ro_ro text for countdown.unit_labels.seconds.

      • payments.options.full.billing_titlestring

        Saved ro_ro text for payments.options.full.billing_title.

      • payments.options.full.billing_descriptionstring

        Saved ro_ro text for payments.options.full.billing_description.

      • payments.options.full.discount_textstring

        Saved ro_ro text for payments.options.full.discount_text.

Errors

403
forbidden

The credential is valid, but the store's plan or settings do not allow this operation.

403
plan_required

The 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.

404
not_found

The path is valid but nothing with that id exists in this store.

409
idempotency_key_in_progress

An earlier request with the same Idempotency-Key is still running. Wait, then resend the same request with the same key.

422
invalid_params

One or more fields failed the action's schema.

422
validation_failed

The 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.

POST/preorders/offers/{id}/translations/reset_to_defaults
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"
  }'
Response
{
  "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"
    }
  }
}