Skip to main content
GET
/
api
/
v1
/
hub
/
shop
/
{shopId}
/
product
/
{productId}
/
variants
List Product Variants
curl --request GET \
  --url https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants \
  --header 'X-Shop-API-Key: <x-shop-api-key>'
{
  "status": "success",
  "data": [
    {
      "variantId": 12,
      "variantPrice": 1250000,
      "stockQuantity": 30,
      "options": [
        {
          "optionTypeName": "Color",
          "optionValueName": "Red"
        },
        {
          "optionTypeName": "Size",
          "optionValueName": "42"
        }
      ]
    }
  ]
}
Lists all configured variants, prices, options, and stock levels for a specific product.

Authorizations

X-Shop-API-Key
string
required
Your Secret API Key (sk_live_... or sk_test_...) generated from the Developer dashboard. Must be kept secret.

Path Parameters

shopId
string
required
The unique UUID of the shop.
productId
number
required
The unique ID of the product.
{
  "status": "success",
  "data": [
    {
      "variantId": 12,
      "variantPrice": 1250000,
      "stockQuantity": 30,
      "options": [
        {
          "optionTypeName": "Color",
          "optionValueName": "Red"
        },
        {
          "optionTypeName": "Size",
          "optionValueName": "42"
        }
      ]
    }
  ]
}