Skip to content

Questionnaire

Get Questionnaire Result

Description

Retrieve questionnaire result via the task_id of the questionnaire.

Request Config

ConfigDefinition
URL/qn/result/<task_id>
MethodGET

Params

NameTypeDescriptionRequired
task_idstringTask idYes

Response


Schema of data

NameTypeDescription
task_idstringTask id
task_namestringTask name
codestringQuestionnaire code
timeoutbooleanWhether the task timed out
namestringQuestionnaire name
questions[]objectQuestion list
+ codestringQuestion code
+ contentstringQuestion content
+ input_typeint32Question input type.1:String, 2:Number, 3:Decimal, 4:Single-choice, 5:Multiple-choice, 6:Bar code, 7:QR code, 8:Bar code + QR code
+ options[]objectAll options of the question, data is available only when the input type is 4 or 5
++ codestringOption code
++ namestringOption name
+ answer_valuestringAnswer content,data is available when the input type is 1, 2, 3, 6, 7 or 8,the answer content will returned in the form of a string.
+ answer_option_values[]objectMultiple-choice question answer, when the input type is 4 or 5, the answer will be returned in the form of an array.
++ codestringOption code
++ namestringOption name

Response Body Sample

json
{
  "code": 0,
  "message": "",
  "data": {
    "task_id": "b5fed073-d66a-451f-93c0-ea412d7543e8",
    "task_name": "KO Cooler",
    "code": "nielsenQN-101",
    "timeout": false,
    "name": "HS Coke Custom Modern Tank Slide Shelves",
    "questions": [{
      "code": "nielsenQ-119",
      "content": "Product facing",
      "input_type": 2,
      "options": [],
      "answer_value": "3",
      "answer_option_values": []
    },
      {
        "code": "nielsenQ-104",
        "content": "manufacturer name",
        "input_type": 4,
        "options": [{
          "code": "1015",
          "name": "Wei Chuan Company"
        }, {
          "code": "1013",
          "name": "Jing Tian Company"
        }, {
          "code": "1012",
          "name": "Watsons"
        }],
        "answer_value": "",
        "answer_option_values": [{
          "code": "1015",
          "name": "Wei Chuan Company"
        }]
      }
    ]
  }
}

Powered by Clobotics Retail Team.