Attach Image
POST {{baseUrl}}/products/:product/images
You can add up to 10 images to a specific product by providing the ID of the product you want to attach these images to it in the product path parameter. You can do that either via URL link or uploading an image.
Note: You can send one image only per request.
OAuth Scopes
products.read_write
Request Body
[{"name"=>"photo", "value"=>"uploaded image file", "datatype"=>"string"}, {"name"=>"default", "value"=>"1", "datatype"=>"number"}, {"name"=>"sort", "value"=>"0", "datatype"=>"number"}, {"name"=>"alt", "value"=>"text", "datatype"=>"string"}]
HEADERS
Key | Datatype | Required | Description |
---|---|---|---|
Content-Type | string | ||
Accept | string |
RESPONSES
status: Created
{"status":201,"success":true,"data":{"id":1829325271,"image":{"original":{"url":"https://i.ibb.co/jyqRQfQ/avatar-male.webp","width":0,"height":0},"standard_resolution":{"url":"https://i.ibb.co/jyqRQfQ/avatar-male.webp","width":1000,"height":606.7567567567568},"low_resolution":{"url":"https://i.ibb.co/jyqRQfQ/avatar-male.webp","width":500,"height":303.3783783783784},"thumbnail":{"url":"https://i.ibb.co/jyqRQfQ/avatar-male.webp","width":120,"height":72.81081081081082}},"sort":0,"default":false,"alt_seo":"Image Alternative SEO","video_url":"","type":"image"}}