API e desenvolvedores

Create option value

post/v1/products/{product_id}/options/{option_id}/values

Create a new value for an existing product option.

Exemplo

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

Parâmetros

product_idintegerpathobrigatório

Product identifier

option_idintegerpathobrigatório

Option identifier

Corpo da requisição

namestringobrigatório

Option value label

Respostas

201
Successful Response
401
Invalid or missing API key
403
API key lacks the products:write scope
404
Option not found
422
Validation Error
429
Rate limit exceeded
Precisa de ajuda?