Skip to main content
GET
/
vendor
/
product-variants
curl 'http://localhost:9000/vendor/product-variants?sku=ACME-SHIRT-M' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>'
{
  "variants": [
    {
      "id": "variant_01HXYZ",
      "title": "M",
      "sku": "ACME-SHIRT-M",
      "product_id": "prod_01HXYZ",
      "product": { "id": "prod_01HXYZ", "title": "Acme T-Shirt" }
    }
  ],
  "count": 1,
  "offset": 0,
  "limit": 50
}
Returns product variants regardless of parent product, with the parent product embedded.

Query parameters

limit
number
default:"50"
The maximum number of variants to return.
offset
number
default:"0"
The number of variants to skip before returning results.
order
string
The field to sort by, e.g. created_at or -created_at for descending.
fields
string
Comma-separated fields to include in the response. Prefix with +/- to add to or remove from the defaults.
q
string
Search term matched against variant fields.
id
string | string[]
Filter by variant ID(s).
manage_inventory
boolean
Filter by whether inventory is managed for the variant.
allow_backorder
boolean
Filter by whether backorders are allowed.
sku
string | string[]
Filter by SKU(s).
ean
string | string[]
Filter by EAN(s).
upc
string | string[]
Filter by UPC(s).
barcode
string | string[]
Filter by barcode(s).
product_id
string | string[]
Filter by parent product ID(s).
created_at
object
Filter by creation date using operators like $gt, $lt, $gte, $lte.
updated_at
object
Filter by update date using operators like $gt, $lt, $gte, $lte.
deleted_at
object
Filter by deletion date using operators like $gt, $lt, $gte, $lte.
$and
object[]
Join multiple filter objects with a logical AND.
$or
object[]
Join multiple filter objects with a logical OR.

Response

variants
object[]
count
number
Total number of matching variants.
offset
number
Number of skipped variants.
limit
number
Maximum number of returned variants.
curl 'http://localhost:9000/vendor/product-variants?sku=ACME-SHIRT-M' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>'
{
  "variants": [
    {
      "id": "variant_01HXYZ",
      "title": "M",
      "sku": "ACME-SHIRT-M",
      "product_id": "prod_01HXYZ",
      "product": { "id": "prod_01HXYZ", "title": "Acme T-Shirt" }
    }
  ],
  "count": 1,
  "offset": 0,
  "limit": 50
}