Time
POST /v1/form/update
Below is an example illustrating the consumable format of TimeComponent. 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": "39a6393d-8e93-4029-9467-6db0d2ca3409",
"question": "What time is your flight?",
"kind": "TimeComponent",
"settings": {}
},
"review": [
...,
{
"id": "62090ca8-e5b4-4b24-b79a-c392d07d74a0",
"question": "what is your flight number?",
"answer": "AF-301"
}
],
"message": null,
"invoice": {
"title": "Question Engine All cards No logic",
"quantity": 1,
"currency": "XOF",
"totalCost": 90001000.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
Date time "YYYY-MM-DD HH:mm:ss"
timeZone
Libraries such as Moment.js use IANA Time zone by default. List of tz database time zones can also be obtained on Wikipedia
Example
{
"eServiceId": "663835dfae67d8704b6752b7",
"refId": "SLH-4UN0RDF0990D",
"questionId": "39a6393d-8e93-4029-9467-6db0d2ca3409",
"values": {
"value": "2024-07-26 21:30:00",
"timeZone":"GMT"
}
}{
"status": "COMPLETED",
"refId": "SLH-4UN0RDF0990D",
"question": null,
"review": [
...,
{
"id": "39a6393d-8e93-4029-9467-6db0d2ca3409",
"question": "What time is your flight?",
"answer": "26/07/2024 21:30 GMT"
}
],
"message": null,
"invoice": {
"title": "Question Engine All cards No logic",
"quantity": 1,
"currency": "XOF",
"totalCost": 90001000.0
}
}{
"error": {
"code": "invalid_request_error",
"message": "GMTX is an invalid IANA time zone"
}
}Last updated