Developers
Products

Update a variant's price

PATCH
/products/{id}/variants/{variant_id}

Changes a variant's price and discount. Only the fields you send change. The discount must leave a price above zero. Returns the whole product.

Authorization

apiKey
headerAuthorizationBearer <token>

A store API key from Settings → Developers → API keys, sent as Authorization: Bearer zk_live_….

Path Parameters

id*string

The resource id

Formatuuid
variant_id*string

The variant id

Formatuuid

Header Parameters

Idempotency-Key?string

A unique value (e.g. a UUID) per change. Retrying with the same key returns the first result instead of applying the change twice. Kept for 24 hours.

Lengthlength <= 255

Request Body

application/json
  1. body
price?string
Match^\d{1,8}(\.\d{1,2})?$
discount_type?string

null removes the discount

Value in"percentage""fixed"
discount_value?string
Match^\d{1,8}(\.\d{1,2})?$

Response Body

Success

application/json
  1. response
object*"product"
Value in"product"
id*string
name*string

Name in the store's default language

slug*string
type*string
Value in"physical""digital""consulting""webinar"
status*string
Value in"pending""approved""deleted""archived""featured""in_review""draft"
currency*string

The store currency

Length3 <= length <= 3
min_price*string

Lowest price after discounts across variants

max_price*string

Decimal amount as a string, e.g. "149.00"

category_id*string
tags*array<string>
images*array<string>

Public image URLs

translations*array<>
variants*array<>
created_at*string

ISO 8601 timestamp

updated_at*string

ISO 8601 timestamp

curl -X PATCH "https://example.com/products/497f6eca-6276-4993-bfeb-53cbbbba6f08/variants/497f6eca-6276-4993-bfeb-53cbbbba6f08" \  -H "Content-Type: application/json" \  -d '{}'
{  "object": "product",  "id": "00000000-0000-4000-8000-0000000000a1",  "name": "Classic T-shirt",  "slug": "classic-t-shirt",  "type": "physical",  "status": "approved",  "currency": "SAR",  "min_price": "108.00",  "max_price": "108.00",  "category_id": null,  "tags": [    "summer"  ],  "images": [    "https://cdn.example.com/products/classic-t-shirt.jpg"  ],  "translations": [    {      "locale": "en",      "name": "Classic T-shirt",      "description": "100% cotton."    },    {      "locale": "ar",      "name": "تيشيرت كلاسيكي",      "description": "قطن ١٠٠٪."    }  ],  "variants": [    {      "object": "product_variant",      "id": "00000000-0000-4000-8000-0000000000b1",      "product_id": "00000000-0000-4000-8000-0000000000a1",      "title": "Medium / Black",      "sku": "TSHIRT-M-BLK",      "barcode": null,      "price": "120.00",      "discount_type": "percentage",      "discount_value": "10.00",      "stock": 42,      "low_stock_threshold": 5,      "option1": "Medium",      "option2": "Black",      "option3": null,      "position": 1,      "image_url": null,      "created_at": "2026-09-01T08:00:00.000Z",      "updated_at": "2026-10-01T09:30:00.000Z"    }  ],  "created_at": "2026-09-01T08:00:00.000Z",  "updated_at": "2026-10-01T09:30:00.000Z"}