Set all media for a product
Set all the media items for a product in one go. The payload is an array refelecting all the media on the given product. In addition to adding the new entries, this will also remove any exising entries that are not in the payload. So an empty array will delete all the product media on the product.
An item with a productMediaUid names that media; an item without one names the media the product already has with the same mainUrl. An item that changes nothing is not written, so sending the same list again leaves the media, their uids and the cover image as they are and sends no webhook.
If no media is set as cover image, the first media added will be used. Only one image can be set as the cover image.
Required permissions: PRODUCT
Access token recevied after user login with a deviceToken
Reference to a tenant.
^[A-Za-z0-9-_]+Reference to a Product.
^[A-Za-z0-9-_]+No Content
No content
POST /v2/tenants/{tenantUid}/products/{productUid}/media/batch HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 113
{
"items": [
{
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"setAsCoverImage": true,
"productMediaUid": "text"
}
]
}No Content
No content
Last updated
Was this helpful?

