For the complete documentation index, see llms.txt. This page is also available as Markdown.

✂️ID Cropper


The ID Cropper API automatically crops ID images to keep only the document itself and remove any surrounding background. Send the image as a Base64 string, and the API detects the ID area, isolates it, and returns a clean, properly cropped version of the document.

ID Cropper

POST https://valifystage.com/api/v1/id_cropper_register

Headers

Name
Type
Description

Content-Type

string

application/json

Authentication

string

Bearer <access-token>

Request Body

Name
Type
Description

bundle_key

string

A bundle key provided to you by Valify.

img

string

Base64 image that need to be cropped

lang (optional)

string

The error message language

Status Codes

{
    "data": {
        "img": "<base64_cropped_image>"
    },
    "transaction_id": <str>,
    "trials_remaining": <str>
}
{
    "message": "Bad Request – invalid request received (e.g. missing Bundle key, required parameters or invalid json) | Make sure all the required parameters are included"
}
{
    "message": "Unauthorized – your Bundle key is invalid"
}
{
    "message": "Forbidden – specified access_token could not be found"
}
{
    "message": "Not Found"
}
{
    "message": "Unsupported Media Type"
}

Integration

  1. Download the JSON file from here.

Passport OCR
  1. Open Postman and click on Import.

    1. Drop the JSON file.

    1. Click on "Passport" and then click on "Authorization" and replace the <access token> field with your access token and then click on "Body".

  1. Click on "Body" then fill in the required data and hit "Send".

Last updated