Media
The article highlights the API endpoints and simple methods used to add photos and videos for products on Omnitron.
On the Omnitron panels, there are Product Pictures and Product Videos sections on the detail pages of the existing or pending products in Products and Catalogs > Product Pool and Integration > Pending Products.

Frontend images and videos are sent to Omnitron via API.
HTTP Methods
GET Product Images
This method is used to get images of products.
Path: /api/v1/product_image/?limit=100&product={product_pk}
Response
GET Product Videos
This method is used to get videos of products.
Path: /api/v1/product_video/?limit=100&product={product_pk}
Response
POST Create Product Image
This method is used to upload images of products.
Path: /api/v1/product_image/
Parameter
Detail
product
PK information of the product with media
image
Image with .png or .jpeg extension
video
Video with .mp4 extension
source
Indicates what source the image came from Enum field (integration or unified values)
Response
POST Create Product Video
This method is used to upload videos of products.
Path: /api/v1/product_video/
Response
Response / 400
The following errors may occur if the payload of the POST request is not correct while creating an image on a product.
PATCH Update Product Image
This method is used to change the order of the images uploaded for the product.
Path: /api/v1/product_image/{pk}/
Response
PATCH Update Product Video
This method is used to change the order of the videos uploaded for the product.
Path: /api/v1/product_video/{pk}/
Response / 200
If the PATCH response is successful, it returns the following response.
Response / 400
Following errors may take place while updating an image on a product, if the payload of the PATCH request is not correct.
DELETE Product Image
This method is used to delete the images uploaded for the product.
Path: /api/v1/product_image/{pk}/
Response
Returns HTTP204 if the DELETE request is successful. Related product image has been deleted.
DELETE Product Video
This method is used to delete the videos uploaded for the product.
Path: /api/v1/product_video/{pk}/
Response
Returns HTTP204 if the DELETE request is successful. Related product video has been deleted.
POST Set the Main Image of a Product
This method is used to select the main image of the product.
Path: /api/v1/product_image/{pk}/make_special/
Response
Downloadable Image
This is the structure where the images in the ERP systems of the companies are downloaded and saved to the CDN and default storage with projects and media.
POST Receive Images from ERP
These methods allow the download of product images from the ERP system.
Path: /api/v1/downloadable_image/{product_pk}/download/
Response
HTTP200
Last updated
Was this helpful?

