Skip to main content
PATCH
/
products
/
{id}
/
variants
/
{variant_id}
cURL
curl -X PATCH https://api.neuraldraft.io/v1/products/32/variants/72 \
  -H "Authorization: Bearer ndsk_live_yourkey" \
  -H "Content-Type: application/json" \
  -d '{"stock_quantity":4}'
{
  "id": 71,
  "product_id": 32,
  "name": "Natural cork",
  "price": 2999,
  "sku": "ND-CORK-PAIR-N",
  "stock_quantity": 123,
  "options": {
    "color": "natural"
  },
  "sort_order": 0,
  "is_active": true
}

Documentation Index

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

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

Authorizations

Authorization
string
header
required

Project API key. Pass as Authorization: Bearer ndsk_live_.... Manage keys via /projects/me/api-keys. Test-mode keys use the ndsk_test_ prefix.

Path Parameters

id
integer
required
Example:

32

variant_id
integer
required

Body

application/json
name
string
sku
string
price
integer
stock_quantity
integer | null
options
object
sort_order
integer
is_active
boolean

Response

Updated.

id
integer
required
Example:

71

product_id
integer
required
Example:

32

name
string
required
Example:

"Natural cork"

price
integer
required
Example:

2999

sku
string | null
Example:

"ND-CORK-PAIR-N"

stock_quantity
integer | null
options
object

Free-form variant options (size, color, etc.).

Example:
{ "color": "natural" }
sort_order
integer
default:0
is_active
boolean
default:true