API e desenvolvedores

Create option

post/v1/products/{product_id}/options

Add a new option with values to an existing product.

Exemplo

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":"…"}'

Parâmetros

product_idintegerpathobrigatório

Product identifier

Corpo da requisição

namestringobrigatório

Option group name

valuesstring[]obrigatório

Option values (at least 1)

Respostas

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
Precisa de ajuda?