Get limits
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/offers/{id}/limitsCosts 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
idstringRequiredThe offer's ID, from
GET /preorders/offers.
Query parameters
localestringLanguage for translated text, such as fr or pt-BR. Omit for the shop's default language.
Returns
default_per_variantnullThe same quantity limit for every variant, copied onto each one when set. Null when there is none.
display_stylestringHow shoppers see the limit: none, disclaimer (remaining units in the disclaimer line) or progress_bar.
One ofnonedisclaimerprogress_barlimit_textstringText printed with the remaining-units count.
show_iconsbooleanWhether the widget uses icons for quantity and shipping details.
progress_barobjectLook and text of the storefront progress bar toward the quantity limit.
Show 7 child attributesHide child attributes
progress_textstringProgress bar text.
fill_colorstringBar fill color, as hex.
background_colorstringBar background color, as hex.
box_background_colornullColor behind the bar, as hex. Null uses the disclaimer background.
text_colorstringBar text color, as hex.
border_radiusintegerBar corner radius in pixels.
show_percentagebooleanWhether a percentage shows next to the bar.
order_tagsarray of stringsTags Shopify puts on orders containing this offer.
termsobjectThe terms checkbox shoppers accept before preordering.
Show 5 child attributesHide child attributes
require_acceptancebooleanWhether shoppers must accept the terms before preordering.
terms_textstringWording beside the terms checkbox.
disable_button_until_acceptedbooleanWhether the button stays disabled until the terms are accepted.
record_acceptancebooleanWhether acceptance is recorded as a cart line property.
acceptance_labelstringLabel of the cart line property that records acceptance.
cartobjectWhether a cart can mix preorder and regular items, and the error shown when it cannot.
Show 2 child attributesHide child attributes
allowed_itemsstringmixed lets a cart hold preorder and regular items; preorder_only blocks the mix at checkout.
One ofmixedpreorder_onlyerror_messagestringError shown when a blocked mixed cart reaches checkout.
order_quantityobjectMinimum and maximum quantity per order.
Show 2 child attributesHide child attributes
minimumnullMinimum quantity per order. Null when there is none.
maximumnullMaximum quantity per order. Null when there is none.
Errors
not_foundThe path is valid but nothing with that id exists in this store.
conflictThe request is well formed, but the resource's current state does not allow it.
invalid_paramsOne or more fields failed the action's schema.
validation_failedThe 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.
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body)curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits?locale=fr" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits?locale=fr", {
headers: {
"X-Auth-Token": process.env.STOQ_API_KEY,
},
});
const data = await res.json();import os
import requests
res = requests.get(
"https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits?locale=fr",
headers={"X-Auth-Token": os.environ["STOQ_API_KEY"]},
)
data = res.json()require "net/http"
require "json"
uri = URI("https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/limits?locale=fr")
req = Net::HTTP::Get.new(uri, "X-Auth-Token" => ENV["STOQ_API_KEY"])
res = Net::HTTP.start(uri.host, uri.port, use_ssl: true) { |http| http.request(req) }
data = JSON.parse(res.body){
"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
}
}{
"errors": [
"Invalid API key"
],
"code": "auth_invalid",
"details": [
{
"code": "auth_invalid",
"message": "Invalid API key",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Offer not found"
],
"code": "not_found",
"details": [
{
"code": "not_found",
"message": "Offer not found",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"name is required"
],
"code": "validation_failed",
"details": [
{
"code": "validation_failed",
"message": "name is required",
"path": null,
"value": null,
"expected": null
}
]
}{
"errors": [
"Rate limit exceeded"
],
"code": "rate_limited",
"details": [
{
"code": "rate_limited",
"message": "Rate limit exceeded",
"path": null,
"value": null,
"expected": null
}
]
}