# Retrieving applicant verification results

Verifications typically take \~2 minutes on average to process. You can either poll the result retrieval call for a non-pending status, or the recommended method is to set up a webhook to be notified when the verification is complete. This also provides the details of the check.

&#x20;When an applicant has finished processing, use this endpoint to retrieve extracted data from their documents along with the verification result.

***

## Retrieving the result

<mark style="color:green;">`POST`</mark> `/api-applicant-status`

Retrieve the verification status, and extracted data from an applicant's documents.

| Name          | Value                 |
| ------------- | --------------------- |
| Content-Type  | `multipart/form-data` |
| Authorization | `Bearer YOUR_TOKEN`   |

**Body**

<table><thead><tr><th>Name</th><th width="165">Type</th><th>Description</th></tr></thead><tbody><tr><td><code>applicantId</code></td><td>string</td><td>Unique applicantId generated on applicant creation <mark style="color:red;">(required)</mark></td></tr></tbody></table>

#### Request

{% tabs %}
{% tab title="cURL" %}

```sh
curl --location 'https://enterprise.personr.co/api/1.1/wf/api-applicant-status' \
--form 'applicantId="4242424242424x424242424242424242"'
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
var axios = require('axios');
var FormData = require('form-data');
var data = new FormData();
data.append('applicantId', '4242424242424x424242424242424242');

var config = {
  method: 'post',
maxBodyLength: Infinity,
  url: 'https://enterprise.personr.co/api/1.1/wf/api-applicant-status',
  headers: { 
    ...data.getHeaders()
  },
  data : data
};

axios(config)
.then(function (response) {
  console.log(JSON.stringify(response.data));
})
.catch(function (error) {
  console.log(error);
});
```

{% endtab %}

{% tab title="Javascript" %}

```javascript
var form = new FormData();
form.append("applicantId", "4242424242424x424242424242424242");

var settings = {
  "url": "https://enterprise.personr.co/api/1.1/wf/api-applicant-status",
  "method": "POST",
  "timeout": 0,
  "processData": false,
  "mimeType": "multipart/form-data",
  "contentType": false,
  "data": form
};

$.ajax(settings).done(function (response) {
  console.log(response);
});
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require "uri"
require "net/http"

url = URI("https://enterprise.personr.co/api/1.1/wf/api-applicant-status")

https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true

request = Net::HTTP::Post.new(url)
form_data = [['applicantId', '4242424242424x424242424242424242']]
request.set_form form_data, 'multipart/form-data'
response = https.request(request)
puts response.read_body
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = "https://enterprise.personr.co/api/1.1/wf/api-applicant-status"

payload={'applicantId': '4242424242424x424242424242424242'}
files=[

]
headers = {}

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

print(response.text)
```

{% endtab %}
{% endtabs %}

**Response**

{% tabs %}
{% tab title="200 - Approved" %}

```json
{
    "status": "success",
    "response": {
        "applicantStatus": "Reviewed",
        "applicantActionStatus": "Reviewed",
        "result": {
            "Modified Date": 1709088258859,
            "Created Date": 1699237071350,
            "reviewAnswer": "Approved",
            "applicant": "1699236591586x0000000000000000000",
            "company": "1668816503943x0000000000000000000",
            "rejectLabels": [],
            "verification": "1699236590532x0000000000000000000",
        },
        "extractedFirstName": "JOHN DEREK",
        "extractedLastName": "SAMPLE",
        "extractedBirthDate": "1995-10-23",
        "documentCountry": "AUS",
        "extractedStreetNum": "123",
        "extractedStreet": "SAMPLE LANE",
        "extractedCity": "PERTH",
        "extractedState": "WESTERN AUSTRALIA",
        "extractedPostCode": "6000",
        "ipAddress": "xxx.xxx.xxx.xxx", //Note this can be IPv4 or IPv6
        "ipTimezone": "Australia/Perth",
        "ipCountry": "Australia",
        "ipCity": "Perth",
        "documents": [
            "PASSPORT",
            "ID_CARD",
            "SELFIE"
            ],
        "docNumber": [
            "PA123456789",
            "123456789"
            ],
        "docCountry": [
            "AUS"
            ],
        "sourceKey": "Example Source Key",
        "externalUserId": []
    }
}
```

{% endtab %}

{% tab title="200 - Rejected" %}

```json
{
    "status": "success",
    "response": {
        "applicantStatus": "Reviewed",
        "applicantActionStatus": "Reviewed",
        "result": {
            "Modified Date": 1709088258859,
            "Created Date": 1699237071350,
            "reviewAnswer": "Rejected",
            "applicant": "1699236591586x0000000000000000000",
            "company": "1668816503943x0000000000000000000",
            "rejectLabels": [
                "FORGERY",
                "PEP"
            ],
            "verification": "1699236590532x0000000000000000000",
        },
        "extractedFirstName": "JOHN DEREK",
        "extractedLastName": "SAMPLE",
        "extractedBirthDate": "1995-10-23",
        "documentCountry": "AUS",
        "extractedStreetNum": "123",
        "extractedStreet": "SAMPLE LANE",
        "extractedCity": "PERTH",
        "extractedState": "WESTERN AUSTRALIA",
        "extractedPostCode": "6000"
    }
}
```

{% endtab %}

{% tab title="400" %}

```json
{
    "statusCode": 400,
    "message": "Error: incorrect applicantId provided"
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
If your applicant is taking longer to process, it may be because of their image quality. We also check identity data against 100+ sources, which may take time if the data doesn't match.
{% endhint %}

#### Applicant Status Types

`Created` The applicant has been created.

<mark style="color:blue;">`Pre-Checked`</mark> The applicant's document images are being processed.

<mark style="color:orange;">`Pending`</mark> The applicant's identity data is being processed.

<mark style="color:green;">`Reviewed`</mark> The verification is complete, and results are ready.

#### Applicant Action Status Types

<mark style="color:orange;">`Pending`</mark> The verification is being processed.

<mark style="color:green;">`Reviewed`</mark> The verification is complete, and results are ready.

Applicant `Status` and `ActionStatus` update at the same time. It's recommended to use `Status` as it contains more information.

#### Review Answer Types

<mark style="color:green;">`Approved`</mark> The applicant has successfully been verified.

<mark style="color:red;">`Rejected`</mark> The applicant wasn't able to be verified. Look at `rejectLabels` to see why.

There are two types of rejections: <mark style="color:red;">`Rejected (Retry)`</mark> and <mark style="color:red;">`Rejected (Final)`</mark>

Rejected (Retry) allows an applicant to attempt their verification again, if they've uploaded a blurry photo for example.

Rejected (Final) is final, and does not allow another attempt. This is used when an applicant has attempted to forge their documents, or if they appear on a sanction or watchlist.

{% hint style="info" %}
See the next page for a list of rejection labels, and what they mean.
{% endhint %}
