> ## Documentation Index
> Fetch the complete documentation index at: https://docs.stackone.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Greenhouse Partner Integration API

> To activate the Greenhouse Partner integration in StackOne for assessments and background checks., please follow the necessary steps.

export const DifferenceBetweenListEndpointAndStaticIdOfPackage = ({providerName, dynamicPackageImageAtProviderUI, staticPackageImageAtProviderUI}) => {
  return <>
            <Accordion title="How is the Package's List Endpoint URL different from a Static Package ID?">
                <Info>
                    The Package's List Endpoint URL allows StackOne to fetch a list of available packages from your system, while the Static Package ID is fixed and available for users to select on the provider's side.
                </Info>

                <b>When you have a Package's List Endpoint URL</b>
                <br />
                A list of packages will be available to select in {providerName}.
                <Frame>
                    <img src={dynamicPackageImageAtProviderUI} alt="Dynamic Package ID" style={{
    maxHeight: '500px',
    width: 'auto'
  }} />
                </Frame>
                <br />

                <b>When you have a Static Package ID</b>
                <br />
                A static package ID will be available to select in {providerName}.
                <Frame>
                    <img src={staticPackageImageAtProviderUI} alt="Static Package ID" style={{
    maxHeight: '500px',
    width: 'auto'
  }} />
                </Frame>
            </Accordion>

            <Note>
                At least one field is necessary for making packages available in the Provider's UI. Preference will be given to the <b>Package's List Endpoint URL</b>, even if both fields are configured.
            </Note>
        </>;
};

export const DifferenceBetweenPublicAndPartnerAPI = ({showPublic = true, showPartner = true, showPublicPartner = true, title = "Difference between Public API & Partner API"}) => {
  return <>
            <Accordion title={title}>
                <ul className="custom-list-accordion">
                    {showPublic && <li><b>Public API:</b> Access to the StackOne Unified APIs, excluding the Assessments and Background Checks Unified API and its features.</li>}

                    {showPartner && <li><b>Partner API:</b> Access to the Assessments and Background Checks Unified API and its features, but not other StackOne Unified APIs. This allows you to integrate your provider's partner app with StackOne.</li>}

                    {showPublicPartner && <li><b>Public + Partner API:</b> Access to all StackOne Unified APIs, including the Assessments and Background Checks Unified API and its features.</li>}
                </ul>
            </Accordion>
        </>;
};

## Overview

StackOne enables integration with Greenhouse for Assessment and Background Check, allowing you to receive webhook notifications whenever a recruiter sends a test to a candidate, updates the test result, and views the result on the candidate’s profile in Greenhouse.
This guide covers how to set up and use the Greenhouse Integration Partner with StackOne.

## Partnership Requirements

<Warning>
  A partnership with Greenhouse Integration Partner is required to proceed with this documentation.
</Warning>

<Steps>
  <Step title="Apply to the Greenhouse Integration Partner Program">
    Visit the [Greenhouse Integration Partner application page](https://www.greenhouse.com/integration-partner#apply-now) and begin the partner application process.
  </Step>

  <Step title="Select Integration Types">
    On the application form, select <b>Assessment API</b>, <b>Webhook</b>, and <b>Harvest API</b> as your integration types.<br />
    When you select <b>Assessment API</b>, you will be prompted to provide specific API endpoint URLs (see the screenshot attached with the next step).
  </Step>

  <Step title="Provide StackOne Endpoint URLs in the form">
    **list\_tests**

    ```plaintext theme={null}
    https://api.stackone.com/external-trigger/greenhouse/list_tests?tenant-id=YOUR_GREENHOUSE_TENANT_ID
    ```

    **send\_test**

    ```plaintext theme={null}
    https://api.stackone.com/external-trigger/greenhouse/send_test?tenant-id=YOUR_GREENHOUSE_TENANT_ID
    ```

    **test\_status**

    ```plaintext theme={null}
    https://api.stackone.com/external-trigger/greenhouse/test_status?tenant-id=YOUR_GREENHOUSE_TENANT_ID
    ```

    **response\_error**

    ```plaintext theme={null}
    https://api.stackone.com/external-trigger/greenhouse/response_error?tenant-id=YOUR_GREENHOUSE_TENANT_ID
    ```

    <Note>
      **About the Tenant ID**: The `tenant-id` parameter in these URLs should be replaced with a unique identifier of your choice.
      This ID is **not provided by Greenhouse** and is **not generated by StackOne**. You can use any unique value (e.g., your company name such as `example-inc` or `acme-corp`).
      This parameter is used by Greenhouse to create uniquely routed endpoints and distinguish between different integrations. Choose a value that makes sense
      for your organisation and use it consistently across all endpoints.
    </Note>

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/assessment_partner_form.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=2b5d31046e894aa3dd5f0e48315dde99" alt="Greenhouse Assessment API Endpoint Form" style={{ maxHeight: '500px', width: 'auto' }} width="934" height="1360" data-path="images/greenhouse/assessment-or-background-check/assessment_partner_form.png" />
    </Frame>

    <Info>
      Greenhouse reviews applications on the first Monday of every month. A member of their Partnerships team will contact you with next steps.
    </Info>
  </Step>

  <Step title="Receive Partnership Credentials">
    Once approved, Greenhouse will provide you with:

    * Partner Username
    * Partner Password
    * Any additional credentials needed

    Use these credentials to complete the [StackOne Configuration](#stackone-configuration).

    <Info>
      To test your integration app through your Greenhouse Sandbox, please contact Greenhouse Support and provide the **External Trigger Token** to enable the integration.

      <Note>
        To obtain the **External Trigger Token**, please follow these steps:

        * [StackOne Configuration](#stackone-configuration)
        * [ATS User Enablement](#ats-user-enablement)
      </Note>
    </Info>
  </Step>
</Steps>

## Provider Side Setup

You need to submit a request for Greenhouse Integration Partner as mentioned in [Partnership Requirements](#partnership-requirements) to obtain the Greenhouse Integration Partnership,
and provide the **External Trigger Token** required to enable your integration if you want to test your integration app via the Greenhouse Sandbox.

<Note>
  To obtain the **External Trigger Token**, please follow these steps:

  * [StackOne Configuration](#stackone-configuration)
  * [ATS User Enablement](#ats-user-enablement)
</Note>

Once your integration is enabled by Greenhouse, it will be available to add as a stage under *Jobs > Interview Plans*.

## StackOne Configuration

<Steps>
  <Step title="Navigate to enable the Greenhouse at StackOne">
    Go to the ATS category on the *Integrations* page and enable Greenhouse.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/greenhouse-integration-setup.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=17e46d9cc5b4f65394c8da137965aac8" alt="Configuration" width="1235" height="485" data-path="images/greenhouse/assessment-or-background-check/greenhouse-integration-setup.png" />
    </Frame>
  </Step>

  <Step title="Enable and Configure Greenhouse in StackOne">
    Fill out the necessary fields in the **Greenhouse - Configuration** modal:

    * **Authentication Type** - Select `Public + Partner API` or `Partner API` to integrate with Greenhouse (for Assessment/Background Check integration).
          <DifferenceBetweenPublicAndPartnerAPI />
          <Note>
            * If you select `Public + Partner API`, the hiring team's data will be included in the webhook notification.<br />
            * If you select `Partner API`, the hiring team's data will not be included in the webhook notification.
          </Note>

    * **Partner Category** - Select the appropriate category based on your integration's classification as a partner for Greenhouse. e.g.: `Assessments` or `Background Checks`

    * **Package's List Endpoint URL** - Implement and provide an endpoint to StackOne that StackOne will use to retrieve the list of packages when the recruiter wants to send a test to a candidate.

      Implement the following POST endpoint:

      ```bash theme={null}
      curl --location 'https://your-domain.com/<route-to-the-post-endpoint>' \
      --header 'Content-Type: application/json' \
      --header 'x-stackone-signature: string' \
      --header 'Authorization: Basic <base64encoded-api-key>' \
      --data '{
          "account_id": "456551489512493411",
          "provider": "greenhouse"
      }'
      ```

      The expected response of the POST endpoint (list of packages). Refer to:

      * [List Assessments Packages](https://docs.stackone.com/ats/api-reference/assessments/packages/list-assessments-packages)
      * [List Background Check Packages](https://docs.stackone.com/ats/api-reference/background-checks/packages/list-background-check-packages)

      Enter the endpoint into the designated field:

      ```plaintext theme={null}
      https://your-domain.com/<route-to-the-post-endpoint>
      ```

    * **Partner's Username** - You will receive the `username` from Greenhouse support as mentioned in the previous step.

    * **Partner's Password** - The `password` will also be provided by Greenhouse support as mentioned in the previous step.

    * **Package ID** - If you do not have the Package's List Endpoint URL, you can specify a particular package ID that will be visible to the recruiter when they wish to send the test to the candidate.

    <DifferenceBetweenListEndpointAndStaticIdOfPackage providerName="Greenhouse" dynamicPackageImageAtProviderUI="/images/greenhouse/assessment-or-background-check/greenhouse_dynamic_package.png" staticPackageImageAtProviderUI="/images/greenhouse/assessment-or-background-check/greenhouse_static_package.png" />

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/greenhouse-configuration-form.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=85d74e0ed9cab62e1a2abf8dfdcbfd16" alt="Greenhouse Configuration Form" width="536" height="977" data-path="images/greenhouse/assessment-or-background-check/greenhouse-configuration-form.png" />
    </Frame>

    Click on the `Confirm` or `Save Changes` button to enable Greenhouse, which allows end-users to link their accounts via the StackOne Connector Hub.
  </Step>

  <Step title="Add a Webhook">
    Navigate to the *Webhooks* page, click on `Add webhook` and fill out the form:

    * **Name:** Enter your webhook with a recognisable name.
    * **URL:** Enter the URL where the webhook will send the notification of the enabled events.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/greenhouse_add_webhook_form.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=d82d3aa7584f6a1b1f209f4dced88a86" alt="Add Webhook form" width="532" height="394" data-path="images/greenhouse/assessment-or-background-check/greenhouse_add_webhook_form.png" />
    </Frame>

    Enable webhook events from the `Events` tab for Assessment & Background Check, such as `Assessments Order` & `Background Check Order`.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/greenhouse_add_webhook.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=da8b307b2254ccb205734e85eaf47cd4" alt="Select webhook events" width="1868" height="902" data-path="images/greenhouse/assessment-or-background-check/greenhouse_add_webhook.png" />
    </Frame>

    Click the `Confirm` and `Save` buttons to add the webhook.
  </Step>
</Steps>

## ATS User Enablement

Navigate to the *Accounts* page or the StackOne Connector Hub to link your Greenhouse account with StackOne.

<Frame>
  <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/greenhouse-link-account-page.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=c7a30e29f74a73550384cc84fc0a328b" alt="Link Greenhouse Account" width="1237" height="278" data-path="images/greenhouse/assessment-or-background-check/greenhouse-link-account-page.png" />
</Frame>

Once your Greenhouse Integration app is published in the [Greenhouse Marketplace/Partner Directory](https://integrations.greenhouse.com), the user will need to provide an **External Trigger Token** to Greenhouse Support. This token serves as an API key to enable the integration, which can be obtained from the StackOne Connector Hub during the connection process.

<Info>
  **For Partners:** To test your integration app using the Greenhouse Sandbox, you need to provide an **External Trigger Token** to Greenhouse support as an API key in order to connect your integration app.

  **For Users:** Each user must provide an **External Trigger Token** to Greenhouse support in order to connect with your integration app.
</Info>

<Frame>
  <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/greenhouse-custom-view-external-trigger.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=351247613000bad56ee448f775ba36ba" alt="Greenhouse User view of External-trigger" width="488" height="335" data-path="images/greenhouse/assessment-or-background-check/greenhouse-custom-view-external-trigger.png" />
</Frame>

When Greenhouse completes the configuration process, the user will see your integration as a stage in Jobs > Interview Plan and can use it to send assessments or background checks to the candidate.

<Frame>
  <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/customer-view-integration-stage.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=28b882a3c96a8706f0b4c5882b30a969" alt="User view of integration stage" width="1166" height="642" data-path="images/greenhouse/assessment-or-background-check/customer-view-integration-stage.png" />
</Frame>

## ATS User Experience

### Send the test to the candidate from Greenhouse

<Frame caption="Test your integration with StackOne using your Greenhouse Sandbox">
  <video controls className="w-full aspect-video" src="https://cdn.stackone.com/public/greenhouse_assess_bg_check_workflow_update_result_flow.mov" />
</Frame>

<Note>
  Follow the [Greenhouse Assessment or Background Check](https://hub.stackone.com/integration-configuration-concepts/ats/greenhouse-assessment-background-check) guide regarding how to send the test from Greenhouse.
</Note>

### User will see after test has been sent

When a user sends an assessment or background check to a candidate, they will see an 'Awaiting candidate’s submission' message in the candidate application.

<Frame>
  <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/send-webhook-success.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=da3f54c56d0dd6ce5b7b4887fa981a93" alt="Send Webhook Success" width="748" height="161" data-path="images/greenhouse/assessment-or-background-check/send-webhook-success.png" />
</Frame>

## ATS User Experience Customisation

<Steps>
  <Step title="To Update the result via unified api">
    Utilise the following endpoints to update the results:

    * [Assessment Update Result](https://docs.stackone.com/ats/api-reference/assessments/results/update-assessments-result)
    * [Background Check Update Result](https://docs.stackone.com/ats/api-reference/background-checks/results/update-background-check-result)

    Utilise the following endpoint to get metadata to update the result of the assessment or background check:

    * [Connector Meta Information](https://docs.stackone.com/platform/api-reference/connectors/get-connector-meta-information) with the provider key `greenhouse` for model `assessments/results.update` or `background_checks/results.update`

    <div className="fields-table">
      | Fields (when provided) | User sees in Greenhouse                                                                                             |
      | ---------------------- | ------------------------------------------------------------------------------------------------------------------- |
      | Result URL             | Shows a **View Report** link in the Grading Instructions tab (under `Go to Interview Kit`) and a `Go to Test` link. |
      | Score value            | Displays the **Score** in the Grading Instructions tab (under `Go to Interview Kit`).                               |
      | Start Date             | Displays the **Started At** value in the Grading Instructions tab (under `Go to Interview Kit`).                    |
      | Submission Date        | Displays the **Completed At** value in the Grading Instructions tab (under `Go to Interview Kit`).                  |
      | Summary                | Displays the **Notes** value in the Grading Instructions tab (under `Go to Interview Kit`).                         |
    </div>
  </Step>

  <Step title="How will the results of the assessment/background check be displayed to the user in Greenhouse?">
    When a user opens a candidate's application, they will see the updated score along with its application stage.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/result_summary.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=9de94f3ca340942977ccabb16e019dde" alt="Updated Result" width="1025" height="212" data-path="images/greenhouse/assessment-or-background-check/result_summary.png" />
    </Frame>

    Click the `Go to Interview Kit` link to access more detailed test results.

    <Frame>
      <img src="https://mintcdn.com/stackone-60/9iRjvhHLDQa8VyMv/images/greenhouse/assessment-or-background-check/result_in_detail.png?fit=max&auto=format&n=9iRjvhHLDQa8VyMv&q=85&s=533b4a2d4f11f3916debfb18b3990548" alt="Detailed Result" width="1143" height="402" data-path="images/greenhouse/assessment-or-background-check/result_in_detail.png" />
    </Frame>

    <Note>
      By default, the test result status will be sent as `complete`. Multiple updates are not allowed for a test.
    </Note>
  </Step>
</Steps>

## Testing Checklist

✅  **Provider Setup:**

* Once the integration is published by Greenhouse, it is visible in the [Greenhouse Marketplace/Partner Directory](https://integrations.greenhouse.com) under Assessments or Background Checks categories.

✅  **StackOne Configuration:**

* Selected `Public + Partner API` or `Partner API`
* Package's List Endpoint URL is correct.
* Valid Partner's Username and Password
* Package's List Endpoint response is expected according to the following endpoint's response:
  * [List Assessments Packages](https://docs.stackone.com/ats/api-reference/assessments/packages/list-assessments-packages)
  * [List Background Check Packages](https://docs.stackone.com/ats/api-reference/background-checks/packages/list-background-check-packages)

✅  **ATS User Enablement:**

* Shared the `External Trigger Token` to the Greenhouse support, and they have enabled the partner integration app for your Greenhouse account.
* Once the app is enabled by Greenhouse for the user, the integration is visible to add as a stage in Jobs > Interview Plan under the specific Job.

✅  **Create a Webhook**

* Added a webhook for Greenhouse and enable it with the events such as: `Assessment Order` or `Background Check Order`
* Valid webhook URL to receive assessment/background check notifications.

✅  **ATS User Experience:**

* Navigate to specific *Job > Interview Plan > Add Stage > Select enabled Integration* app as a stage that will be visible under the candidate application.
* If you've configured Package's List Endpoint URL, a list of packages is visible in the dropdown field when you click the `Send test to candidate` link.
* If you've configured Static Package ID, a single package is visible in the dropdown field when you click the `Send test to candidate` link.
* Select a package, click `Send Test`, and send the webhook. A message **Submitted tests** will appear if the notification has been sent.

✅  **Update Result**

* Success response from the update result endpoint.
* Updated result details to Greenhouse’s UI.

## Troubleshooting

<div className="troubleshooting-table">
  | Symptom                                                                                                                 | Likely cause                                                                                                                                                                                                                             | Fix                                                                                                                                                                                                                                                                                                                      |
  | ----------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
  | Unable to find your Integration app in [Greenhouse Marketplace/Partner Directory](https://integrations.greenhouse.com). | Greenhouse Partner Integration is not published/approved.                                                                                                                                                                                | Contact Greenhouse support for partnership status.                                                                                                                                                                                                                                                                       |
  | Integration partner app not visible under *Jobs > Interview Plan* to add.                                               | **•** Integration app is not active. <br /><br /> **•** Invalid External Trigger Token.                                                                                                                                                  | Contact Greenhouse support for partnership status & provide External Trigger Token.                                                                                                                                                                                                                                      |
  | Unable to open prompt to select package & Getting `Sorry, we encountered an error. Please try again.` message.          | **•** Package's List Endpoint URL or Static Package ID is missing from StackOne Configuration. <br /><br /> **•** Invalid response getting from the Package's List Endpoint URL. <br /><br /> **•** Invalid Package's List Endpoint URL. | **•** Add Static Package ID if you don't have Package's List Endpoint URL. <br /><br /> **•** Response format should be expected as mentioned in the [StackOne Configuration](#stackone-configuration). <br /><br /> **•** Check Package's List Endpoint URL implementation at your end. <br /><br /> **•** Verify CORS. |
  | Test notification is not received.                                                                                      | **•** Invalid webhook URL. <br /><br /> **•** Incorrect webhook events are enabled.                                                                                                                                                      | **•** Verify webhook URL. <br /><br /> **•** Enable expected events as mentioned in the [StackOne Configuration](#stackone-configuration).                                                                                                                                                                               |
  | The job's hiring team data is not be included in test notification.                                                     | `Partner API` authentication type selected instead of `Public + Partner API`.                                                                                                                                                            | Select authentication type `Public + Partner API` instead.                                                                                                                                                                                                                                                               |
  | Unable to update result.                                                                                                | Invalid payload format.                                                                                                                                                                                                                  | Check Connector Meta API endpoint for payload format.                                                                                                                                                                                                                                                                    |
  | Unable to update result details again.                                                                                  | Attempting multiple result updates for the same test which has already been updated.                                                                                                                                                     | Update only final results in Greenhouse for the tests. <br /> <Note>By default, the test result status will be sent as `complete`. Multiple updates are not allowed for a test.</Note>                                                                                                                                   |
</div>

For persistent issues, contact StackOne support with detailed error logs and configuration information.
