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

Language