Product Images
This is used to view, create, update and delete product images.
Product Image Properties
| id |
{ "id" : 255 }
The unique ID of the product |
| sortOrder |
{ "sortOrder" : 2 }
The sort order of the product image |
| url |
{
"url" :
"https://static.ecommercedns.uk/images/bb30.jpg?1"
}
The URL for the image |
| description |
{ "description" : "nike blue airmax trainers" }
The ALT tag for the image |
What you can do with product images
GET /v1/products/ID/images
Receive a list of all images
POST /v1/products/ID/images
Create a new product image
PUT /v1/products/ID/images/ID
Update a product image
DELETE /v1/products/ID/images/ID
Delete a product image
GET /v1/products/ID/images
Returns a list of product images assigned to a product.
GET /v1/products/1/images
HTTP/1.1 200 OK
[
{
"id": 1,
"sortOrder": 2,
"url": "...",
"description": ""
}
]
POST /v1/products/ID/images
Creates a new product image.
| image | URL or base64 encoded image |
POST /v1/products/1/images
POST /v1/products/1/images
{
"image": "..."
}
POST /v1/products/1/images
HTTP/1.1 201 Created
{
"id": 1,
"sortOrder": 2,
"url": "...",
"description": ""
}
PUT /v1/products/ID/images/ID
Update a product image.
PUT /v1/products/1/images/1
PUT /v1/products/1/images/1
{
"description": "Test"
}
PUT /v1/products/1/images/1
HTTP/1.1 200 OK
{
"id": 1,
"url": "...",
"sortOrder": 2,
"description": "Test"
}
DELETE /v1/products/ID/images/ID
Deletes an existing product image.
Returns 204 No Content on success.