post
https://api-v3.authenticating.com/identity/v2/passport/scan
Recent Requests
Log in to see full request history
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Loading…
This endpoint is used to upload the photo page of a user's passport or visa for verification. Unlike Upload Passport, the image is sent as a file using multipart/form-data and not as a base64 string.
This is an asynchronous call. It returns a 202 with result as in_progress as soon as the image is saved, and the scan runs in the background. Once the scan is done, the result can be fetched in one of the following ways:
- Webhook (recommended): The
GOVT_ID_SCAN_STATUS_UPDATEevent is sent to all the active webhook URLs of your company. Details on the payload can be checked here. - Status API: Call Check Upload Passport V2 every few seconds until
resultis no longerin_progress.
If the webhook is not received within a few minutes, call the status API. It always has the latest result.
Before calling this endpoint, the user must be created using Create User and consent must be recorded using User Consent.
Request Body (multipart/form-data)
multipart/form-data)| Field | Type | Required | Notes |
|---|---|---|---|
userAccessCode | text | Yes | userAccessCode of the user. |
idFront | file | Yes | Photo page of the passport. JPG, JPEG or PNG, 5MB or smaller. |
Important Notes:-
- This call does not tell you whether the passport passed or not. A
202only means the image was uploaded successfully and the scan has started. - Only the following formats are accepted:- JPG, JPEG, PNG. PDF files and other image formats will not be accepted.
- The maximum allowed size of the image is 5MB.
- Only one scan can run at a time for a user. If a scan is already in progress, the call returns a
400. attemptsin the response is the number of scans this user has made on this endpoint.- Only passports and visas are accepted here. Any other document, like a driver's license, will not be verified and returns
restricted_doc_type. Please use Upload ID V2 for those. - The image should be of the page with the user's information on it, and it must be clear, well-lit and have minimal glare. To see a sample passport image, please see this link or this one.
Error Responses
| Status | errorCode | When |
|---|---|---|
400 | IDENTITY_PASSPORT_INVALID_IMAGE_UPLOAD | idFront is missing or is not sent as a file. |
400 | IDENTITY_IMAGE_TOO_LARGE | The image is larger than 5MB. |
400 | IDENTITY_INVALID_IMAGE_FORMAT | The image is not a JPG, JPEG or PNG. |
400 | IDENTITY_PASSPORT_ALREADY_COMPLETED | The passport has already been verified for this user. |
400 | IDENTITY_DOCUMENT_SCAN_IN_PROGRESS | A scan is already in progress for this user. |
400 | - | userAccessCode is missing or doesn't match any user from your company. |
401 | - | The API key is invalid, or consent is not recorded for the user. |
