Hello,
I connected my ERP (not in PHP) with a Prestashop 1.7.4.4 by using WEBSERVICES.
I use CURL in command line to communicate with the webshop.
I can send and update Categories, Manufacturers and Products.
I can insert and delete images but I can't update them 😞
Here how I send images to a product (POST)
We suppose that product ID is 10.
c:\curl\curl.exe -k -X POST -F image=@image.jpg -u MYKEYXXXXXXXXX: https://www.mysite.com/shop/api/images/products/10 -o c:\tmp\answer.xml
It runs well, I received an XML answer with the ID of the image, and the image. I thing sending back the image is not necessary , communication will be faster.
Here how I try to update the image (PUT)
We suppose that product ID is 10 and the image to update is 15.
c:\curl\curl.exe -k -X PUT -F image=@image.jpg -u MYKEYXXXXXXXXX: https://www.mysite.com/shop/api/images/products/10/15 -o c:\tmp\answer.xml
I receive this message :
<prestashop xmlns:xlink="http://www.w3.org/1999/xlink">
<errors>
<error>
<code><![CDATA[76]]></code>
<message><![CDATA[Please set an "image" parameter with image data for value]]></message>
</error>
</errors>
</prestashop>
Could Somebody help me to solve my problem or tell where I can find help ?
I also would like to send a legend but I don't see the solution.
Thank you
JC