Skip to content

Get widget

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

GET/preorders/offers/{id}/widget

Costs 1 rate-limit point · Rate limits

Read the widget configuration for a preorder offer.

button.text_color and background_color only show while custom_colors_enabled is true; otherwise the theme's button colors are used. The disclaimer and the badge show only while show_disclaimer and show_badge are true. The payment and savings breakdown is payments.show_payment_widget, not part of this section. locale returns the texts in that language. Edit with PATCH /preorders/offers/:id/widget.

Also searched asget widgetshow widgetview button settingsview badge settingsview disclaimer settingspreorder ui

Path parameters

Query parameters

  • localestring

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

Returns

  • buttonobject

    Text and colors of the preorder button.

    Show 4 child attributesHide child attributes
    • button_textstring

      Preorder button label.

    • custom_colors_enabledboolean

      true uses text_color and background_color; false uses the theme's own button colors.

    • text_colorstring

      Button text color, as hex. Used when custom_colors_enabled is true.

    • background_colorstring

      Button background color, as hex. Used when custom_colors_enabled is true.

  • disclaimerobject

    The disclaimer line shown under the preorder button.

    Show 5 child attributesHide child attributes
    • show_disclaimerboolean

      Whether the disclaimer line shows under the button.

    • disclaimer_textstring

      Text of the disclaimer line.

    • text_colorstring

      Disclaimer text color, as hex.

    • background_colorstring

      Disclaimer background color, as hex.

    • border_radiusinteger

      Disclaimer corner radius in pixels.

  • badgeobject

    The preorder badge shown on product pages and product cards.

    Show 4 child attributesHide child attributes
    • show_badgeboolean

      Whether the preorder badge shows.

    • badge_textstring

      Label printed on the preorder badge.

    • text_colorstring

      Badge text color, as hex.

    • background_colorstring

      Badge background color, as hex.

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/offers/{id}/widget
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/widget" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "button": {
    "button_text": "Preorder Now",
    "custom_colors_enabled": true,
    "text_color": "#ffffff",
    "background_color": "#8700d3"
  },
  "disclaimer": {
    "show_disclaimer": true,
    "disclaimer_text": "Expected to ship by August 2026",
    "text_color": "#FFFFFF",
    "background_color": "#1F2937",
    "border_radius": 4
  },
  "badge": {
    "show_badge": true,
    "badge_text": "Pre-Order",
    "text_color": "#FFFFFF",
    "background_color": "#000000"
  }
}