Documentation IndexFetch the complete documentation index at: /llms.txtUse this file to discover all available pages before exploring further.
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Add a variant to a product.
curl -X POST 'http://localhost:9000/admin/products/prod_01HXYZABCDEF/variants' \ -H 'Authorization: Bearer <token>' \ -H 'Content-Type: application/json' \ -d '{"title": "L", "sku": "LS-L", "options": {"Size": "L"}}'
const { product } = await client.admin.products.$id.variants.mutate({ $id: "prod_01HXYZABCDEF", title: "L", sku: "LS-L", options: { Size: "L" }, })
{ "product": { "id": "prod_01HXYZABCDEF", "title": "Linen Shirt", "variants": [ { "id": "variant_01HXYZABCDEF", "title": "M", "sku": "LS-M" }, { "id": "variant_01HXYZABCDEG", "title": "L", "sku": "LS-L" } ] } }
{"Size": "L"}
Show properties