GET
{orders_api_base_url}
/
orders
/
history
/
{
  "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

store_id
string
required
The unique identifier of the store whose order history you want to retrieve
date_from
string
required
Start date for historical data retrieval (ISO 8601 format: YYYY-MM-DDTHH:mm:ssZ)
date_to
string
required
End date for historical data retrieval (ISO 8601 format: YYYY-MM-DDTHH:mm:ssZ)
granularity
string
default:"daily"
Data aggregation level: “hourly”, “daily”, “weekly”, “monthly”
include_analytics
boolean
default:"true"
Whether to include advanced analytics and performance metrics
compare_period
boolean
default:"false"
Include comparison with the previous equivalent period
partner
string
Filter by specific delivery platform for focused analysis
include_items
boolean
default:"false"
Include detailed item-level analytics in the response

Response

period_summary
object
High-level summary for the requested time period
time_series_data
array
Data points broken down by the specified granularity
partner_performance
object
Performance breakdown by delivery platform
analytics
object
Advanced analytics and insights (when include_analytics=true)
comparison
object
Comparison with previous period (when compare_period=true)

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"
  }
}
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