API and developers

Add media to variant

post/v1/products/{product_id}/variants/{variant_id}/media

Add media (image, video, etc.) to a product variant.

Example

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

Parameters

product_idintegerpathrequired

Product identifier

variant_idintegerpathrequired

Variant identifier

Request body

titlestring | null

Media title or alt text

urlstringrequired

Public URL of the media file

Responses

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