{
    "schema_version": "1.0",
    "platform": "Islamove",
    "currency": "PHP",
    "base_url": "https://islamove.com",
    "discovery": {
        "menu_by_slug": "GET /api/customer/menu.php?slug={slug}",
        "menu_by_id": "GET /api/customer/menu.php?restaurant_id={id}",
        "item_detail": "GET /api/menu_item_detail.php?id={menu_item_id}",
        "search": "GET /api/restaurant_search.php?q={query}"
    },
    "cart": {
        "get": "GET /api/customer/cart.php",
        "add": "POST /api/customer/cart.php",
        "update": "PATCH /api/customer/cart.php",
        "remove": "DELETE /api/customer/cart.php",
        "guest_auth": "X-Guest-Session-Id header (client-generated UUID)",
        "customer_auth": "Authorization: Bearer {api_token}"
    },
    "checkout": {
        "start": "POST /api/customer/checkout.php",
        "requires": [
            "customer_auth",
            "delivery_address_id",
            "cart_id"
        ],
        "payment": "gateway_redirect (Xendit) — human confirmation required",
        "quote": "GET /api/customer/checkout_quote.php"
    },
    "ordering_flow": [
        "1. GET menu_by_slug or menu_by_id",
        "2. For items with has_modifiers=true, GET item_detail to obtain option_groups",
        "3. POST cart add with menu_item_id, quantity, selections[]",
        "4. Customer must register/login and set delivery address",
        "5. POST checkout/start then follow checkout_url for payment"
    ],
    "constraints": {
        "one_restaurant_per_cart": "Use clear_and_add:true when switching restaurants",
        "modifiers_required": "Some items require selections[] from item_detail",
        "menu_schedules": "Check orderable_by_schedule and schedule_warning on cart",
        "delivery_region": "Verify delivery_scope before add-to-cart",
        "checkout_not_headless": "Payment requires user interaction via gateway redirect"
    },
    "html_fallback": {
        "menu_page": "/restaurants/{slug}/menu",
        "web_cart_add": "POST /api/cart_add.php (session cookie auth)"
    }
}