GetDate
Get a spoken natural language response from the end user and interpret it as a date.
Properties
Property |
Type |
Description |
Required Properties |
on_done |
string |
Callback URL to be sent an HTTP POST request when finished.
See Get date callback for details. |
Optional Properties |
timeout_seconds |
integer |
Time, in seconds, to wait for the user to say a number.
When the timeout expires, will send an empty
string to the on_done callback and move on to the next
command in the routine. |
prompt_url |
string |
URL of the .wav or .mp3 file to play at the start of
the command. Normally used to communicate instructions
to the end user. |
Example
{
"name": "GetDate",
"on_done": "http://myserver.com/gotdate",
"timeout_seconds": 10,
"prompt_url": "http://myserver.com/please_state_dob.wav"
}
Get date callback
HTTP request sent when a GetDate command finishes.
Request
method: | POST |
content-type: | json |
The request body contains a JSON object with the following properties:
Property |
Type |
Description |
account_id |
string |
The ID of your Sift API account. |
connection_id |
string |
ID of the Connection that
handled the command. |
value |
string |
The date that the end user said, as an ISO
8601-formatted date string. If the user does not
specify a year, the year portion of the date is
omitted. |
Example
{
"account_id": "372718353dcf4d16",
"connection_id": "6f5704748865267a",
"value": "05-09"
}
Response
content-type: | application/json |
The response body may optionally contain a JSON object with the following properties.
Property |
Type |
Description |
Optional Properties |
routine |
list |
A new routine list to run
on the connection referenced by the
connection_id property of the request. |