Version: 202201
Update Product Image
PUT/openapi/2022-01/products/:product_id/images/:image_id
Update the details of an existing product image using its unique identifier.
Request
Path Parameters
product_id stringrequired
Product's ID
image_id stringrequired
Image's ID
- application/json
- Body
- Example
Body
image object
positionint32
The position of the image.
srcstringrequired
The relative URL of the image.
{
"image": {
"position": 0,
"src": "string"
}
}
Responses
- 200
- 422
200
- application/json
- Schema
- Example
- Result
Schema
image object
idstring
Example:
91d032e7-bbc8-47e4-8668-9ba6fe714de6product_idstring
Example:
636a07da-39eb-4829-bde9-b65fae1c28b0positioninteger
Default value:
0Example:
2srcstring
Example:
//cdn.shoplazza.com/loading.pngwidthinteger
Default value:
0Example:
100heightinteger
Default value:
0Example:
100altstring
Example:
created_atstring
Example:
2024-04-08T07:13:28Zupdated_atstring
Example:
2024-04-16T08:37:28Z{
"image": {
"id": "91d032e7-bbc8-47e4-8668-9ba6fe714de6",
"product_id": "636a07da-39eb-4829-bde9-b65fae1c28b0",
"position": 2,
"src": "//cdn.shoplazza.com/loading.png",
"width": 100,
"height": 100,
"alt": "",
"created_at": "2024-04-08T07:13:28Z",
"updated_at": "2024-04-16T08:37:28Z"
}
}
{
"image": {
"id": "91d032e7-bbc8-47e4-8668-9ba6fe714de6",
"product_id": "636a07da-39eb-4829-bde9-b65fae1c28b0",
"position": 2,
"src": "//cdn.shoplazza.com/loading.png",
"width": 100,
"height": 100,
"alt": "",
"created_at": "2024-04-08T07:13:28Z",
"updated_at": "2024-04-16T08:37:28Z"
}
}
422
- application/json
- Schema
- Example
- Result
Schema
errorsstring[]
{
"errors": [
"Position must be greater than 0"
]
}
{
"errors": [
"Position must be greater than 0"
]
}