Crop a document

This endpoint is used to remove the background from a document image.

How to call the endpoint

To call the endpoint you will need to perform a HTTP POST request to this URL:


Crop Request

Content Type: The crop endpoint expects the body of requests to be in the form-data format. Responses will be in application/json format

These are the properties the endpoint accepts:

PropertyMandatoryDescription
Page (int)🔒Represents the page of the document you are cropping.
- Must be between 1 and 3
- 1 for the front page of the document
- 2 for the back page of the document
- 3 for additional page of the document
DocumentType (string)🔒A string representing the type of the document you are cropping
- Must be either 'ID1' or 'ID3'
Image (file)🔒Image data representing the image you wish to crop.
- File must be either JPEG, PNG or BMP
ClientReference (string)A reference identifying this call for your reference.

Crop Response

Example of a full document verification crop response:

{  
    "image": "{Base 64 data removed for documentation}",  
    "metadata": {  
        "glare": 0,  
        "sharpness": 62  
    }  
}
Property NameDescription
Image(string)Base 64 string representing the cropped document image.
Meta Data (object)Represents extended data obtained from cropping the image. The values provided are not guaranteed to exist on each request

Glare and Sharpness Scores

The Sharpness score will indicate the quality of the image. The score is between 0 and 100, and the higher the value, the better the quality of the image detected. If the score is too low, the image may not be successfully classified, and you will need to use an alternative image to attempt the verification.

The Glare score will indicate how much glare has been detected on the image. The score is between 0 and 100, and the lower the value, the better the image (the less glare was detected). If the score is too high, the image may not be successfully classified, and you will need to use an alternative image to attempt the verification.

Language
Authorization
Header
Click Try It! to start a request and see the response here!