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.

Example
curl https://api.webshopapp.com/en/products/{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

Request:
https://<api_key>:<api_token>@<cluster_url>/<shop_language>/products/<product_id>/images.json

PHP client example:

<?php
$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.