# Retrieve the results

You'll need to know how to [send a request](/api/certn-api-v-1.0/getting-started/demo-account/send-request.md) before you can follow the instructions in this section.

## Request

The results you got from the Softcheck quickscreen creation call indicate that we have received your request and are actively working on it. You can see this by checking the `report_status` field, which will likely be marked as `ANALYZING`. These results will not be updated in real-time. To retrieve the updated versions, you can set up a [webhook](/api/certn-api-v-1.0/guides/use-the-api/webhooks.md), or send requests to one of our endpoints.

### Choose your endpoint <a href="#get-the-url" id="get-the-url"></a>

In this guide, we'll show you how to send requests to our API to retrieve the status of your application via our endpoints. When using this method, keep sending requests until the field `report_status` is marked as `COMPLETE`. Once it is, you can view your final report.

We'll use the `/applicants` endpoint, which allows you to retrieve the report as a **JSON** object.

{% hint style="info" %}
Once your report is ready, you can download it as a **PDF** or **HTML** file via our `/reports` endpoint.
{% endhint %}

### Get your application ID <a href="#send-the-request" id="send-the-request"></a>

To tell the API which application to send back, you need to provide it with the right application ID. You'll find it in the response of the creation call, under `id`. We use [universally unique identifiers (UUIDs)](https://en.wikipedia.org/wiki/Universally_unique_identifier)![](/files/i1X0t7ez6Vlx9HiwQQXC), so it'll be formatted like this:`123e4567-e89b-12d3-a456-426614174000`

### Set up your URL

Once you have your application ID, append it to the URL.

1. Choose the URL that corresponds to your industry
2. In the URL, replace `<applicationID>` with your application's ID

{% tabs %}
{% tab title="Human Resources" %}

```python
"https://demo-api.certn.co/hr/v1/applicants/<applicationID>"
```

{% endtab %}

{% tab title="Property Management" %}

```python
"https://demo-api.certn.co/api/v2/applicants/<applicationID>"
```

{% endtab %}
{% endtabs %}

### Send the request <a href="#send-the-request" id="send-the-request"></a>

Now we're ready to bring it all together. Our `/applicants` endpoint accepts GET requests, so make sure that is what you use.

Here is what your full script may look like when using Python:

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

```python
import requests
import json

############### Optional ###############

# Gets the application ID from the previous request
with open("softcheckDemo.json") as f:
  softcheckResponse = json.load(f)
  
applicationID = softcheckResponse['id']

############# End Optional ##############


### Replace <token> with your API Key
headers = { "Authorization": "Bearer <token>" }

### Replace <URL> with the URL that corresponds to your industry and
### append the application ID
url = "<URL>"

# Sends the HTTP request to the API via GET
result = requests.get(url, headers=headers)


############### Optional ###############

# Brings errors to the forefront
result.raise_for_status()

# Writes the contents of the report to a file 
# named "resultsSoftcheckDemo.json"
with open("resultsSoftcheckDemo.json", "w") as f:
    f.write(result.text)
  
############# End Optional ##############
```

{% endtab %}
{% endtabs %}

In the previous example, we saved the results of the call to a new file named `resultsSoftcheckDemo.json`.‌

With everything set properly and a good internet connection, you should receive a response status of `200 OK`.

{% hint style="success" %}
**200 OK**

`[...]`\
`"id": "<number>"`\
`[...]`\
`"report_status": "COMPLETE"`\
`[...]`
{% endhint %}

## Errors

Here are some errors you may encounter when doing this exercise, and how to fix them.‌

### 401 Unauthorized

Find this error in [the previous article](/api/certn-api-v-1.0/getting-started/demo-account/send-request.md#401-unauthorized).

### 403 Forbidden <a href="#id-401-unauthorized" id="id-401-unauthorized"></a>

Find this error in [the previous article](/api/certn-api-v-1.0/getting-started/demo-account/send-request.md#401-unauthorized).

### 404 Not found

You may receive a `404 Not found` if:‌

* The application ID couldn't be found

{% hint style="danger" %}
`"detail": "Not found."`
{% endhint %}

* The application ID is a string of letters

{% hint style="danger" %}
`<HTML Page>` **`NOT FOUND`**
{% endhint %}

#### How to fix this issue <a href="#how-to-fix-this-issue" id="how-to-fix-this-issue"></a>

Append your [application ID](/api/certn-api-v-1.0/getting-started/demo-account/retrieve-results.md#send-the-request) to the end of the URL and make sure it is in the proper format.

{% content-ref url="/pages/-MbvYXtBnywVTALaZNg\_" %}
[Error codes](/api/certn-api-v-1.0/api-reference/resources/error-codes.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.certn.co/api/certn-api-v-1.0/getting-started/demo-account/retrieve-results.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
