DocumentConfirmation
This article explains how to check the authenticity of a document using the Unico Check REST API.
This method verifies that the document provided in the request is the same document.
How to use it?
Make a POST request to the /documents/confirmation
endpoint
With a valid Access token, make a request to the endpoint (POST/documents/confirmation) enviando os seguintes parâmetros:
{
"documentType": "TIPO_DOCUMENTO",
"imagebase64": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAgSURBVDhPY/wPBAwUACYoTTYYNWDUABAYNWDgDWBgAABrygQclUTopgAAAABJRU5ErkJggg=="
}
Parameters:
- HEADER PARAMETERS
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
APIKEY | String | Mandatory | API key |
Authorization | String | Mandatory | Access token |
Content-Type | String | Mandatory | "application/json" |
- REQUEST BODY SCHEMA
Name | Type | Mandatory/Optional | Description |
---|---|---|---|
documentType | String | Mandatory | Tipo do documento |
imagebase64 | String | Mandatory | Foto do documento. A imagem precisa ser em base64 (png, jpg, jpeg) |
Request example:
{
"documentType": "3",
"imagebase64": "iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsQAAA7EAZUrDhsAAAAgSURBVDhPY/wPBAwUACYoTTYYNWDUABAYNWDgDWBgAABrygQclUTopgAAAABJRU5ErkJggg=="
}
The type of document can be found in the enumerated article at Classified Document.
Successful request
If the request was executed successfully, the return response is a JSON containing the status of the check as follows:
{
"Status": true
}
The status is a boolean indicating whether the document has been typified or not.
Request error
If an error occurs, the return response is a JSON containing the error code and description:
{
"Error": {
"code": "40004",
"description": "Error description"
}
}
For more information on the errors returned, see the list available in the article Response Errors.
Any concerns?
Missing something or still need help? If you are already a customer or partner, you can contact us through the Help Center.