put https://app.ecwid.com/api/v3//products//media
Update product main & gallery images/videos in bulk
Access scopes
Requires the following access scope: update_catalog
Request
A JSON object with the following fields:
Field | Type | Description |
---|---|---|
mainMedia | Main image URL & Main video URL. If empty or null — no changes.If the list is empty — the gallery will be erased. | |
galleryMedia | array | 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
Field | Type | Description |
---|---|---|
videoUrl | string | Main video URL that replaces the value. If the field is missing — the main product video will be deleted. |
imageUrl | string | Main video URL that replaces the value. If the field is missing — the main product image will be deleted. |
GalleryMedia
Field | Type | Description |
---|---|---|
videoUrl | string | Gallery video URL. If the field is missing — the main product video will be deleted. |
imageUrl | string | Gallery 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:
Field | Type | Description |
---|---|---|
mainMedia | Related to the main product image or/and main product video | |
galleryMedia | array | Gallery video URL that replaces the value. If the field is missing — the main product image will be deleted. |
MediaItemResult
Field | Type | Description |
---|---|---|
success | boolean | Result of uploading. true or false |
id | string | Identification number of uploaded product/video. For Main image = 0. For Gallery = 1, 2, 3, etc. Shows up when "success" = true |
errorCode | string | Possible values:DOWNLOAD_IMAGE_FAILED DOWNLOAD_VIDEO_FAILED Shows up when "success" = false |
errorMessage | string | Error 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 Status | Description |
---|---|
422 WRONG_URL | That link doesn't look right. Make sure you are pasting the correct link. Try copying the link via the Share option. |
422 NOT_VIDEO_URL | This 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_SUPPORTED | Sorry, videos on this platform are not supported. |
422 VIDEO_UNAVAILABLE | This video can't be accessed. Make sure that you're linking a video that can be viewed by anyone. |
500 INTERNAL_ERROR | The link you've pasted couldn't be processed. Please try again in a moment. |