Assets (Admin)
Last updated
Last updated
Assets are media resources that can be used inside commerce entities ecosystem, like images or videos.
We don't export an endpoint to upload assets directly by our api as we use some 3rd party service provider like Cloudinary to maintain that assets in the web. So, to upload some asset and use it into your products, you must create an asset upload request using this module which will give to you all needed informations to upload your media asset directly using the .
Assets are maintained by commerce service and have its lifecycle. So, when you request to upload some asset, you must keep in mind some things:
The signature that you will receive to upload expires in 1 hour.
After that time, if you don't upload anything to Cloudinary using that signature, your asset will be expired and you will need to get a new asset signature.
Uploaded assets must be associated to some product at maximum 3 days after the upload.
If the uploaded asset was not associated, it will be automatically removed and the asset will expire
Assets that are unassociated from all products (after some time of use) are automatically removed
If you have more than one product associated to the same asset, don't worry. We just remove assets that are not associated to anything.
Rest API reference:
Creates a new request to upload some asset (image or video) in our service. You must use this endpoint response to upload assets using the specific provider apis (ex: Cloudinary)
image
Example: image
Available options: product
Available options: