YesNo
POST /v1/form/update
Below is an example illustrating the consumable format of YESNO. 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', with the source being a list of options available for selection.
{
"status": "NEXT",
"refId": "SLH-4UN0RDF0990D",
"question": {
"questionId": "c3ce1796-5164-4f1a-a86b-11698dfaaeee",
"question": "Do you have a car?",
"kind": "YesNoComponent",
"settings": {
"source": [
"Yes",
"No"
]
}
},
"review": [],
"message": null,
"invoice": {
"title": "Question Engine All cards No logic",
"quantity": 1,
"currency": "XOF",
"totalCost": 1000.0
}
}Response to the question
YESNO format anticipates a single selection from the provided source.
Headers
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'.
value
option from provided source (case sensitive)
Example Request
{
"eServiceId": "663835dfae67d8704b6752b7",
"refId": "SLH-4UN0RDF0990D",
"questionId": "c3ce1796-5164-4f1a-a86b-11698dfaaeee",
"values": {
"value":"Yes"
}
}{
"status": "NEXT",
"refId": "SLH-4UN0RDF0990D",
"question": {
"questionId": "1264876b-3415-4d90-ac77-dbb2ca39553a",
"question": "How long is your vacation?",
"kind": "DateRangeComponent",
"settings": {}
},
"review": [
{
"id": "c3ce1796-5164-4f1a-a86b-11698dfaaeee",
"question": "Do you have a car?",
"answer": "Yes"
}
],
"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