NAV
shell

Introduction

Greenhouse integrates with many candidate testing platforms, including code testing, video interviewing, personality testing, and more. We’ve created the Assessment Partner API to allow our customers to seemlessly integrate our Partners’ assessments into their Greenhouse interview workflow. This document outlines the end-user experience with the integration and the technical details of how to implement it.

Working with Greenhouse to implement the integration

To begin the integration process, please send the following information to us at partners@greenhouse.io:

  1. URL for your list_tests API call
  2. URL for your send_test API call
  3. URL for your test_status API call
  4. A sample API key

We’ll add your integration to our Partners page, add your FAQ article to our help section, and provide you with a Sandbox account to test the integration.

Workflow

The Assessment Partner will provide an org-level API key to the customer. The organization will provide this API key to their Greenhouse Account Manager, who will input it into our system.

Selecting the Test

Once Greenhouse enters the API key for the organization, a new partner interview stage will be available for use. The user can add this stage to the Hiring Plan of any job that has access to the new Assessment Partner stage. Greenhouse will then make an API call to the List Tests endpoint to determine what tests the organization has configured.

Add Stage Image

Sending the Test

When a candidate reaches this Interview Stage, the user will click the “Send Test” button to send the test to the candidate via the Send Test endpoint. Greenhouse will send the Test ID and candidate email to the Assessment Partner, who will email the test to the candidate. The Assessment Partner will then send Greenhouse the ID for this unique test instance.

Add Stage Image

Receiving the Test Results

Greenhouse will periodically poll the Test Status endpoint to retreive the candidate’s test status and results. When the candidate completes the test, Greenhouse will notify the appropriate user that the test is complete. The user will be able to view the candidate’s score, navigate to the partner site to see more details, and make an advance or reject decision within Greenhouse. The user will also be able to filter candidates by score and advance or reject candidates in bulk.

Authentication

Every request Greenhouse sends to a Assessment Partner’s API will utilize HTTP Basic Authentication over HTTPS. As such, we require each of the API endpoints to use HTTPS.

When an organization decides to utilize a Assessment Partner’s integration, they will provide their Greenhouse Account Manager with their API key for that Assessment Partner.

Greenhouse will then make all requests for the organization using that API key as the username in Basic Authentication. Greenhouse will append a : (colon) to the API token and then Base64 encode the resulting string.

Upon receiving a request, the Assessment Partner should inspect the API key to determine whether the request should be permitted and which data should be returned.

Example Situation

List Tests

Greenhouse will first need to retreive the list of tests from the Assessment Partner using the list_tests API endpoint. We will show the list of available tests to the user, who will to select the appropriate test for a given candidate.

GET https://www.testing-partner.com/api/list_tests

curl 'https://www.testing-partner.com/api/list_tests'
-H "Authorization: Basic MGQwMzFkODIyN2VhZmE2MWRjMzc1YTZjMmUwNjdlMjQ6"

Request

Greenhouse will make a GET request to the list_tests endpoint specified by the Assessment Partner.

Response

API Response

[
    {
        "partner_test_id": "12345",
        "partner_test_name": "My First Test" 
    },
    {
        "partner_test_id": "54321",
        "partner_test_name": "My Second Test"
    }
]

The Assessment Partner’s response should include a JSON payload containing a list of test objects for the organization. Each test object should contain the keys partner_test_id and partner_test_name.

Property NameTypeRequiredDescription
partner_test_idStringYesIdentifies a test available to an organization.
partner_test_nameStringYesA descriptive title for the test. We will use this value our UI as the test’s label.

Send Test

When a Greenhouse user sends a test to a candidate, Greenhouse will send a request to the Assessment Partner’s send_test API endpoint. The Assessment Partner will then email the specified candidate the specified test.

Request

curl -X POST 'https://www.testing-partner.com/api/send_test'
-H "Authorization: Basic MGQwMzFkODIyN2VhZmE2MWRjMzc1YTZjMmUwNjdlMjQ6"
{
    "partner_test_id": "12345",
    "candidate":
    {
        "first_name": "Harry",
        "last_name": "Potter",
        "resume_url": "https://hogwarts.com/resume",
        "phone_number": "123-456-7890",
        "email": "hpotter@hogwarts.edu",
        "greenhouse_profile_url": "https://app.greenhouse.io/people/17681532?application_id=26234709"
    }
}

Greenhouse will initiate the process by sending a POST request to the send_test endpoint specified by the Assessment Partner. The body of the POST request will contain a JSON payload.

Property NameTypeRequiredDescription
partner_test_idStringYesIdentifies a test available to an organization. Initially provided as a response to the List Tests request.
first_nameStringYesThe first name of the candidate.
last_nameStringYesThe last name of the candidate.
resume_urlStringNoA URL to the candidate’s resume. This URL will expire 30 days after the request.
phone_numberStringNoThe candidate’s phone number.
emailStringYesThe candidate’s email address. The test should be sent to this address.
greenhouse_profile_urlStringYesURL to the candidate’s Greenhouse application. Allows the partner to link back to Greenhouse.

Response

The API Response

{
    "partner_interview_id": "98765"
}

The response to the send_test request should contain a JSON payload in its body. This payload should be a single object that contains a single key: partner_interview_id.

Property NameTypeRequiredDescription
partner_interview_idStringYesIdentifies a candidate’s test.

Test Status

After a successful send_test request, Greenhouse will check whether test instance has been completed by periodically polling the test_status API endpoint.

GET https://www.testing-partner.com/api/test_status?partner_interview_id=12345

Request

curl 'https://www.testing-partner.com/api/test_status'
-H "Authorization: Basic MGQwMzFkODIyN2VhZmE2MWRjMzc1YTZjMmUwNjdlMjQ6"
{
    "partner_interview_id": "12345"
}

Greenhouse will send a GET request to the test_status endpoint provided by the Assessment Partner. The GET request will contain a single query string parameter: partner_interview_id.

Parameter NameTypeRequiredDescription
partner_interview_idStringYesIdentifies a test instance for a candidate. Initially provided as a response to the Send Test request.

Response

API Response

{
    "partner_status": "complete",
    "partner_profile_url": "http://example.com/tests/12345",
    "partner_score": 81,
    "metadata":
        {
            "Started At": "10:15 AM 26 March 2014",
            "Completed At": "10:15 AM 26 March 2014",
            "Notes": "This candidate did extremely well!"
        }

}

The response to a test_status request should contain a JSON object in its body with up to four keys: partner_status, partner_profile_url, partner_score, and metadata.

Property NameTypeRequiredDescription
partner_statusStringYesDescribes the current state of the test instance. If the test has been completed and results are available, this value should be “complete.” We will continue to poll until the status is “complete.”
partner_profile_urlStringRequired only if status is complete.URL to the candidate’s page on the Test Partner’s website.
partner_scoreNumberNoNumerical score reflecting the candidate’s performance on the test.
metadataObjectNoA non-nested object containing keys and values that will be displayed in our test results. All of the values must be Javascript primitives.

Response Error

When Greenhouse receives a malformed response for any of Assessment Partner’s API endpoints, we would like to report the errors to the Assessment Partner. As such, each Assessment Partner should provide an API endpoint to ingest this information.

POST https://www.testing-partner.com/api/request_errors

Request

curl -X POST 'https://www.testing-partner.com/api/request_errors'
-H "Authorization: Basic MGQwMzFkODIyN2VhZmE2MWRjMzc1YTZjMmUwNjdlMjQ6"
{
    "api_call": "test_status",
    "errors": ["partner_status is 'complete' but partner_profile url is missing"],
    "partner_test_id" : "12345",
    "partner_test_name": "Personality Test",
    "partner_interview_id": "299506",
    "candidate_email": "hpotter@hogwarts.edu"
}

After receiving a malformed response, Greenhouse will provide the Assessment Partner with the details of the failed response. Each time an invalid response arrives, Greenhouse will send a POST request to the response_error API endpoint.

The body of the request will contain as much information as Greenhouse has at the moment of failure.

For example, if a list_tests request fails, Greenhouse can only provide the api call (in this case, ‘list_tests’) and the assorted errors (missing keys, unexpected data types, etc.). However, if a test_status request fails, we can provide more information (partner_test_id, partner_interview_id, etc.) that may prove useful for debugging purposes. Assessment Partners can always expect to receive api_call and errors in the JSON body.

Property NameValueRequiredDescription
api_callStringYesThe name of the API call that generated the malformed response.
errorsArrayYesAn array of strings which describe an error that prevented the response from validating.
partner_test_idStringNoIdentifies a test available to an organization. Initially provided as a response to the List Tests request.
partner_test_nameStringNoA human-readable string that identifies the test. Initially provided as a response to the List Tests request.
partner_interview_idStringNoIdentifies a candidate’s test.
candidate_emailStringNoThe candidate’s email address. The test should be sent to this address.

Response

API Response

{
    "status": 200
}

The response to a successful response_errors request should contain a response code of 200.

Errors

Successful requests should generate a response with a 200-level status code. Unsuccessful requests should generate a response with one of the following responses:

Status CodeDescription
401Unsuccessful authentication with the provided API key.
404The requested resource could not be found.