0. Here's the [OpenAPI Spec for Fountain Partner API](https://partners.fountain.com/openapi/63d9a6eabe5db70065291b9a).

- [Postman supports creating Postman Collections from OpenAPI Specs](https://blog.postman.com/postman-supports-openapi-3-0/)

1. Import OpenAPI Spec into Postman and then Export Postman Collection

- [Postman: Importing an API](https://learning.postman.com/docs/designing-and-developing-your-api/importing-an-api/)
- [Exporting data from Postman](https://learning.postman.com/docs/getting-started/importing-and-exporting/exporting-data/)

2. To get your Sandbox running update the following values provided in the setup package:

| Field | API Param or Header | Description |
| --- | --- | --- |
| **API Key** | `partner_api_key` | Provided in the `X-ACCESS-TOKEN`header to authenticate API requests. |
| **External ID** | `partner_id` | Unique identifier for your Partner account. |
| **Sandbox Host** | `base_url` | Endpoint URL for Partner API requests. Update made to Sandbox will use `https://partners-sandbox.fountain.com`. |

3. Next conduct a GET request using the Account External ID and API Key provided in your Setup Package

- This will retrieve your Partner Account Settings
- Here's the API reference for [GET Show Partner](https://partners.fountain.com/reference/get_v1-partners-id)

GET Show Partner

```curl
curl --request GET \
     --url https://partners-sandbox.fountain.com/v1/partners/abcabc77-1111-2222-3333-687790b60123 \
     --header 'Accept: application/json' \
     --header 'X-ACCESS-TOKEN: abcddadd-abcd-1234-5678-1265f613b2e4'
```

- You should receive a JSON object showing your current Account Settings similar to this:

GET Show Partner Response

```json
{
  "data": {
    "id": "abcabc77-1111-2222-3333-687790b60123",
    "type": "partner",
    "attributes": {
      "applicant_redirect_url": null,
      "applicant_webhook": null,
      "install_webhook": null,
      "name": "Example Test Partner",
      "settings_auth_header": "X-FOUNTAIN-ACCOUNT-KEY",
      "settings_auth_method": "auth_header",
      "settings_password": null,
      "settings_username": null,
      "settings_webhook": null,
      "uninstall_webhook": null,
      "api_key": "abcddadd-abcd-1234-5678-1265f613b2e4",
      "label_keys": []
    }
  }
}
```

4. Now let's update those Account Settings.

- Let's assume you are trying to update the URL for your `applicant_webhook`:

**The URL defined in `applicant_webhook` is the most important Partner Account Setting because this is the endpoint Fountain will send all the Applicant Data to.**

- Please configure `applicant_webhook` before proceeding with the rest of your integration.

- API reference for [PUT Update Partner](https://partners.fountain.com/reference/put_v1-partners-id).

PUT Update Partner

```curl
curl --request PUT \
     --url https://partners-sandbox.fountain.com/v1/partners/abcabc77-1111-2222-3333-687790b60123 \
     --header 'Accept: application/json' \
     --header 'Content-Type: application/json' \
     --header 'X-ACCESS-TOKEN: abcddadd-abcd-1234-5678-1265f613b2e4' \
     --data '
{
     "partner": {
          "applicant_webhook": "https://webhook.site/applicant"
     }
}'
```

- You should have received a JSON object showing your updated Account Settings.
- Remove any Settings you are not going to configure from the body.
  - You can use the environment variable or replace the variables within the brackets with the Settings you want to update.

PUT Update Partner Response

```json
{
  "data": {
    "id": "abcabc77-1111-2222-3333-687790b60123",
    "type": "partner",
    "attributes": {
      "applicant_redirect_url": null,
      "applicant_webhook": "https://webhook.site/applicant",
      "install_webhook": null,
      "name": "Example Test Partner",
      "settings_auth_header": "X-FOUNTAIN-ACCOUNT-KEY",
      "settings_auth_method": "auth_header",
      "settings_password": null,
      "settings_username": null,
      "settings_webhook": null,
      "uninstall_webhook": null,
      "api_key": "abcddadd-abcd-1234-5678-1265f613b2e4",
      "label_keys": []
    }
  }
}
```

5. Additional Settings Considerations:

- `logo_url`
  - This will set your Company logo so that it appears in the /integrations/screening page
  - Format: .png
  - Min Resolution: 64 px x 64 px
- `install_webhook`
  - This triggers when your Partner Integration is saved in a Fountain Customer Account
  - Useful to:
    - Keep a Count of active Customer Accounts
    - Programmatically handle set up of a newly Connect-ed Customer Account
- `settings_webhook`
  - If you plan on having multiple Stage Option Types this will be an important part of your Setup
    - Review [Checking Partner Stage Options](https://partners.fountain.com/docs/partner-stage-setup) for more info
  - Loads your different service packages aka Partner Stage Options
- `uninstall_webhook`
  - This triggers when a Customer Account is Disconnect-ed from your Partner Integration
  - Useful if you need to clean up after any of the install actions

6. For more info on Partner Settings check out [Configuration](https://partners.fountain.com/docs/configuration).
