Skip to content

Get limits

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

GET/preorders/offers/{id}/limits

Costs 1 rate-limit point · Rate limits

Read the limits & terms of a preorder offer: quantity limits and their display, order tags, the terms checkbox and mixed-cart rules.

default_per_variant is copied onto every variant when it changes; the limit that applies is each variant's own (max_count and quantity_limit on GET /preorders/offers/:id/products/variants), or the batch limits on a batch offer. display_style picks how remaining units show: limit_text is used with disclaimer, the progress_bar settings with progress_bar. order_quantity caps units per order, apart from the variant limit. cart.allowed_items preorder_only blocks mixed carts at checkout with cart.error_message. Edit with PATCH /preorders/offers/:id/limits.

Also searched asget limitsshow limitsview quantity limitsview order min maxlimitsget checkout settingsshow checkoutview termsview mixed cartview order tagscheckout

Path parameters

Query parameters

  • localestring

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

Returns

  • default_per_variantnull

    The same quantity limit for every variant, copied onto each one when set. Null when there is none.

  • display_stylestring

    How shoppers see the limit: none, disclaimer (remaining units in the disclaimer line) or progress_bar.

    One of nonedisclaimerprogress_bar
  • limit_textstring

    Text printed with the remaining-units count.

  • show_iconsboolean

    Whether the widget uses icons for quantity and shipping details.

  • progress_barobject

    Look and text of the storefront progress bar toward the quantity limit.

    Show 7 child attributesHide child attributes
    • progress_textstring

      Progress bar text.

    • fill_colorstring

      Bar fill color, as hex.

    • background_colorstring

      Bar background color, as hex.

    • box_background_colornull

      Color behind the bar, as hex. Null uses the disclaimer background.

    • text_colorstring

      Bar text color, as hex.

    • border_radiusinteger

      Bar corner radius in pixels.

    • show_percentageboolean

      Whether a percentage shows next to the bar.

  • order_tagsarray of strings

    Tags Shopify puts on orders containing this offer.

  • termsobject

    The terms checkbox shoppers accept before preordering.

    Show 5 child attributesHide child attributes
    • require_acceptanceboolean

      Whether shoppers must accept the terms before preordering.

    • terms_textstring

      Wording beside the terms checkbox.

    • disable_button_until_acceptedboolean

      Whether the button stays disabled until the terms are accepted.

    • record_acceptanceboolean

      Whether acceptance is recorded as a cart line property.

    • acceptance_labelstring

      Label of the cart line property that records acceptance.

  • cartobject

    Whether a cart can mix preorder and regular items, and the error shown when it cannot.

    Show 2 child attributesHide child attributes
    • allowed_itemsstring

      mixed lets a cart hold preorder and regular items; preorder_only blocks the mix at checkout.

      One of mixedpreorder_only
    • error_messagestring

      Error shown when a blocked mixed cart reaches checkout.

  • order_quantityobject

    Minimum and maximum quantity per order.

    Show 2 child attributesHide child attributes
    • minimumnull

      Minimum quantity per order. Null when there is none.

    • maximumnull

      Maximum quantity per order. Null when there is none.

Errors

404
not_found

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

409
conflict

The request is well formed, but the resource's current state does not allow it.

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}/limits
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits" \
  -H "X-Auth-Token: $STOQ_API_KEY"
Response
{
  "default_per_variant": null,
  "display_style": "none",
  "limit_text": "string",
  "show_icons": true,
  "progress_bar": {
    "progress_text": "string",
    "fill_color": "string",
    "background_color": "string",
    "box_background_color": null,
    "text_color": "string",
    "border_radius": 1,
    "show_percentage": true
  },
  "order_tags": [
    "string"
  ],
  "terms": {
    "require_acceptance": true,
    "terms_text": "string",
    "disable_button_until_accepted": true,
    "record_acceptance": true,
    "acceptance_label": "string"
  },
  "cart": {
    "allowed_items": "mixed",
    "error_message": "string"
  },
  "order_quantity": {
    "minimum": null,
    "maximum": null
  }
}