Why is my image upload API returning an empty JSON?

Why is my image upload API returning an empty JSON?

edwinso
Shopify Partner
2 0 0

Hello, I am trying to upload an image for a product via API, I am doing the test via postman with the following data

 

post url: https://my-shop-name.myshopify.com/admin/api/2024-01/products/productid/images.json

 

Headers : X-Shopify-Access-Token : shop-api-key

 

Body json 

 

 

{
	"image": {
		"position": 1,
		"metafields": [
			{
				"key": "new",
				"value": "newvalue",
				"type": "single_line_text_field",
				"namespace": "global"
			}
		],
		"attachment": "base64.string",
		"filename": "primera_imagen.jpg"
	}
}

The problem is that the message returns ok 200 but the result is an empty json

 

 

edwinso_0-1707931065497.png

 

any idea what could be happening?

 

Replies 0 (0)