GET
/
stores
/
{store_id}
/
menu-rules
/
{rule_id}
{
  "rule": {},
  "execution_status": {},
  "execution_history": [
    {}
  ],
  "impact_analysis": {}
}
This endpoint provides comprehensive details about a specific menu rule, enabling detailed analysis, troubleshooting, and optimization of individual rule configurations and their business impact.
Individual rule retrieval provides deep insights into rule behavior, execution patterns, and business impact, supporting data-driven optimization and troubleshooting of menu automation logic.

Path Parameters

store_id
string
required
The unique identifier of the store containing the menu rule
rule_id
string
required
The unique identifier of the menu rule to retrieve

Query Parameters

include_history
boolean
default:"false"
Include rule execution history and performance metrics
include_impact_analysis
boolean
default:"false"
Include business impact analysis and effectiveness metrics
date_range
string
Date range for historical data (format: YYYY-MM-DD,YYYY-MM-DD)

Response

rule
object
Complete rule configuration and metadata
execution_status
object
Current rule status and next scheduled evaluation
execution_history
array
Historical execution records and outcomes (if requested)
impact_analysis
object
Business impact metrics and effectiveness analysis (if requested)

Response Example

{
    "rule": {
        "rule_id": "rule_456",
        "rule_name": "Happy Hour Beverage Pricing",
        "rule_type": "pricing",
        "is_active": true,
        "priority": 10,
        "conditions": {
            "time_range": {
                "start": "15:00",
                "end": "18:00"
            },
            "days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday"],
            "date_exceptions": ["2024-12-25", "2024-01-01"]
        },
        "actions": {
            "adjust_pricing": {
                "type": "percentage",
                "value": -25,
                "round_to": 0.05
            },
            "apply_promotional_tag": "happy_hour"
        },
        "scope": {
            "apply_to_categories": ["beverages", "appetizers"],
            "exclude_items": ["premium_wine", "specialty_cocktails"],
            "affected_item_count": 23
        },
        "effective_date_range": {
            "start_date": "2024-02-01",
            "end_date": "2024-03-31"
        },
        "created_at": "2024-01-15T10:30:00Z",
        "updated_at": "2024-01-20T14:45:00Z",
        "created_by": "manager_user_123"
    },
    "execution_status": {
        "current_status": "inactive",
        "last_execution": "2024-01-19T17:00:00Z",
        "next_evaluation": "2024-01-22T15:00:00Z",
        "execution_count_today": 0,
        "total_executions": 45,
        "last_execution_result": "success"
    },
    "execution_history": [
        {
            "execution_time": "2024-01-19T17:00:00Z",
            "execution_result": "success",
            "items_affected": 23,
            "duration_ms": 125,
            "conditions_met": true,
            "actions_executed": ["adjust_pricing", "apply_promotional_tag"]
        }
    ],
    "impact_analysis": {
        "revenue_impact": {
            "total_discount_applied": 1250.75,
            "affected_orders": 89,
            "average_order_increase": 15.5
        },
        "customer_engagement": {
            "happy_hour_orders": 89,
            "repeat_customers": 34,
            "customer_satisfaction_score": 4.2
        },
        "operational_metrics": {
            "kitchen_efficiency": "improved",
            "inventory_turnover": "increased",
            "staff_feedback": "positive"
        }
    }
}
Data Availability: Historical and impact analysis data may have retention limits. Specify appropriate date ranges to ensure you receive the data you need for analysis.
Performance Monitoring: Use the execution history to identify optimization opportunities and troubleshoot rule performance issues for better business outcomes.

Use Cases

Execution Status Details

Historical Analysis

Impact Analysis Metrics

Error Handling

Best Practices

Analytics and Reporting

Integration with Business Intelligence

Rule Optimization Workflow