MultipleChoice
POST /v1/form/update
Below is an example illustrating the consumable format of MultipleChoiceComponent. The 'NEXT' status indicates that you haven't reached the end of the form yet. Each question is uniquely identified by an ID stored in 'questionId'.
{
"status": "NEXT",
"refId": "SLH-4UN0RDF0990D",
"question": {
"questionId": "b2556dcd-d0c0-430e-96fa-defc650356ac",
"question": "Select the car brands you have",
"kind": "MultipleChoiceComponent",
"settings": {
"source": [
{
"title": "Honda",
"value": false
},
{
"title": "Toyota",
"value": false
},
{
"title": "Mazda",
"value": false
},
{
"title": "BMW",
"value": false
},
{
"title": " Mercedes",
"value": false
},
{
"title": "Audi",
"value": false
}
]
}
},
"review": [
...,
{
"id": "0cf25539-7d62-4adf-9ffe-1754f090bda1",
"question": "Why do you want this job?",
"answer": "Because I am a genius."
}
],
"message": null,
"invoice": {
"title": "Question Engine All cards No logic",
"quantity": 1,
"currency": "XOF",
"totalCost": 1000.0
}
}Response to the question
Headers
Name
Value
Content-Type
application/json
CLIENT_ID
<client id>
Body
In addition to the API keys specified in the Headers, ensure to include the eServiceId, refId, questionId. Upon a successful request, you will receive the next question. You'll recognize reaching the end of the form when the status is 'COMPLETED'.
values class field(s)
Format
value
string array
Example
{
"eServiceId": "663835dfae67d8704b6752b7",
"refId": "SLH-4UN0RDF0990D",
"questionId": "b2556dcd-d0c0-430e-96fa-defc650356ac",
"values": {
"value": [
"Honda",
"BMW"
]
}
}
{
"status": "COMPLETED",
"refId": "SLH-4UN0RDF0990D",
"question": null,
"review": [
...,
{
"id": "0cf25539-7d62-4adf-9ffe-1754f090bda1",
"question": "Why do you want this job?",
"answer": "Because I am a genius."
},
{
"id": "b2556dcd-d0c0-430e-96fa-defc650356ac",
"question": "Select the car brands you have",
"answer": "Honda, BMW"
}
],
"message": null,
"invoice": {
"title": "Question Engine All cards No logic",
"quantity": 1,
"currency": "XOF",
"totalCost": 1000.0
}
}{
"error": {
"code": "invalid_request_error",
"message": "value field is missing"
}
}Last updated