Chapter 9 - Image management
Accessing the images is done through the images
entity.
Several types of images are available.
General shop images
Product images
Category images
Manufacturer images
Supplier images
Store images
They can be reach using the following links:
/api/images/general
/api/images/products
/api/images/categories
/api/images/manufacturers
/api/images/suppliers
/api/images/stores
Various image size are available, depending on the image types. They are available as XLink links in the links above, encapsulated in the image_types
node.
For instance, in order to retrieve the image with the id 10 for the product with id 5, we would use the following path: /api/images/products/5/10
.
Changing the images
In order to change the available images, we have to use a POST
request, with the new image as its parameter.
For instance, here is how to change the image for category 2:
HTTP method: PUT
URL: /images/categories/2
Parameters: images=[binary content for the new image]
...and here is how to add a new image to the product with id '1':
HTTP method: POST
URL: /images/products/1
Parameters: images=[binary content for the new image]
Here is an HTML form enabling images to be sent:
If you would rather use cURL:
Last updated