Skip to main content
GET
/
api
/
v3
/
admin
/
products
/
{product_id}
/
variants
Spree Admin SDK
import { createAdminClient } from '@spree/admin-sdk'

const client = createAdminClient({
  baseUrl: 'https://your-store.com',
  secretKey: 'sk_xxx',
})

const { data: variants } = await client.products.variants.list('prod_86Rf07xd4z', {
  expand: ['prices', 'stock_items'],
})
{
  "data": [
    {
      "id": "variant_UkLWZg9DAJ",
      "product_id": "prod_UkLWZg9DAJ",
      "sku": "SKU-56",
      "options_text": "",
      "track_inventory": true,
      "media_count": 0,
      "thumbnail_url": null,
      "purchasable": false,
      "in_stock": false,
      "backorderable": false,
      "weight": 0,
      "height": null,
      "width": null,
      "depth": null,
      "price": {
        "id": null,
        "amount": null,
        "amount_in_cents": 0,
        "compare_at_amount": null,
        "compare_at_amount_in_cents": null,
        "currency": "USD",
        "display_amount": "$0.00",
        "display_compare_at_amount": null,
        "price_list_id": null
      },
      "original_price": null,
      "option_values": [],
      "metadata": {},
      "position": 1,
      "cost_price": "17.0",
      "cost_currency": "USD",
      "barcode": null,
      "weight_unit": "lb",
      "dimensions_unit": null,
      "deleted_at": null,
      "created_at": "2026-05-21T18:11:48.762Z",
      "updated_at": "2026-05-21T18:11:48.775Z",
      "tax_category_id": "taxcat_UkLWZg9DAJ",
      "available_stock": 0,
      "reserved_quantity": 0,
      "total_on_hand": 0,
      "product_name": "Product 50221"
    },
    {
      "id": "variant_gbHJdmfrXB",
      "product_id": "prod_UkLWZg9DAJ",
      "sku": "SKU-57",
      "options_text": "Size: S",
      "track_inventory": true,
      "media_count": 0,
      "thumbnail_url": null,
      "purchasable": true,
      "in_stock": false,
      "backorderable": true,
      "weight": 135.61,
      "height": 190.22,
      "width": 43.51,
      "depth": 109.66,
      "price": {
        "id": "price_gbHJdmfrXB",
        "amount": "19.99",
        "amount_in_cents": 1999,
        "compare_at_amount": null,
        "compare_at_amount_in_cents": null,
        "currency": "USD",
        "display_amount": "$19.99",
        "display_compare_at_amount": null,
        "price_list_id": null
      },
      "original_price": null,
      "option_values": [
        {
          "id": "optval_UkLWZg9DAJ",
          "option_type_id": "opt_UkLWZg9DAJ",
          "name": "size-7",
          "label": "S",
          "position": 1,
          "color_code": null,
          "option_type_name": "foo-size-16",
          "option_type_label": "Size",
          "image_url": null,
          "metadata": {},
          "created_at": "2026-05-21T18:11:48.786Z",
          "updated_at": "2026-05-21T18:11:48.786Z"
        }
      ],
      "metadata": {},
      "position": 2,
      "cost_price": "17.0",
      "cost_currency": "USD",
      "barcode": null,
      "weight_unit": "lb",
      "dimensions_unit": null,
      "deleted_at": null,
      "created_at": "2026-05-21T18:11:48.783Z",
      "updated_at": "2026-05-21T18:11:48.798Z",
      "tax_category_id": "taxcat_UkLWZg9DAJ",
      "available_stock": 0,
      "reserved_quantity": 0,
      "total_on_hand": 0,
      "product_name": "Product 50221"
    }
  ],
  "meta": {
    "page": 1,
    "limit": 25,
    "count": 2,
    "pages": 1,
    "from": 1,
    "to": 2,
    "in": 2,
    "previous": null,
    "next": null
  }
}

Documentation Index

Fetch the complete documentation index at: https://spreecommerce.org/docs/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-spree-api-key
string
header
required

Secret API key for admin access

Authorization
string
header
required

JWT token for admin user authentication

Headers

x-spree-api-key
string
required
Authorization
string
required

Bearer token for admin authentication

Path Parameters

product_id
string
required

Product ID

Query Parameters

page
integer

Page number

limit
integer

Number of records per page

expand
string

Comma-separated associations to expand (e.g., images, prices, stock_items, option_values). Use dot notation for nested expand (max 4 levels).

fields
string

Comma-separated list of fields to include (e.g., sku,price,stock). id is always included.

Response

200 - application/json

variants found