API and developers

Create option

post/v1/products/{product_id}/options

Add a new option with values to an existing product.

Example

curl -X POST "https://api.ya.onl/v1/products/{product_id}/options" \
  -H "X-API-Key: yv_live_v1_…" \
  -H "Content-Type: application/json" \
  -d '{"name":"…","values":"…"}'

Parameters

product_idintegerpathrequired

Product identifier

Request body

namestringrequired

Option group name

valuesstring[]required

Option values (at least 1)

Responses

201
Successful Response
401
Invalid or missing API key
403
API key lacks the products:write scope
404
Product not found
422
Validation Error
429
Rate limit exceeded
Need help?