# Create your first application

You'll need to know [your User id](https://docs.certn.co/api/start/understand-your-general-resources#retrieve-your-users) to follow the instructions in this page.

### Get the URL <a href="#get-the-url" id="get-the-url"></a>

‌You can find the URLs for all our endpoints in the [API Reference](https://docs.certn.co/api/api-reference) section of this documentation. Knowing how to use them can be helpful, so we'll show you how they're created.‌

In this example, you'll be making calls to our demo environment, `https://demo-api.certn.co`.‌

We currently divide our endpoints for application management by permissible purpose:‌

* **Human Resources** endpoints start with `/api/v1/hr/`
* **Property Management** endpoints start with `/api/v1/pm/`

Later on, you'll request a [softcheck](https://docs.certn.co/api/guides/checks/softcheck "mention"), which is under `/applications`. You'll also make it a [quickscreen](https://docs.certn.co/api/faq#what-is-a-quickscreen-and-how-do-i-use-it), so you'll be filling all of the information yourself instead of sending it to your applicant. To make it a quickscreen, add `/quick` to your URL.‌&#x20;

Put this together and you get the URL for your call.

* Choose the URL that corresponds to your industry to continue:

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

<pre class="language-python"><code class="lang-python"><strong>application_url = "https://demo-api.certn.co/api/v1/hr/applications/quick/"
</strong></code></pre>

{% endtab %}

{% tab title="Property Management" %}

<pre class="language-python"><code class="lang-python"><strong>application_url = "https://demo-api.certn.co/api/v1/pm/applications/quick/"
</strong></code></pre>

{% endtab %}
{% endtabs %}

### Format the request body <a href="#add-the-content" id="add-the-content"></a>

1. To request a Softcheck, **add the request-flag** `'request_softcheck': true` to your request body.‌
2. For your applicant, use our CEO's name, **Andrew McLeod**.
3. For the applicant's address, use our office location in Victoria, BC.&#x20;
   1. **1006 Fort St, Victoria, BC V8V 3K4, Canada**
4. For the `owner_id`, use the id of the User requesting the application. In this situation, it's you. See [#retrieve-your-users](https://docs.certn.co/api/start/understand-your-general-resources#retrieve-your-users "mention"), to find out how to retrieve your User id.
5. For `position_or_property_location`, use the location of the position (Human Resources industry) or property (Property Management industry) for which you are running the check. In the example, we're hiring for a position (HR industry) that will be located in Blanshard St, Victoria. See [#position-or-property-location](https://docs.certn.co/api/api-reference/resources/application-parameters#position-or-property-location "mention") for more information on this field.

```python
{
    "request_softcheck": true,
    "information": {
        "first_name": "Andrew",
        "last_name": "McLeod",
        "addresses": [{
                "address": "1006 Fort St Unit 300",
                "city": "Victoria",
                "province_state": "BC",
                "country": "CA",
                "current": true
            }
        ],
    },
    "owner_id": f"{your_user_id}",
    "position_or_property_location": {
        "address": "2680 Blanshard St Unit 3",
        "city": "Victoria",
        "province_state": "BC",
        "country": "CA",
        "postal_code": "V8T5E1",
        "location_type": "Position Location"
    }
}
```

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

‌Now we're ready to bring it all together. Our `/applications` endpoint accepts POST 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

# Use your access token in the header
headers = { "Authorization": f"Bearer {access_token}" }

# Use the appropriate application URL that corresponds to your industry
url = f"{application_url}"

body = {
    "request_softcheck": true,
    "information": {
        "first_name": "Andrew",
        "last_name": "McLeod",
        "addresses": [{
                "address": "1006 Fort St Unit 300",
                "city": "Victoria",
                "province_state": "BC",
                "country": "CA",
                "current": true
            }
        ],
    },
    "owner_id": f"{your_user_id}",
    "position_or_property_location": {
        "address": "2680 Blanshard St Unit 3",
        "city": "Victoria",
        "province_state": "BC",
        "country": "CA",
        "postal_code": "V8T5E1",
        "location_type": "Position Location"
    }
}

# Send the HTTP request to the API via POST
response = requests.post(url, headers=headers, data=content)

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

# Brings errors to the forefront
response.raise_for_status()

# Writes the contents of the response in a file named "softcheck_demo.json"
with open("softcheck_demo.json", "w") as f:
    f.write(response.text)
    
############# End Optional ##############
```

{% endtab %}
{% endtabs %}

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

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

{% hint style="success" %}
**201 Created**

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

The id in the response corresponds to the newly created applicant. Copy this id, as you'll need it next to [retrieve-results](https://docs.certn.co/api/start/demo-account/retrieve-results "mention").

## Errors <a href="#errors" id="errors"></a>

‌Please see [error-codes](https://docs.certn.co/api/api-reference/resources/error-codes "mention") for more details on types of errors, and how to resolve them.

{% content-ref url="../../api-reference/resources/error-codes" %}
[error-codes](https://docs.certn.co/api/api-reference/resources/error-codes)
{% endcontent-ref %}
