Upload gallery video cover

This method updates the cover of the video in product gallery. Maximum allowed file size is 20Mb. JPG, PNG, and GIF are accepted.

If the video already has a cover, the uploaded image will replace the existing one. When uploading an image for a video cover, the image itself needs to be sent in the body of your request in a form of binary data. The file that you wish to upload needs to be prepared for that format and then sent to Ecwid API endpoint.

Alternatively, you can specify an externalUrl to your file as a request parameter and Ecwid will download it from there.

Headers

NameTypeDescription
AuthorizationstringoAuth token with mandatory Bearer before it. Example: Bearer e***s0, where e***s0 should be replaced with your oAuth token.

Path params

ParameterTypeDescription
#numberMedia file number in product gallery. 0 is the first (main) image/video, 1 is the second, etc. For example, {productId}/gallery/video/2 is the path to the video that takes 3rd place in the product gallery.

Response

A JSON object of type 'UploadStatus' with the following fields:

UploadStatus

FieldTypeDescription
idnumberInternal 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 StatusDescription
400Request parameters are malformed
402The functionality/method is not available on the merchant plan
403Access token doesn't have update_catalog scope
404Product is not found / Video #0 is not found
413The image file is too large (Maximum allowed size is 20Mb)
415Unsupported content-type: expected application/octet-stream
422The uploaded file is not an image
500Uploading of the image file failed or there was an internal server error while processing a file

Error response body (optional)

FieldTypeDescription
errorMessagestringError message
Language