Modo Claro
Update Image
POST
/products/images/{image-id}Last modified: a month 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
Parâmetros Path
image-id
string
requerido
Parâmetros Bodymultipart/form-data
photo
string
requerido
A specific location or directory on a computer's file system that indicates the file's location.
Exemplo:
@"Users/Images/profile.png"
default
integer
opcional
Set the image as default
Exemplo:
1
sort
number
opcional
Sorting order of the image
Exemplo:
1
alt
string
opcional
Alternative text to appear when the image doesn't load properly.
Exemplo:
Alt Text
Request samples
Respostas
Updated Successfully(201)
Record Not Found(404)
Updated Successfully
HTTP Code: 201
Content Type : JSONapplication/json
Esquema de Dados
No schema defined
Exemplo
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: a month ago