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.

Product images not updating through admin api

Product images not updating through admin api

Hasankhn
New Member
7 0 0

Hi community,

I am updating images through shopify admin api, i am deleting the images and then re-uploading them through products api sending a put request to the product, but my images position is not updating, can you explain the reason for this ?

 

Deleting images request

https://{{apikey}}:{{password}}@{{yourstore}}.myshopify.com/admin/products/product_id.json

{
"product":{"images": [
 
]
}
}

updating images request

https://{{apikey}}:{{password}}@{{yourstore}}.myshopify.com/admin/products/product_id.json

 

{
"product":{"images": [
{
"position": 1
},
{
"position": 2
},
{
"position": 3
},
{
"position": 4
}
]
}
}
Reply 1 (1)

Hasankhn
New Member
7 0 0

please help anyone..

thanks