Have your say in Community Polls: What was/is your greatest motivation to start your own business?
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Unable to Upload Images to Products via Rest API - Code 200 But No Image Appears

Unable to Upload Images to Products via Rest API - Code 200 But No Image Appears

TopBonsai
Visitor
1 0 0

Hi there, I have a problem uploading images to products via Rest API. The request is returning code 200, but the image is not on the site. More details below:

 

I'm sending a POST to "admin/api/2024-04/products/9225362407714/images.json" with the following body:

 

{
	"image": {
		"attachment": "iVBORw0KGgoAAAANSUhEUgAAAJQAAACUCAMAAABC4vDmAAAAA1BMVEWwABUP+SchAAAALElEQVR4nO3BMQEAAADCoPVPbQwfoAAAAAAAAAAAAAAAAAAAAAAAAAAAAHgZViQAAd2fpbUAAAAASUVORK5CYII=",
		"filename": "image.png"
	}
}

 

 

It's returning code 200, but the response is an empty array, and the image is not in the product:

 

{
	"images": []
}

 


Can someone help me please? 😄

Replies 0 (0)