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

Upload product media

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".

Required permissions: PRODUCT

post
/tenants/{tenantUid}/products/{productUid}/media/upload
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
mediastringRequired

The file content as base64 or source URL.

filenamestringRequired
positionintegerOptional
productMediaUidstringOptionalPattern: ^[A-Za-z0-9-_]+
setAsCoverImagebooleanOptional
Responses
201

Example response

application/json
productMediaUidstringRequiredPattern: ^[A-Za-z0-9-_]+
mainUrlstringRequired
thumbnailUrlstringRequired
positionintegerRequired
widthintegerRequired
heightintegerRequired
isCoverImagebooleanRequired
sourcestring · enumRequiredPossible values:
createdAtstring · date-timeRequired
createdBystringRequired
lastModifiedAtstring · date-timeRequired
lastModifiedBystringRequired
post/tenants/{tenantUid}/products/{productUid}/media/upload
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
}
201

Example response

{
  "productMediaUid": "text",
  "mainUrl": "text",
  "thumbnailUrl": "text",
  "position": 1,
  "width": 1,
  "height": 1,
  "isCoverImage": true,
  "source": "FLOW",
  "createdAt": "2026-01-01T00:00:00.000Z",
  "createdBy": "text",
  "lastModifiedAt": "2026-01-01T00:00:00.000Z",
  "lastModifiedBy": "text"
}

Last updated

Was this helpful?