v1

latestOpenAPI 3.1.02026-08-04170116.0 KB
Data Out

Execute Natural Language Query (Moby AI)

Process natural language prompts to retrieve data. This endpoint interprets user-provided questions and generates SQL queries to fetch the desired results. The response returns the query results in a JSON format, grouped based on the question.

post/orcabase/api/moby

Request body

shopIdstring required

The shop domain for which you are requesting data (e.g., example.myshopify.com).

questionstring required

The natural language input describing the data you want to query. The AI interprets this to generate SQL or directly retrieve relevant data.

Example request

{
  "shopId": "example.myshopify.com",
  "question": "I have 2 questions: 1. What is my blended spend for the last 7 days, breaking down by day, and 2. Give me the best performing campaigns list for the last 30 days."
}

Response

The natural language query was successfully processed, and the response contains the query results in JSON format, grouped by question and its respective answer.

isErrorboolean

Indicates whether any errors occurred in processing the request.

errorstring nullable

An optional error field if an error occurred.

assistantConclusionstring

Summary provided by the assistant regarding the processed queries.

Example response

{
  "assistantConclusion": "Your data is ready for exploration:\n\n1. **Blended Spend for the Last 7 Days**: You can view the daily breakdown in the table format.\n2. **Best Performing Campaigns in the Last 30 Days**: The list of top campaigns is available in the table format.\n\nIf you need further assistance or have more questions, feel free to ask!\n"
}