List products
API v2 is in public beta: endpoints and fields can change before general availability. See the changelog
/preorders/productsCosts 1 rate-limit point · Rate limits
List the variants on the store-wide Preorders > Products tab, with the offers each is linked to, paginated.
search matches product title, variant title and SKU, as the tab's search does. sort is one of created_asc, created_desc, title_asc, title_desc (default title_asc); created means the product's Shopify creation order. product_status keeps active, draft, archived, unlisted (comma-separated). With no offer filter the list holds only variants linked to an offer, as the tab does; offer_ids keeps variants in those offers and no_offer_linked=true adds the variants in no offer (the tab's 'No offer linked'). Variants deleted in Shopify are left out. per_page is 1-100 (default 20). Each row's offers carry that variant's own shipping_text and max_count (the values PATCH /preorders/products writes), quantity_limit (read-only: the limit that applies, which on a batch offer is the batches' total and not max_count; null is no limit), preorder_count and quantity_limit_reached. The top-level offers are every offer the tab can pick from, each with its current_status (live, scheduled or off, as GET /preorders/offers reports it: a dated offer is scheduled before its start and off after its end). include_inventory=true adds each row's live Shopify inventory_quantity and inventory_policy, and reads sku live, as the tab shows them.
Also searched aspreorder productsproducts tablist preorder productsvariants on preorderwhich offer is this product inproducts not in an offersearch preorder products
Query parameters
sortstringOne ofcreated_asccreated_desctitle_asctitle_descpagestringper_pagestringsearchstringproduct_statusstringoffer_idsarrayno_offer_linkedstringinclude_inventorystring
Errors
Missing or invalid X-Auth-Token.
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/products" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/products", {
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/products",
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/products")
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/products?sort=created_asc&offer_ids=string" \
-H "X-Auth-Token: $STOQ_API_KEY"const res = await fetch("https://app.stoqapp.com/api/v2/external/preorders/products?sort=created_asc&offer_ids=string", {
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/products?sort=created_asc&offer_ids=string",
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/products?sort=created_asc&offer_ids=string")
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": [
"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
}
]
}