Update picture
Partially updates the rich item to set the picture or rawPicture.
Path parameters
-
The unique identifier for the business.
-
The SKU of the item.
Maximum length is
25
.
Body Required
-
The id of the business
-
A stock-keeping unit
Maximum length is
25
. -
fileType string
Image format (eg. 'jpeg' or 'png').
-
picture string(byte)
The cropped picture: use this field only to update picture (PATCH method). When updating picture, this field is required.
-
rawPicture string(byte)
The raw picture (before cropping): use this field only to update picture (PATCH method). When updating picture, this field is optional.
PATCH
/i/richItem/{businessId}/{sku}
curl \
-X PATCH https://api.lsk.lightspeed.app/i/richItem/454335871/UGG-BB-PUR-06 \
-H "Authorization: Bearer $ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"businessId":454335871,"sku":"UGG-BB-PUR-06","fileType":"png","picture":"iVBORw0KGgoAAAANSUhEUgAAAIwAAACMAQMAAACUDtN9AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAJwAAACcBKgmRTwAAAANQTFRFAAAAp3o92gAAABlJREFUeJztwTEBAAAAwqD1T20JT6AAAOBrCmQAASsQRDsAAAAASUVORK5CYII=","rawPicture":"iVBORw0KGgoAAAANSUhEUgAAAIwAAACMAQMAAACUDtN9AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAJwAAACcBKgmRTwAAAANQTFRFAAAAp3o92gAAABlJREFUeJztwTEBAAAAwqD1T20JT6AAAOBrCmQAASsQRDsAAAAASUVORK5CYII="}'
Request examples
{
"businessId": 454335871,
"sku": "UGG-BB-PUR-06",
"fileType": "png",
"picture": "iVBORw0KGgoAAAANSUhEUgAAAIwAAACMAQMAAACUDtN9AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAJwAAACcBKgmRTwAAAANQTFRFAAAAp3o92gAAABlJREFUeJztwTEBAAAAwqD1T20JT6AAAOBrCmQAASsQRDsAAAAASUVORK5CYII=",
"rawPicture": "iVBORw0KGgoAAAANSUhEUgAAAIwAAACMAQMAAACUDtN9AAAAAXNSR0IB2cksfwAAAAlwSFlzAAAAJwAAACcBKgmRTwAAAANQTFRFAAAAp3o92gAAABlJREFUeJztwTEBAAAAwqD1T20JT6AAAOBrCmQAASsQRDsAAAAASUVORK5CYII="
}
Response examples (200)
{
"businessId": 454335871,
"sku": "UGG-BB-PUR-06",
"descriptions": [
{
"localeCode": "de",
"description": "Das ist ein Test",
"displayName": "Rich Item 1 DE"
},
{
"localeCode": "en",
"description": "This is a test for a rich item",
"displayName": "Rich Item 1"
}
],
"allergenCodes": [
"milk",
"cereals"
],
"creationDate": "2021-11-03T13:50:47Z",
"lastUpdateDate": "2021-11-11T16:29:56Z",
"pictureUrl": "http://s3-eu-west-1.amazonaws.com/com.ikentoo.trial.rich-content-store/25372_029b5ad1-08f7-4e1f-9087-3ca91ad818f7.png",
"rawPictureUrl": "http://s3-eu-west-1.amazonaws.com/com.ikentoo.trial.rich-content-store/25372_029b5ad1-08f7-4e1f-9087-3ca91ad818f7_raw.png"
}