Dropdown
POST /v1/form/update
Below is an example illustrating the consumable format of DropdownComponent. 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": "ed2726aa-727b-4607-9770-2e9bec0c918d",
"question": "What is the body type of your car?",
"kind": "DropdownComponent",
"settings": {
"source": [
"Coupe",
"Sedan",
"SUV"
]
}
},
"review": [
{
"id": "c3ce1796-5164-4f1a-a86b-11698dfaaeee",
"question": "Do you have a car?",
"answer": "Yes"
},
{
"id": "1264876b-3415-4d90-ac77-dbb2ca39553a",
"question": "How long is your vacation?",
"answer": "08/08/2024 => 08/09/2024"
},
{
"id": "f4cf4659-7b5b-46bc-94b2-8f60f144b0dc",
"question": "What is your date of birth?",
"answer": "08/08/2000"
}
],
"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
Select a value from Data source
Example
{
"eServiceId": "663835dfae67d8704b6752b7",
"refId": "SLH-4UN0RDF0990D",
"questionId": "ed2726aa-727b-4607-9770-2e9bec0c918d",
"values": {
"value":"Coupe"
}
}
{
"status": "NEXT",
"refId": "SLH-4UN0RDF0990D",
"question": {
"questionId": "29846b84-5acf-4820-bf9b-a3138c2348be",
"question": "What is your emil address",
"kind": "EmailComponent",
"settings": {}
},
"review": [
...,
{
"id": "ed2726aa-727b-4607-9770-2e9bec0c918d",
"question": "What is the body type of your car?",
"answer": "Coupe"
}
],
"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