Add an image
POST
/products/{product_id}/images
const url = 'https://api.integration.tryonvirtual.com/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/images';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"url":"https://example.com"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.integration.tryonvirtual.com/v1/products/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/images \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "url": "https://example.com" }'Either JSON with a public image url (we download it), or a multipart upload with an image file field. Max 15 MB. Allowed types: JPEG, PNG, WebP, GIF. The first image becomes the product’s primary image.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”product_id
required
string format: uuid
Request Bodyrequired
Section titled “Request Bodyrequired”object
url
required
string format: uri
Examplegenerated
{ "url": "https://example.com"}object
image
required
string format: binary
Responses
Section titled “Responses”Image attached
Media typeapplication/json
object
image
object
id
string format: uuid
url
string
position
integer
is_primary
boolean
created_at
string format: date-time
Examplegenerated
{ "image": { "id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "url": "example", "position": 1, "is_primary": true, "created_at": "2026-04-15T12:00:00Z" }}Invalid input
Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{ "error": { "code": "example", "message": "example" }}Resource not found (or belongs to another shop)
Media typeapplication/json
object
error
object
code
string
message
string
Examplegenerated
{ "error": { "code": "example", "message": "example" }}