{
  "name": "MyTravel API Documentation",
  "description": "API documentation for MyTravel booking website",
  "version": "1.0.0",
  "base_url": "/api",
  "endpoints": {
    "authentication": {
      "prefix": "/auth",
      "routes": [
        {
          "method": "POST",
          "path": "/auth/login",
          "description": "User login",
          "middleware": ["throttle:login"],
          "parameters": {
            "body": ["email", "password"]
          }
        },
        {
          "method": "POST",
          "path": "/auth/register",
          "description": "User registration",
          "parameters": {
            "body": ["name", "email", "password"]
          }
        },
        {
          "method": "POST",
          "path": "/auth/logout",
          "description": "User logout",
          "middleware": ["api"]
        },
        {
          "method": "POST",
          "path": "/auth/refresh",
          "description": "Refresh authentication token",
          "middleware": ["api"]
        },
        {
          "method": "GET",
          "path": "/auth/me",
          "description": "Get current authenticated user",
          "middleware": ["api"]
        },
        {
          "method": "POST",
          "path": "/auth/me",
          "description": "Update user profile",
          "middleware": ["api"]
        },
        {
          "method": "POST",
          "path": "/auth/change-password",
          "description": "Change user password",
          "middleware": ["api"],
          "parameters": {
            "body": ["old_password", "password"]
          }
        }
      ]
    },
    "user": {
      "prefix": "/user",
      "routes": [
        {
          "method": "GET",
          "path": "/user/booking-history",
          "description": "Get user's booking history",
          "middleware": ["api"],
          "name": "api.user.booking_history"
        },
        {
          "method": "POST",
          "path": "/user/wishlist",
          "description": "Add or remove item from wishlist",
          "middleware": ["api"],
          "parameters": {
            "body": ["id", "type"]
          },
          "name": "api.user.wishList.handle"
        },
        {
          "method": "GET",
          "path": "/user/wishlist",
          "description": "Get user's wishlist",
          "middleware": ["api"],
          "name": "api.user.wishList.index"
        },
        {
          "method": "POST",
          "path": "/user/permanently_delete",
          "description": "Permanently delete user account",
          "middleware": ["api"],
          "name": "user.permanently.delete"
        }
      ]
    },
    "configuration": {
      "routes": [
        {
          "method": "GET",
          "path": "/configs",
          "description": "Get application configurations",
          "name": "api.get_configs"
        },
        {
          "method": "GET",
          "path": "/gateways",
          "description": "Get available payment gateways",
          "name": "api.gateways"
        },
        {
          "method": "GET",
          "path": "/home-page",
          "description": "Get homepage layout data",
          "name": "api.get_home_layout"
        }
      ]
    },
    "search_services": {
      "routes": [
        {
          "method": "GET",
          "path": "/services",
          "description": "Search all services",
          "parameters": {
            "query": ["service_type", "q", "lat", "lng", "check_in", "check_out", "adults", "children", "page"]
          },
          "name": "api.service-search"
        },
        {
          "method": "GET",
          "path": "/{type}/search",
          "description": "Search services by type (hotel, tour, space, car, flight, boat, event)",
          "parameters": {
            "query": ["check_in", "check_out", "adults", "children", "page", "lat", "lng", "location_id"]
          },
          "name": "api.search2"
        },
        {
          "method": "GET",
          "path": "/{type}/detail/{id}",
          "description": "Get detailed information about a service",
          "name": "api.detail"
        },
        {
          "method": "GET",
          "path": "/{type}/availability/{id}",
          "description": "Check availability for a service",
          "parameters": {
            "query": ["check_in", "check_out", "adults", "children"]
          },
          "name": "api.service.check_availability"
        },
        {
          "method": "GET",
          "path": "/boat/availability-booking/{id}",
          "description": "Check boat availability for booking",
          "name": "api.service.checkBoatAvailability"
        },
        {
          "method": "GET",
          "path": "/{type}/filters",
          "description": "Get available filters for a service type",
          "name": "api.service.filter"
        },
        {
          "method": "GET",
          "path": "/{type}/form-search",
          "description": "Get search form fields for a service type",
          "name": "api.service.form"
        }
      ]
    },
    "location": {
      "routes": [
        {
          "method": "GET",
          "path": "/locations",
          "description": "Search locations",
          "parameters": {
            "query": ["q", "lat", "lng"]
          },
          "name": "api.location.search"
        },
        {
          "method": "GET",
          "path": "/location/{id}",
          "description": "Get location details",
          "name": "api.location.detail"
        }
      ]
    },
    "booking": {
      "prefix": "/booking",
      "routes": [
        {
          "method": "POST",
          "path": "/booking/addToCart",
          "description": "Add item to cart",
          "parameters": {
            "body": ["service_type", "service_id", "start_date", "end_date", "adults", "children", "prices"]
          },
          "name": "api.booking.add_to_cart"
        },
        {
          "method": "POST",
          "path": "/booking/addEnquiry",
          "description": "Add an enquiry",
          "parameters": {
            "body": ["service_type", "service_id", "name", "email", "phone", "message"]
          },
          "name": "api.booking.add_enquiry"
        },
        {
          "method": "POST",
          "path": "/booking/doCheckout",
          "description": "Process checkout",
          "parameters": {
            "body": ["code", "payment_gateway", "payment_method"]
          },
          "name": "api.booking.doCheckout"
        },
        {
          "method": "GET",
          "path": "/booking/confirm/{gateway}",
          "description": "Confirm payment",
          "name": "api.booking.confirm"
        },
        {
          "method": "GET",
          "path": "/booking/cancel/{gateway}",
          "description": "Cancel payment",
          "name": "api.booking.cancel"
        },
        {
          "method": "GET",
          "path": "/booking/{code}",
          "description": "Get booking details by code",
          "name": "api.booking.detail"
        },
        {
          "method": "GET",
          "path": "/booking/{code}/thankyou",
          "description": "Get thank you page data",
          "name": "booking.thankyou"
        },
        {
          "method": "GET",
          "path": "/booking/{code}/checkout",
          "description": "Get checkout page data"
        },
        {
          "method": "GET",
          "path": "/booking/{code}/check-status",
          "description": "Check checkout status"
        }
      ]
    },
    "news": {
      "routes": [
        {
          "method": "GET",
          "path": "/news",
          "description": "Search news articles",
          "parameters": {
            "query": ["q", "category", "page"]
          },
          "name": "api.news.search"
        },
        {
          "method": "GET",
          "path": "/news/category",
          "description": "Get news categories",
          "name": "api.news.category"
        },
        {
          "method": "GET",
          "path": "/news/{id}",
          "description": "Get news article details",
          "name": "api.news.detail"
        }
      ]
    },
    "review": {
      "routes": [
        {
          "method": "POST",
          "path": "/{type}/write-review/{id}",
          "description": "Write a review for a service",
          "middleware": ["api"],
          "parameters": {
            "body": ["title", "content", "rate", "name", "email"]
          },
          "name": "api.service.write_review"
        }
      ]
    },
    "media": {
      "prefix": "/media",
      "routes": [
        {
          "method": "POST",
          "path": "/media/store",
          "description": "Upload media file",
          "middleware": ["auth:sanctum"],
          "name": "api.media.store"
        }
      ]
    },
    "user_sanctum": {
      "routes": [
        {
          "method": "GET",
          "path": "/user",
          "description": "Get authenticated user (Sanctum)",
          "middleware": ["auth:sanctum"]
        }
      ]
    }
  },
  "service_types": [
    "hotel",
    "tour",
    "space",
    "car",
    "flight",
    "boat",
    "event"
  ],
  "middleware": {
    "api": "Standard API authentication",
    "auth:sanctum": "Laravel Sanctum authentication"
  }
}
