Проведение в одной папке биометрического анализа (BIOMETRY) и проверки двустороннего документа (DOCUMENTS).

Задача:

Провести в рамках одной папки в системе проверку валидности двустороннего документа и биометрическое сравнение персоны на селфи и на персоны фото в документе. В рамках примера заведомо известно, что персоны на селфи и в документе – разные. Сканы документов в приведенном примере получены из общедоступных источников сети Internet.

Решение:

На первом этапе процесса необходимо создать в системе папку, содержащую следующие файлы:

  • фото лица персоны, тэг «photo_selfie»;
  • скан лицевой стороны документа с фотографией персоны, тэг «photo_id»;
  • скан оборотной стороны документа без фотографии персоны, тэг «photo_id».

Метод создания папок в системе описан в соответствующем разделе данного FAQ.

Запросы создания целевой папки в рамках примера:

HTTP

Bash

Python

php

Java


POST /api/folders/ HTTP/1.1
Host: api-d.oz-services.ru
X-Forensic-Access-Token: 0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1
User-Agent: PostmanRuntime/7.15.2
Accept: */*
Cache-Control: no-cache
Postman-Token: 28f86d40-2af3-4477-a006-0369633dc9d2,c0c19c91-2060-4280-a224-c2862411af4a
Host: api-d.oz-services.ru
Accept-Encoding: gzip, deflate
Content-Type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Length: 208223
Connection: keep-alive
cache-control: no-cache


Content-Disposition: form-data; name="photo1"; filename="/X:/1.jpg


------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="photo1"; filename="/X:/1.jpg


------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="photo2"; filename="/X:/90eace77-ca39-45fa-853e-b9495d389640.jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="photo1"; filename="/X:/1.jpg


------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="photo2"; filename="/X:/90eace77-ca39-45fa-853e-b9495d389640.jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="photo3"; filename="/X:/8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW--,
Content-Disposition: form-data; name="photo1"; filename="/X:/1.jpg


------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="photo2"; filename="/X:/90eace77-ca39-45fa-853e-b9495d389640.jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="photo3"; filename="/X:/8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW--
Content-Disposition: form-data; name="payload"

{
  "media:tags": {
    "photo1": [
      "photo_selfie"
    ],
       "photo2": [
      "photo_id"
    ],
       "photo3": [
      "photo_id"
    ]
  }
}
------WebKitFormBoundary7MA4YWxkTrZu0gW--


curl -X POST \
  https://api-d.oz-services.ru/api/folders/ \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 208223' \
  -H 'Content-Type: multipart/form-data; boundary=--------------------------573870906914586680913917' \
  -H 'Host: api-d.oz-services.ru' \
  -H 'Postman-Token: 28f86d40-2af3-4477-a006-0369633dc9d2,a7dec4e1-3fef-4f9e-bc98-61628c4e02ac' \
  -H 'User-Agent: PostmanRuntime/7.15.2' \
  -H 'X-Forensic-Access-Token: 0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1' \
  -H 'cache-control: no-cache' \
  -H 'content-type: multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW' \
  -F 'photo1=@/X:/1.jpg' \
  -F 'photo2=@/X:/90eace77-ca39-45fa-853e-b9495d389640.jpeg' \
  -F 'photo3=@/X:/8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg' \
  -F 'payload={
  "media:tags": {
    "photo1": [
      "photo_selfie"
    ],
       "photo2": [
      "photo_id"
    ],
       "photo3": [
      "photo_id"
    ]
  }
}'


import requests

url = "https://api-d.oz-services.ru/api/folders/"

payload = "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"photo1\"; filename=\"1.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"photo2\"; filename=\"90eace77-ca39-45fa-853e-b9495d389640.jpeg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"photo3\"; filename=\"8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"payload\"\r\n\r\n{\n  \"media:tags\": {\n    \"photo1\": [\n      \"photo_selfie\"\n    ],\n       \"photo2\": [\n      \"photo_id\"\n    ],\n       \"photo3\": [\n      \"photo_id\"\n    ]\n  }\n}\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--"
headers = {
    'content-type': "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW",
    'X-Forensic-Access-Token': "0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1",
    'User-Agent': "PostmanRuntime/7.15.2",
    'Accept': "*/*",
    'Cache-Control': "no-cache",
    'Postman-Token': "28f86d40-2af3-4477-a006-0369633dc9d2,35b7a295-9c27-401c-8116-cb3ffd9a53af",
    'Host': "api-d.oz-services.ru",
    'Accept-Encoding': "gzip, deflate",
    'Content-Type': "multipart/form-data; boundary=--------------------------573870906914586680913917",
    'Content-Length': "208223",
    'Connection': "keep-alive",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)


setUrl('https://api-d.oz-services.ru/api/folders/');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Connection' => 'keep-alive',
  'Content-Length' => '208223',
  'Content-Type' => 'multipart/form-data; boundary=--------------------------573870906914586680913917',
  'Accept-Encoding' => 'gzip, deflate',
  'Host' => 'api-d.oz-services.ru',
  'Postman-Token' => '28f86d40-2af3-4477-a006-0369633dc9d2,fc37bc6c-e00b-4811-b8c8-02291f044ee5',
  'Cache-Control' => 'no-cache',
  'Accept' => '*/*',
  'User-Agent' => 'PostmanRuntime/7.15.2',
  'X-Forensic-Access-Token' => '0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1',
  'content-type' => 'multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW'
));

$request->setBody('------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="photo1"; filename="1.jpg"
Content-Type: image/jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="photo2"; filename="90eace77-ca39-45fa-853e-b9495d389640.jpeg"
Content-Type: image/jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="photo3"; filename="8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg"
Content-Type: image/jpeg


------WebKitFormBoundary7MA4YWxkTrZu0gW
Content-Disposition: form-data; name="payload"

{
  "media:tags": {
    "photo1": [
      "photo_selfie"
    ],
       "photo2": [
      "photo_id"
    ],
       "photo3": [
      "photo_id"
    ]
  }
}
------WebKitFormBoundary7MA4YWxkTrZu0gW--');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}


OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW");
RequestBody body = RequestBody.create(mediaType, "------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"photo1\"; filename=\"1.jpg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"photo2\"; filename=\"90eace77-ca39-45fa-853e-b9495d389640.jpeg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"photo3\"; filename=\"8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg\"\r\nContent-Type: image/jpeg\r\n\r\n\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW\r\nContent-Disposition: form-data; name=\"payload\"\r\n\r\n{\n  \"media:tags\": {\n    \"photo1\": [\n      \"photo_selfie\"\n    ],\n       \"photo2\": [\n      \"photo_id\"\n    ],\n       \"photo3\": [\n      \"photo_id\"\n    ]\n  }\n}\r\n------WebKitFormBoundary7MA4YWxkTrZu0gW--");
Request request = new Request.Builder()
  .url("https://api-d.oz-services.ru/api/folders/")
  .post(body)
  .addHeader("content-type", "multipart/form-data; boundary=----WebKitFormBoundary7MA4YWxkTrZu0gW")
  .addHeader("X-Forensic-Access-Token", "0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1")
  .addHeader("User-Agent", "PostmanRuntime/7.15.2")
  .addHeader("Accept", "*/*")
  .addHeader("Cache-Control", "no-cache")
  .addHeader("Postman-Token", "28f86d40-2af3-4477-a006-0369633dc9d2,d48a569b-ddea-40a4-9bc9-776582b8a959")
  .addHeader("Host", "api-d.oz-services.ru")
  .addHeader("Accept-Encoding", "gzip, deflate")
  .addHeader("Content-Type", "multipart/form-data; boundary=--------------------------573870906914586680913917")
  .addHeader("Content-Length", "208223")
  .addHeader("Connection", "keep-alive")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Ответ сервера на запрос создания целевой папки:

JSON


{
    "time_created": 1580111830,
    "time_updated": 1580111830,
    "meta_data": {},
    "folder_id": "1c7b448f-5da2-4da7-abd5-ff2e5edb18ac",
    "resolution_time": null,
    "resolution_status": "INITIAL",
    "resolution_endpoint": null,
    "resolution_state_hash": "b09ab05a68ae7a76",
    "resolution_comment": null,
    "resolution_suggest": null,
    "resolution_author_id": null,
    "is_archive": false,
    "media": [
        {
            "time_created": 1580111830,
            "time_updated": 1580111830,
            "meta_data": {},
            "media_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
            "media_type": "IMAGE_FOLDER",
            "info": {
                "thumb": {
                    "md5": "b5b68f21b824e016ef756b2f934224a0",
                    "size": 16732,
                    "width": 300,
                    "height": 188,
                    "mime-type": "image/jpeg"
                },
                "original": {
                    "md5": "339c933f157b7e796003ab17290f8465",
                    "size": 72461,
                    "width": 987,
                    "height": 619,
                    "mime-type": "image/jpeg"
                }
            },
            "tags": [
                "photo_id"
            ],
            "original_name": "8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg",
            "image_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
            "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/7fdc23cd-d186-4a69-9bc0-98eafc9019e1.jpeg",
            "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/7fdc23cd-d186-4a69-9bc0-98eafc9019e1_thumb.jpeg"
        },
        {
            "time_created": 1580111830,
            "time_updated": 1580111830,
            "meta_data": {},
            "media_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
            "media_type": "IMAGE_FOLDER",
            "info": {
                "thumb": {
                    "md5": "e797fba781c5d493648cf892993c8982",
                    "size": 14077,
                    "width": 300,
                    "height": 189,
                    "mime-type": "image/jpeg"
                },
                "original": {
                    "md5": "7db11e1e3d2676558d1e2ea4a732e4b0",
                    "size": 40402,
                    "width": 766,
                    "height": 483,
                    "mime-type": "image/jpeg"
                }
            },
            "tags": [
                "photo_id"
            ],
            "original_name": "90eace77-ca39-45fa-853e-b9495d389640.jpeg",
            "image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
            "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05.jpeg",
            "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05_thumb.jpeg"
        },
        {
            "time_created": 1580111830,
            "time_updated": 1580111830,
            "meta_data": {},
            "media_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
            "media_type": "IMAGE_FOLDER",
            "info": {
                "thumb": {
                    "md5": "2bcd1075007cc891f6385395614b1696",
                    "size": 16178,
                    "width": 300,
                    "height": 271,
                    "mime-type": "image/jpeg"
                },
                "original": {
                    "md5": "9919ad38c0b365145489606408396d41",
                    "size": 94525,
                    "width": 1000,
                    "height": 904,
                    "mime-type": "image/jpeg"
                }
            },
            "tags": [
                "photo_selfie"
            ],
            "original_name": "1.jpg",
            "image_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
            "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/8e51055b-b363-4017-87fa-2eb5dfaaa0ef.jpeg",
            "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/8e51055b-b363-4017-87fa-2eb5dfaaa0ef_thumb.jpeg"
        }
    ]
}

Из ответа для дальнейшей работы понадобятся следующие данные:

  • folder_id = 1c7b448f-5da2-4da7-abd5-ff2e5edb18ac - идентификатор созданной папки;
  • media_id = 8e51055b-b363-4017-87fa-2eb5dfaaa0ef - идентификатор фото лица персоны;
  • media_id = c91110a0-0a52-4c61-be01-9574978d3b05 - идентификатор скана лицевой стороны документа;
  • media_id = 7fdc23cd-d186-4a69-9bc0-98eafc9019e1 - идентификатор скан оборотной стороны документа.

Далее требуется назначить на целевую папку анализы двух типов – BIOMETRY и DOCUMENTS. Особенностью данного примера является то, что при назначении анализов на всю папку целиком анализ BIOMETRY не может завершиться успешно, так как на одном из изображений (оборотная сторона документа) отсутствует лицо персоны. В случае, если анализ BIOMETRY будет назначен на изображение, не содержащее лицо, он может завершиться с ошибкой вида «Could not locate face on source image [image_id]».

Анализ DOCUMENTS также может завершиться неуспешно, так как на одном из изображений (фото лица персоны) отсутствует скан документа. В случае, если анализ DOCUMENTS будет назначен на изображение, не содержащее скан документа, он может завершиться с ошибкой вида «Processing error - did not found any document candidates on image».

Чтобы назначение анализов на папку в данном примере прошло успешно следует воспользоваться дополнительным механизмом назначения анализов на конкретные media_id.

Запросы назначения анализов в рамках примера:

HTTP

Bash

Python

php

Java


POST /api/folders/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/analyses/ HTTP/1.1
Host: api-d.oz-services.ru
X-Forensic-Access-Token: 0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1
Content-Type: application/json
User-Agent: PostmanRuntime/7.15.2
Accept: */*
Cache-Control: no-cache
Postman-Token: 525bdcff-ae3c-40d0-9add-0ab54a9fbe4a,3e96e6df-5bd1-430c-8c8c-654fa3f1e9a2
Host: api-d.oz-services.ru
Accept-Encoding: gzip, deflate
Content-Length: 339
Connection: keep-alive
cache-control: no-cache

{
  "analyses": [
    {
      "type": "documents",
      "source_media": [
        "c91110a0-0a52-4c61-be01-9574978d3b05", "7fdc23cd-d186-4a69-9bc0-98eafc9019e1"
      ]
    },
    {
      "type": "biometry",
      "source_media": [
        "8e51055b-b363-4017-87fa-2eb5dfaaa0ef", "c91110a0-0a52-4c61-be01-9574978d3b05"
      ]
    }
  ]
}


curl -X POST \
  https://api-d.oz-services.ru/api/folders/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/analyses/ \
  -H 'Accept: */*' \
  -H 'Accept-Encoding: gzip, deflate' \
  -H 'Cache-Control: no-cache' \
  -H 'Connection: keep-alive' \
  -H 'Content-Length: 339' \
  -H 'Content-Type: application/json' \
  -H 'Host: api-d.oz-services.ru' \
  -H 'Postman-Token: 525bdcff-ae3c-40d0-9add-0ab54a9fbe4a,e6792af7-9a82-432f-8877-0e2e8fbd8c28' \
  -H 'User-Agent: PostmanRuntime/7.15.2' \
  -H 'X-Forensic-Access-Token: 0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1' \
  -H 'cache-control: no-cache' \
  -d '{
  "analyses": [
    {
      "type": "documents",
      "source_media": [
        "c91110a0-0a52-4c61-be01-9574978d3b05", "7fdc23cd-d186-4a69-9bc0-98eafc9019e1"
      ]
    },
    {
      "type": "biometry",
      "source_media": [
        "8e51055b-b363-4017-87fa-2eb5dfaaa0ef", "c91110a0-0a52-4c61-be01-9574978d3b05"
      ]
    }
  ]
}'


import requests

url = "https://api-d.oz-services.ru/api/folders/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/analyses/"

payload = "{\n  \"analyses\": [\n    {\n      \"type\": \"documents\",\n      \"source_media\": [\n        \"c91110a0-0a52-4c61-be01-9574978d3b05\", \"7fdc23cd-d186-4a69-9bc0-98eafc9019e1\"\n      ]\n    },\n    {\n      \"type\": \"biometry\",\n      \"source_media\": [\n        \"8e51055b-b363-4017-87fa-2eb5dfaaa0ef\", \"c91110a0-0a52-4c61-be01-9574978d3b05\"\n      ]\n    }\n  ]\n}"
headers = {
    'X-Forensic-Access-Token': "0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1",
    'Content-Type': "application/json",
    'User-Agent': "PostmanRuntime/7.15.2",
    'Accept': "*/*",
    'Cache-Control': "no-cache",
    'Postman-Token': "525bdcff-ae3c-40d0-9add-0ab54a9fbe4a,862d12b7-fd0c-4629-af99-990d42c048b2",
    'Host': "api-d.oz-services.ru",
    'Accept-Encoding': "gzip, deflate",
    'Content-Length': "339",
    'Connection': "keep-alive",
    'cache-control': "no-cache"
    }

response = requests.request("POST", url, data=payload, headers=headers)

print(response.text)


setUrl('https://api-d.oz-services.ru/api/folders/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/analyses/');
$request->setMethod(HTTP_METH_POST);

$request->setHeaders(array(
  'cache-control' => 'no-cache',
  'Connection' => 'keep-alive',
  'Content-Length' => '339',
  'Accept-Encoding' => 'gzip, deflate',
  'Host' => 'api-d.oz-services.ru',
  'Postman-Token' => '525bdcff-ae3c-40d0-9add-0ab54a9fbe4a,ce61b472-a964-4274-90ac-ef71b234bce9',
  'Cache-Control' => 'no-cache',
  'Accept' => '*/*',
  'User-Agent' => 'PostmanRuntime/7.15.2',
  'Content-Type' => 'application/json',
  'X-Forensic-Access-Token' => '0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1'
));

$request->setBody('{
  "analyses": [
    {
      "type": "documents",
      "source_media": [
        "c91110a0-0a52-4c61-be01-9574978d3b05", "7fdc23cd-d186-4a69-9bc0-98eafc9019e1"
      ]
    },
    {
      "type": "biometry",
      "source_media": [
        "8e51055b-b363-4017-87fa-2eb5dfaaa0ef", "c91110a0-0a52-4c61-be01-9574978d3b05"
      ]
    }
  ]
}');

try {
  $response = $request->send();

  echo $response->getBody();
} catch (HttpException $ex) {
  echo $ex;
}


OkHttpClient client = new OkHttpClient();

MediaType mediaType = MediaType.parse("application/json");
RequestBody body = RequestBody.create(mediaType, "{\n  \"analyses\": [\n    {\n      \"type\": \"documents\",\n      \"source_media\": [\n        \"c91110a0-0a52-4c61-be01-9574978d3b05\", \"7fdc23cd-d186-4a69-9bc0-98eafc9019e1\"\n      ]\n    },\n    {\n      \"type\": \"biometry\",\n      \"source_media\": [\n        \"8e51055b-b363-4017-87fa-2eb5dfaaa0ef\", \"c91110a0-0a52-4c61-be01-9574978d3b05\"\n      ]\n    }\n  ]\n}");
Request request = new Request.Builder()
  .url("https://api-d.oz-services.ru/api/folders/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/analyses/")
  .post(body)
  .addHeader("X-Forensic-Access-Token", "0ccbdb4627c9d07c6c5b8f6e6cca44b5f8cb0c54ad7659098fa336240d494b0f9035e14bc42fc461224a9719f105e41026fed0f6f14188d9107b8c3d697a0cb1")
  .addHeader("Content-Type", "application/json")
  .addHeader("User-Agent", "PostmanRuntime/7.15.2")
  .addHeader("Accept", "*/*")
  .addHeader("Cache-Control", "no-cache")
  .addHeader("Postman-Token", "525bdcff-ae3c-40d0-9add-0ab54a9fbe4a,43fda7a1-1f77-45ca-bf97-44a13b94715f")
  .addHeader("Host", "api-d.oz-services.ru")
  .addHeader("Accept-Encoding", "gzip, deflate")
  .addHeader("Content-Length", "339")
  .addHeader("Connection", "keep-alive")
  .addHeader("cache-control", "no-cache")
  .build();

Response response = client.newCall(request).execute();

Ответ сервера на запрос назначения анализов:

JSON


[
    {
        "time_created": 1580115685,
        "time_updated": 1580115685,
        "meta_data": null,
        "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426",
        "folder_id": "1c7b448f-5da2-4da7-abd5-ff2e5edb18ac",
        "type": "DOCUMENTS",
        "state": "PROCESSING",
        "results_data": null,
        "confs": {
            "authenticity": 0,
            "capabilities": 508
        },
        "error_message": null,
        "error_code": null,
        "resolution_operator": null,
        "source_media": [
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "b5b68f21b824e016ef756b2f934224a0",
                        "size": 16732,
                        "width": 300,
                        "height": 188,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "339c933f157b7e796003ab17290f8465",
                        "size": 72461,
                        "width": 987,
                        "height": 619,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_id"
                ],
                "original_name": "8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg",
                "image_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/7fdc23cd-d186-4a69-9bc0-98eafc9019e1.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/7fdc23cd-d186-4a69-9bc0-98eafc9019e1_thumb.jpeg"
            },
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "e797fba781c5d493648cf892993c8982",
                        "size": 14077,
                        "width": 300,
                        "height": 189,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "7db11e1e3d2676558d1e2ea4a732e4b0",
                        "size": 40402,
                        "width": 766,
                        "height": 483,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_id"
                ],
                "original_name": "90eace77-ca39-45fa-853e-b9495d389640.jpeg",
                "image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05_thumb.jpeg"
            }
        ],
        "results_media": [
            {
                "media_association_id": 440433,
                "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426",
                "results_data": null,
                "media_association_type": "IMAGE",
                "source_image_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
                "output_images": [],
                "collection_persons": []
            },
            {
                "media_association_id": 440434,
                "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426",
                "results_data": null,
                "media_association_type": "IMAGE",
                "source_image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "output_images": [],
                "collection_persons": []
            }
        ],
        "results_group": [],
        "resolution_status": "PROCESSING",
        "resolution": "PROCESSING"
    },
    {
        "time_created": 1580115685,
        "time_updated": 1580115685,
        "meta_data": null,
        "analyse_id": "9d731e69-ffaa-403b-9132-e5cbe4e60d93",
        "folder_id": "1c7b448f-5da2-4da7-abd5-ff2e5edb18ac",
        "type": "BIOMETRY",
        "state": "PROCESSING",
        "results_data": null,
        "confs": {},
        "error_message": null,
        "error_code": null,
        "resolution_operator": null,
        "source_media": [
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "2bcd1075007cc891f6385395614b1696",
                        "size": 16178,
                        "width": 300,
                        "height": 271,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "9919ad38c0b365145489606408396d41",
                        "size": 94525,
                        "width": 1000,
                        "height": 904,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_selfie"
                ],
                "original_name": "1.jpg",
                "image_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/8e51055b-b363-4017-87fa-2eb5dfaaa0ef.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/8e51055b-b363-4017-87fa-2eb5dfaaa0ef_thumb.jpeg"
            },
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "e797fba781c5d493648cf892993c8982",
                        "size": 14077,
                        "width": 300,
                        "height": 189,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "7db11e1e3d2676558d1e2ea4a732e4b0",
                        "size": 40402,
                        "width": 766,
                        "height": 483,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_id"
                ],
                "original_name": "90eace77-ca39-45fa-853e-b9495d389640.jpeg",
                "image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05_thumb.jpeg"
            }
        ],
        "results_media": [
            {
                "media_association_id": 440435,
                "analyse_id": "9d731e69-ffaa-403b-9132-e5cbe4e60d93",
                "results_data": null,
                "media_association_type": "IMAGE",
                "source_image_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
                "output_images": [],
                "collection_persons": []
            },
            {
                "media_association_id": 440436,
                "analyse_id": "9d731e69-ffaa-403b-9132-e5cbe4e60d93",
                "results_data": null,
                "media_association_type": "IMAGE",
                "source_image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "output_images": [],
                "collection_persons": []
            }
        ],
        "results_group": [],
        "resolution_status": "PROCESSING",
        "resolution": "PROCESSING"
    }
]

Выполнение анализа занимает некоторое время, результат следует просматривать с помощью метода Folder Analyses [LIST].

Результаты выполнения анализов:

JSON


[
    {
        "time_created": 1580115685,
        "time_updated": 1580115686,
        "meta_data": null,
        "analyse_id": "9d731e69-ffaa-403b-9132-e5cbe4e60d93",
        "folder_id": "1c7b448f-5da2-4da7-abd5-ff2e5edb18ac",
        "type": "BIOMETRY",
        "state": "FINISHED",
        "results_data": {
            "max_confidence": 0.0,
            "min_confidence": 0.0
        },
        "confs": {},
        "error_message": null,
        "error_code": null,
        "resolution_operator": null,
        "source_media": [
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "2bcd1075007cc891f6385395614b1696",
                        "size": 16178,
                        "width": 300,
                        "height": 271,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "9919ad38c0b365145489606408396d41",
                        "size": 94525,
                        "width": 1000,
                        "height": 904,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_selfie"
                ],
                "original_name": "1.jpg",
                "image_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/8e51055b-b363-4017-87fa-2eb5dfaaa0ef.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/8e51055b-b363-4017-87fa-2eb5dfaaa0ef_thumb.jpeg"
            },
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "e797fba781c5d493648cf892993c8982",
                        "size": 14077,
                        "width": 300,
                        "height": 189,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "7db11e1e3d2676558d1e2ea4a732e4b0",
                        "size": 40402,
                        "width": 766,
                        "height": 483,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_id"
                ],
                "original_name": "90eace77-ca39-45fa-853e-b9495d389640.jpeg",
                "image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05_thumb.jpeg"
            }
        ],
        "results_media": [
            {
                "media_association_id": 440435,
                "analyse_id": "9d731e69-ffaa-403b-9132-e5cbe4e60d93",
                "results_data": null,
                "media_association_type": "IMAGE",
                "source_image_id": "8e51055b-b363-4017-87fa-2eb5dfaaa0ef",
                "output_images": [
                    {
                        "time_created": 1580115685,
                        "time_updated": 1580115685,
                        "meta_data": {},
                        "media_id": "2cc783ac-6f4b-4842-829f-5f664d9b59ed",
                        "media_type": "IMAGE_RESULT_ANALYSE_SINGLE",
                        "info": {
                            "thumb": {
                                "md5": "a41cd88b09c2a34be2283f99b8e4e620",
                                "size": 4337,
                                "width": 112,
                                "height": 112,
                                "mime-type": "image/jpeg"
                            },
                            "original": {
                                "md5": "0fe7c98b38111eb7855fbee977b0b966",
                                "size": 3139,
                                "width": 112,
                                "height": 112,
                                "mime-type": "image/jpeg"
                            }
                        },
                        "tags": [],
                        "original_name": "",
                        "image_id": "2cc783ac-6f4b-4842-829f-5f664d9b59ed",
                        "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/2cc783ac-6f4b-4842-829f-5f664d9b59ed.jpeg",
                        "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/2cc783ac-6f4b-4842-829f-5f664d9b59ed_thumb.jpeg",
                        "media_association_id": 440435
                    }
                ],
                "collection_persons": []
            },
            {
                "media_association_id": 440436,
                "analyse_id": "9d731e69-ffaa-403b-9132-e5cbe4e60d93",
                "results_data": null,
                "media_association_type": "IMAGE",
                "source_image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "output_images": [
                    {
                        "time_created": 1580115686,
                        "time_updated": 1580115686,
                        "meta_data": {},
                        "media_id": "1a821244-63e2-41c1-8d68-2712c76aa344",
                        "media_type": "IMAGE_RESULT_ANALYSE_SINGLE",
                        "info": {
                            "thumb": {
                                "md5": "1c0d8909a62c0575415436a6ef3c165c",
                                "size": 3034,
                                "width": 112,
                                "height": 112,
                                "mime-type": "image/jpeg"
                            },
                            "original": {
                                "md5": "933daf7c66719c7073e772f56626e874",
                                "size": 2306,
                                "width": 112,
                                "height": 112,
                                "mime-type": "image/jpeg"
                            }
                        },
                        "tags": [],
                        "original_name": "",
                        "image_id": "1a821244-63e2-41c1-8d68-2712c76aa344",
                        "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/1a821244-63e2-41c1-8d68-2712c76aa344.jpeg",
                        "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/1a821244-63e2-41c1-8d68-2712c76aa344_thumb.jpeg",
                        "media_association_id": 440436
                    }
                ],
                "collection_persons": []
            }
        ],
        "results_group": [],
        "resolution_status": "DECLINED",
        "resolution": "DECLINED"
    },
    {
        "time_created": 1580115685,
        "time_updated": 1580115688,
        "meta_data": null,
        "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426",
        "folder_id": "1c7b448f-5da2-4da7-abd5-ff2e5edb18ac",
        "type": "DOCUMENTS",
        "state": "FINISHED",
        "results_data": {
            "text_fields": [
                {
                    "mrz": "ID",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Document_Class_Code",
                    "field_type": 0,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "KAZ",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Issuing_State_Code",
                    "field_type": 1,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Document_Number",
                    "field_type": 2,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 3,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Date_of_Expiry",
                    "field_type": 3,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 3,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Date_of_Issue",
                    "field_type": 4,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Date_of_Birth",
                    "field_type": 5,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Place_of_Birth (71237638)",
                    "field_type": 6,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": "test",
                    "field_name": "Personal_Number",
                    "field_type": 7,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 3,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Surname (71237640)",
                    "field_type": 8,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Surname",
                    "field_type": 8,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Given_Names (71237641)",
                    "field_type": 9,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Given_Names",
                    "field_type": 9,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Nationality (71237643)",
                    "field_type": 11,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Nationality",
                    "field_type": 11,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "M",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Sex",
                    "field_type": 12,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Authority (71237656)",
                    "field_type": 24,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": null,
                    "visual": "test",
                    "barcode": null,
                    "field_name": "Surname_And_Given_Names (71237657)",
                    "field_type": 25,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Surname_And_Given_Names",
                    "field_type": 25,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "KAZ",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Nationality_Code",
                    "field_type": 26,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Optional_Data",
                    "field_type": 36,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "Kazakhstan",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Issuing_State_Name",
                    "field_type": 38,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "MRZ_Strings",
                    "field_type": 51,
                    "verification": {
                        "mrz": 0,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "3",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Document_Number_CheckDigit",
                    "field_type": 80,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "4",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Date_of_Birth_CheckDigit",
                    "field_type": 81,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "7",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Date_of_Expiry_CheckDigit",
                    "field_type": 82,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "6",
                    "visual": null,
                    "barcode": null,
                    "field_name": "FinalCheckDigit",
                    "field_type": 84,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "MRZ_Strings_With_Correct_CheckSums",
                    "field_type": 172,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "test",
                    "visual": null,
                    "barcode": null,
                    "field_name": "Age",
                    "field_type": 185,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 0,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                },
                {
                    "mrz": "10",
                    "visual": "10",
                    "barcode": null,
                    "field_name": "RemainderTerm",
                    "field_type": 364,
                    "verification": {
                        "mrz": 1,
                        "visual": 0,
                        "barcode": 0,
                        "mrz-visual": 3,
                        "mrz-barcode": 0,
                        "visual-barcode": 0
                    }
                }
            ]
        },
        "confs": {
            "authenticity": 0,
            "capabilities": 508
        },
        "error_message": null,
        "error_code": null,
        "resolution_operator": null,
        "source_media": [
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "b5b68f21b824e016ef756b2f934224a0",
                        "size": 16732,
                        "width": 300,
                        "height": 188,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "339c933f157b7e796003ab17290f8465",
                        "size": 72461,
                        "width": 987,
                        "height": 619,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_id"
                ],
                "original_name": "8c3e7f9e-0ccf-460d-934c-ba76b5aa64c4.jpeg",
                "image_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/7fdc23cd-d186-4a69-9bc0-98eafc9019e1.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/7fdc23cd-d186-4a69-9bc0-98eafc9019e1_thumb.jpeg"
            },
            {
                "time_created": 1580111830,
                "time_updated": 1580111830,
                "meta_data": {},
                "media_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "media_type": "IMAGE_FOLDER",
                "info": {
                    "thumb": {
                        "md5": "e797fba781c5d493648cf892993c8982",
                        "size": 14077,
                        "width": 300,
                        "height": 189,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "7db11e1e3d2676558d1e2ea4a732e4b0",
                        "size": 40402,
                        "width": 766,
                        "height": 483,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [
                    "photo_id"
                ],
                "original_name": "90eace77-ca39-45fa-853e-b9495d389640.jpeg",
                "image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/c91110a0-0a52-4c61-be01-9574978d3b05_thumb.jpeg"
            }
        ],
        "results_media": [
            {
                "media_association_id": 440433,
                "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426",
                "results_data": {
                    "document_id": 1540865220,
                    "document_name": "Kazakhstan - Id Card (2009)"
                },
                "media_association_type": "IMAGE",
                "source_image_id": "7fdc23cd-d186-4a69-9bc0-98eafc9019e1",
                "output_images": [
                    {
                        "time_created": 1580115688,
                        "time_updated": 1580115688,
                        "meta_data": {
                            "field_name": "Portrait",
                            "field_type": 201
                        },
                        "media_id": "50875dbd-f59a-4b0f-b96c-e1213eeda74b",
                        "media_type": "IMAGE_RESULT_ANALYSE_SINGLE",
                        "info": {
                            "thumb": {
                                "md5": "e548c3e0407043764d23c991cd458493",
                                "size": 6934,
                                "width": 185,
                                "height": 256,
                                "mime-type": "image/jpeg"
                            },
                            "original": {
                                "md5": "068246cc8b1e359a61c41d6ea0f2fdc7",
                                "size": 6050,
                                "width": 185,
                                "height": 256,
                                "mime-type": "image/jpeg"
                            }
                        },
                        "tags": [],
                        "original_name": "",
                        "image_id": "50875dbd-f59a-4b0f-b96c-e1213eeda74b",
                        "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/50875dbd-f59a-4b0f-b96c-e1213eeda74b.jpeg",
                        "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/50875dbd-f59a-4b0f-b96c-e1213eeda74b_thumb.jpeg",
                        "media_association_id": 440433
                    },
                    {
                        "time_created": 1580115688,
                        "time_updated": 1580115688,
                        "meta_data": {
                            "field_name": "Signature",
                            "field_type": 204
                        },
                        "media_id": "f24d977a-92bf-4f93-aecd-7776b4da9651",
                        "media_type": "IMAGE_RESULT_ANALYSE_SINGLE",
                        "info": {
                            "thumb": {
                                "md5": "602c95ae0ae64a66641fe71f90654771",
                                "size": 2273,
                                "width": 210,
                                "height": 72,
                                "mime-type": "image/jpeg"
                            },
                            "original": {
                                "md5": "bc07d257265067ba1d59908080d48c6e",
                                "size": 1999,
                                "width": 210,
                                "height": 72,
                                "mime-type": "image/jpeg"
                            }
                        },
                        "tags": [],
                        "original_name": "",
                        "image_id": "f24d977a-92bf-4f93-aecd-7776b4da9651",
                        "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/f24d977a-92bf-4f93-aecd-7776b4da9651.jpeg",
                        "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/f24d977a-92bf-4f93-aecd-7776b4da9651_thumb.jpeg",
                        "media_association_id": 440433
                    }
                ],
                "collection_persons": []
            },
            {
                "media_association_id": 440434,
                "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426",
                "results_data": {
                    "document_id": 1540865350,
                    "document_name": "Kazakhstan - Id Card (2009) Side B"
                },
                "media_association_type": "IMAGE",
                "source_image_id": "c91110a0-0a52-4c61-be01-9574978d3b05",
                "output_images": [
                    {
                        "time_created": 1580115688,
                        "time_updated": 1580115688,
                        "meta_data": {
                            "field_name": "Barcode",
                            "field_type": 205
                        },
                        "media_id": "6c640a89-132a-44cb-94bd-599fca7a79cd",
                        "media_type": "IMAGE_RESULT_ANALYSE_SINGLE",
                        "info": {
                            "thumb": {
                                "md5": "f913eb836d873a5ef1ee3b9e7b1cca68",
                                "size": 3519,
                                "width": 300,
                                "height": 51,
                                "mime-type": "image/jpeg"
                            },
                            "original": {
                                "md5": "74bb6ba74df2e5b72a978437da0035bd",
                                "size": 4854,
                                "width": 427,
                                "height": 74,
                                "mime-type": "image/jpeg"
                            }
                        },
                        "tags": [],
                        "original_name": "",
                        "image_id": "6c640a89-132a-44cb-94bd-599fca7a79cd",
                        "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/6c640a89-132a-44cb-94bd-599fca7a79cd.jpeg",
                        "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/6c640a89-132a-44cb-94bd-599fca7a79cd_thumb.jpeg",
                        "media_association_id": 440434
                    }
                ],
                "collection_persons": []
            }
        ],
        "results_group": [
            {
                "time_created": 1580115688,
                "time_updated": 1580115688,
                "meta_data": {
                    "type": "document"
                },
                "media_id": "d61e1d4f-8a21-41e5-898f-3a8daf622ffb",
                "media_type": "IMAGE_RESULT_ANALYSE_GROUP",
                "info": {
                    "thumb": {
                        "md5": "e299f3ea814e6ac7ea804e3171bc9b14",
                        "size": 14210,
                        "width": 300,
                        "height": 189,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "881bc9a1bab69dc8f0f7b75619448b60",
                        "size": 40340,
                        "width": 766,
                        "height": 483,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [],
                "original_name": "",
                "image_id": "d61e1d4f-8a21-41e5-898f-3a8daf622ffb",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/d61e1d4f-8a21-41e5-898f-3a8daf622ffb.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/d61e1d4f-8a21-41e5-898f-3a8daf622ffb_thumb.jpeg",
                "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426"
            },
            {
                "time_created": 1580115688,
                "time_updated": 1580115688,
                "meta_data": {
                    "type": "document"
                },
                "media_id": "3ab478e6-7690-42dd-9914-017cd0b05b44",
                "media_type": "IMAGE_RESULT_ANALYSE_GROUP",
                "info": {
                    "thumb": {
                        "md5": "e3c62666c398bc88a368f8cfba329373",
                        "size": 15024,
                        "width": 300,
                        "height": 167,
                        "mime-type": "image/jpeg"
                    },
                    "original": {
                        "md5": "c95b25e9d8e8db55d1eb0737ac878a7c",
                        "size": 66328,
                        "width": 979,
                        "height": 548,
                        "mime-type": "image/jpeg"
                    }
                },
                "tags": [],
                "original_name": "",
                "image_id": "3ab478e6-7690-42dd-9914-017cd0b05b44",
                "original_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/3ab478e6-7690-42dd-9914-017cd0b05b44.jpeg",
                "thumb_url": "http://api-d.oz-services.ru/static/1c7b448f-5da2-4da7-abd5-ff2e5edb18ac/3ab478e6-7690-42dd-9914-017cd0b05b44_thumb.jpeg",
                "analyse_id": "5b80bb01-6186-4fd1-aca5-bdf6ba815426"
            }
        ],
        "resolution_status": "SUCCESS",
        "resolution": "SUCCESS"
    }
]

В ответе можно увидеть, что оба анализа успешно завершены ("state": "FINISHED"). По анализу BIOMETRY принято отрицательное решение ("resolution": "DECLINED"), лица персон на документе и на фото не совпадают. Документ успешно распознан (блок «result_data») и определен его тип «Kazakhstan - Id Card (2009)» (стр. 686, 763). По анализу DOCUMENTS принято положительное решение ("resolution": "SUCCESS"), документ валидный.

*данные по распознанным полям документа в примере заменены на тестовые в целях соблюдения 152-ФЗ «О персональных данных».