For cropping, you will need to use these two endpoints:
Create Crop - POSThttps://api.mediavalet.com/crop/:assetId - send your desired crop coordinates in the body (top, left, width and height), this will return crop id as payload
For resizing, you will need to follow these steps:
Create Crop Template - POSThttps://api.mediavalet.com/crop/templates- create template by defining x and y (width and height) , name of the template and sendDimensionas type , this will return crop template id in response payload
Create Crop From Template - POSThttps://api.mediavalet.com/cropWithTemplate/:assetId- along with template id from 1., send your desired crop coordinates in the body (top, left, width and height - width and height should be the same as in template created in step 1.) as well as scaledHeight and scaledWidth (these are the sizes to which you want to scale the image up, they need to be bigger than defined height and width from 1. , but not bigger than total height and width of the original image), this will return crop id as payload
For resizing, you will need to follow these steps: