Light Mode
Update Image
POST
/products/images/{image-id}Last modified:Â 18 days ago
This endpoint allows you to update a specific product's image by passing the image_id
as a path parameter. The updating of the image can be done either via providing a URL link to the image or uploading an image via multipart/form-data
media type.
:::tip[Note]
You can only update one image per request.
:::products.read_write
- Products Read & Write
Request
Path Params
image-id
stringÂ
required
Body Params multipart/form-data
photo
stringÂ
required
A specific location or directory on a computer's file system that indicates the file's location.
Example:
@"Users/Images/profile.png"
default
integerÂ
optional
Set the image as default
Example:
1
sort
numberÂ
optional
Sorting order of the image
Example:
1
alt
stringÂ
optional
Alternative text to appear when the image doesn't load properly.
Example:
Alt Text
Request samples
Responses
Updated Successfully(201)
Record Not Found(404)
Updated Successfully
HTTP Code:Â 201
Content Type :Â JSONapplication/json
Data Schema
No schema defined
Example
Example
{
"status": 201,
"success": true,
"data": {
"id": 713368802,
"image": {
"original": {
"url": "https://cdn.salla.sa/bYQEn/9oJoUzXfR8zzXAwAlTRHNIl1xBsuFpgcXdPnkAXd.png",
"width": 0,
"height": 0
},
"standard_resolution": {
"url": "https://cdn.salla.sa/bYQEn/9oJoUzXfR8zzXAwAlTRHNIl1xBsuFpgcXdPnkAXd.png",
"width": 0,
"height": 0
},
"low_resolution": {
"url": "https://cdn.salla.sa/bYQEn/9oJoUzXfR8zzXAwAlTRHNIl1xBsuFpgcXdPnkAXd.png",
"width": 0,
"height": 0
},
"thumbnail": {
"url": "https://cdn.salla.sa/bYQEn/9oJoUzXfR8zzXAwAlTRHNIl1xBsuFpgcXdPnkAXd.png",
"width": 0,
"height": 0
}
},
"sort": 5,
"default": true,
"alt_seo": "image",
"video_url": "",
"type": "image"
}
}
Last modified: 18 days ago