Skip to main content
PUT
/
api
/
v1
/
variants
/
{variant_id}
Update Variant
curl --request PUT \
  --url https://api.launchmystore.io/api/v1/variants/{variant_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "sku": "<string>",
  "price": 123,
  "compare_at_price": 123,
  "inventory_quantity": 123,
  "weight": 123,
  "barcode": "<string>",
  "option1": "<string>",
  "option2": "<string>",
  "option3": "<string>",
  "image_id": "<string>"
}
'
{
  "success": true,
  "data": {
    "id": "var_abc123",
    "product_id": "prod_xyz789",
    "title": "Red / Small",
    "sku": "TSHIRT-RED-S-UPDATED",
    "price": 2499,
    "compare_at_price": 3999,
    "inventory_quantity": 75,
    "weight": 200,
    "option1": "Red",
    "option2": "Small",
    "option3": null,
    "updated_at": "2024-01-25T10:30:00Z"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.launchmystore.io/llms.txt

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

Path Parameters

variant_id
string
required
The variant ID to update

Body Parameters

sku
string
Stock keeping unit
price
number
Price in cents
compare_at_price
number
Compare at price in cents
inventory_quantity
number
Stock quantity
weight
number
Weight in grams
barcode
string
Barcode
option1
string
First option value
option2
string
Second option value
option3
string
Third option value
image_id
string
Associate with a product image

Response

{
  "success": true,
  "data": {
    "id": "var_abc123",
    "product_id": "prod_xyz789",
    "title": "Red / Small",
    "sku": "TSHIRT-RED-S-UPDATED",
    "price": 2499,
    "compare_at_price": 3999,
    "inventory_quantity": 75,
    "weight": 200,
    "option1": "Red",
    "option2": "Small",
    "option3": null,
    "updated_at": "2024-01-25T10:30:00Z"
  }
}