ESTAGE Support
IdeasMy tickets

Update one variant

Permission products:writeRate limit writesIdempotent with Idempotency-Key
PATCHhttps://api.estage.com/v1/variants/{id}

Authorization

ESTAGE-API-Keystringheaderrequired

A project key, est_live_…, from Settings → API keys. Call from server code only.

Path parameters

idintegerrequired

Body

application/json
pricenumber≥ 0
skustringnullable≤ 255 chars

Must not be used by another variant of the same product.

compare_at_pricenumbernullable≥ 0
inventory_policystring

deny = stop selling at zero; continue = keep selling.

One of deny, continue

titlestring≤ 255 chars
barcodestringnullable≤ 255 chars
cost_amountnumbernullable≥ 0
positioninteger≥ 0
image_idintegernullable

An image of the same product.

weightnumbernullable≥ 0
lengthnumbernullable≥ 0
widthnumbernullable≥ 0
heightnumbernullable≥ 0
is_defaultboolean

Headers

Idempotency-Keystring≤ 255 chars

Any unique string per attempt. A retry with the same key gets the first answer back instead of doing the work twice.

RequestcURL
curl --request PATCH \
  --url 'https://api.estage.com/v1/variants/variant-id' \
  --header 'ESTAGE-API-Key: est_live_your-api-key' \
  --header 'Content-Type: application/json' \
  --header 'Idempotency-Key: your-unique-key' \
  --data '{ "price": 24.5, "compare_at_price": 29, "sku": "TEE-L", "inventory_policy": "deny" }'
OK
{
  "data": {
    "id": 30442,
    "product_id": 5012,
    "title": "L",
    "sku": "TEE-L",
    "barcode": null,
    "price": "24.50",
    "compare_at_price": "29.00",
    "cost_amount": null,
    "position": 0,
    "image_id": null,
    "weight": null,
    "inventory_policy": "deny",
    "is_default": false,
    "option_values": [
      "L"
    ],
    "inventory": {
      "on_hand": 8,
      "reserved": 0,
      "available": 8
    }
  }
}
Example. Errors are { error: { code, message, details } }.