videos/ endpoint provides an interface for managing videos in the shop system. Videos can be uploaded and the corresponding URLs can be queried via the API.
Various video formats are supported, as well as individual restrictions such as maximum file size and allowed formats, which are controlled via the shop configuration content.videoSettings.
Supported methods
List of all supported methods.| Command/Info | Endpoints | GET | PUT | POST | DELETE |
|---|---|---|---|---|---|
| Video URL | |||||
| Video upload |
General
- Supported video formats:
mp4avimovwmvflvmkvwebmmpeg3gpogg/ogv
- Maximum file size
Defined via the configurationcontent.videoSettings. - Allowed formats
The permitted video formats can also be configured viacontent.videoSettings.
Methods for video upload
GET videos/url/{typeId}
This endpoint returns the URL where videos of the specified type (e.g. category or product videos) are stored. The path parametertypeId must have the value categories or products.
Example
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to read category or product data. | |
| 400 Bad Request | ”invalidValue” | |
| 400 Bad Request | ”missing” | subshopId was not provided. |
POST videos/upload/{typeId}
This endpoint allows uploading a video for a specified type (e.g. categories or products). The path parametertypeId must have the value categories or products.
The request body must contain the file name (fileName) and the binary data of the video (videoData). After a successful upload, the name of the uploaded file is returned.
Write permissions for category or product data are required.
Example
Request body
Response
Error codes
| Error | Type | Reason |
|---|---|---|
| 401 Unauthorized | Not authorized: you are not logged in or you do not have the required permissions to write category or product data. | |
| 400 Bad Request | ”missing” | subshopId was not provided.video was not provided (if fileName or videoData are missing or empty). |
| 400 Bad Request | ”invalidValue” | |
| 400 Bad Request | ”invalidFileFormat” | The video has an invalid format. |
| 503 Service Unavailable | ”internalError” | The upload failed. |
