API REFERENCE
...
For Open Data
Task
Get a Task Status
4min
Get a task status by taskId
GET
Request
Path Params
taskId
String
required
Unique identifier for the task
Header Parameters
Authorization
String
required
Bearer link token, it returned by the /links
Curl
1curl --location --globoff 'https://api-sandbox.klavi.ai/data/v1/tasks/{taskId}/status' \
2--header 'Accept: application/json' \
3--header 'Content-Type: application/json'
Responses
200
1{
2 "code":200,
3 "message":"ok",
4 "status": "success",
5 "mfaInfo": object,
6}
Name | Descritption |
---|---|
code | The status of task, only valid when the status is fail, other is 200, the error code and message, please refer to the document for details: Open Data Codes and Errors |
message | Only valid when the status is fail, other is ok |
status | Verify the status of MFA, the enumeration values are: success,fail , needMFA and pending If you want to customize error messages, please first check the status as fail before proceeding with customization based on the code number. |
mfaInfo | Only valid when the status is needMFA |
JSON
1{
2 "mfaId": 32,
3 "mfaType":"questions",
4 "questions":[
5 {
6 "id":"100",
7 "question":"test",
8 "options":[
9 {
10 "label":"xxx",
11 "value":"1"
12 }
13 ]
14 }
15 ]
16}
Example:
JSON
1{
2 "mfaId": 32,
3 "mfaType":"questions",
4 "questions":[
5 {
6 "id":"100",
7 "question":"Em qual desses municipios você reside ou já residiu?",
8 "options":[
9 {
10 "label":"BURITI DOS MONTES",
11 "value":"1"
12 },
13 {
14 "label":"SAO GONCALO DO GURGUEIA",
15 "value":"2"
16 },
17 {
18 "label":"Nenhuma das alternativas",
19 "value":"3"
20 },
21 {
22 "label":"SAO PEDRO DA CIPA",
23 "value":"4"
24 },
25 {
26 "label":"SAO PAULO",
27 "value":"5"
28 }
29 ]
30 }
31 ]
32}
Updated 29 Sep 2024
Did this page help you?