List products variants for an offer
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/offers/{id}/products/variantsCosts 1 rate-limit point · Rate limits
List the variants on a preorder offer, as the offer's Products table shows them, paginated.
On an offer with batches on, each row has batch_progress (units sold and the limit enforced per batch, and the batch on sale now) and batch_limits (the variant's own per-batch limits). max_count is the variant's own limit, the one PATCH writes; quantity_limit is the read-only limit that applies (the batches' total on a batch offer, where max_count is kept but not enforced). search matches product title, variant title and SKU. sort is one of attached, title, title_asc, title_desc, created_asc, created_desc, added_asc, added_desc, sold_asc, sold_desc (default attached, the attach order; title is title_asc). product_status keeps products in active, draft, archived, unlisted (comma-separated); when a product's status can't be read from Shopify the filter is skipped and product_status_filter_skipped is true. limit_reached=true keeps variants at their quantity limit. product.status is the stored status; include_statuses=true reads the ones not stored yet from Shopify (products[].status when grouped). group_by=product returns products (shopify_product_id, title, image_url, variant_count, variants) instead of variants and pages by product, so a product's variants never split across pages: per_page counts products and meta has total_products and total_variants. exclude_discarded=true leaves out variants deleted from the catalog (discarded: true). include_inventory=true adds each row's live Shopify inventory_quantity, inventory_policy and product.tags. The filters inventory (zero_or_below | positive), inventory_policy (DENY | CONTINUE; lowercase is deprecated), product_tag and exclude_product_tag imply include_inventory and apply to each page after the read, so a page can hold fewer rows than per_page; keep paging while meta.page < meta.total_pages.
Also searched aslist variants on offervariants attached to offershow offer variantsattached variantsoffer variant listlist products on offersearch offer products
Path parameters
idstringRequired
Query parameters
sortstringOne ofattachedtitletitle_asctitle_desccreated_asccreated_descadded_ascadded_descsold_ascsold_descgroup_bystringOne ofproductinventorystringOne ofzero_or_belowpositiveinventory_policystringOne ofDENYCONTINUEdenycontinuepagestringper_pagestringsearchstringproduct_statusstringlimit_reachedintegerinclude_statusesstringexclude_discardedstringinclude_inventorystringproduct_tagstringexclude_product_tagstring
Errors
Missing or invalid X-Auth-Token.
The resource does not exist for this shop, or the action path is not registered.
The request failed validation.
Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.
Every error has the same shape: see Errors.
curl "https://app.stoqapp.com/api/v2/external/preorders/offers/73a74948-2b57-4cc3-971f-2b441828c977/products/variants" \
-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/products/variants", {
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/products/variants",
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/products/variants")
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/products/variants?sort=attached&group_by=product&inventory=zero_or_below" \
-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/products/variants?sort=attached&group_by=product&inventory=zero_or_below", {
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/products/variants?sort=attached&group_by=product&inventory=zero_or_below",
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/products/variants?sort=attached&group_by=product&inventory=zero_or_below")
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){
"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
}
]
}