API Docs · eKYC Core
Common objects
Two shapes recur across the eKYC Core surface: the ImageData object every image-taking endpoint accepts, and the envelope its JSON responses are wrapped in. They are defined here once and referred to by name from each endpoint page.
The three lookup tables — Image label table, Card type table and Response errors — stay on the Overview, because they are read alongside the authentication and usage rules rather than alongside a single object.
ImageData
Clients can provide image data to the TrustVision API by specifying the ID the image by using upload API, or by sending the image data as base64-encoded text.
Wherever an endpoint's Request table types a parameter ImageData — image, image1, image2, or an array of them such as selfies, images or qr1_images — this is the object it takes.
| Name | Type | Required | Description |
|---|---|---|---|
id | string | Optional | ID of image is returned from API Upload |
base64 | string | Optional | base64 encoded text of image data |
label | string | Optional | label of the image as described at Label table |
metadata | string_json | Optional | key-value string, key should be string, value should be string, int, float, bool. Example "{\"id\":\"123456789\",\"type\":1}" |
Each key is optional on its own, but the two ways of naming an image are mutually exclusive:
- If you use
base64,labelandmetadata, omit parameterid. - If you use
id(resultidis returned from Upload Image API), omit parameterbase64,labelandmetadata.
A few endpoints accept one further key on the same object — an
embedding, for instance. Where they do, the endpoint's own Request section carries the extra row and the note that goes with it.
Response envelope
Where an endpoint answers in JSON, the body carries two top-level keys. data holds the result, and its fields differ from endpoint to endpoint, so each endpoint page documents its own. errors carries the same three keys on every endpoint and is defined below.
{
"data": {
"status": string, // "success" or "failure"
...
},
"errors": [
{
"code": string,
"message": string,
"detail": {
"field": string, // optional, which parameter is invalid.
... // any other information that can be useful for client
},
},
... // other errors
]
}
In case the request processing has been finished, the HTTP status code will be 200, and the data.status is either "success" or "failure" depending on whether the request has been successfully processed or not. If the data.status is "failure", the "errors" field will tell you why it failed, with a code belonging to that endpoint — those are listed under Failure codes on the endpoint's own page.
Each entry in errors carries:
| Name | Type | Description |
|---|---|---|
code | string | which error occurred — see Response errors, or Failure codes on the endpoint's page |
message | string | the message that accompanies the code |
detail | object | field is optional and says which parameter is invalid, plus any other information that can be useful for client |
In case of any other errors, the data field will be empty, and the server sends one of following HTTP status code with error code. Response errors on the Overview lists those for the eKYC Core surface as a whole; each endpoint page carries the list documented for that endpoint under Failure codes, and the two do not match on every endpoint.
The download endpoints are the exception to the shape above. On success they send the file itself as binary content, so they use this envelope only to report an error — and then
datais{}. See Download image and Download file.
All failure codes, by endpoint
Every eKYC Core endpoint documents its own Failure codes section — repeated per endpoint rather than deduplicated, because the sets genuinely differ: request_not_found_exception is documented on only 16 of the 36 endpoints below, Face OTP both drops and adds codes the rest share, and the file endpoints redefine what 413/415 mean. This table is an index over those pages, not a replacement for them — each row names every endpoint that documents a given HTTP code, error code and description exactly as its own page has it. Get result is the one endpoint of the 37 with no Failure codes section at all.
| HTTP code | Error code | Description | Where |
|---|---|---|---|
400 | incorrect_number_of_faces | Selfie or original image have more than 1 faces. | Only Face OTP. |
400 | invalid_parameter_exception | Input parameter violates a constraint. | All except Get client settings, Delete files. |
400 | request_time_too_skewed | The X-TV-Timestamp header is expired, need a newer one. | All except Get client settings, Get requests by X-Request-ID, Face OTP, Delete files, Update metadata. |
401 | access_denied_exception | You are not authorized to perform the action. | All except Create temporary credential. |
404 | image_not_found_exception | The image ID is not found in DB. | All except Create temporary credential, Get client settings, Get requests by X-Request-ID, Delete files, Check NFC, Verify NFC, Create a transaction, Finish a transaction. |
404 | image_not_found_exception | The image ID of id_card is not found | Only Verify NFC — its own wording for the same code. |
404 | request_not_found_exception | The request ID is not found when polling result by id | Only Full eKYC, Alert faces, Compare faces, Detect faces, Index faces, Index faces video, Search faces, Verify faces suspicious, Detect ID cards, Read doc info, Read ID card info, Read QR info, Verify identity, Search metadata, Check NFC, Verify NFC. |
404 | request_not_found_exception | The request ID is not found in Memory Cache and DB. | Only Face OTP — its own wording for the same code. |
405 | not_allow_delete_exception | Not allow to delete file | Only Delete files. |
408 | request_timeout_exception | Request takes too long to process | All except Get requests by X-Request-ID. |
413 | file_too_large_exception | The input file size exceeds the allowed limit (15MB). | Only Convert PDF to images, Upload video/audio/frames. |
413 | image_too_large_exception | The input image size exceeds the allowed limit (15MB). | Only Verify face liveness, Verify face video liveness, Upload image, Vision Score. |
415 | invalid_file_format_exception | The provided file format is not supported (PDF). | Only Convert PDF to images. |
415 | invalid_image_format_exception | The provided image format is not supported (JPG/PNG) | Only Verify face liveness, Verify face video liveness, Upload image, Vision Score. |
429 | rate_limit_exception | The number of requests exceeded your throughput limit. | All except Get requests by X-Request-ID. |
500 | internal_server_error | Some unexpected error occurs while processing the request | Every endpoint with a Failure codes section. |
This table covers the HTTP-status transport codes only — the endpoint-specific business codes (
image_has_no_faces,incorrect_card_type, and the rest of thedata.status: "failure"codes a handful of endpoints define) stay on each endpoint's own Failure codes section, since they only make sense in that endpoint's context.