🔤 Recognize Document (OCR)
Code samples
POST /webapi/kyc/user/{uuid}/recognize-document
Body parameter
{
"image": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAA...",
"document_type": "passport",
"country": "ru"
}
🛠️ Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
| uuid | path | string(uuid) | true | Verification UUID |
| image | body | string | true | Document image in base64 |
| document_type | body | string | true | Document type (passport, id_card) |
| country | body | string | true | Document country (ISO code) |
Example responses
200 Response
{
"success": true,
"confidence": 0.95,
"data": {
"firstName": "Ivan",
"lastName": "Ivanov",
"patronymic": "Ivanovich",
"dob": "1990-01-01",
"seria": "1234",
"number": "567890",
"passport_date": "2010-01-01"
},
"warnings": []
}
🔁 Responses
| Status | Meaning | Description | Schema |
|---|---|---|---|
| 200 | OK | Document data recognized | Inline |
| 404 | Not Found | Verification not found | Inline |
| 422 | Unprocessable Entity | Validation error | Inline |
📋 Response Schema
| Name | Type | Description |
|---|---|---|
| success | boolean | Operation success |
| confidence | number | Recognition confidence (0–1) |
| data | object | Recognized document fields |
| warnings | string[] | Warnings about recognition quality |