cancel
Showing results for 
Search instead for 
Did you mean: 

API: upload product delete images

API: upload product delete images

Hello,

 

I upload all products with the mediaGallery (all images).

Works fine, but:

 

When I send a put, to update the complete product, and there was already the same images, he delete all images.

Send I again the put, the images are set and display

Send I again the put, the images are deleted

Send I again the put, the images are set and display

Send I again the put, the images are deleted

...

 

So did I need to clean this first? I want to overwrite the images ... also when the images are exactly the same ... but this seems a delete on the server

 

Thank you!

 

 

3 REPLIES

Re: API: upload product delete images

I see now in the response:

if no images are exists before I update:

        {
            "attribute_code": "image",
            "value": "/D/H/DH-V40_2.jpg"
        },
        {
            "attribute_code": "small_image",
            "value": "/D/H/DH-V40_small_2.jpg"
        },
        {
            "attribute_code": "thumbnail",
            "value": "/D/H/DH-V40_thumb_2.jpg"
        },

if the images are exists:

        {
            "attribute_code": "image",
            "value": "no_selection"
        },
        {
            "attribute_code": "small_image",
            "value": "no_selection"
        },
        {
            "attribute_code": "thumbnail",
            "value": "no_selection"
        }

What mean "no_selection"? The put is exactly the same

Re: API: upload product delete images

By default, No Selection means Product hasn't any image associated, If a product has the image assigned then they will display a value of product image name. 

If Issue Solved, Click Kudos/Accept As solutions.

Re: API: upload product delete images

Ok, but is has 3 images.

 

This is the response, when I try to add new images.

The JSON is too big to post here, but it include always all 3 images ... but without ID of the image.