Results
This section provides details on how to retrieve session results for an Age verification session. Two options are available:
- Fetching the session status (GET endpoint)
- Webhook notifications
GET https://age.yoti.com/api/v1/sessions/<sessionId>/result
Header | Description |
---|---|
Authorization | API Key to call the Yoti Age API. Should be sent as a 'Bearer {{API_TOKEN}}'. |
Content-Type | application/json |
Yoti-SDK-Id | Your unique SDK ID (uuid) |
Example response
{
"sdk_id": "<uuid>",
"callback_url": "https://your.callback.url",
"callback":{
"url":"https://your.callback.url",
"auto":false
},
"notification_url": "https://your.webhook.url",
"cancel_url":"https://your.cancel.url",
"type": "OVER",
"age_estimation": {
"threshold": 18,
"allowed": true,
"level": "NONE"
},
"digital_id": {
"threshold": 19,
"allowed": true,
"level": "NONE"
},
"doc_scan": {
"threshold": 25,
"allowed": true,
"level": "NONE"
},
"credit_card":{
"threshold":18,
"allowed":true,
"level":"",
"authenticity":""
},
"mobile":{
"threshold":18,
"allowed":true,
"level":"",
"authenticity":""
},
"login":{
"threshold":0,
"allowed":false,
"level":"",
"authenticity":""
},
"age": 18,
"status": "COMPLETE",
"method": "AGE_ESTIMATION",
"reference_id": "",
"created_at": "2021-04-28T14:44:00.263517Z",
"expires_at": "2030-10-30T20:04:00.263517Z",
"updated_at": "2021-04-28T14:44:36.056933Z",
"id": "<uuid>",
"evidence_id": "<uuid>",
"biometric_consent_required": true,
"biometric_consent_given_at": "",
"terminal_id": ""
}
Field | Value | Description |
---|---|---|
sdk_id | uuid | SDK ID for a given session. |
callback_url | string | Configured callback_url property in session creation. |
notification_url | string | Configured notification_url property in session creation. |
type | AGE, OVER, UNDER | Configured type property in session creation. |
age_estimation | object | Configured age_estimation properties in session creation. |
digital_id | object | Configured digital_id properties in session creation. |
doc_scan | object | Configured doc_scan properties in session creation. |
age | integer | Returns the actual age if type AGE. Otherwise returns the threshold value. |
status | PENDING IN_PROGRESS FAIL COMPLETE ERROR CANCELLED | PENDING - User has not started any checks. IN_PROGRESS - Checks have begun on the session, awaiting result to be returned. FAIL - The session has been completed, however the user has failed to meet the age threshold. FAIL will be returned only for 'OVER' and 'UNDER' attempts. COMPLETE - The session has been completed, the user has passed the required threshold or an age has been returned. ERROR - We could not provide an age result or calculate the threshold. This may be because the face was not recognised during age estimation or if the ID document was processed via Doc Scan, but we do not believe that it is a genuine document. CANCELLED - The user no longer wishes to prove their age, and aborts the session. Additional states may be added in future releases and therefore mapping methods should contain default values. |
method | string | The AV method used to complete the session. |
reference_id | string | Configured reference_id property in session creation. |
created_at | timestamp | Timestamp of session creation. |
expires_at | timestamp | Timestamp of session expiry. |
updated_at | timestamp | Timestamp of last session update. |
id | uuid | ID of session. |
evidence_id | uuid | An ID relating to a specific Age verification attempt. |
biometric_consent_required | boolean | Configured biometric_consent_required properties in session creation. |
biometric_consent_given_at | timestamp | Timestamp of biometric consent. |
terminal_id | string | Value set for the Yoti-Terminal-Id header in session creation. |