Skip to content

Get storefront text

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

GET/preorders/settings/storefront_text

Costs 1 rate-limit point · Rate limits

The shop-wide preorder storefront text: the currency format, the button's out-of-stock and add-to-cart text, and the preorder modal's continue and cancel buttons and error heading. Shared by every preorder offer. ?locale= reads one language (omitted: the shop's default language).

Change it with PATCH /preorders/settings/storefront_text. A language with no translation of a field returns the shop default's text for it, and locale echoes the language asked for. currency_format is the same in every language. The Preorder button's own text and the offer's messages are set per offer (PATCH /preorders/offers/:id/widget).

Also searched aspreorder currency formatpreorder out of stock textpreorder add to cart textpreorder modal button textpreorder error headingpreorder storefront text

Query parameters

  • localestring

    Language of the text, such as fr or pt-BR. Omit for the shop's default language.

Returns

  • currency_formatstring
    Example: string
  • buttonobject
    Show 2 child attributesHide child attributes
    • out_of_stock_textstring
      Example: string
    • add_to_cart_textstring
      Example: string
  • modalobject
    Show 3 child attributesHide child attributes
    • continue_button_textstring
      Example: string
    • cancel_button_textstring
      Example: string
    • error_headingstring
      Example: string
  • localestring
    Example: string

Errors

404
not_found

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

422
invalid_params

One or more fields failed the action's schema.

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/settings/storefront_text
curl "https://app.stoqapp.com/api/v2/external/preorders/settings/storefront_text" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "currency_format": "string",
  "button": {
    "out_of_stock_text": "string",
    "add_to_cart_text": "string"
  },
  "modal": {
    "continue_button_text": "string",
    "cancel_button_text": "string",
    "error_heading": "string"
  },
  "locale": "string"
}