Get Orders History
curl --request GET \
--globoff \
--url 'https://api.example.com/{{orders_api_base_url}}/orders/history/'import requests
url = "https://api.example.com/{{orders_api_base_url}}/orders/history/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/{{orders_api_base_url}}/orders/history/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{orders_api_base_url}}/orders/history/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{orders_api_base_url}}/orders/history/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/{{orders_api_base_url}}/orders/history/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{orders_api_base_url}}/orders/history/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"period_summary": {
"date_from": "<string>",
"date_to": "<string>",
"total_orders": 123,
"total_revenue": "<string>",
"average_order_value": "<string>",
"completion_rate": 123,
"cancellation_rate": 123
},
"time_series_data": [
{
"period": "<string>",
"orders_count": 123,
"revenue": "<string>",
"average_order_value": "<string>",
"completion_rate": 123,
"peak_hour": "<string>"
}
],
"partner_performance": {
"UberEats": {},
"DoorDash": {},
"GrubHub": {},
"LulaDirect": {}
},
"analytics": {
"growth_trends": {},
"seasonal_patterns": {},
"performance_indicators": {},
"recommendations": [
{}
]
},
"comparison": {
"previous_period": {},
"growth_metrics": {},
"trend_analysis": "<string>"
}
}Orders
Get Orders History
Retrieve comprehensive historical order data with advanced analytics, reporting capabilities, and detailed performance metrics.
GET
{orders_api_base_url}
/
orders
/
history
/
Get Orders History
curl --request GET \
--globoff \
--url 'https://api.example.com/{{orders_api_base_url}}/orders/history/'import requests
url = "https://api.example.com/{{orders_api_base_url}}/orders/history/"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/{{orders_api_base_url}}/orders/history/', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.example.com/{{orders_api_base_url}}/orders/history/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/{{orders_api_base_url}}/orders/history/"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/{{orders_api_base_url}}/orders/history/")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/{{orders_api_base_url}}/orders/history/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"period_summary": {
"date_from": "<string>",
"date_to": "<string>",
"total_orders": 123,
"total_revenue": "<string>",
"average_order_value": "<string>",
"completion_rate": 123,
"cancellation_rate": 123
},
"time_series_data": [
{
"period": "<string>",
"orders_count": 123,
"revenue": "<string>",
"average_order_value": "<string>",
"completion_rate": 123,
"peak_hour": "<string>"
}
],
"partner_performance": {
"UberEats": {},
"DoorDash": {},
"GrubHub": {},
"LulaDirect": {}
},
"analytics": {
"growth_trends": {},
"seasonal_patterns": {},
"performance_indicators": {},
"recommendations": [
{}
]
},
"comparison": {
"previous_period": {},
"growth_metrics": {},
"trend_analysis": "<string>"
}
}This endpoint provides access to comprehensive historical order data with powerful analytics capabilities. Ideal for business intelligence, performance reporting, trend analysis, and strategic planning.
This endpoint includes advanced analytics features like trend calculations, performance metrics, and comparative analysis across different time periods.
Query Parameters
string
required
The unique identifier of the store whose order history you want to retrieve
string
required
Start date for historical data retrieval (ISO 8601 format: YYYY-MM-DDTHH:mm:ssZ)
string
required
End date for historical data retrieval (ISO 8601 format: YYYY-MM-DDTHH:mm:ssZ)
string
default:"daily"
Data aggregation level: “hourly”, “daily”, “weekly”, “monthly”
boolean
default:"true"
Whether to include advanced analytics and performance metrics
boolean
default:"false"
Include comparison with the previous equivalent period
string
Filter by specific delivery platform for focused analysis
boolean
default:"false"
Include detailed item-level analytics in the response
Response
object
array
Data points broken down by the specified granularity
object
object
object
Response Example
{
"period_summary": {
"date_from": "2024-01-01T00:00:00Z",
"date_to": "2024-01-31T23:59:59Z",
"total_orders": 1247,
"total_revenue": "64,859.75",
"average_order_value": "52.03",
"completion_rate": 94.5,
"cancellation_rate": 3.2
},
"time_series_data": [
{
"period": "2024-01-01",
"orders_count": 45,
"revenue": "2,341.25",
"average_order_value": "52.03",
"completion_rate": 96.0,
"peak_hour": "19:00"
},
{
"period": "2024-01-02",
"orders_count": 38,
"revenue": "1,977.50",
"average_order_value": "52.04",
"completion_rate": 95.0,
"peak_hour": "18:30"
}
],
"partner_performance": {
"UberEats": {
"total_orders": 485,
"total_revenue": "25,243.80",
"average_order_value": "52.05",
"completion_rate": 95.2,
"average_prep_time": "18.5 minutes"
},
"DoorDash": {
"total_orders": 412,
"total_revenue": "21,424.20",
"average_order_value": "52.01",
"completion_rate": 94.8,
"average_prep_time": "17.2 minutes"
},
"GrubHub": {
"total_orders": 245,
"total_revenue": "12,745.50",
"average_order_value": "52.02",
"completion_rate": 93.5,
"average_prep_time": "19.8 minutes"
},
"LulaDirect": {
"total_orders": 105,
"total_revenue": "5,446.25",
"average_order_value": "51.87",
"completion_rate": 96.8,
"average_prep_time": "15.3 minutes"
}
},
"analytics": {
"growth_trends": {
"monthly_growth": "+12.5%",
"revenue_trend": "increasing",
"order_volume_trend": "stable_growth"
},
"seasonal_patterns": {
"peak_days": ["Friday", "Saturday", "Sunday"],
"peak_hours": ["17:00-21:00"],
"seasonal_recommendations": "Consider extended hours on weekends"
},
"performance_indicators": {
"efficiency_score": 87.5,
"customer_satisfaction_proxy": 94.5,
"revenue_per_hour": "$425.30"
},
"recommendations": [
"Consider promoting during Tuesday-Thursday slow periods",
"UberEats partnership showing strongest performance",
"Weekend capacity could be increased to capture more demand"
]
},
"comparison": {
"previous_period": {
"total_orders": 1098,
"total_revenue": "57,241.50",
"average_order_value": "52.14"
},
"growth_metrics": {
"order_growth": "+13.6%",
"revenue_growth": "+13.3%",
"avg_order_value_change": "-0.2%"
},
"trend_analysis": "Strong growth in order volume and revenue with stable order values, indicating successful customer acquisition and retention"
}
}
Granularity Examples
Granularity Examples
Hourly Analysis (for operational optimization)Weekly Trends (for strategic planning)Monthly Performance Review
GET {{orders_api_base_url}}/orders/history/?store_id=449235c1-3d04-4519-998b-40d2a621e5e0&date_from=2024-01-15T00:00:00Z&date_to=2024-01-15T23:59:59Z&granularity=hourly
GET {{orders_api_base_url}}/orders/history/?store_id=449235c1-3d04-4519-998b-40d2a621e5e0&date_from=2024-01-01T00:00:00Z&date_to=2024-03-31T23:59:59Z&granularity=weekly&compare_period=true
GET {{orders_api_base_url}}/orders/history/?store_id=449235c1-3d04-4519-998b-40d2a621e5e0&date_from=2024-01-01T00:00:00Z&date_to=2024-12-31T23:59:59Z&granularity=monthly&include_analytics=true
Business Intelligence: Use the analytics data to identify growth opportunities, optimize operations, and make data-driven decisions about staffing, inventory, and marketing.
Data Freshness: Historical data is updated in near real-time. For the most current hour’s data, allow 15-30 minutes for complete processing.
Large Datasets: When requesting large date ranges with hourly granularity, responses may be substantial. Consider using daily or weekly granularity for broad analysis.
Use Cases
Business Intelligence Applications
Business Intelligence Applications
Revenue Analysis
- Monthly/quarterly revenue trends
- Platform performance comparison
- Seasonal revenue patterns
- Identify peak hours for staffing
- Optimize kitchen capacity planning
- Improve order completion rates
- Market penetration analysis
- Growth opportunity identification
- Partnership performance evaluation
- KPI tracking and benchmarking
- Efficiency improvement initiatives
- Customer satisfaction analysis

