put https://app.ecwid.com/api/v3//products//gallery/video/
This method updates the cover of the video in product gallery. Maximum allowed file size is 20Mb. Only JPEG is accepted.
Upload an image from an external resource using the externalUrl query parameter. Alternatively, you can send an image as binary data in the request body.
Access scopes
Requires the following access scope: update_catalog
Headers
Name | Type | Description |
---|---|---|
Authorization | string | Authorize request with an access token. Format:Bearer access_token .Example: Bearer secret_ab***cd , where secret_ab***cd is your access token. |
Content-Type | string | Must be "image/jpeg" |
Response
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
id | number | Internal image ID |
Errors
In case of error, Ecwid responds with an error HTTP status code and JSON-formatted body containing error description
HTTP codes
HTTP Status | Description |
---|---|
400 | Request parameters are malformed |
402 | The functionality/method is not available on the merchant plan |
403 | Access token doesn't have update_catalog scope |
404 | Product is not found / Video is not found |
413 | The image file is too large (Maximum allowed size is 20Mb) |
415 | Unsupported content-type: expected application/octet-stream |
422 | The uploaded file is not an image |
500 | Uploading of the image file failed or there was an internal server error while processing a file |
Error response body (optional)
Field | Type | Description |
---|---|---|
errorMessage | string | Error message |