Images from rest api not showing up in shop

NekomCC
Tourist
4 0 0

Hi there, I have a small problem with uploading images to products via the shopify REST Api. 

When I create a image for a product, with a post request, I can't see it in my shop. When i fetch my product again with a GET request I'm able to see that there is an image.

 

My Request: POST: /admin/api/2019-07/products.json

 

{
"product":{
"title":"Burton Custom Freestyle 151",
"bodyhtml":"<strong>Good snowboard!</strong>",
"vendor":"Burton",
"producttype":"Snowboard",
"tags":"Barnes & Noble, John's Fav, \"Big Air\"",
"images":[
{
"src":"https://image.shopimore.at/upload/mayway/images/600/geschirrspueler-mayway-steel-tech-1603-n-16069-5..."
}
]
}
}

.

 

I also tried to upload it to the "ProductImages" endpoint with the same result.

 

Thanks in advance 

PS: it's just some test so the data doesn't make any sense

Replies 7 (7)
Sumankc
Shopify Partner
16 3 4

Hi there,

 

what response are you getting after the POST request?

also, i think bodyhtml and producttype properties are wrong, can you compare with the documentation?

If your problem solved then Like & Accept this Solution.
For Development & customization jobs - suman@cartmade.com.
NekomCC
Tourist
4 0 0

Hi there,

 

the missing underscores are just in the post missing. They are present in the original call.

 

shopify_com.jpgshopify_com2.jpg

 

thank you for your response and thanks for any other solutions

Jason
Shopify Expert
10440 169 2081

In the image of the data response I see an image in place. This one:
https://cdn.shopify.com/s/files/1/0267/7581/4228/products/geschirrspueler-mayway-steel-tech-1603-n-1...

So what's not working as you expect? Is this about the API or more to do with the front end code not showing the image? Those could be two very different issues.

I jump on these forums to help and share some insights. Not looking to be hired, and not looking for work.
Don't hand out staff invites or give admin password to forum members unless absolutely needed. In most cases the help you need can be handled without that.
★ http://freakdesign.com.au ★
NekomCC
Tourist
4 0 0

The image there is not shown anywhere in the shop. Even though it's saved.

NekomCC
Tourist
4 0 0

Nevermind,

 

i found the bug. Thanks for the help

 

idanavis
New Member
4 0 0

what was the bug, i have the same issue

devharlo
Tourist
4 0 1

Was the bug of any relevance to the problem, or unrelated?  Would be nice to know for the sake of anyone else that reads this dead end post