Skip to main content
GET
/
vendor
/
products
/
{id}
/
variants
/
{variant_id}
curl 'http://localhost:9000/vendor/products/prod_01HXYZ/variants/variant_01HXYZ' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>'
{
  "variant": {
    "id": "variant_01HXYZ",
    "title": "M",
    "sku": "ACME-SHIRT-M",
    "product_id": "prod_01HXYZ",
    "manage_inventory": false,
    "allow_backorder": false,
    "options": [
      { "id": "optval_01HXYZ", "value": "M", "option": { "id": "opt_01HXYZ", "title": "Size" } }
    ]
  }
}
Returns a variant scoped to the given product.

Path parameters

id
string
required
The product’s ID.
variant_id
string
required
The variant’s ID.

Query parameters

fields
string
Comma-separated fields to include in the response. Prefix with +/- to add to or remove from the defaults.

Response

variant
object
curl 'http://localhost:9000/vendor/products/prod_01HXYZ/variants/variant_01HXYZ' \
  -H 'Authorization: Bearer <token>' \
  -H 'x-seller-id: <seller_id>'
{
  "variant": {
    "id": "variant_01HXYZ",
    "title": "M",
    "sku": "ACME-SHIRT-M",
    "product_id": "prod_01HXYZ",
    "manage_inventory": false,
    "allow_backorder": false,
    "options": [
      { "id": "optval_01HXYZ", "value": "M", "option": { "id": "opt_01HXYZ", "title": "Size" } }
    ]
  }
}