Quote
POST /v1/form/update
Below is an example illustrating the consumable format of QuoteComponent. 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-4UN2LPTW0W3J",
"question": {
"questionId": "ec84933c-9604-4951-b504-2b5f7ae2b5e3",
"question": "These are your options",
"kind": "QuoteComponent",
"settings": {
"source": [
{
"id": "66383a4cae67d8704b6752b9",
"index": 0,
"title": "Vegas",
"description": null,
"unitPrice": 10000000.0,
"fixedPrice": 10000000.0,
"currency": "XOF",
"hidePrice": false
},
{
"id": "66383a65ae67d8704b6752bb",
"index": 1,
"title": "Bali",
"description": null,
"unitPrice": 90000000.0,
"fixedPrice": 90000000.0,
"currency": "XOF",
"hidePrice": false
},
{
"id": "66383a84ae67d8704b6752bd",
"index": 2,
"title": "Paris",
"description": null,
"unitPrice": 20000000.0,
"fixedPrice": 20000000.0,
"currency": "XOF",
"hidePrice": false
}
],
}
},
"review": [
...,
{
"id": "58faf398-f0dc-4f93-9a18-81304d1fcae9",
"question": "What is your phone number?",
"answer": "+15551234567"
}
],
"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
array of opition(s) from source
Example
{
"eServiceId": "6646403efc0445aabb9e9b6d",
"refId": "SLH-4UN0RDF0990D",
"questionId": "ec84933c-9604-4951-b504-2b5f7ae2b5e3",
"values": {
"value": [
{
"id": "66383a4cae67d8704b6752b9",
"index": 0,
"title": "Vegas",
"description": null,
"unitPrice": 10000000.0,
"fixedPrice": 10000000.0,
"currency": "XOF",
"hidePrice": false
}
]
}
}{
"status": "NEXT",
"refId": "SLH-4UN0RDF0990D",
"question": {
"questionId": "9fe6d9e6-0ceb-447f-9589-7ac7bc456102",
"question": "Select your an activity",
"kind": "SingleChoiceComponent",
"settings": {
"source": [
"Gym",
"basketball",
"running"
]
}
},
"review": [
...,
{
"id": "ec84933c-9604-4951-b504-2b5f7ae2b5e3",
"question": "These are your options",
"answer": "Bali"
}
],
"message": null,
"invoice": {
"title": "Question Engine All cards No logic",
"quantity": 1,
"currency": "XOF",
"totalCost": 90001000.0
}
}{
"error": {
"code": "invalid_request_error",
"message": "value field is missing"
}
}Last updated