# Read the settings available to your account

`GET https://{host}/webhooks/account-integration/config`

Optional. Returns the questionnaires, templates and other settings as form fields, for building a settings screen on your side.

## Authentication

`Authorization: Bearer <token>`

The token Refapp issued for your account. It identifies the account, so nothing else is needed.

## Query parameters

| Name | Type | Required | Description |
|---|---|---|---|
| `job_id` | string | no | Your id for the requisition the settings are for, the same value as `candidate.job.id` when submitting. |
| `lang` | string | no | Language for the field labels, as an ISO 639-1 code such as `sv` or `en`. |
| `recruiter` | string | no | Email of the recruiter setting things up, so the options can be limited to what that person may see. |
| `webhook_data` | string | no | JSON-serialised current field values; send it when re-fetching after a field marked `refetch` changed. |

## Responses

### 200 (application/json)

The form fields to render.

- `config`, object, required
  - `fields`, array of object, required: The form fields to render. Treat them as dynamic content: fields can be added or removed at any time. Refapp avoids breaking changes, so a new field is more likely than a removed field or a changed value type.
    - `id`, string, required
    - `type`, string, required: One of `"select"`, `"checkbox"`, `"text"`, `"header"`, `"subheader"`, `"paragraph"`
    - `label`, string, required
    - `value`, string | boolean | number
    - `placeholder`, string
    - `options`, array of object
      - `id`, string, required
      - `label`, string, required
    - `disabled`, boolean
    - `required`, boolean
    - `refetch`, boolean: When true, fetch the config again with the current values in `webhook_data` whenever this field changes.
    - `label-markdown`, string
    - `label-html`, string
    - `label-class`, string: One of `"info"`, `"warning"`, `"error"`, `"success"`, `"default"`
  - `moving_criteria`, array of object: The criteria that status updates for this account can carry in `criteria`, with a name and labels in the requested language to show a recruiter building routing rules. This list is the source of truth for the criteria and outcomes of the account: build routing rules from it, not from the criteria and values in this reference. Treat the list as dynamic content, like `fields`: criteria and outcomes can be added or removed at any time, and the list follows the account's settings. Refapp avoids breaking changes, so a new criterion or outcome is more likely than a removed one or a changed value type. The list is left out when the account has no criteria.
    - `Alternative 1`, object: Where the background check stands. `anomalies_*` once it found anomalies: pending until a reviewer approves or rejects them. `declined` when the candidate declined.
      - `id`, string, required: Always `"background_check_outcome"`
      - `name`, string, required
      - `kind`, string, required: Always `"outcome"`
      - `outcomes`, array of object, required: `minItems: 1`
        - `id`, string, required: One of `"in_progress"`, `"clear"`, `"anomalies_pending_review"`, `"anomalies_approved"`, `"anomalies_rejected"`, `"declined"`
        - `label`, string, required
        - `hint`, string
    - `Alternative 2`, object: `warning` while a fraud warning is active on the candidate.
      - `id`, string, required: Always `"reference_check_fraud"`
      - `name`, string, required
      - `kind`, string, required: Always `"outcome"`
      - `outcomes`, array of object, required: `minItems: 1`
        - `id`, string, required: One of `"positive"`, `"warning"`
        - `label`, string, required
        - `hint`, string
    - `Alternative 3`, object: `overdue` once the deadline for adding referees has passed and the candidate has not added all requested referees.
      - `id`, string, required: Always `"reference_check_referees_overdue"`
      - `name`, string, required
      - `kind`, string, required: Always `"outcome"`
      - `outcomes`, array of object, required: `minItems: 1`
        - `id`, string, required: One of `"overdue"`, `"not_overdue"`
        - `label`, string, required
        - `hint`, string
    - `Alternative 4`, object: `warning` when a behavioural trait fell outside the target range, `insufficient` when too few referees answered to compare against the benchmark.
      - `id`, string, required: Always `"reference_check_behaviours"`
      - `name`, string, required
      - `kind`, string, required: Always `"outcome"`
      - `outcomes`, array of object, required: `minItems: 1`
        - `id`, string, required: One of `"positive"`, `"warning"`, `"insufficient"`
        - `label`, string, required
        - `hint`, string
    - `Alternative 5`, object: `warning` when a referee reported a counterproductive work behaviour.
      - `id`, string, required: Always `"reference_check_cwb"`
      - `name`, string, required
      - `kind`, string, required: Always `"outcome"`
      - `outcomes`, array of object, required: `minItems: 1`
        - `id`, string, required: One of `"positive"`, `"warning"`
        - `label`, string, required
        - `hint`, string
    - `Alternative 6`, object: How strongly the referees recommend the candidate, in percent.
      - `id`, string, required: Always `"reference_check_recommendation"`
      - `name`, string, required
      - `kind`, string, required: Always `"score"`
      - `range`, object, required
        - `min`, number, required: Always `0`
        - `max`, number, required: Always `100`
    - `Alternative 7`, object: A criterion this document does not list yet. Ignore it unless you know its id.
      - `Alternative 1`, object
        - `id`, string, required
        - `name`, string, required
        - `kind`, string, required: Always `"outcome"`
        - `outcomes`, array of object, required: `minItems: 1`
          - `id`, string, required
          - `label`, string, required
          - `hint`, string
      - `Alternative 2`, object
        - `id`, string, required
        - `name`, string, required
        - `kind`, string, required: Always `"score"`
        - `range`, object
          - `min`, number, required
          - `max`, number, required

### 401 (text/plain)

The token is missing, unknown, revoked, or the integration is not enabled for the account. All four look the same.
