Skip to content

Make an Ask

Use natural language to query your data

Body

application/json

question string required

A question in natural language that you want to ask the system.


conversationId string required

A unique identifier for the conversation.


requestContext string required

A JSON object containing the user and organization identifiers.


Response

200 - application/json

answer object required

Child Attributes

answer.type enum<string> required

The type of response.

One of: text, chart, table.


answer.message string required

A message to display to the user.


answer.chart object

Child Attributes

answer.chart.type enum<string>

One of: line, bar


answer.chart.title string

The title of the chart.


answer.chart.xLabel string

The label for the x-axis.


answer.chart.yLabel string

The label for the y-axis.


answer.chart.data object[]

An array of objects containing the data points for the chart.

Child Attributes

answer.chart.data.label string

The label for the data point.


answer.chart.data.value string

The value for the data point.


answer.table object

Child Attributes

answer.table.head object[]

Child Attributes

answer.table.head.name string

The name of the header.


answer.table.head.type string

The type of the header.


answer.table.body [][]

Each row is an array whose values correspond to the column names at their index. The value index of the array can be a string or number.

Request /ask
curl --request POST \
--url "https://api.inconvo.com/ask" \
--header "Content-Type: application/json" \
--data '{
"question":
"How many products have we sold over the
past 6 months?",
"conversationId": "conv_c9b1d",
"requestContext": {
"userId": "user_d7adc",
"orgId": "org_99548"
}
}'
Example response
{
"type": "text",
"message":
"You have sold 293 product over the past 6 months."
}