Common · Standard API · eKYC Core
Get requests by X-Request-ID
GET/v1/requests_by_x_req_id/:x_request_id?max_results={max_results}
Returns every request that shares one x-request-id, grouped by service name, together with a final_result that aggregates them.
Request
MethodGET
Path/v1/requests_by_x_req_id/:x_request_id?max_results={max_results}
Content-Typeapplication/json
Auth requiredYes — HMAC signing
With following parameters:
| Name | Type | Required | Description |
|---|---|---|---|
x_request_id | string | Required | get requests that share this x-request-id |
max_results | int | Optional | max number of results |
Sample request
curl -X GET \
https://tv-staging.trustingsocial.com/api/v1/requests_by_x_req_id/HpOapuk3jg \
-H 'Authorization: TV <YOUR ACCESS KEY>:<CREATED SIGNATURE>' \
-H 'X-TV-Timestamp: 2019-04-21T18:00:15+07:00' \
-H 'Content-Type: application/json'
Response
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.
{
"data": {
"file_ids": [ // input file ids of all requests below, no duplicated id
{
"id": string,
"label": string,
"gesture": string, // optional
}
],
"compare_faces": [ // service name
{
"data": {
"request_id": string, // request_id
"x_request_id": string,
"access_key_id": string,
"file_ids": [ // input file ids, optional
{
"id": string,
"label": string,
"gesture": string, // optional
}
],
... // other request field
}
},
... // other request
],
... // other service
"final_result": { // aggregate result of all services
"full_input_file": {
"id_card_front_id": string,
"id_card_back_id": string,
"main_selfie_id": string,
"selfies": [
{
"id": string,
"label": string,
"gesture": string, // optional
},
...
]
},
"nfc_input": {
"sod": string, // base64
"dg1": string, // base64
"dg2": string, // base64
"dg13": string, // base64
"dg14": string, // base64
"dg15": string, // base64
"com": string // base64
},
"verify_nfc": { // result of verify_nfc service
"card_information": [
{
"field": string,
"value": string,
"confidence_score": float,
"confidence_verdict": string
},
...
],
"image": {
"id": string
},
"nfc_verification": { ... } // reference to verify_nfc service
}
"card_information": [ // list of card information from ocr request
{
"field": string,
"value": string,
"confidence_score": float,
"confidence_verdict": string
},
...
],
"card_tampering": { ... }, // reference to detect_id_card_tampering service response
"card_sanity": { ... }, // reference to verify_id_card_sanity service response
"search_faces": { ... }, // reference to search_faces service response
"liveness_check": { ... }, // reference to verify_face_liveness service response
"portrait_sanity": { ... }, // reference to verify_portrait_sanity service response
}
}
"errors": [
{
"code": string,
"message": string,
"detail": {
"field": string, // optional, which parameter is invalid.
... // any other information that can be useful for client
},
},
... // other errors
]
}
Failure codes
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:
| HTTP code | Error code | Description |
|---|---|---|
401 | access_denied_exception | You are not authorized to perform the action. |
400 | invalid_parameter_exception | Input parameter violates a constraint. |
500 | internal_server_error | Some unexpected error occurs while processing the request |
The codes above are the ones documented for this endpoint. Response errors on the Overview lists the codes for the eKYC Core surface as a whole — the two lists do not match on every endpoint.