Skip to main content
PUT
/
api
/
v1
/
hub
/
shop
/
{shopId}
/
product
/
{productId}
/
variants
/
{variantId}
Update Variant
curl --request PUT \
  --url https://api.sabivendor.com/api/v1/hub/shop/{shopId}/product/{productId}/variants/{variantId} \
  --header 'Content-Type: application/json' \
  --header 'X-Shop-API-Key: <x-shop-api-key>' \
  --data '
{
  "variantPrice": 123,
  "stockQuantity": 123
}
'
{
  "status": "success",
  "message": "Variant updated successfully",
  "data": {
    "variantId": 12,
    "variantPrice": 1300000,
    "stockQuantity": 25
  }
}
Modifies pricing, status, or stock settings for an existing product SKU variant.

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.
variantId
number
required
The unique ID of the variant.

Request Body (JSON)

variantPrice
number
Updated variant price in Kobo.
stockQuantity
number
Updated variant stock count.
{
  "status": "success",
  "message": "Variant updated successfully",
  "data": {
    "variantId": 12,
    "variantPrice": 1300000,
    "stockQuantity": 25
  }
}