API and developers

Assign categories to product

post/v1/products/{product_id}/categories

Assign existing categories to a product by their IDs.

Example

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

Parameters

product_idintegerpathrequired

Product identifier

Request body

tag_idsinteger[]required

List of category IDs to assign to the product

Responses

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
Need help?