arrow-left

All pages
gitbookPowered by GitBook
1 of 5

Loading...

Loading...

Loading...

Loading...

Loading...

Request a demo account

How to sign up for a demo account.

hashtag
Contact the Certn Partnerships Team

To request a demo account, email Certn's Partnership Team at [email protected]envelope. They will arrange a call to learn about your organization's specific requirements and to help you set up your demo account.

Once created, you will be invited into your demo account via email, and prompted to create a password.

hashtag
Set up your account for API tests

Set up your account on our dashboard to start testing our API.

  1. Go to

  2. Enter your email and password

  3. Click Log in

circle-check

You can manage your account settings and billing info from here.

hashtag
Add a payment card

Adding a payment card to your account allows you to test a greater variety of features. Since this is a demo environment, you can use the card information provided below.

From your team's Settings page:

  1. Click Billing

  2. Click Connect Payment Card

  3. Fill in the following card number: 4242 4242 4242 4242

hashtag
Create an API key

  1. Navigate back to the dashboard by clicking the Certn logo in the top left

  2. Click on the Partner tab

  3. Click Refresh Keys

You can now start testing the API with your demo account.

circle-info

When testing on our demo environment, you'll receive prefilled server responses to calls made with mock data.

hashtag
Get production access

When you’re ready to use the API in production, send us an email at .

Understand your general resources

You'll need to know how to before you can follow the instructions in this section.

hashtag
Organizational structure

When you're set up within Certn, you belong to an organization. This organization has a few levels of hierarchy:

Click the profile icon
  • Click Settings

  • Locate the team you want to use for testing

  • Click Settings for this team

  • Add an expiry date in the future

  • Fill in the following CVC: 424

  • Click Authorize Card

  • Click OK to accept that a new key will be created, inactivating the previously generated key
  • Click Copy

  • A new Client ID and Secret Key will appear in a modal for copy/pasting

    1. Once this modal is closed, the Secret Key will not be accessible anymore

  • https://demo-app.certn.co/loginarrow-up-right
    Create your first applicationchevron-right
    [email protected]envelope
    Access your Partner tools
    Create or refresh your API Key
    Confirm you are ready to refresh your API key
    Copy and save your Client ID and Secret Key
    Superteams
    • Teams

      • Users

    Superteams can have multiple Teams and Teams can have multiple Users. When you're added to Certn, you're linked to a Team, which is linked to a Superteam.

    hashtag
    Authorization header

    You'll need an Authorization headerarrow-up-right with a valid Bearer token. This token is your access token you retrieved according to Get your access token.

    • Replace access_token with your API access token:

    hashtag
    Retrieve your Users

    In the beginning, you'll be the only User in your organizational account. Let's retrieve your users by making a GET request to our /users/ endpoint.

    import requests
    
    # Use your access token in the header.
    headers = {
    

    In this example, we saved the results of the call to a new file named user_list.json.‌

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

    circle-check

    200 OK

    {

    [...]

    "results": [

    { "id": "string<uuid>", [...]

    },

    ]

    }

    In the user_list.json file, you should see one user listed in the results: it's you! Look for the id field for your User, and copy that value. We use universally unique identifiers (UUIDs)arrow-up-right for ids, so it'll be formatted like this:123e4567-e89b-12d3-a456-426614174000.You'll need this to Create your first application.

    For more details on the structure of the User list response, see .

    hashtag
    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.‌

    See Error Codes for details on types of errors and how to resolve them.

    Get your access token
    Error codeschevron-right

    Get your access token

    To follow this guide, you need a demo account. Make sure it's fully set up according to our instructions on how to request a demo account.

    hashtag
    Send a 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 Pythonarrow-up-right, but most of the content you'll work with will be in JSONarrow-up-right.‌

    hashtag
    Get your API access token

    ‌To gain access to our API, you will need your Client ID and Client Secret. Instructions for getting these values can be found in . You should take special precautions to keep your client secret a secret. In the example below (using our demo environment https://demo-api.certn.co), we show you how you can use secrets stored in a .env file.

    First, make a request to get your access token. This token will be required to make all other API requests. For this step, make a GET request to our /token/ endpoint. If you're new to HTTP requests, visit for useful guides.

    With everything set properly and a good internet connection, you should receive a response.status_code of 200 OK. The response.data object should look something like:

    circle-check

    200 OK

    {

    "access_token": "string",

    You'll need this access_token as a bearer token in headers for all requests to our API. Let's see how to use this to .

    hashtag
    Errors

    Please see and for more details on types of errors, and how to resolve them.

    { "Authorization": "Bearer {access_token}" }
    "expires_in": 36000,

    ...

    }

    Use the API
    W3Schoolsarrow-up-right
    Understand your general resources
    Get and use an Authorization Token
    Error codes
    import requests
    from dotenv import dotenv_values
    
    
    # An example of how to manage your Client ID and Client Secret, using a .env file
    secrets = dotenv_values(".env")
    
    client_id = secrets["CLIENT_ID"]
    client_secret = secrets["CLIENT_SECRET"]
    
    # add the 
    headers = {
        "Content-Type": "application/x-www-form-urlencoded"
    }
    body = {"grant_type": "client_credentials"}
    
    # url to retrieve your access token
    url = "https://demo-api.certn.co/token/"
    
    # Send the HTTP request to the API via POST, 
    # including your Client ID and Client Secret for authentication
    response = requests.post(
        url, 
        headers=headers, 
        auth=(client_id, client_secret), 
        data=body
    )
    
    # retrieve the access token
    access_token = response.data.get("access_token")
    "
    Authorization
    "
    :
    f
    "Bearer
    {
    access_token
    }
    "
    }
    # URL to retrieve a list of your users
    url = "https://demo-api.certn.co/api/v1/users/"
    # Send the HTTP request to the API via GET
    response = requests.get(url, headers=headers)
    ############### Optional ###############
    # Brings errors to the forefront
    response.raise_for_status()
    # Writes the contents of the response in a file named "user_list.json"
    with open("user_list.json", "w") as f:
    f.write(response.text)
    ############# End Optional #############

    Retrieve the results

    You'll need to know how to create an application before you can follow the instructions in this section.

    hashtag
    Request

    The results you got from the Softcheck quickscreen creation call indicate that we received your request and are actively working on it. You can see this by checking the report_status field, which will likely be ANALYZING. These results will not be updated in real-time. To retrieve the updated versions, you can set up a webhook, or send requests to one of our endpoints.

    hashtag
    Choose your endpoint

    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. Then, you can view your final report.

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

    circle-info

    Once your report is ready, you can download it as a PDF or HTML file via our /reports endpoint.

    hashtag
    Get your application ID

    To tell the API which application to retrieve, 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 , so it'll be formatted like this:123e4567-e89b-12d3-a456-426614174000

    hashtag
    Set up your URL

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

    1. Choose the URL that corresponds to your industry

    2. In the URL, replace {application_id} with your application's ID

    hashtag
    Send the request

    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:

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

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

    circle-check

    200 OK

    [...] "id": "<number>" [...] "report_status": "COMPLETE" [...]

    hashtag
    Errors

    Please see for more details on types of errors, and how to resolve them.

    Create your first application

    You'll need to know to follow the instructions in this page.

    hashtag
    Get the URL

    ‌You can find the URLs for all our endpoints in the 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, which is under /applications. You'll also make it a quickscreen, 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.‌

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

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

    application_url = "https://demo-api.certn.co/api/v1/hr/applications/quick/"
    application_url = "https://demo-api.certn.co/api/v1/pm/applications/quick/"

    hashtag
    Format the request body

    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.

      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 , 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 for more information on this field.

    hashtag
    Send the request

    ‌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:

    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.

    circle-check

    201 Created

    [...] "id": "<number>", [...] "report_status": "ANALYZING", [...]

    The id in the response corresponds to the newly created applicant. Copy this id, as you'll need it next to Retrieve the results.

    hashtag
    Errors

    ‌Please see Error codes for more details on types of errors, and how to resolve them.

    your User id
    API Reference
    Error codeschevron-right
    universally unique identifiers (UUIDs)arrow-up-right
    Error codes
    Error codeschevron-right
    applicant_url = f"https://demo-api.certn.co/api/v1/hr/applicants/{application_id}/"
    applicant_url = f"https://demo-api.certn.co/api/v1/pm/applicants/{application_id}/"
    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 ##############
    {
        "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"
        }
    }
    import requests
    import json
    
    ############### Optional ###############
    
    # Gets the application ID from the previous request
    with open("softcheck_demo.json") as f:
      softcheck_response = json.load(f)
      
    application_id = softcheck_response.get('id')
    
    ############# End Optional ##############
    
    # Use your access token in the header.
    headers = { "Authorization": f"Bearer {access_token}" }
    
    # URL to retrieve the applicant details, determined by your industry
    url = applicant_url
    
    # Send 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 "results_softcheck_demo.json"
    with open("results_softcheck_demo.json", "w") as f:
        f.write(result.text)
      
    ############# End Optional ##############
    Retrieve your Users
    Retrieve a list of users
    Position or Property Location