SEOshop Documentation

Uploading a product image

To add an image to a product you need to do a POST request to the products/<product_id>/images.json resource. The attachment parameter is the base64 encoded body of the image.

curl{product_id}/images.json \
  -u key:secret \
  -d productImage[attachment]="/9j/4AAQSkZJRgABAQEAZABkAAD/2wBDAAEBAQEB.." \
  -d productImage[filename]="the-filename-with-extension-goes-here.jpg"
Upload a product image


PHP client example:

$api->productsImages->create('123', array(
    'attachment' => 'BASE64_ENCODED_IMAGE_BODY',
    'filename' => 'image.png')
Was this article helpful? Yes No
One moment please
Thanks for your feedback.