For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

post
/tenants/{tenantUid}/products/{productUid}/media/batch
Authorizations
AuthorizationstringRequired

Access token recevied after user login with a deviceToken

Path parameters
tenantUidstringRequired

Reference to a tenant.

Pattern: ^[A-Za-z0-9-_]+
productUidstringRequired

Reference to a Product.

Pattern: ^[A-Za-z0-9-_]+
Body
Responses
204

No Content

No content

post/tenants/{tenantUid}/products/{productUid}/media/batch
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"
    }
  ]
}
204

No Content

No content

Last updated

Was this helpful?