---
title: "Reset translations to defaults"
description: "Reset a preorder offer's storefront text for one language to STOQ's default translations, as the offer translator's \"Load default translations\" does."
url: https://docs.stoqapp.com/v2-reference/preorders-offers/reset-translations-to-defaults/
api: "API v2 reference"
method: POST
path: "/preorders/offers/{id}/translations/reset_to_defaults"
---

# Reset translations to defaults

`POST https://app.stoqapp.com/api/v2/external/preorders/offers/{id}/translations/reset_to_defaults`

Reset a preorder offer's storefront text for one language to STOQ's default translations, as the offer translator's &quot;Load default translations&quot; does.

**Note:** 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.

## Path parameters

- `id` (string, required): The offer's ID, from [`GET /preorders/offers`](https://docs.stoqapp.com/v2-reference/preorders-offers/list-offers/).

## Headers

- `Idempotency-Key` (string): 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

- `locale` (string): 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_locale` (string): The shop's primary language, which the offer's own text is in.
- `locales` (array of strings): Languages with at least one saved translation on this offer.
- `published_locales` (array of strings): Languages worth checking for gaps: those published in the shop's Shopify markets plus the default language.
- `multi_language_enabled` (boolean): Whether translations reach the storefront. Turned on with PATCH /account/languages.
- `fields` (array of strings): Every translatable field path, such as widget.button.text.
- `source_values` (object): The offer's text in the default language, keyed by field path. Null where the field is empty.
  - `widget.button.text` (string): Preorder button label (widget.button.button_text on the offer).
  - `widget.disclaimer.text` (string): Disclaimer line under the button (widget.disclaimer.disclaimer_text).
  - `widget.badge.text` (string): Preorder badge label (widget.badge.badge_text).
  - `widget.billing_widget.title` (string): Payment widget title stored on the offer itself, which is also the title of the payment option the offer row holds.
  - `widget.billing_widget.description` (string): Payment widget description stored on the offer itself, which is also the description of the payment option the offer row holds.
  - `shipping.shipping_text` (string): Ship date text, the {{ date }} value (shipping.timeline.variant_shipping_text).
  - `shipping.preorder_shipping_text` (string): Shipping line under the button (shipping.timeline.shipping_text).
  - `payments.discount_text` (string): Discount text stored on the offer itself, for the payment option the offer row holds.
  - `limits.quantity_limit_text` (string): Text printed with the remaining-units count (limits.limit_text).
  - `limits.progress_bar_text` (string): Progress bar text (limits.progress_bar.progress_text).
  - `checkout.terms.text` (string): Wording beside the terms checkbox (limits.terms.terms_text).
  - `checkout.mixed_cart.error_message` (string): Error shown when a blocked mixed cart reaches checkout (limits.cart.error_message).
  - `countdown.text` (null): Countdown heading; the same text as countdown.ends_text.
  - `countdown.starts_text` (null): Countdown heading shown before launch (countdown.starts_text).
  - `countdown.ends_text` (null): Countdown heading shown during the preorder (countdown.ends_text).
  - `countdown.unit_labels.days` (string): Countdown days label (countdown.labels.days).
  - `countdown.unit_labels.hours` (string): Countdown hours label (countdown.labels.hours).
  - `countdown.unit_labels.minutes` (string): Countdown minutes label (countdown.labels.minutes).
  - `countdown.unit_labels.seconds` (string): Countdown seconds label (countdown.labels.seconds).
  - `advanced.line_item_properties.custom_text` (null): Free text added to every preorder cart line (advanced.cart_attributes.custom_text).
  - `payments.options.full.billing_title` (string): Title of the full-payment option (payments.full.option_title). Null when the offer has no full-payment option.
  - `payments.options.full.billing_description` (string): Description of the full-payment option (payments.full.option_description).
  - `payments.options.full.discount_text` (string): Discount text of the full-payment option (payments.full.discount_text).
  - `payments.options.partial.billing_title` (null): Title of the partial-payment option (payments.partial.option_title). Null when the offer has no partial-payment option.
  - `payments.options.partial.billing_description` (null): Description of the partial-payment option (payments.partial.option_description).
  - `payments.options.partial.discount_text` (null): Discount text of the partial-payment option (payments.partial.discount_text).
- `translations` (object): Saved translations keyed by locale, then by field path. Only locales and fields with saved text appear.
  - `fr` (object): Saved fr translations, keyed by field path.
    - `widget.button.text` (string): Saved fr text for widget.button.text.
    - `widget.disclaimer.text` (string): Saved fr text for widget.disclaimer.text.
    - `widget.badge.text` (string): Saved fr text for widget.badge.text.
    - `widget.billing_widget.title` (string): Saved fr text for widget.billing_widget.title.
    - `widget.billing_widget.description` (string): Saved fr text for widget.billing_widget.description.
    - `shipping.shipping_text` (string): Saved fr text for shipping.shipping_text.
    - `shipping.preorder_shipping_text` (string): Saved fr text for shipping.preorder_shipping_text.
    - `payments.discount_text` (string): Saved fr text for payments.discount_text.
    - `limits.quantity_limit_text` (string): Saved fr text for limits.quantity_limit_text.
    - `checkout.terms.text` (string): Saved fr text for checkout.terms.text.
    - `checkout.mixed_cart.error_message` (string): Saved fr text for checkout.mixed_cart.error_message.
    - `countdown.unit_labels.days` (string): Saved fr text for countdown.unit_labels.days.
    - `countdown.unit_labels.hours` (string): Saved fr text for countdown.unit_labels.hours.
    - `countdown.unit_labels.minutes` (string): Saved fr text for countdown.unit_labels.minutes.
    - `countdown.unit_labels.seconds` (string): Saved fr text for countdown.unit_labels.seconds.
    - `payments.options.full.billing_title` (string): Saved fr text for payments.options.full.billing_title.
    - `payments.options.full.billing_description` (string): Saved fr text for payments.options.full.billing_description.
    - `payments.options.full.discount_text` (string): Saved fr text for payments.options.full.discount_text.
  - `en` (object): Saved en translations, keyed by field path.
    - `widget.button.text` (string): Saved en text for widget.button.text.
  - `pt_br` (object): Saved pt_br translations, keyed by field path.
    - `widget.button.text` (string): Saved pt_br text for widget.button.text.
    - `widget.disclaimer.text` (string): Saved pt_br text for widget.disclaimer.text.
    - `widget.badge.text` (string): Saved pt_br text for widget.badge.text.
    - `widget.billing_widget.title` (string): Saved pt_br text for widget.billing_widget.title.
    - `widget.billing_widget.description` (string): Saved pt_br text for widget.billing_widget.description.
    - `shipping.shipping_text` (string): Saved pt_br text for shipping.shipping_text.
    - `shipping.preorder_shipping_text` (string): Saved pt_br text for shipping.preorder_shipping_text.
    - `payments.discount_text` (string): Saved pt_br text for payments.discount_text.
    - `limits.quantity_limit_text` (string): Saved pt_br text for limits.quantity_limit_text.
    - `checkout.mixed_cart.error_message` (string): Saved pt_br text for checkout.mixed_cart.error_message.
    - `countdown.unit_labels.days` (string): Saved pt_br text for countdown.unit_labels.days.
    - `countdown.unit_labels.hours` (string): Saved pt_br text for countdown.unit_labels.hours.
    - `countdown.unit_labels.minutes` (string): Saved pt_br text for countdown.unit_labels.minutes.
    - `countdown.unit_labels.seconds` (string): Saved pt_br text for countdown.unit_labels.seconds.
    - `payments.options.full.billing_title` (string): Saved pt_br text for payments.options.full.billing_title.
    - `payments.options.full.billing_description` (string): Saved pt_br text for payments.options.full.billing_description.
    - `payments.options.full.discount_text` (string): Saved pt_br text for payments.options.full.discount_text.
  - `ro_ro` (object): Saved ro_ro translations, keyed by field path.
    - `widget.button.text` (string): Saved ro_ro text for widget.button.text.
    - `widget.disclaimer.text` (string): Saved ro_ro text for widget.disclaimer.text.
    - `widget.badge.text` (string): Saved ro_ro text for widget.badge.text.
    - `widget.billing_widget.title` (string): Saved ro_ro text for widget.billing_widget.title.
    - `widget.billing_widget.description` (string): Saved ro_ro text for widget.billing_widget.description.
    - `shipping.shipping_text` (string): Saved ro_ro text for shipping.shipping_text.
    - `shipping.preorder_shipping_text` (string): Saved ro_ro text for shipping.preorder_shipping_text.
    - `payments.discount_text` (string): Saved ro_ro text for payments.discount_text.
    - `limits.quantity_limit_text` (string): Saved ro_ro text for limits.quantity_limit_text.
    - `checkout.mixed_cart.error_message` (string): Saved ro_ro text for checkout.mixed_cart.error_message.
    - `countdown.unit_labels.days` (string): Saved ro_ro text for countdown.unit_labels.days.
    - `countdown.unit_labels.hours` (string): Saved ro_ro text for countdown.unit_labels.hours.
    - `countdown.unit_labels.minutes` (string): Saved ro_ro text for countdown.unit_labels.minutes.
    - `countdown.unit_labels.seconds` (string): Saved ro_ro text for countdown.unit_labels.seconds.
    - `payments.options.full.billing_title` (string): Saved ro_ro text for payments.options.full.billing_title.
    - `payments.options.full.billing_description` (string): Saved ro_ro text for payments.options.full.billing_description.
    - `payments.options.full.discount_text` (string): Saved ro_ro text for payments.options.full.discount_text.

Rate limit: this call costs 2 points ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Example request

```sh
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"
  }'
```

## 202

Success: example response shown.

```json
{
  "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"
    }
  }
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 404

The resource does not exist for this shop, or the action path is not registered.

```json
{
  "errors": [
    "Offer not found"
  ],
  "code": "not_found",
  "details": [
    {
      "code": "not_found",
      "message": "Offer not found",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 409

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

```json
{
  "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
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

