Difficulty loading product images on product_update

Hello,
I am testing the product_update mutation to update product details such as images.
I keep on getting this error:
In field \"images\": In element #0: Expected \"UpdateProductImageInput\", found not an object.\nIn field \"images\": In element #1: Expected \"UpdateProductImageInput\", found not an object.","locations":[{"line":1,"column":11}]}

However, I cannot for the life of me find my mistake (which I’m sure is right in front of my face!)…

This is the JSON I am sending:
{"query":"mutation ($input: UpdateProductInput!) { product_update(data: $input) { request_id }}","variables":{"input":{"sku":"mc-api-test-000\/2-L","tariff_code":"","images":{"src":"https:\/\/maisoncashmere.com\/media\/adjconfigurable\/135x_6055_2125_000_1607530397.jpg","position":1}}}}

What am I doing wrong?

Best,
Claudia

Hi there, would it be possible to have an update on this? Thanks so much!

Hi @Csraspini!

My apologies for the delayed response about this

Try by sending the image wrapped in [ ], something like this:

{“input”:{“sku”:“mc-api-test-000/2-L”,“tariff_code”:"",“images”:[{“src”:“https://maisoncashmere.com/media/adjconfigurable/135x_6055_2125_000_1607530397.jpg","position”:1}]}}

Let me know if that still doesn’t work.
Thanks in advance!
Tom

Hi @tomasw,
Yes, that was precisely it! Thank you!

Claudia

1 Like