API e desenvolvedores

Assign categories to product

post/v1/products/{product_id}/categories

Assign existing categories to a product by their IDs.

Exemplo

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

Parâmetros

product_idintegerpathobrigatório

Product identifier

Corpo da requisição

tag_idsinteger[]obrigatório

List of category IDs to assign to the product

Respostas

200
Categories already assigned
201
Categories assigned
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?