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.
The accepted file formats for the images are .png, .jpg, and .jpeg.
To customize image dimensions, the following dynamic setting is used:
MAX_IMAGE_DIMENSIONS
This setting is employed to set the maximum dimensions of product images. Its purpose is to ensure that product images do not exceed specific width and height values, typically configured to maintain image quality, optimize page loads, and enhance overall performance.
Default values are as follows:
Path:
/api/v1/dynamic_settings/Method:
POSTBody:
HTTP Methods
GET Product Images
GET Product ImagesThis method is used to get images of products.
Path: /api/v1/product_image/?limit=100&product={product_pk}
Response
GET Product Videos
GET Product VideosThis method is used to get videos of products.
Path: /api/v1/product_video/?limit=100&product={product_pk}
Response
POST Create Product Image
POST Create Product ImageThis 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
POST Create Product VideoThis 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
PATCH Update Product ImageThis 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
PATCH Update Product VideoThis 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
DELETE Product ImageThis 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
DELETE Product VideoThis 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
POST Set the Main Image of a ProductThis 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
POST Receive Images from ERPThese 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?

