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

# Start qualification

> Start the qualification process for a survey and get the first question, or an immediate result.

Call this endpoint when the user clicks a survey from the [surveys feed](https://docs-saas.primeearn.com/partner-saas/surveys/get-surveys.md). It returns one of three outcomes:

* **`accepted`**: the user must answer a question first. Show `questions.current` and send the answer to [Submit an answer](https://docs-saas.primeearn.com/partner-saas/qualification/submit-answer.md).
* **`qualified`**: send the user to `url`.
* **`disqualified`**: the user does not fit this survey. Show your "no match" screen, or follow `redirect_url` if it is present.

> [!NOTE]
>
> Replace `{your-domain}` with your own domain. For example, if your platform runs on `example.com`, the base URL is `https://partners.example.com`.

## Headers

**Authorization** `string` *required*

`Bearer {uh}`. `uh` is the user hash returned by [Get surveys](https://docs-saas.primeearn.com/partner-saas/surveys/get-surveys.md). You can also send `Bearer {external_user_id}:{app}`.

## Body

**survey** `string` *required*

Survey hash (UUID) from the surveys feed.

**token** `string`

Your app API token. Required when secure API mode is enabled for your app.

**policy\_optin** `boolean`

Send `true` once the user has accepted your privacy policy. When your app requires a policy opt-in and the user has not given it, the response is `disqualified` with `message: "Policy required"`.

**subid** `string`

Optional tracking value, stored with the survey click.

## Response

**status** `string` *required*

`accepted`, `qualified`, `disqualified` or `error`.

**questions** `object` *required*

**properties**

**current** `object | null`

The question to show next. `null` when `status` is not `accepted`.

**properties**

**id** `string`

Question hash (UUID). Send it as `question` in [Submit an answer](https://docs-saas.primeearn.com/partner-saas/qualification/submit-answer.md).

**question** `string`

Question text, in the user's language.

**type** `string`

One of `single_choice`, `multiple_choice`, `input_int`, `input_text`, `input_bigtext`, `input_date`. See [Question types](https://docs-saas.primeearn.com/partner-saas/qualification/question-types.md).

**is\_skippable** `boolean`

Whether the user may skip this question.

**autocomplete** `boolean`

When `true`, `answers` is empty: look up answers as the user types with [Search answers](https://docs-saas.primeearn.com/partner-saas/qualification/search-answers.md).

**answers** `object[]`

Answer options for choice questions. Empty for input questions and autocomplete questions.

**properties**

**id** `string`

Answer hash (UUID). Send it in `answer`.

**text** `string`

Answer text, in the user's language.

**available** `integer | null`

Approximate number of questions left for this survey. It can change during qualification.

**message** `string | null`

On `disqualified` and `error`, the reason (for example a reason code such as `"18"`, or `"Policy required"`). Otherwise `null`.

**advice** `boolean`

Internal flag. You can ignore it.

**url** `string`

Only on `qualified`. The survey entry link on the survey router (`https://{router-host}/out?...`). The router host depends on the survey. Send the user to this URL as is.

**redirect\_type** `string`

Present with `url` or `redirect_url`. How to open the link, as configured for your app (for example `new_tab`).

**redirect\_url** `string`

Only on `disqualified`, when your app has a disqualification redirect configured.

**pre\_qualification\_reward** `number`

Reward earned by the user for answering qualification questions, when pre-qualification rewards are enabled for your app. In your app's currency.

**is\_consent\_required** `boolean`

Present and `true` when the user must give consent before entering the survey. In this case `status` is `qualified` and there is no `url`.

**redirect\_survey\_hash** `string`

Present when the user is moved on to another survey. Continue qualification with this survey hash.

## Errors

| HTTP | When |
| - | - |
| `400` | App not found, app deleted, or `token` does not match (`{"status":"error","message":"Token mismatch"}`). |
| `401` | Missing or unknown bearer token (`{"message":"Unauthenticated."}`). |
| `404` | Unknown survey hash. |
| `422` | Validation error, for example `survey` missing. |
| `429` | Rate limit exceeded. |

```bash cURL theme={null}
curl --request POST \
  --url https://partners.{your-domain}/api/qualification \
  --header 'Authorization: Bearer 0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f' \
  --header 'Content-Type: application/json' \
  --data '{
    "survey": "a4df4600-df48-4286-990d-fa68db595f44"
  }'
```

```json Question (single choice) theme={null}
{
  "status": "accepted",
  "questions": {
    "current": {
      "id": "0d8263ff-07b9-4097-b228-517eb1a35b2d",
      "question": "Are you of Hispanic, Latino, or Spanish origin?",
      "type": "single_choice",
      "is_skippable": true,
      "autocomplete": false,
      "answers": [
        { "id": "c18689dc-6379-4c86-92f6-692f67c3c522", "text": "No, not of Hispanic, Latino, or Spanish origin" },
        { "id": "5b1c2f4e-8a0e-4c2f-9a33-2f0d6f1b7c11", "text": "Yes, Mexican, Mexican American, Chicano" },
        { "id": "9e7d3a10-1f2b-4c5d-8e6f-7a8b9c0d1e2f", "text": "Yes, Cuban" }
      ]
    },
    "available": 2
  },
  "message": null,
  "advice": false
}
```

```json Qualified theme={null}
{
  "status": "qualified",
  "questions": { "current": null, "available": null },
  "message": null,
  "advice": false,
  "url": "https://{router-host}/out?sh=a4df4600-df48-4286-990d-fa68db595f44&uh=0b6c1a3e-5d1f-4c1e-9d0a-2f3b4c5d6e7f&p=web",
  "redirect_type": "new_tab"
}
```

```json Disqualified theme={null}
{
  "status": "disqualified",
  "questions": { "current": null, "available": null },
  "message": "18",
  "advice": false
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.