Update product media in bulk

Update product main & gallery images/videos in bulk

📘

To update product gallery use secret token. The update_catalog access scope is required. Reach out to us at [email protected] to add the scope.

Headers

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

Request

A JSON object with the following fields:

FieldTypeDescription
mainMediaMain image URL & Main video URL. If empty or null — no changes.
If the list is empty — the gallery will be erased.
galleryMediaarray Gallery image & video URLs
If both array fields are missing - the error will appear in the response.
If empty or null — no changes.
If the list is empty — the gallery will be erased.

MediaItemData

FieldTypeDescription
videoUrlstringMain video URL that replaces the value.
If the field is missing — the main product video will be deleted.
imageUrlstringMain video URL that replaces the value.
If the field is missing — the main product image will be deleted.

GalleryMedia

FieldTypeDescription
videoUrlstringGallery video URL.
If the field is missing — the main product video will be deleted.
imageUrlstringGallery video URL that replaces the value.
If the field is missing — the main product image will be deleted.

Response

A JSON object with the following fields:

FieldTypeDescription
mainMediaRelated to the main product image or/and main product video
galleryMediaarray Gallery video URL that replaces the value.
If the field is missing — the main product image will be deleted.

MediaItemResult

FieldTypeDescription
successbooleanResult of uploading. true or false
idstringIdentification number of uploaded product/video.
For Main image = 0.
For Gallery = 1, 2, 3, etc.
Shows up when "success" = true
errorCodestringPossible values:
DOWNLOAD_IMAGE_FAILED
DOWNLOAD_VIDEO_FAILED
Shows up when "success" = false
errorMessagestringError message text.
Shows up when "success" = false

In case of an error, Ecwid responds with an error HTTP status code and, optionally, a JSON-formatted body containing error description

HTTP codes

HTTP StatusDescription
422 WRONG_URLThat link doesn't look right. Make sure you are pasting the correct link. Try copying the link via the Share option.
422 NOT_VIDEO_URLThis is not a link to a video. Make sure you are pasting the correct link. Try copying the link via the Share option.
422 VIDEO_NOT_SUPPORTEDSorry, videos on this platform are not supported.
422 VIDEO_UNAVAILABLEThis video can't be accessed. Make sure that you're linking a video that can be viewed by anyone.
500 INTERNAL_ERRORThe link you've pasted couldn't be processed. Please try again in a moment.
Language