GET
/
stores
/
{store_id}
/
menu-rules
{
  "rules": [
    {}
  ],
  "total_count": 123,
  "active_count": 123,
  "rule_categories": {}
}
This endpoint provides access to the complete set of menu rules that control menu behavior, item availability, pricing logic, and operational constraints, enabling sophisticated menu management and automation.
Menu rules provide the business logic layer that automates menu management, ensuring consistent application of business policies, operational constraints, and customer experience requirements.

Path Parameters

store_id
string
required
The unique identifier of the store to retrieve menu rules for

Query Parameters

rule_type
string
Filter rules by type (availability, pricing, display, operational)
active_only
boolean
default:"false"
Return only currently active rules
menu_id
string
Filter rules that apply to a specific menu
include_details
boolean
default:"true"
Include detailed rule configuration and metadata

Response

rules
array
Array of menu rule objects with complete configuration details
total_count
integer
Total number of rules for the store
active_count
integer
Number of currently active rules
rule_categories
object
Summary of rules by category and type

Response Example

{
    "rules": [
        {
            "rule_id": "rule_123",
            "rule_name": "Breakfast Hour Availability",
            "rule_type": "availability",
            "is_active": true,
            "priority": 1,
            "conditions": {
                "time_range": {
                    "start": "06:00",
                    "end": "11:00"
                },
                "days_of_week": ["monday", "tuesday", "wednesday", "thursday", "friday"]
            },
            "actions": {
                "set_availability": true,
                "apply_to_items": ["breakfast_menu_items"]
            },
            "created_at": "2024-01-01T00:00:00Z",
            "updated_at": "2024-01-15T10:30:00Z"
        }
    ],
    "total_count": 15,
    "active_count": 12,
    "rule_categories": {
        "availability": 8,
        "pricing": 4,
        "display": 2,
        "operational": 1
    }
}
Rule Hierarchy: Rules are applied in priority order, with higher priority rules taking precedence over lower priority ones when conflicts arise.
Performance Optimization: Use filtering parameters to retrieve only the specific rules you need, especially when dealing with stores that have extensive rule configurations.

Use Cases

Rule Structure Details

Rule Types and Examples

Rule Evaluation Process

Rule Management Insights

Error Handling

Best Practices

Integration Patterns