ProductMedia
ProductMedia
List media (images, videos) for a given product.
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
Reference to a specific page in a result set.
The number of items per page in a result set.
GET /v2/tenants/{tenantUid}/products/{productUid}/media HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Example response
{
"items": [
{
"productMediaUid": "text",
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"width": 1,
"height": 1,
"isCoverImage": true,
"source": "FLOW",
"createdAt": "2025-07-30T18:19:16.388Z",
"createdBy": "text",
"lastModifiedAt": "2025-07-30T18:19:16.388Z",
"lastModifiedBy": "text"
}
],
"paging": {
"pageNumber": 1,
"pageSize": 1,
"totalCount": 1
}
}
When you already have the images that you want to use, add them as the URL. Note that the URLs must be publicly accessible.
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
^[A-Za-z0-9-_]*
POST /v2/tenants/{tenantUid}/products/{productUid}/media HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 101
{
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"setAsCoverImage": true,
"productMediaUid": "text"
}
Example response
{
"productMediaUid": "text",
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"width": 1,
"height": 1,
"isCoverImage": true,
"source": "FLOW",
"createdAt": "2025-07-30T18:19:16.388Z",
"createdBy": "text",
"lastModifiedAt": "2025-07-30T18:19:16.388Z",
"lastModifiedBy": "text"
}
Retrieve the data record for the given product media.
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
Reference to a product media record.
GET /v2/tenants/{tenantUid}/products/{productUid}/media/{productMediaUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
Example response
{
"productMediaUid": "text",
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"width": 1,
"height": 1,
"isCoverImage": true,
"source": "FLOW",
"createdAt": "2025-07-30T18:19:16.388Z",
"createdBy": "text",
"lastModifiedAt": "2025-07-30T18:19:16.388Z",
"lastModifiedBy": "text"
}
Update a product media record.
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
Reference to a product media record.
PUT /v2/tenants/{tenantUid}/products/{productUid}/media/{productMediaUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 76
{
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"setAsCoverImage": true
}
Example response
{
"productMediaUid": "text",
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"width": 1,
"height": 1,
"isCoverImage": true,
"source": "FLOW",
"createdAt": "2025-07-30T18:19:16.388Z",
"createdBy": "text",
"lastModifiedAt": "2025-07-30T18:19:16.388Z",
"lastModifiedBy": "text"
}
Delete a product media record.
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
Reference to a product media record.
DELETE /v2/tenants/{tenantUid}/products/{productUid}/media/{productMediaUid} HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
No Content
No content
Upload a new image or video. We accept two kinds of values in the file field, either
base64
a Base64 encoded string of the file content, or
URL
a URL of the file from where to download the content (make sure that the URL is accessible).
Filename is the name with which the file will be uploaded, e.g. "new-image.jpg".
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
The file content as base64 or source URL.
^[A-Za-z0-9-_]+
POST /v2/tenants/{tenantUid}/products/{productUid}/media/upload HTTP/1.1
Host: api.flowretail.com
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 95
{
"media": "text",
"filename": "text",
"position": 1,
"productMediaUid": "text",
"setAsCoverImage": true
}
Example response
{
"productMediaUid": "text",
"mainUrl": "text",
"thumbnailUrl": "text",
"position": 1,
"width": 1,
"height": 1,
"isCoverImage": true,
"source": "FLOW",
"createdAt": "2025-07-30T18:19:16.388Z",
"createdBy": "text",
"lastModifiedAt": "2025-07-30T18:19:16.388Z",
"lastModifiedBy": "text"
}
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.
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.
Reference to a tenant.
^[A-Za-z0-9-_]+
Reference to a Product.
^[A-Za-z0-9-_]+
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
Was this helpful?