Skip to content

List products

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

GET
/preorders/products
curl --request GET \
--url 'https://app.stoqapp.com/api/v2/external/preorders/products?sort=created_asc&page=string&per_page=string&search=string&product_status=string&offer_ids=string&no_offer_linked=string&include_inventory=string' \
--header 'X-Auth-Token: <X-Auth-Token>'

List the variants on the store-wide Preorders > Products tab, with the offers each is linked to, paginated.

Note: 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.

sort
Allowed values: created_asc created_desc title_asc title_desc

Example

created_asc
page

Example

string
per_page

Example

string
search

Example

string
product_status

Example

string
offer_ids

Example

[
"string"
]
no_offer_linked

Example

string
include_inventory

Example

string

Success — the requested resource.

Media typeapplication/json
object

Example generated

{}

Missing or invalid X-Auth-Token.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Unauthorized"
]
}

The request failed validation.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"name is required"
]
}

Rate limited — cost-weighted per token (read 1, write 2; 360 points / 60s). Check Retry-After.

Media typeapplication/json

Error envelope returned by every failed request.

object
errors
required
Array<string>

Example

{
"errors": [
"Rate limit exceeded"
]
}
Was this page helpful?

Still stuck? Ask Quinn or chat with support