Skip to content

Get translations

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

GET/preorders/offers/{id}/translations

Costs 1 rate-limit point · Rate limits

Read every translation override on a preorder offer, plus the full enumeration of translatable field paths, each field's default-locale source text, and every locale the shop has actually published (not just ones with an override already).

Overrides reach the storefront only while multi_language_enabled is true (PATCH /account/languages); until then shoppers see source_values, the default-language text. fields are the paths set, set_many and unset take, which are not the offer's own field names (checkout.terms.text is limits.terms.terms_text). locales lists only languages with an override, in stored form (pt-BR is pt_br); published_locales are the languages published in Shopify plus the default.

Also searched asget translationsshow translationsview translationslist translationsview localized texti18nlocalization

Path parameters

Returns

  • default_localestring

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

  • localesarray of anys

    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.

Errors

404
not_found

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

422
validation_failed

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

GET/preorders/offers/{id}/translations
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/translations" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "default_locale": "string",
  "locales": [
    null
  ],
  "published_locales": [
    "string"
  ],
  "multi_language_enabled": true,
  "fields": [
    "string"
  ],
  "source_values": {
    "widget.button.text": "string",
    "widget.disclaimer.text": "string",
    "widget.badge.text": "string",
    "widget.billing_widget.title": "string",
    "widget.billing_widget.description": "string",
    "shipping.shipping_text": "string",
    "shipping.preorder_shipping_text": "string",
    "payments.discount_text": "string",
    "limits.quantity_limit_text": "string",
    "limits.progress_bar_text": "string",
    "checkout.terms.text": "string",
    "checkout.mixed_cart.error_message": "string",
    "countdown.text": null,
    "countdown.starts_text": null,
    "countdown.ends_text": null,
    "countdown.unit_labels.days": "string",
    "countdown.unit_labels.hours": "string",
    "countdown.unit_labels.minutes": "string",
    "countdown.unit_labels.seconds": "string",
    "advanced.line_item_properties.custom_text": null,
    "payments.options.full.billing_title": "string",
    "payments.options.full.billing_description": "string",
    "payments.options.full.discount_text": "string",
    "payments.options.partial.billing_title": null,
    "payments.options.partial.billing_description": null,
    "payments.options.partial.discount_text": null
  },
  "translations": {}
}