Qualification Flow for Survey API

General Idea

We offer to take over the qualification process with the Survey API. Choose this path if you want to reduce qualifications after the click and take over the UI for the qualifications.

🚧

SURVEY API NEEDS TO BE INTEGRATED

This document is just an appendix to the Survey API documentation. Please integrate the Survey API before expand the qualification flow.

Start the Qualification flow

To receive the open questions for a specific survey, call a POST request (Create Click) on the click_url received from the Get Surveys Endpoint.

Example Response

{
  "data": {
    "id": "edf06866-e477-40a6-8287-ff987863e2e9"
  }
}

With this click id, you can call a GET request (Get Click) to get the next question you should render for the user to enter the survey.

Example Response

{
  "data": {
    "answer_question": {
      "question": {
        "id": "e9bdff4e7d",
        "language": "en",
        "type": "TEXT",
        "localized_text": "What is your favorite color?",
        "answers": [
          {
            "code": "1",
            "localized_text": "Red"
          }
        ],
        "can_skip": true,
        "is_duplicate": false,
        "example": null,
        "validation_info": {
          "min": 1,
          "max": 1,
          "regex": "^.{1,30}$"
        }
      }
    },
    "redirect": {
      "url": "https://web.bitlabs.ai"
    },
    "answered_questions": 0,
    "required_questions": 0
  }
}

After that, you can POST the answers with the Update Click endpoint and get back to the next question if there is one. If there is no open question left, you can send the user to the final redirect.