Send your first request
To follow this guide, you need a demo account. Make sure it's fully setup! If not, follow our instructions on how to create a demo account.

Request

‌To communicate with our API, you'll need to build HTTP requests. You can use the programming language of your choice to achieve this. We provide examples of scripts using Python, but most of the content you'll work with will be in JSON.‌

Get the URL

‌The URLs for our endpoints are available to you in this documentation. However, 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. It can be found at https://demo-api.certn.co.‌
We currently divide our endpoints by industry:‌
  • Human resources endpoints start with /hr/v1/
  • Property management endpoints start with /api/v2/
‌Later on, you'll request a Softcheck, which is under the /applications endpoint. You'll also make it a quick screen, so you will fill all of the information yourself instead of sending it to your applicant. To make it a quick screen, add /quick to your URL.‌
Place this together, and you get the URL for your call!
  • Choose the URL that corresponds to your industry to continue:
Human Resources
Property Management
1
"https://demo-api.certn.co/hr/v1/applications/quick/"
Copied!
1
"https://demo-api.certn.co/api/v2/applications/quick/"
Copied!

Get your API key

‌To gain access to our API, you need an Authorization header with a valid Bearer token. The token is your API key.
  • Replace <token> with your API key in the following header:
1
{ "Authorization": "Bearer <token>" }
Copied!
Include this header in every call to our API, and keep it secure. It is your access key.‌

Add the content

  1. 1.
    To request a Softcheck, add the request-flag 'request_softcheck': true to your content.‌
  2. 2.
    For your applicant, use our CEO's name, Andrew McLeod.
  3. 3.
    For the address, use our office location in Victoria, BC.
  4. 4.
    Fill the SIN/SSN number with a placeholder.
1
{
2
"request_softcheck": true,
3
"information": {
4
"first_name": "Andrew",
5
"last_name": "McLeod",
6
"addresses": [
7
{
8
"address": "1006 Fort St Unit 300",
9
"city": "Victoria",
10
"province_state": "BC",
11
"country": "CA"
12
}
13
],
14
"sin_ssn": "123456789"
15
},
16
}
Copied!
‌For more testing, replace the name Andrew McLeod with Curtis Smith or Daniel Faulkner .

Send the request

‌Now we're ready to bring it all together. Our /application endpoint accepts POST requests, so make sure that is what you use. Visit W3Schools for useful guides on HTTP requests.
Here is what your full script may look like when using Python:
Python
1
import requests
2
3
### Replace <token> with your API Key
4
headers = { "Authorization": "Bearer <token>" }
5
6
### Replace <URL> with the URL that corresponds to your industry
7
url = "<URL>"
8
9
content = {
10
"request_softcheck": True,
11
"information": {
12
"first_name": "Andrew",
13
"last_name": "McLeod",
14
"addresses": [
15
{
16
"address": "1006 Fort St Unit 300",
17
"city": "Victoria",
18
"province_state": "BC",
19
"country": "CA"
20
}
21
],
22
"sin_ssn": "123456789"
23
},
24
}
25
26
# Sends the HTTP request to the API via POST
27
response = requests.post(url, headers=headers, json=content)
28
29
############### Optional ###############
30
31
# Brings errors to the forefront
32
response.raise_for_status()
33
34
# Writes the contents of the response in a file named "softcheckDemo.json"
35
with open("softcheckDemo.json", "w") as f:
36
f.write(response.text)
37
38
############# End Optional ##############
Copied!
In the previous example, we saved the results of the call to a new file named softcheckDemo.json.‌
With everything set properly and a good internet connection, you should receive a response status of 201 Created.
201 Created
[...] "id": "<number>", [...] "report_status": "ANALYZING", [...]

Errors

‌Errors are a relatively common occurrence when working with APIs. It's always good to know how to prevent them and what to do when they arise.‌
Here are some errors you may encounter when doing this exercise, and how to fix them.‌

400 Bad Request

‌You may receive a 400 Bad Request when:‌
  • Some required fields are missing in your request
"information": { "addresses": ["This field is required."] }

How to fix this issue

Add the missing fields to the body of your request and verify your syntax.

401 Unauthorized

‌You may receive a 401 Unauthorized if:‌
  • You sent your request without an authorization header
"detail": "Authentication credentials were not provided."
  • You sent your request with an authorization header, but without an API Key
  • You provided an incorrect API key in the header of your request
"detail": "Invalid token."

How to fix this issue

Add your API key in the authorization header, and include it in every call.‌

403 Forbidden

You may receive a 403 Forbidden if:
  • You sent your request to an endpoint you don't have access to
"detail": "You do not have permission to perform this action."

How to fix this issue

Use the URL that corresponds to your industry.

Other errors

See Error codes for a full list.
Last modified 3mo ago