openapi: 3.1.0 info: # Do not change the title, if the title changes, the import paths will be broken title: Api version: 0.1.0 description: Easy Agra API specification servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: auth description: Authentication operations - name: users description: User management - name: owner-requests description: Owner request management - name: notifications description: Notification management - name: activity-logs description: Activity log management - name: platform-settings description: Platform settings - name: dashboard description: Dashboard data - name: hotels description: Hotel management - name: rooms description: Room management - name: bookings description: Booking management and monitoring - name: reviews description: Hotel reviews and ratings - name: spas description: Spa management - name: spa-services description: Spa service management - name: spa-appointments description: Spa appointment booking - name: tourist-places description: Tourist places management - name: payments description: Payment management and processing - name: refunds description: Refund management - name: commissions description: Platform commission configuration - name: hotel-commission-agreements description: Hotel commission agreements for owners - name: earnings description: Owner earnings and platform revenue - name: payouts description: Owner payout/withdrawal requests - name: reports description: Revenue, commission and earnings reports - name: trips description: Customer trip planning and management - name: support description: Support ticket and complaint management - name: coupons description: Coupon validation for customer checkout - name: transport description: Transport locations (railway stations, bus stands, airports) paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /auth/register: post: operationId: register tags: [auth] summary: Register a new user requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RegisterInput" responses: "201": description: Registered content: application/json: schema: $ref: "#/components/schemas/AuthResponse" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "409": description: Email already exists content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/login: post: operationId: login tags: [auth] summary: Login requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/LoginInput" responses: "200": description: Logged in content: application/json: schema: $ref: "#/components/schemas/AuthResponse" "401": description: Invalid credentials content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "403": description: Account suspended or rejected content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/logout: post: operationId: logout tags: [auth] summary: Logout responses: "200": description: Logged out content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /auth/me: get: operationId: getMe tags: [auth] summary: Get current user responses: "200": description: Current user content: application/json: schema: $ref: "#/components/schemas/User" "401": description: Not authenticated content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /auth/forgot-password: post: operationId: forgotPassword tags: [auth] summary: Request password reset requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ForgotPasswordInput" responses: "200": description: Reset link sent content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /auth/reset-password: post: operationId: resetPassword tags: [auth] summary: Reset password with token requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ResetPasswordInput" responses: "200": description: Password reset content: application/json: schema: $ref: "#/components/schemas/MessageResponse" "400": description: Invalid or expired token content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /users: get: operationId: listUsers tags: [users] summary: List all users (admin/super_admin only) parameters: - name: role in: query schema: type: string - name: status in: query schema: type: string - name: search in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Users list content: application/json: schema: $ref: "#/components/schemas/UsersPage" /users/{id}: get: operationId: getUser tags: [users] summary: Get user by ID parameters: - name: id in: path required: true schema: type: integer responses: "200": description: User content: application/json: schema: $ref: "#/components/schemas/User" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" patch: operationId: updateUser tags: [users] summary: Update user (admin/super_admin or self) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserUpdate" responses: "200": description: Updated user content: application/json: schema: $ref: "#/components/schemas/User" delete: operationId: deleteUser tags: [users] summary: Delete user (super_admin only) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /users/{id}/status: patch: operationId: updateUserStatus tags: [users] summary: Update user status (admin/super_admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserStatusUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/User" /users/{id}/role: patch: operationId: updateUserRole tags: [users] summary: Update user role (super_admin only) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UserRoleUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/User" /users/{id}/change-password: post: operationId: changePassword tags: [users] summary: Change password (self only) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ChangePasswordInput" responses: "200": description: Password changed content: application/json: schema: $ref: "#/components/schemas/MessageResponse" "400": description: Wrong current password content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /users/{id}/photo: post: operationId: uploadProfilePhoto tags: [users] summary: Upload profile photo parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PhotoUploadInput" responses: "200": description: Photo uploaded content: application/json: schema: $ref: "#/components/schemas/User" /users/{id}/delete-account: delete: operationId: deleteAccount tags: [users] summary: Delete own account parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Account deleted content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /owner-requests: get: operationId: listOwnerRequests tags: [owner-requests] summary: List owner requests (admin/super_admin) parameters: - name: status in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Owner requests list content: application/json: schema: $ref: "#/components/schemas/OwnerRequestsPage" post: operationId: submitOwnerRequest tags: [owner-requests] summary: Submit owner request (customer) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OwnerRequestInput" responses: "201": description: Request submitted content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "409": description: Pending request already exists content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /owner-requests/{id}: get: operationId: getOwnerRequest tags: [owner-requests] summary: Get a single owner request (admin/super_admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Owner request detail content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" put: operationId: updateOwnerRequest tags: [owner-requests] summary: Update owner request while pending (customer) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OwnerRequestUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "403": description: Not allowed content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" delete: operationId: cancelOwnerRequest tags: [owner-requests] summary: Cancel owner request while pending (customer) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Cancelled content: application/json: schema: $ref: "#/components/schemas/MessageResponse" "403": description: Not allowed content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /owner-requests/{id}/approve: post: operationId: approveOwnerRequest tags: [owner-requests] summary: Approve owner request (admin/super_admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Approved content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" /owner-requests/{id}/reject: post: operationId: rejectOwnerRequest tags: [owner-requests] summary: Reject owner request (admin/super_admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OwnerRequestRejectInput" responses: "200": description: Rejected content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" /owner-requests/{id}/restore: post: operationId: restoreOwnerRequest tags: [owner-requests] summary: Restore a rejected request back to pending (super_admin) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Restored to pending content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "403": description: Not allowed content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /owner-requests/my: get: operationId: getMyOwnerRequest tags: [owner-requests] summary: Get current user's owner request responses: "200": description: My owner request content: application/json: schema: $ref: "#/components/schemas/OwnerRequest" "404": description: No request found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /notifications: get: operationId: listNotifications tags: [notifications] summary: List notifications for current user parameters: - name: unreadOnly in: query schema: type: boolean - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Notifications list content: application/json: schema: $ref: "#/components/schemas/NotificationsPage" /notifications/read-all: post: operationId: markAllNotificationsRead tags: [notifications] summary: Mark all notifications as read responses: "200": description: All marked read content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /notifications/{id}/read: post: operationId: markNotificationRead tags: [notifications] summary: Mark notification as read parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Marked read content: application/json: schema: $ref: "#/components/schemas/Notification" /notifications/unread-count: get: operationId: getUnreadNotificationCount tags: [notifications] summary: Get unread notification count responses: "200": description: Unread count content: application/json: schema: $ref: "#/components/schemas/UnreadCount" /activity-logs: get: operationId: listActivityLogs tags: [activity-logs] summary: List activity logs (admin/super_admin) parameters: - name: userId in: query schema: type: integer - name: actionType in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Activity logs content: application/json: schema: $ref: "#/components/schemas/ActivityLogsPage" /platform-settings: get: operationId: getPlatformSettings tags: [platform-settings] summary: Get platform settings responses: "200": description: Platform settings content: application/json: schema: $ref: "#/components/schemas/PlatformSettings" patch: operationId: updatePlatformSettings tags: [platform-settings] summary: Update platform settings (super_admin only) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/PlatformSettingsUpdate" responses: "200": description: Updated settings content: application/json: schema: $ref: "#/components/schemas/PlatformSettings" /dashboard/stats: get: operationId: getDashboardStats tags: [dashboard] summary: Get dashboard statistics (admin/super_admin) responses: "200": description: Dashboard stats content: application/json: schema: $ref: "#/components/schemas/DashboardStats" /dashboard/recent-activity: get: operationId: getRecentActivity tags: [dashboard] summary: Get recent activity logs (admin/super_admin) responses: "200": description: Recent activity content: application/json: schema: type: array items: $ref: "#/components/schemas/ActivityLog" /dashboard/role-breakdown: get: operationId: getRoleBreakdown tags: [dashboard] summary: User count by role (admin/super_admin) responses: "200": description: Role breakdown content: application/json: schema: type: array items: $ref: "#/components/schemas/RoleCount" /announcements: post: operationId: sendAnnouncement tags: [users] summary: Send announcement to all users (super_admin only) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AnnouncementInput" responses: "200": description: Announcement sent content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /hotels/stats: get: operationId: getHotelStats tags: [hotels] summary: Get hotel owner dashboard stats responses: "200": description: Stats content: application/json: schema: $ref: "#/components/schemas/HotelStats" /hotels: get: operationId: listHotels tags: [hotels] summary: List hotels parameters: - in: query name: status schema: type: string - in: query name: search schema: type: string - in: query name: city schema: type: string - in: query name: page schema: type: integer - in: query name: limit schema: type: integer responses: "200": description: Hotels list content: application/json: schema: $ref: "#/components/schemas/HotelsPage" post: operationId: createHotel tags: [hotels] summary: Create a hotel requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/HotelInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Hotel" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /hotels/{id}: get: operationId: getHotel tags: [hotels] summary: Get hotel by ID parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Hotel content: application/json: schema: $ref: "#/components/schemas/Hotel" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" put: operationId: updateHotel tags: [hotels] summary: Update a hotel parameters: - in: path name: id required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/HotelUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/Hotel" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" delete: operationId: deleteHotel tags: [hotels] summary: Soft delete a hotel parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/MessageResponse" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /hotels/{id}/submit: post: operationId: submitHotel tags: [hotels] summary: Submit hotel for approval parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Submitted content: application/json: schema: $ref: "#/components/schemas/Hotel" "403": description: Forbidden content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /hotels/{id}/approve: post: operationId: approveHotel tags: [hotels] summary: Approve a hotel parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Approved content: application/json: schema: $ref: "#/components/schemas/Hotel" /hotels/{id}/reject: post: operationId: rejectHotel tags: [hotels] summary: Reject a hotel parameters: - in: path name: id required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/HotelRejectInput" responses: "200": description: Rejected content: application/json: schema: $ref: "#/components/schemas/Hotel" /hotels/{id}/suspend: post: operationId: suspendHotel tags: [hotels] summary: Suspend a hotel parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Suspended content: application/json: schema: $ref: "#/components/schemas/Hotel" /hotels/{id}/restore: post: operationId: restoreHotel tags: [hotels] summary: Restore a soft-deleted hotel (super_admin) parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Restored content: application/json: schema: $ref: "#/components/schemas/Hotel" /hotels/{id}/nearby: get: operationId: getHotelNearbyPlaces tags: [hotels] summary: Get nearby places for a hotel security: - cookieAuth: [] parameters: - in: path name: id required: true schema: type: integer responses: "200": description: Nearby places list content: application/json: schema: type: object required: [nearby] properties: nearby: type: array items: $ref: "#/components/schemas/HotelNearbyPlace" post: operationId: addHotelNearbyPlace tags: [hotels] summary: Add a nearby place to a hotel security: - cookieAuth: [] parameters: - in: path name: id required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/HotelNearbyPlaceInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/HotelNearbyPlace" /hotels/{id}/nearby/{nearbyId}: put: operationId: updateHotelNearbyPlace tags: [hotels] summary: Update a nearby place entry security: - cookieAuth: [] parameters: - in: path name: id required: true schema: type: integer - in: path name: nearbyId required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/HotelNearbyPlaceInput" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/HotelNearbyPlace" delete: operationId: deleteHotelNearbyPlace tags: [hotels] summary: Delete a nearby place entry security: - cookieAuth: [] parameters: - in: path name: id required: true schema: type: integer - in: path name: nearbyId required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean /rooms/stats: get: operationId: getRoomStats tags: [rooms] summary: Room statistics security: - cookieAuth: [] parameters: - name: hotelId in: query schema: type: integer responses: "200": description: Stats content: application/json: schema: $ref: "#/components/schemas/RoomStats" /rooms: get: operationId: listRooms tags: [rooms] summary: List rooms security: - cookieAuth: [] parameters: - name: hotelId in: query schema: type: integer - name: status in: query schema: type: string - name: search in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Rooms list content: application/json: schema: $ref: "#/components/schemas/RoomsPage" post: operationId: createRoom tags: [rooms] summary: Create room security: - cookieAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RoomInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/Room" /rooms/{id}: get: operationId: getRoom tags: [rooms] summary: Get room security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Room content: application/json: schema: $ref: "#/components/schemas/Room" put: operationId: updateRoom tags: [rooms] summary: Update room security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RoomUpdate" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/Room" delete: operationId: deleteRoom tags: [rooms] summary: Soft delete room security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: $ref: "#/components/schemas/MessageResponse" /rooms/{id}/restore: post: operationId: restoreRoom tags: [rooms] summary: Restore deleted room (super_admin) security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Restored content: application/json: schema: $ref: "#/components/schemas/Room" /rooms/{id}/activate: post: operationId: activateRoom tags: [rooms] summary: Activate room security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Activated content: application/json: schema: $ref: "#/components/schemas/Room" /rooms/{id}/deactivate: post: operationId: deactivateRoom tags: [rooms] summary: Deactivate room security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deactivated content: application/json: schema: $ref: "#/components/schemas/Room" /rooms/{id}/maintenance: post: operationId: setRoomMaintenance tags: [rooms] summary: Set room to maintenance status security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Set to maintenance content: application/json: schema: $ref: "#/components/schemas/Room" /bookings/stats: get: operationId: getBookingStats tags: [bookings] summary: Booking statistics for admin dashboard security: - cookieAuth: [] responses: "200": description: Booking stats content: application/json: schema: $ref: "#/components/schemas/BookingStats" /bookings/analytics: get: operationId: getBookingAnalytics tags: [bookings] summary: Booking analytics data security: - cookieAuth: [] responses: "200": description: Analytics content: application/json: schema: $ref: "#/components/schemas/BookingAnalytics" /bookings: get: operationId: listBookings tags: [bookings] summary: List bookings security: - cookieAuth: [] parameters: - name: status in: query schema: type: string - name: search in: query schema: type: string - name: hotelId in: query schema: type: integer - name: customerId in: query schema: type: integer - name: dateFrom in: query schema: type: string - name: dateTo in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Bookings list content: application/json: schema: $ref: "#/components/schemas/BookingsPage" post: operationId: createBooking tags: [bookings] summary: Create a new booking security: - cookieAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BookingInput" responses: "201": description: Booking created content: application/json: schema: $ref: "#/components/schemas/Booking" /bookings/{id}: get: operationId: getBooking tags: [bookings] summary: Get booking detail security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Booking content: application/json: schema: $ref: "#/components/schemas/Booking" /bookings/{id}/confirm: post: operationId: confirmBooking tags: [bookings] summary: Confirm a booking security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Confirmed content: application/json: schema: $ref: "#/components/schemas/Booking" /bookings/{id}/reject: post: operationId: rejectBooking tags: [bookings] summary: Reject a booking security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BookingRejectInput" responses: "200": description: Rejected content: application/json: schema: $ref: "#/components/schemas/Booking" /bookings/{id}/cancel: post: operationId: cancelBooking tags: [bookings] summary: Cancel a booking security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/BookingCancelInput" responses: "200": description: Cancelled content: application/json: schema: $ref: "#/components/schemas/Booking" /bookings/{id}/checkin: post: operationId: checkInBooking tags: [bookings] summary: Check in a booking security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Checked in content: application/json: schema: $ref: "#/components/schemas/Booking" /bookings/{id}/checkout: post: operationId: checkOutBooking tags: [bookings] summary: Check out a booking security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Checked out content: application/json: schema: $ref: "#/components/schemas/Booking" /reviews/stats: get: operationId: getReviewStats tags: [reviews] summary: Review stats for admin security: - cookieAuth: [] responses: "200": description: Review stats content: application/json: schema: $ref: "#/components/schemas/ReviewStats" /reviews/eligible-bookings: get: operationId: getEligibleBookings tags: [reviews] summary: Bookings eligible for review security: - cookieAuth: [] responses: "200": description: Eligible bookings content: application/json: schema: type: array items: $ref: "#/components/schemas/EligibleBooking" /reviews/top-hotels: get: operationId: getTopRatedHotels tags: [reviews] summary: Top rated hotels parameters: - name: limit in: query schema: type: integer responses: "200": description: Top hotels content: application/json: schema: type: array items: $ref: "#/components/schemas/TopRatedHotel" /reviews/hotel/{hotelId}: get: operationId: fetchHotelReviews tags: [reviews] summary: Reviews for a specific hotel parameters: - name: hotelId in: path required: true schema: type: integer responses: "200": description: Hotel reviews content: application/json: schema: $ref: "#/components/schemas/ReviewsPage" /reviews: get: operationId: listReviews tags: [reviews] summary: List reviews security: - cookieAuth: [] parameters: - name: hotelId in: query schema: type: integer - name: customerId in: query schema: type: integer - name: rating in: query schema: type: integer - name: status in: query schema: type: string - name: reportStatus in: query schema: type: string - name: search in: query schema: type: string - name: sort in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Reviews list content: application/json: schema: $ref: "#/components/schemas/ReviewsPage" post: operationId: createReview tags: [reviews] summary: Submit a review security: - cookieAuth: [] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReviewInput" responses: "201": description: Review created content: application/json: schema: $ref: "#/components/schemas/Review" /reviews/{id}: get: operationId: getReview tags: [reviews] summary: Get review detail security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Review content: application/json: schema: $ref: "#/components/schemas/Review" put: operationId: updateReview tags: [reviews] summary: Edit a review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReviewInput" responses: "200": description: Updated review content: application/json: schema: $ref: "#/components/schemas/Review" delete: operationId: deleteReview tags: [reviews] summary: Delete a review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean required: [success] /reviews/{id}/reply: post: operationId: replyToReview tags: [reviews] summary: Owner reply to review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReviewReplyInput" responses: "200": description: Reply added content: application/json: schema: $ref: "#/components/schemas/Review" /reviews/{id}/report: post: operationId: reportReview tags: [reviews] summary: Report a review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReviewReportInput" responses: "200": description: Reported content: application/json: schema: type: object properties: success: type: boolean required: [success] /reviews/{id}/hide: post: operationId: hideReview tags: [reviews] summary: Admin hide a review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Hidden content: application/json: schema: $ref: "#/components/schemas/Review" /reviews/{id}/restore: post: operationId: restoreReview tags: [reviews] summary: Super admin restore a review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Restored content: application/json: schema: $ref: "#/components/schemas/Review" /reviews/{id}/remove: post: operationId: removeReview tags: [reviews] summary: Super admin permanently remove a review security: - cookieAuth: [] parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Removed content: application/json: schema: type: object properties: success: type: boolean required: [success] # ── Restaurants ──────────────────────────────────────────────────────── /restaurants/my: get: operationId: getMyRestaurants tags: [restaurants] summary: Owner's restaurants responses: "200": description: List of owner's restaurants content: application/json: schema: type: array items: $ref: "#/components/schemas/RestaurantSummary" /restaurants: get: operationId: listRestaurants tags: [restaurants] summary: Browse restaurants (public) parameters: - name: search in: query schema: type: string - name: city in: query schema: type: string - name: cuisine in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Paginated restaurant list content: application/json: schema: $ref: "#/components/schemas/RestaurantsPage" post: operationId: createRestaurant tags: [restaurants] summary: Create restaurant (owner) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RestaurantInput" responses: "201": description: Created restaurant content: application/json: schema: $ref: "#/components/schemas/RestaurantDetail" /restaurants/{id}: get: operationId: getRestaurant tags: [restaurants] summary: Get restaurant detail (public) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Restaurant detail content: application/json: schema: $ref: "#/components/schemas/RestaurantDetail" put: operationId: updateRestaurant tags: [restaurants] summary: Update restaurant (owner) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RestaurantInput" responses: "200": description: Updated restaurant content: application/json: schema: $ref: "#/components/schemas/RestaurantDetail" delete: operationId: deleteRestaurant tags: [restaurants] summary: Soft-delete restaurant (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean required: [success] /restaurants/{id}/menu: get: operationId: getRestaurantMenu tags: [restaurants] summary: Get menu for a restaurant parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Menu items content: application/json: schema: type: array items: $ref: "#/components/schemas/MenuItemDetail" post: operationId: addMenuItem tags: [restaurants] summary: Add menu item (owner) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MenuItemInput" responses: "201": description: Created menu item content: application/json: schema: $ref: "#/components/schemas/MenuItemDetail" /menu-items/{id}: put: operationId: updateMenuItem tags: [restaurants] summary: Update menu item (owner) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/MenuItemInput" responses: "200": description: Updated menu item content: application/json: schema: $ref: "#/components/schemas/MenuItemDetail" delete: operationId: deleteMenuItem tags: [restaurants] summary: Delete menu item (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean required: [success] /restaurants/{id}/tables: get: operationId: getRestaurantTables tags: [restaurants] summary: Get tables for a restaurant parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Tables content: application/json: schema: type: array items: $ref: "#/components/schemas/TableDetail" post: operationId: addTable tags: [restaurants] summary: Add table (owner) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TableInput" responses: "201": description: Created table content: application/json: schema: $ref: "#/components/schemas/TableDetail" /tables/{id}: put: operationId: updateTable tags: [restaurants] summary: Update table (owner) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TableInput" responses: "200": description: Updated table content: application/json: schema: $ref: "#/components/schemas/TableDetail" delete: operationId: deleteTable tags: [restaurants] summary: Delete table (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean required: [success] # ── Reservations ────────────────────────────────────────────────────── /reservations/my: get: operationId: getMyReservations tags: [reservations] summary: Customer's own reservations responses: "200": description: Customer reservations content: application/json: schema: type: array items: $ref: "#/components/schemas/ReservationDetail" /reservations: get: operationId: listReservations tags: [reservations] summary: List reservations (owner/admin) parameters: - name: restaurantId in: query schema: type: integer - name: status in: query schema: type: string - name: date in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Paginated reservations content: application/json: schema: $ref: "#/components/schemas/ReservationsPage" post: operationId: createReservation tags: [reservations] summary: Create reservation (customer) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReservationInput" responses: "201": description: Created reservation content: application/json: schema: $ref: "#/components/schemas/ReservationDetail" /reservations/{id}: get: operationId: getReservation tags: [reservations] summary: Get reservation detail parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Reservation detail content: application/json: schema: $ref: "#/components/schemas/ReservationDetail" delete: operationId: cancelReservation tags: [reservations] summary: Cancel reservation (customer) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Cancelled content: application/json: schema: $ref: "#/components/schemas/ReservationDetail" /reservations/{id}/confirm: patch: operationId: confirmReservation tags: [reservations] summary: Confirm reservation (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Confirmed content: application/json: schema: $ref: "#/components/schemas/ReservationDetail" /reservations/{id}/reject: patch: operationId: rejectReservation tags: [reservations] summary: Reject reservation (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Rejected content: application/json: schema: $ref: "#/components/schemas/ReservationDetail" /reservations/{id}/complete: patch: operationId: completeReservation tags: [reservations] summary: Mark reservation complete (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Completed content: application/json: schema: $ref: "#/components/schemas/ReservationDetail" /spas/my: get: operationId: getMySpasList tags: [spas] summary: Get my spas (spa owner) responses: "200": description: List of my spas content: application/json: schema: type: array items: $ref: "#/components/schemas/Spa" /spas/stats: get: operationId: getSpaOwnerStats tags: [spas] summary: Get spa owner dashboard stats responses: "200": description: Stats content: application/json: schema: $ref: "#/components/schemas/SpaStats" /spas: get: operationId: getAllSpas tags: [spas] summary: List all spas (admin) parameters: - name: search in: query schema: type: string - name: status in: query schema: type: string - name: city in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Paginated spas content: application/json: schema: $ref: "#/components/schemas/SpasPage" post: operationId: createSpa tags: [spas] summary: Create a new spa requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SpaInput" responses: "201": description: Created spa content: application/json: schema: $ref: "#/components/schemas/Spa" /spas/{id}: get: operationId: getSpaById tags: [spas] summary: Get spa detail parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Spa detail content: application/json: schema: $ref: "#/components/schemas/Spa" put: operationId: updateSpa tags: [spas] summary: Update spa parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SpaInput" responses: "200": description: Updated spa content: application/json: schema: $ref: "#/components/schemas/Spa" delete: operationId: deleteSpa tags: [spas] summary: Soft delete spa parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean required: - success /spas/{id}/restore: post: operationId: restoreSpa tags: [spas] summary: Restore a deleted spa parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Restored content: application/json: schema: $ref: "#/components/schemas/Spa" /spas/{id}/status: put: operationId: updateSpaStatus tags: [spas] summary: Update spa status (admin) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SpaStatusUpdate" responses: "200": description: Updated spa content: application/json: schema: $ref: "#/components/schemas/Spa" /spas/{id}/services: get: operationId: getSpaServices tags: [spa-services] summary: Get services for a spa parameters: - name: id in: path required: true schema: type: integer responses: "200": description: List of services content: application/json: schema: type: array items: $ref: "#/components/schemas/SpaService" post: operationId: createSpaService tags: [spa-services] summary: Add service to spa (owner) parameters: - name: id in: path required: true schema: type: integer requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SpaServiceInput" responses: "201": description: Created service content: application/json: schema: $ref: "#/components/schemas/SpaService" /spa-services/{id}: put: operationId: updateSpaService tags: [spa-services] summary: Update spa service (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Updated service content: application/json: schema: $ref: "#/components/schemas/SpaService" delete: operationId: deleteSpaService tags: [spa-services] summary: Delete spa service (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Deleted content: application/json: schema: type: object properties: success: type: boolean required: - success /spa-appointments/my: get: operationId: getMySpaAppointments tags: [spa-appointments] summary: Get customer's own appointments parameters: - name: status in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Paginated appointments content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentsPage" /spa-appointments/owner: get: operationId: getOwnerSpaAppointments tags: [spa-appointments] summary: Get all appointments for owner's spas parameters: - name: spaId in: query schema: type: integer - name: status in: query schema: type: string - name: page in: query schema: type: integer - name: limit in: query schema: type: integer responses: "200": description: Paginated appointments content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentsPage" /spa-appointments: post: operationId: createSpaAppointment tags: [spa-appointments] summary: Book a spa appointment (customer) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentInput" responses: "201": description: Created appointment content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentDetail" /spa-appointments/{id}: get: operationId: getSpaAppointmentById tags: [spa-appointments] summary: Get appointment detail parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Appointment detail content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentDetail" /spa-appointments/{id}/confirm: put: operationId: confirmSpaAppointment tags: [spa-appointments] summary: Confirm appointment (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Confirmed content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentDetail" /spa-appointments/{id}/reject: put: operationId: rejectSpaAppointment tags: [spa-appointments] summary: Reject appointment (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Rejected content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentDetail" /spa-appointments/{id}/complete: put: operationId: completeSpaAppointment tags: [spa-appointments] summary: Complete appointment (owner) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Completed content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentDetail" /spa-appointments/{id}/cancel: put: operationId: cancelSpaAppointment tags: [spa-appointments] summary: Cancel appointment (customer) parameters: - name: id in: path required: true schema: type: integer responses: "200": description: Cancelled content: application/json: schema: $ref: "#/components/schemas/SpaAppointmentDetail" /tourist-places: get: operationId: listTouristPlaces tags: [tourist-places] summary: List tourist places (public) parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: search in: query schema: { type: string } - name: city in: query schema: { type: string } - name: featured in: query schema: { type: boolean } responses: "200": description: List of tourist places content: application/json: schema: $ref: "#/components/schemas/TouristPlacesPage" post: operationId: createTouristPlace tags: [tourist-places] summary: Create a tourist place (admin) requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceInput" responses: "201": description: Created content: application/json: schema: $ref: "#/components/schemas/TouristPlace" /tourist-places/seed: post: operationId: seedTouristPlaces tags: [tourist-places] summary: Seed demo tourist places (super_admin) responses: "200": description: Seeded content: application/json: schema: type: object properties: message: { type: string } count: { type: integer } required: [message, count] /tourist-places/{id}: get: operationId: getTouristPlace tags: [tourist-places] summary: Get tourist place detail (public) parameters: - name: id in: path required: true schema: { type: integer } responses: "200": description: Tourist place detail content: application/json: schema: $ref: "#/components/schemas/TouristPlaceDetail" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" put: operationId: updateTouristPlace tags: [tourist-places] summary: Update a tourist place (admin) parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceInput" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/TouristPlace" delete: operationId: deleteTouristPlace tags: [tourist-places] summary: Delete a tourist place (admin) parameters: - name: id in: path required: true schema: { type: integer } responses: "200": description: Deleted content: application/json: schema: type: object properties: success: { type: boolean } required: [success] /tourist-places/{id}/images: post: operationId: addTouristPlaceImage tags: [tourist-places] summary: Add image to tourist place (admin) parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceImageInput" responses: "201": description: Image added content: application/json: schema: $ref: "#/components/schemas/TouristPlaceImage" /tourist-places/{id}/images/reorder: post: operationId: reorderTouristPlaceImages tags: [tourist-places] summary: Reorder images (admin) parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ReorderImagesInput" responses: "200": description: Reordered content: application/json: schema: type: object properties: success: { type: boolean } required: [success] /tourist-places/images/{imageId}: put: operationId: updateTouristPlaceImage tags: [tourist-places] summary: Update image metadata (admin) parameters: - name: imageId in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceImageInput" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/TouristPlaceImage" delete: operationId: deleteTouristPlaceImage tags: [tourist-places] summary: Delete image (admin) parameters: - name: imageId in: path required: true schema: { type: integer } responses: "200": description: Deleted content: application/json: schema: type: object properties: success: { type: boolean } required: [success] /tourist-places/images/{imageId}/feature: put: operationId: setFeaturedTouristPlaceImage tags: [tourist-places] summary: Set image as featured (admin) parameters: - name: imageId in: path required: true schema: { type: integer } responses: "200": description: Featured set content: application/json: schema: type: object properties: success: { type: boolean } required: [success] /tourist-places/{id}/tips: post: operationId: addTouristPlaceTip tags: [tourist-places] summary: Add visitor tip (admin) parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceTipInput" responses: "201": description: Tip added content: application/json: schema: $ref: "#/components/schemas/TouristPlaceTip" /tourist-places/tips/{tipId}: put: operationId: updateTouristPlaceTip tags: [tourist-places] summary: Update visitor tip (admin) parameters: - name: tipId in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceTipInput" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/TouristPlaceTip" delete: operationId: deleteTouristPlaceTip tags: [tourist-places] summary: Delete visitor tip (admin) parameters: - name: tipId in: path required: true schema: { type: integer } responses: "200": description: Deleted content: application/json: schema: type: object properties: success: { type: boolean } required: [success] /tourist-places/{id}/distances: post: operationId: addTouristPlaceDistance tags: [tourist-places] summary: Add distance info (admin) parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceDistanceInput" responses: "201": description: Distance added content: application/json: schema: $ref: "#/components/schemas/TouristPlaceDistance" /tourist-places/my-favorites: get: operationId: getMyFavoritePlaces tags: [tourist-places] summary: Get my favorited tourist places responses: "200": description: List of favorited places content: application/json: schema: type: object properties: places: type: array items: $ref: "#/components/schemas/TouristPlaceDetail" total: type: integer required: [places, total] /tourist-places/connections: get: operationId: getTouristPlaceConnections tags: [tourist-places] summary: Get inter-place distances between all tourist places responses: "200": description: All place-to-place distances content: application/json: schema: type: object properties: connections: type: array items: $ref: "#/components/schemas/TouristPlaceConnection" required: [connections] /tourist-places/{id}/favorite: post: operationId: toggleTouristPlaceFavorite tags: [tourist-places] summary: Toggle favorite status for a tourist place parameters: - name: id in: path required: true schema: { type: integer } responses: "200": description: Favorite toggled content: application/json: schema: $ref: "#/components/schemas/FavoriteToggleResult" /tourist-places/{id}/nearby: get: operationId: getNearbyRecommendations tags: [tourist-places] summary: Get nearby hotels, restaurants, and spas for a tourist place parameters: - name: id in: path required: true schema: { type: integer } responses: "200": description: Nearby recommendations content: application/json: schema: $ref: "#/components/schemas/NearbyRecommendations" /tourist-places/{id}/connections: get: operationId: getPlaceConnections tags: [tourist-places] summary: Get distances from this place to all other tourist places parameters: - name: id in: path required: true schema: { type: integer } responses: "200": description: Connections from this place content: application/json: schema: type: object properties: connections: type: array items: $ref: "#/components/schemas/TouristPlaceConnection" required: [connections] /tourist-places/distances/{distId}: put: operationId: updateTouristPlaceDistance tags: [tourist-places] summary: Update distance info (admin) parameters: - name: distId in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/TouristPlaceDistanceInput" responses: "200": description: Updated content: application/json: schema: $ref: "#/components/schemas/TouristPlaceDistance" delete: operationId: deleteTouristPlaceDistance tags: [tourist-places] summary: Delete distance info (admin) parameters: - name: distId in: path required: true schema: { type: integer } responses: "200": description: Deleted content: application/json: schema: type: object properties: success: { type: boolean } required: [success] # ─── Coupons (customer) ────────────────────────────────── /coupons/validate: post: operationId: validateCoupon tags: [coupons] summary: Validate a coupon code and calculate discount requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CouponValidateInput" responses: "200": description: Coupon is valid and discount is calculated content: application/json: schema: $ref: "#/components/schemas/CouponValidateResult" "400": description: Coupon invalid or not applicable content: application/json: schema: type: object properties: error: { type: string } required: [error] "404": description: Coupon not found # ─── Payments ─────────────────────────────────────────── /payments: post: operationId: createPayment tags: [payments] summary: Create a payment record for a booking/reservation/appointment requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreatePaymentInput" responses: "201": description: Payment record created content: application/json: schema: $ref: "#/components/schemas/Payment" /payments/my: get: operationId: getMyPayments tags: [payments] summary: Get current customer's payment history parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: status in: query schema: { type: string } responses: "200": description: Customer payment list content: application/json: schema: $ref: "#/components/schemas/PaymentListResponse" /payments/owner: get: operationId: getOwnerPayments tags: [payments] summary: Get payments for the current owner's properties parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: status in: query schema: { type: string } - name: bookingType in: query schema: { type: string } responses: "200": description: Owner payment list content: application/json: schema: $ref: "#/components/schemas/PaymentListResponse" /payments/admin: get: operationId: getAdminPayments tags: [payments] summary: Get all payments (admin/super_admin) parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: status in: query schema: { type: string } - name: bookingType in: query schema: { type: string } - name: search in: query schema: { type: string } responses: "200": description: All payments content: application/json: schema: $ref: "#/components/schemas/PaymentListResponse" /payments/analytics: get: operationId: getPaymentAnalytics tags: [payments] summary: Revenue and payment analytics (admin/super_admin) responses: "200": description: Analytics data content: application/json: schema: $ref: "#/components/schemas/PaymentAnalytics" /payments/{ref}: get: operationId: getPaymentByRef tags: [payments] summary: Get single payment by paymentRef parameters: - name: ref in: path required: true schema: { type: string } responses: "200": description: Payment detail content: application/json: schema: $ref: "#/components/schemas/PaymentDetail" /payments/{ref}/initiate: post: operationId: initiatePayment tags: [payments] summary: Initiate payment (simulate gateway order creation) parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/InitiatePaymentInput" responses: "200": description: Payment initiated content: application/json: schema: $ref: "#/components/schemas/Payment" /payments/{ref}/confirm: post: operationId: confirmPayment tags: [payments] summary: Confirm/complete a payment (simulate gateway callback) parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ConfirmPaymentInput" responses: "200": description: Payment confirmed content: application/json: schema: $ref: "#/components/schemas/Payment" /payments/{ref}/fail: post: operationId: failPayment tags: [payments] summary: Mark payment as failed parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/FailPaymentInput" responses: "200": description: Payment marked failed content: application/json: schema: $ref: "#/components/schemas/Payment" # ─── Refunds ─────────────────────────────────────────── /refunds: post: operationId: requestRefund tags: [refunds] summary: Request a refund for a payment requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RefundRequestInput" responses: "201": description: Refund request submitted content: application/json: schema: $ref: "#/components/schemas/Refund" /refunds/my: get: operationId: getMyRefunds tags: [refunds] summary: Get current customer's refund history responses: "200": description: Customer refund list content: application/json: schema: type: object properties: refunds: type: array items: $ref: "#/components/schemas/RefundDetail" total: { type: integer } required: [refunds, total] /refunds/admin: get: operationId: getAdminRefunds tags: [refunds] summary: Get all refunds (admin/super_admin) parameters: - name: status in: query schema: { type: string } responses: "200": description: All refunds content: application/json: schema: type: object properties: refunds: type: array items: $ref: "#/components/schemas/RefundDetail" total: { type: integer } required: [refunds, total] /refunds/{id}: put: operationId: processRefund tags: [refunds] summary: Approve or reject a refund (admin/super_admin) parameters: - name: id in: path required: true schema: { type: integer } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ProcessRefundInput" responses: "200": description: Refund processed content: application/json: schema: $ref: "#/components/schemas/Refund" # ─── Commission paths ────────────────────────────────────────────────────── /commissions/config: get: summary: Get commission configurations tags: [commissions] responses: "200": description: List of commission configs content: application/json: schema: type: array items: $ref: "#/components/schemas/CommissionConfig" put: summary: Update commission configurations (admin) tags: [commissions] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateCommissionConfigInput" responses: "200": description: Updated configs content: application/json: schema: type: array items: $ref: "#/components/schemas/CommissionConfig" # ─── Hotel Commission Agreement paths ───────────────────────────────────── /hotel-commission-agreements: post: operationId: createHotelCommissionAgreement tags: [hotel-commission-agreements] summary: Create a commission agreement for a hotel requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/HotelCommissionAgreementInput" responses: "201": description: Agreement created content: application/json: schema: $ref: "#/components/schemas/HotelCommissionAgreement" "400": description: Agreement already exists content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /hotel-commission-agreements/{hotelId}: get: operationId: getHotelCommissionAgreement tags: [hotel-commission-agreements] summary: Get commission agreement for a hotel parameters: - name: hotelId in: path required: true schema: { type: integer } responses: "200": description: Agreement found content: application/json: schema: $ref: "#/components/schemas/HotelCommissionAgreement" "404": description: Agreement not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" /hotel-commission-agreements/{hotelId}/agree: post: operationId: agreeToCommission tags: [hotel-commission-agreements] summary: Owner agrees to the commission agreement parameters: - name: hotelId in: path required: true schema: { type: integer } responses: "200": description: Agreement accepted content: application/json: schema: $ref: "#/components/schemas/HotelCommissionAgreement" "404": description: Agreement not found content: application/json: schema: $ref: "#/components/schemas/ErrorResponse" # ─── Earnings paths ──────────────────────────────────────────────────────── /earnings/owner: get: summary: Owner's own earnings summary + list tags: [earnings] parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: status in: query schema: { type: string } - name: from in: query schema: { type: string } - name: to in: query schema: { type: string } responses: "200": description: Owner earnings content: application/json: schema: type: object properties: summary: $ref: "#/components/schemas/OwnerEarningsSummary" earnings: type: array items: $ref: "#/components/schemas/OwnerEarningDetail" total: { type: integer } page: { type: integer } limit: { type: integer } required: [summary, earnings, total, page, limit] /earnings/admin: get: summary: Admin view all owner earnings tags: [earnings] parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: ownerId in: query schema: { type: integer } - name: bookingType in: query schema: { type: string } - name: status in: query schema: { type: string } - name: from in: query schema: { type: string } - name: to in: query schema: { type: string } responses: "200": description: All earnings content: application/json: schema: type: object properties: earnings: type: array items: $ref: "#/components/schemas/OwnerEarningDetail" total: { type: integer } page: { type: integer } limit: { type: integer } required: [earnings, total, page, limit] /earnings/analytics: get: summary: Platform earnings analytics (admin) tags: [earnings] parameters: - name: from in: query schema: { type: string } - name: to in: query schema: { type: string } responses: "200": description: Platform earnings analytics content: application/json: schema: $ref: "#/components/schemas/PlatformEarningsAnalytics" # ─── Payout paths ────────────────────────────────────────────────────────── /payouts: post: summary: Owner requests a payout withdrawal tags: [payouts] requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RequestPayoutInput" responses: "201": description: Payout request created content: application/json: schema: $ref: "#/components/schemas/Payout" /payouts/my: get: summary: Owner's own payout history tags: [payouts] parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: status in: query schema: { type: string } responses: "200": description: Owner payout history content: application/json: schema: type: object properties: payouts: type: array items: $ref: "#/components/schemas/Payout" total: { type: integer } page: { type: integer } limit: { type: integer } required: [payouts, total, page, limit] /payouts/admin: get: summary: Admin view all payout requests tags: [payouts] parameters: - name: page in: query schema: { type: integer, default: 1 } - name: limit in: query schema: { type: integer, default: 20 } - name: status in: query schema: { type: string } - name: ownerId in: query schema: { type: integer } responses: "200": description: All payout requests content: application/json: schema: type: object properties: payouts: type: array items: $ref: "#/components/schemas/PayoutDetail" total: { type: integer } page: { type: integer } limit: { type: integer } required: [payouts, total, page, limit] /payouts/{ref}: patch: summary: Admin approve/reject/mark-paid a payout tags: [payouts] parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ProcessPayoutInput" responses: "200": description: Updated payout content: application/json: schema: $ref: "#/components/schemas/PayoutDetail" # ─── Report paths ────────────────────────────────────────────────────────── /reports/revenue: get: summary: Platform revenue report (admin) tags: [reports] parameters: - name: from in: query schema: { type: string } - name: to in: query schema: { type: string } - name: bookingType in: query schema: { type: string } responses: "200": description: Revenue report data content: application/json: schema: $ref: "#/components/schemas/RevenueReport" /reports/commission: get: summary: Commission report (admin) tags: [reports] parameters: - name: from in: query schema: { type: string } - name: to in: query schema: { type: string } - name: bookingType in: query schema: { type: string } responses: "200": description: Commission report data content: application/json: schema: $ref: "#/components/schemas/RevenueReport" /reports/earnings: get: summary: Owner earnings report (owner/admin) tags: [reports] parameters: - name: from in: query schema: { type: string } - name: to in: query schema: { type: string } - name: ownerId in: query schema: { type: integer } responses: "200": description: Earnings report data content: application/json: schema: $ref: "#/components/schemas/RevenueReport" /trips: get: operationId: listTrips summary: List customer trips tags: [trips] security: [{ cookieAuth: [] }] parameters: - { name: status, in: query, schema: { type: string } } - { name: page, in: query, schema: { type: integer, default: 1 } } - { name: limit, in: query, schema: { type: integer, default: 20 } } responses: '200': description: Trip list content: application/json: schema: type: object properties: trips: { type: array, items: { $ref: '#/components/schemas/TripPlan' } } total: { type: integer } page: { type: integer } limit: { type: integer } required: [trips, total, page, limit] post: operationId: createTrip summary: Create a trip plan tags: [trips] security: [{ cookieAuth: [] }] requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/CreateTripBody' } responses: '201': description: Created trip content: application/json: schema: { $ref: '#/components/schemas/TripPlan' } /trips/{ref}: get: operationId: getTrip summary: Get a trip plan by ref tags: [trips] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Trip detail content: application/json: schema: { $ref: '#/components/schemas/TripPlan' } put: operationId: updateTrip summary: Update a trip plan tags: [trips] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/UpdateTripBody' } responses: '200': description: Updated trip content: application/json: schema: { $ref: '#/components/schemas/TripPlan' } delete: operationId: deleteTrip summary: Delete a trip plan tags: [trips] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Deleted content: application/json: schema: type: object properties: { success: { type: boolean } } required: [success] /trips/{ref}/cancel: patch: operationId: cancelTrip summary: Cancel a trip plan tags: [trips] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Cancelled trip content: application/json: schema: { $ref: '#/components/schemas/TripPlan' } /support/tickets: get: operationId: listSupportTickets summary: List support tickets tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: status, in: query, schema: { type: string } } - { name: priority, in: query, schema: { type: string } } - { name: category, in: query, schema: { type: string } } - { name: search, in: query, schema: { type: string } } - { name: page, in: query, schema: { type: integer, default: 1 } } - { name: limit, in: query, schema: { type: integer, default: 20 } } responses: '200': description: Ticket list content: application/json: schema: type: object properties: tickets: { type: array, items: { $ref: '#/components/schemas/SupportTicket' } } total: { type: integer } page: { type: integer } limit: { type: integer } required: [tickets, total, page, limit] post: operationId: createSupportTicket summary: Create a support ticket tags: [support] security: [{ cookieAuth: [] }] requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/CreateSupportTicketBody' } responses: '201': description: Created ticket content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } /support/tickets/{ref}: get: operationId: getSupportTicket summary: Get ticket detail with messages tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Ticket with messages content: application/json: schema: { $ref: '#/components/schemas/SupportTicketDetail' } delete: operationId: deleteSupportTicket summary: Delete a ticket (super_admin only) tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Deleted content: application/json: schema: type: object properties: { success: { type: boolean } } required: [success] /support/tickets/{ref}/messages: post: operationId: addTicketMessage summary: Add a message to a ticket tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } requestBody: required: true content: application/json: schema: { $ref: '#/components/schemas/AddTicketMessageBody' } responses: '201': description: Created message content: application/json: schema: { $ref: '#/components/schemas/TicketMessage' } /support/tickets/{ref}/status: patch: operationId: updateTicketStatus summary: Update ticket status (admin) tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } requestBody: required: true content: application/json: schema: type: object properties: { status: { type: string } } required: [status] responses: '200': description: Updated ticket content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } /support/tickets/{ref}/assign: patch: operationId: assignTicket summary: Assign ticket to admin tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } requestBody: required: true content: application/json: schema: type: object properties: { assignedTo: { type: integer, nullable: true } } required: [assignedTo] responses: '200': description: Updated ticket content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } /support/tickets/{ref}/close: patch: operationId: closeTicket summary: Close a ticket tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Closed ticket content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } /support/tickets/{ref}/reopen: patch: operationId: reopenTicket summary: Reopen a closed ticket (super_admin) tags: [support] security: [{ cookieAuth: [] }] parameters: - { name: ref, in: path, required: true, schema: { type: string } } responses: '200': description: Reopened ticket content: application/json: schema: { $ref: '#/components/schemas/SupportTicket' } /support/analytics: get: operationId: getSupportAnalytics summary: Support ticket analytics (admin) tags: [support] security: [{ cookieAuth: [] }] responses: '200': description: Analytics data content: application/json: schema: { $ref: '#/components/schemas/SupportAnalytics' } # ─── Cancellation paths ───────────────────────────────────────────────────── /cancellations: post: operationId: requestCancellation tags: [refunds] summary: Customer requests cancellation of a booking requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/RequestCancellationInput" responses: "201": description: Cancellation request created content: application/json: schema: $ref: "#/components/schemas/CancellationDetail" get: operationId: getMyCancellations tags: [refunds] summary: Customer's own cancellation requests responses: "200": description: Cancellation list content: application/json: schema: type: object properties: cancellations: type: array items: $ref: "#/components/schemas/CancellationDetail" total: { type: integer } required: [cancellations, total] /cancellations/{ref}: get: operationId: getCancellation tags: [refunds] summary: Get single cancellation by ref parameters: - name: ref in: path required: true schema: { type: string } responses: "200": description: Cancellation detail content: application/json: schema: $ref: "#/components/schemas/CancellationDetail" /owner/cancellations: get: operationId: getOwnerCancellations tags: [refunds] summary: Owner incoming cancellation requests parameters: - name: status in: query schema: { type: string } responses: "200": description: Owner cancellation list content: application/json: schema: type: object properties: cancellations: type: array items: $ref: "#/components/schemas/CancellationDetail" total: { type: integer } required: [cancellations, total] /owner/cancellations/{ref}: patch: operationId: processOwnerCancellation tags: [refunds] summary: Owner approves or rejects a cancellation parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/ProcessCancellationInput" responses: "200": description: Cancellation processed content: application/json: schema: $ref: "#/components/schemas/CancellationDetail" /admin/cancellations: get: operationId: getAdminCancellations tags: [refunds] summary: Admin list all cancellations parameters: - name: status in: query schema: { type: string } - name: bookingType in: query schema: { type: string } responses: "200": description: All cancellations content: application/json: schema: type: object properties: cancellations: type: array items: $ref: "#/components/schemas/CancellationDetail" total: { type: integer } required: [cancellations, total] /admin/cancellations/{ref}: patch: operationId: processAdminCancellation tags: [refunds] summary: Admin approves or rejects a cancellation parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/AdminCancellationInput" responses: "200": description: Cancellation processed content: application/json: schema: $ref: "#/components/schemas/CancellationDetail" /refunds/analytics: get: operationId: getRefundAnalytics tags: [refunds] summary: Super admin refund analytics responses: "200": description: Refund analytics content: application/json: schema: $ref: "#/components/schemas/RefundAnalytics" /refunds/{ref}: get: operationId: getRefundByRef tags: [refunds] summary: Get single refund by ref parameters: - name: ref in: path required: true schema: { type: string } responses: "200": description: Refund detail content: application/json: schema: $ref: "#/components/schemas/RefundDetail" /refunds/admin/{ref}/override: patch: operationId: overrideRefund tags: [refunds] summary: Super admin overrides a refund decision parameters: - name: ref in: path required: true schema: { type: string } requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/OverrideRefundInput" responses: "200": description: Refund overridden content: application/json: schema: $ref: "#/components/schemas/Refund" # ─── Trip Recommendations ─────────────────────────────────────────────────── /trips/{ref}/recommendations: post: operationId: generateTripRecommendations tags: [trips] summary: Generate smart recommendations for a trip plan parameters: - name: ref in: path required: true schema: { type: string } responses: "200": description: Generated recommendation content: application/json: schema: $ref: "#/components/schemas/TripRecommendation" get: operationId: getTripRecommendations tags: [trips] summary: Get existing recommendations for a trip parameters: - name: ref in: path required: true schema: { type: string } responses: "200": description: Existing recommendation content: application/json: schema: $ref: "#/components/schemas/TripRecommendation" "404": description: No recommendations yet /admin/trip-analytics: get: operationId: getTripAnalytics tags: [trips] summary: Admin trip planner analytics responses: "200": description: Trip analytics content: application/json: schema: $ref: "#/components/schemas/TripAnalytics" components: schemas: HealthStatus: type: object properties: status: type: string required: - status ErrorResponse: type: object properties: error: type: string required: - error MessageResponse: type: object properties: message: type: string required: - message User: type: object properties: id: type: integer fullName: type: string email: type: string mobile: type: string city: type: ["string", "null"] state: type: ["string", "null"] role: type: string enum: [super_admin, admin, hotel_owner, restaurant_owner, spa_owner, customer] status: type: string enum: [pending, active, suspended, rejected] profilePhoto: type: ["string", "null"] createdAt: type: string updatedAt: type: string required: - id - fullName - email - mobile - role - status - createdAt - updatedAt UsersPage: type: object properties: users: type: array items: $ref: "#/components/schemas/User" total: type: integer page: type: integer limit: type: integer required: - users - total - page - limit RegisterInput: type: object properties: fullName: type: string email: type: string mobile: type: string password: type: string city: type: string state: type: string required: - fullName - mobile - password LoginInput: type: object properties: email: type: string mobile: type: string password: type: string rememberMe: type: boolean required: - password AuthResponse: type: object properties: user: $ref: "#/components/schemas/User" message: type: string required: - user - message ForgotPasswordInput: type: object properties: email: type: string required: - email ResetPasswordInput: type: object properties: token: type: string password: type: string required: - token - password UserUpdate: type: object properties: fullName: type: string mobile: type: string city: type: string state: type: string UserStatusUpdate: type: object properties: status: type: string enum: [pending, active, suspended, rejected] reason: type: string required: - status UserRoleUpdate: type: object properties: role: type: string enum: [super_admin, admin, hotel_owner, restaurant_owner, spa_owner, customer] required: - role ChangePasswordInput: type: object properties: currentPassword: type: string newPassword: type: string required: - currentPassword - newPassword PhotoUploadInput: type: object properties: photoUrl: type: string required: - photoUrl OwnerRequest: type: object properties: id: type: integer userId: type: integer requestedRole: type: string enum: [hotel_owner, restaurant_owner, spa_owner] status: type: string enum: [pending, approved, rejected] businessName: type: ["string", "null"] businessDescription: type: ["string", "null"] businessAddress: type: ["string", "null"] city: type: ["string", "null"] state: type: ["string", "null"] gstNumber: type: ["string", "null"] ownerName: type: ["string", "null"] ownerMobile: type: ["string", "null"] ownerEmail: type: ["string", "null"] businessPhotos: type: ["array", "null"] items: type: string identityProof: type: ["string", "null"] rejectionReason: type: ["string", "null"] reviewedBy: type: ["integer", "null"] approvedAt: type: ["string", "null"] createdAt: type: string updatedAt: type: string user: $ref: "#/components/schemas/User" required: - id - userId - requestedRole - status - createdAt - updatedAt - user OwnerRequestsPage: type: object properties: requests: type: array items: $ref: "#/components/schemas/OwnerRequest" total: type: integer page: type: integer limit: type: integer required: - requests - total - page - limit OwnerRequestInput: type: object properties: requestedRole: type: string enum: [hotel_owner, restaurant_owner, spa_owner] businessName: type: string businessDescription: type: string businessAddress: type: string city: type: string state: type: string gstNumber: type: ["string", "null"] ownerName: type: string ownerMobile: type: string ownerEmail: type: string businessPhotos: type: array items: type: string identityProof: type: string required: - requestedRole OwnerRequestUpdate: type: object properties: businessName: type: string businessDescription: type: string businessAddress: type: string city: type: string state: type: string gstNumber: type: ["string", "null"] ownerName: type: string ownerMobile: type: string ownerEmail: type: string businessPhotos: type: array items: type: string identityProof: type: string OwnerRequestRejectInput: type: object properties: reason: type: string required: - reason Notification: type: object properties: id: type: integer userId: type: integer title: type: string message: type: string type: type: string enum: [welcome, owner_approved, owner_rejected, account_update, announcement, general] isRead: type: boolean createdAt: type: string required: - id - userId - title - message - type - isRead - createdAt NotificationsPage: type: object properties: notifications: type: array items: $ref: "#/components/schemas/Notification" total: type: integer page: type: integer limit: type: integer required: - notifications - total - page - limit UnreadCount: type: object properties: count: type: integer required: - count ActivityLog: type: object properties: id: type: integer userId: type: ["integer", "null"] userRole: type: ["string", "null"] actionType: type: string description: type: string ipAddress: type: ["string", "null"] createdAt: type: string user: type: ["object", "null"] properties: id: type: integer fullName: type: string email: type: string required: - id - actionType - description - createdAt ActivityLogsPage: type: object properties: logs: type: array items: $ref: "#/components/schemas/ActivityLog" total: type: integer page: type: integer limit: type: integer required: - logs - total - page - limit PlatformSettings: type: object properties: id: type: integer appName: type: string logo: type: ["string", "null"] contactEmail: type: ["string", "null"] supportEmail: type: ["string", "null"] termsAndConditions: type: ["string", "null"] privacyPolicy: type: ["string", "null"] maintenanceMode: type: boolean updatedAt: type: string required: - id - appName - maintenanceMode - updatedAt PlatformSettingsUpdate: type: object properties: appName: type: string logo: type: string contactEmail: type: string supportEmail: type: string termsAndConditions: type: string privacyPolicy: type: string maintenanceMode: type: boolean DashboardStats: type: object properties: totalUsers: type: integer activeUsers: type: integer pendingUsers: type: integer suspendedUsers: type: integer totalOwnerRequests: type: integer pendingOwnerRequests: type: integer totalAdmins: type: integer pendingHotels: type: integer required: - totalUsers - activeUsers - pendingUsers - suspendedUsers - totalOwnerRequests - pendingOwnerRequests - totalAdmins RoleCount: type: object properties: role: type: string count: type: integer required: - role - count AnnouncementInput: type: object properties: title: type: string message: type: string required: - title - message HotelNearbyPlace: type: object required: [id, hotelId, placeName, category] properties: id: type: integer hotelId: type: integer placeName: type: string category: type: string enum: [tourist_place, railway_station, airport, bus_stand, hospital, market, other] distanceKm: type: ["number", "null"] estimatedTimeMinutes: type: ["integer", "null"] createdAt: type: string updatedAt: type: string HotelNearbyPlaceInput: type: object required: [placeName] properties: placeName: type: string category: type: string enum: [tourist_place, railway_station, airport, bus_stand, hospital, market, other] distanceKm: type: ["number", "null"] estimatedTimeMinutes: type: ["integer", "null"] Hotel: type: object properties: id: type: integer ownerId: type: integer name: type: string description: type: ["string", "null"] category: type: string enum: [budget, standard, premium, luxury] starRating: type: ["integer", "null"] minimum: 1 maximum: 5 address: type: ["string", "null"] city: type: ["string", "null"] state: type: ["string", "null"] pincode: type: ["string", "null"] googleMapLink: type: ["string", "null"] landmark: type: ["string", "null"] contactPerson: type: ["string", "null"] contactMobile: type: ["string", "null"] contactEmail: type: ["string", "null"] website: type: ["string", "null"] checkInTime: type: ["string", "null"] checkOutTime: type: ["string", "null"] totalRooms: type: ["integer", "null"] policies: type: ["string", "null"] cancellationPolicy: type: ["string", "null"] amenities: type: ["array", "null"] items: type: string coverImage: type: ["string", "null"] galleryImages: type: ["array", "null"] items: type: string categorizedPhotos: type: ["array", "null"] items: type: object properties: url: type: string category: type: string enum: [room, lobby, facade, nearby] earlyCheckInEnabled: type: ["boolean", "null"] earlyCheckInTime: type: ["string", "null"] earlyCheckInPrice: type: ["number", "null"] upiId: type: ["string", "null"] upiQrImage: type: ["string", "null"] status: type: string enum: [draft, pending, approved, rejected, suspended] rejectionReason: type: ["string", "null"] reviewedBy: type: ["integer", "null"] approvedAt: type: ["string", "null"] deletedAt: type: ["string", "null"] createdAt: type: string updatedAt: type: string required: - id - ownerId - name - category - status - createdAt - updatedAt HotelInput: type: object properties: name: type: string description: type: string category: type: string enum: [budget, standard, premium, luxury] starRating: type: integer minimum: 1 maximum: 5 address: type: string city: type: string state: type: string pincode: type: string googleMapLink: type: string landmark: type: string contactPerson: type: string contactMobile: type: string contactEmail: type: string website: type: string checkInTime: type: string checkOutTime: type: string totalRooms: type: integer policies: type: string cancellationPolicy: type: string amenities: type: array items: type: string coverImage: type: string galleryImages: type: array items: type: string categorizedPhotos: type: array items: type: object properties: url: type: string category: type: string enum: [room, lobby, facade, nearby] earlyCheckInEnabled: type: boolean earlyCheckInTime: type: string earlyCheckInPrice: type: number required: - name - category HotelUpdate: type: object properties: name: type: string description: type: string category: type: string enum: [budget, standard, premium, luxury] address: type: string city: type: string state: type: string pincode: type: string googleMapLink: type: string landmark: type: string contactPerson: type: string contactMobile: type: string contactEmail: type: string website: type: string checkInTime: type: string checkOutTime: type: string totalRooms: type: integer policies: type: string cancellationPolicy: type: string amenities: type: array items: type: string coverImage: type: string galleryImages: type: array items: type: string categorizedPhotos: type: array items: type: object properties: url: type: string category: type: string enum: [room, lobby, facade, nearby] earlyCheckInEnabled: type: boolean earlyCheckInTime: type: string earlyCheckInPrice: type: number HotelsPage: type: object properties: hotels: type: array items: $ref: "#/components/schemas/Hotel" total: type: integer page: type: integer limit: type: integer required: - hotels - total - page - limit HotelRejectInput: type: object properties: reason: type: string required: - reason HotelStats: type: object properties: totalHotels: type: integer draftHotels: type: integer pendingHotels: type: integer approvedHotels: type: integer rejectedHotels: type: integer suspendedHotels: type: integer deletedHotels: type: integer required: - totalHotels - draftHotels - pendingHotels - approvedHotels - rejectedHotels - suspendedHotels - deletedHotels Room: type: object properties: id: type: integer hotelId: type: integer ownerId: type: integer name: type: string roomNumber: type: string nullable: true roomType: type: string enum: [standard, deluxe, premium, family, executive, suite] description: type: string nullable: true adultsCapacity: type: integer childrenCapacity: type: integer bedType: type: string enum: [single, double, queen, king] roomSize: type: number nullable: true roomSizeUnit: type: string enum: [sqft, sqm] nullable: true basePrice: type: number weekendPrice: type: number nullable: true holidayPrice: type: number nullable: true discountPercentage: type: number extraGuestCharge: type: number nullable: true finalPrice: type: number nullable: true amenities: type: array items: type: string nullable: true coverImage: type: string nullable: true galleryImages: type: array items: type: string nullable: true totalRooms: type: integer availableRooms: type: integer occupiedRooms: type: integer blockedRooms: type: integer underMaintenanceRooms: type: integer status: type: string enum: [draft, active, inactive, maintenance] deletedAt: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - hotelId - ownerId - name - roomType - adultsCapacity - childrenCapacity - bedType - basePrice - discountPercentage - totalRooms - availableRooms - occupiedRooms - blockedRooms - underMaintenanceRooms - status - createdAt - updatedAt RoomInput: type: object properties: hotelId: type: integer name: type: string roomNumber: type: string roomType: type: string enum: [standard, deluxe, premium, family, executive, suite] description: type: string adultsCapacity: type: integer childrenCapacity: type: integer bedType: type: string enum: [single, double, queen, king] roomSize: type: number roomSizeUnit: type: string enum: [sqft, sqm] basePrice: type: number weekendPrice: type: number holidayPrice: type: number discountPercentage: type: number extraGuestCharge: type: number amenities: type: array items: type: string coverImage: type: string galleryImages: type: array items: type: string totalRooms: type: integer availableRooms: type: integer occupiedRooms: type: integer blockedRooms: type: integer underMaintenanceRooms: type: integer required: - hotelId - name - roomType - bedType - basePrice RoomUpdate: type: object properties: name: type: string roomNumber: type: string roomType: type: string enum: [standard, deluxe, premium, family, executive, suite] description: type: string adultsCapacity: type: integer childrenCapacity: type: integer bedType: type: string enum: [single, double, queen, king] roomSize: type: number roomSizeUnit: type: string enum: [sqft, sqm] basePrice: type: number weekendPrice: type: number holidayPrice: type: number discountPercentage: type: number extraGuestCharge: type: number amenities: type: array items: type: string coverImage: type: string galleryImages: type: array items: type: string totalRooms: type: integer availableRooms: type: integer occupiedRooms: type: integer blockedRooms: type: integer underMaintenanceRooms: type: integer RoomsPage: type: object properties: rooms: type: array items: $ref: "#/components/schemas/Room" total: type: integer page: type: integer limit: type: integer required: - rooms - total - page - limit RoomStats: type: object properties: totalRooms: type: integer draftRooms: type: integer activeRooms: type: integer inactiveRooms: type: integer maintenanceRooms: type: integer deletedRooms: type: integer totalAvailable: type: integer required: - totalRooms - draftRooms - activeRooms - inactiveRooms - maintenanceRooms - deletedRooms - totalAvailable Booking: type: object properties: id: type: integer bookingRef: type: string customerId: type: integer hotelId: type: integer roomId: type: integer ownerId: type: integer checkInDate: type: string checkOutDate: type: string nights: type: integer adultsCount: type: integer childrenCount: type: integer earlyCheckIn: type: boolean earlyCheckInAmount: type: number baseAmount: type: number discountAmount: type: number taxAmount: type: number taxRate: type: number finalAmount: type: number status: type: string enum: [pending, confirmed, rejected, cancelled, checked_in, checked_out] cancelReason: type: string nullable: true rejectionReason: type: string nullable: true customerNotes: type: string nullable: true confirmedBy: type: integer nullable: true confirmedAt: type: string nullable: true checkedInAt: type: string nullable: true checkedOutAt: type: string nullable: true customerName: type: string nullable: true hotelName: type: string nullable: true roomName: type: string nullable: true ownerName: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - bookingRef - customerId - hotelId - roomId - ownerId - checkInDate - checkOutDate - nights - adultsCount - childrenCount - baseAmount - discountAmount - taxAmount - taxRate - finalAmount - status - createdAt - updatedAt BookingInput: type: object properties: hotelId: type: integer roomId: type: integer checkInDate: type: string checkOutDate: type: string adultsCount: type: integer childrenCount: type: integer customerNotes: type: string earlyCheckIn: type: boolean required: - hotelId - roomId - checkInDate - checkOutDate BookingRejectInput: type: object properties: reason: type: string required: - reason BookingCancelInput: type: object properties: reason: type: string BookingsPage: type: object properties: bookings: type: array items: $ref: "#/components/schemas/Booking" total: type: integer page: type: integer limit: type: integer required: - bookings - total - page - limit BookingStats: type: object properties: total: type: integer pending: type: integer confirmed: type: integer rejected: type: integer cancelled: type: integer checkedIn: type: integer checkedOut: type: integer totalRevenue: type: number confirmedRevenue: type: number todayBookings: type: integer weekBookings: type: integer monthBookings: type: integer required: - total - pending - confirmed - rejected - cancelled - checkedIn - checkedOut - totalRevenue - confirmedRevenue - todayBookings - weekBookings - monthBookings BookingAnalytics: type: object properties: topHotelsByBookings: type: array items: type: object properties: hotelId: type: integer hotelName: type: string bookingCount: type: integer revenue: type: number required: [hotelId, hotelName, bookingCount, revenue] topRoomTypes: type: array items: type: object properties: roomType: type: string bookingCount: type: integer revenue: type: number required: [roomType, bookingCount, revenue] topOwners: type: array items: type: object properties: ownerId: type: integer ownerName: type: string bookingCount: type: integer revenue: type: number required: [ownerId, ownerName, bookingCount, revenue] byDay: type: array items: type: object properties: date: type: string bookingCount: type: integer revenue: type: number required: [date, bookingCount, revenue] required: - topHotelsByBookings - topRoomTypes - topOwners - byDay Review: type: object properties: id: type: integer bookingId: type: integer hotelId: type: integer customerId: type: integer ownerId: type: integer overallRating: type: integer cleanlinessRating: type: integer roomQualityRating: type: integer staffRating: type: integer locationRating: type: integer valueRating: type: integer reviewTitle: type: string reviewDescription: type: string reviewPhotos: type: array items: type: string ownerReplyTitle: type: string nullable: true ownerReplyMessage: type: string nullable: true ownerRepliedAt: type: string nullable: true status: type: string enum: [approved, hidden, removed] reportCount: type: integer reportReasons: type: array items: type: string reportStatus: type: string enum: [none, pending, reviewed] editableUntil: type: string nullable: true customerName: type: string nullable: true customerPhoto: type: string nullable: true hotelName: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - bookingId - hotelId - customerId - ownerId - overallRating - cleanlinessRating - roomQualityRating - staffRating - locationRating - valueRating - reviewTitle - reviewDescription - reviewPhotos - status - reportCount - reportReasons - reportStatus - createdAt - updatedAt ReviewInput: type: object properties: bookingId: type: integer overallRating: type: integer cleanlinessRating: type: integer roomQualityRating: type: integer staffRating: type: integer locationRating: type: integer valueRating: type: integer reviewTitle: type: string reviewDescription: type: string reviewPhotos: type: array items: type: string required: - bookingId - overallRating - cleanlinessRating - roomQualityRating - staffRating - locationRating - valueRating - reviewTitle - reviewDescription ReviewReplyInput: type: object properties: replyTitle: type: string replyMessage: type: string required: - replyMessage ReviewReportInput: type: object properties: reason: type: string required: - reason ReviewsPage: type: object properties: reviews: type: array items: $ref: "#/components/schemas/Review" total: type: integer page: type: integer limit: type: integer summary: type: object nullable: true properties: avgOverall: type: number avgCleanliness: type: number avgRoomQuality: type: number avgStaff: type: number avgLocation: type: number avgValue: type: number total: type: integer distribution: type: object required: - reviews - total - page - limit ReviewStats: type: object properties: total: type: integer approved: type: integer hidden: type: integer removed: type: integer reported: type: integer avgRating: type: number distribution: type: object required: - total - approved - hidden - removed - reported - avgRating - distribution EligibleBooking: type: object properties: bookingId: type: integer bookingRef: type: string hotelId: type: integer hotelName: type: string checkInDate: type: string checkOutDate: type: string checkedOutAt: type: string nullable: true alreadyReviewed: type: boolean existingReviewId: type: integer nullable: true required: - bookingId - bookingRef - hotelId - hotelName - checkInDate - checkOutDate - alreadyReviewed TopRatedHotel: type: object properties: hotelId: type: integer hotelName: type: string hotelCity: type: string hotelCoverPhoto: type: string nullable: true avgRating: type: number reviewCount: type: integer avgCleanliness: type: number avgRoomQuality: type: number avgStaff: type: number avgLocation: type: number avgValue: type: number positivePct: type: integer required: - hotelId - hotelName - hotelCity - avgRating - reviewCount - positivePct RestaurantSummary: type: object properties: id: type: integer ownerId: type: integer name: type: string description: type: string nullable: true city: type: string nullable: true state: type: string nullable: true cuisineType: type: string nullable: true seatingCapacity: type: integer nullable: true coverPhoto: type: string nullable: true status: type: string openingTime: type: string nullable: true closingTime: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - ownerId - name - status - createdAt - updatedAt RestaurantDetail: type: object properties: id: type: integer ownerId: type: integer name: type: string description: type: string nullable: true address: type: string nullable: true city: type: string nullable: true state: type: string nullable: true contactNumber: type: string nullable: true contactEmail: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true cuisineType: type: string nullable: true seatingCapacity: type: integer nullable: true coverPhoto: type: string nullable: true galleryPhotos: type: array items: type: string upiId: type: string nullable: true upiQrImage: type: string nullable: true status: type: string deletedAt: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - ownerId - name - galleryPhotos - status - createdAt - updatedAt RestaurantInput: type: object properties: name: type: string description: type: string nullable: true address: type: string nullable: true city: type: string nullable: true state: type: string nullable: true contactNumber: type: string nullable: true contactEmail: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true cuisineType: type: string nullable: true seatingCapacity: type: integer nullable: true coverPhoto: type: string nullable: true galleryPhotos: type: array items: type: string required: - name RestaurantsPage: type: object properties: restaurants: type: array items: $ref: "#/components/schemas/RestaurantDetail" total: type: integer page: type: integer limit: type: integer required: - restaurants - total - page - limit MenuItemDetail: type: object properties: id: type: integer restaurantId: type: integer name: type: string category: type: string description: type: string nullable: true price: type: number itemPhoto: type: string nullable: true isVeg: type: boolean isAvailable: type: boolean createdAt: type: string updatedAt: type: string required: - id - restaurantId - name - category - price - isVeg - isAvailable - createdAt - updatedAt MenuItemInput: type: object properties: name: type: string category: type: string description: type: string nullable: true price: type: number itemPhoto: type: string nullable: true isVeg: type: boolean isAvailable: type: boolean required: - name - price TableDetail: type: object properties: id: type: integer restaurantId: type: integer tableNumber: type: string capacity: type: integer status: type: string createdAt: type: string updatedAt: type: string required: - id - restaurantId - tableNumber - capacity - status - createdAt - updatedAt TableInput: type: object properties: tableNumber: type: string capacity: type: integer status: type: string required: - tableNumber ReservationDetail: type: object properties: id: type: integer reservationRef: type: string restaurantId: type: integer tableId: type: integer nullable: true customerId: type: integer ownerId: type: integer customerName: type: string customerMobile: type: string customerEmail: type: string nullable: true reservationDate: type: string reservationTime: type: string guestCount: type: integer specialRequest: type: string nullable: true status: type: string rejectionReason: type: string nullable: true cancelReason: type: string nullable: true confirmedAt: type: string nullable: true completedAt: type: string nullable: true cancelledAt: type: string nullable: true restaurantName: type: string nullable: true restaurantCity: type: string nullable: true tableNumber: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - reservationRef - restaurantId - customerId - ownerId - customerName - customerMobile - reservationDate - reservationTime - guestCount - status - createdAt - updatedAt ReservationInput: type: object properties: restaurantId: type: integer tableId: type: integer nullable: true customerName: type: string customerMobile: type: string customerEmail: type: string nullable: true reservationDate: type: string reservationTime: type: string guestCount: type: integer specialRequest: type: string nullable: true required: - restaurantId - customerName - customerMobile - reservationDate - reservationTime ReservationsPage: type: object properties: reservations: type: array items: $ref: "#/components/schemas/ReservationDetail" total: type: integer page: type: integer limit: type: integer required: - reservations - total - page - limit Spa: type: object properties: id: type: integer ownerId: type: integer name: type: string description: type: string nullable: true address: type: string nullable: true city: type: string nullable: true state: type: string nullable: true contactNumber: type: string nullable: true contactEmail: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true coverPhoto: type: string nullable: true galleryPhotos: type: array items: type: string nullable: true facilities: type: array items: type: string nullable: true upiId: type: string nullable: true upiQrImage: type: string nullable: true status: type: string enum: [draft, pending, approved, rejected, suspended] rejectionReason: type: string nullable: true deletedAt: type: string nullable: true ownerName: type: string nullable: true ownerEmail: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - ownerId - name - status - createdAt - updatedAt SpaInput: type: object properties: name: type: string description: type: string nullable: true address: type: string nullable: true city: type: string nullable: true state: type: string nullable: true contactNumber: type: string nullable: true contactEmail: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true coverPhoto: type: string nullable: true galleryPhotos: type: array items: type: string nullable: true facilities: type: array items: type: string nullable: true required: - name SpasPage: type: object properties: spas: type: array items: $ref: "#/components/schemas/Spa" total: type: integer page: type: integer limit: type: integer required: - spas - total - page - limit SpaStats: type: object properties: totalSpas: type: integer activeSpas: type: integer pendingSpas: type: integer draftSpas: type: integer totalAppointments: type: integer pendingAppointments: type: integer monthlyRevenue: type: number required: - totalSpas - activeSpas - pendingSpas - draftSpas - totalAppointments - pendingAppointments - monthlyRevenue SpaStatusUpdate: type: object properties: status: type: string enum: [draft, pending, approved, rejected, suspended] rejectionReason: type: string nullable: true required: - status SpaService: type: object properties: id: type: integer spaId: type: integer name: type: string category: type: string enum: [full_body_massage, head_massage, foot_massage, aromatherapy, facial, beauty_treatment, couples_therapy, wellness_package] description: type: string nullable: true duration: type: integer price: type: number serviceImage: type: string nullable: true isAvailable: type: boolean createdAt: type: string updatedAt: type: string required: - id - spaId - name - category - duration - price - isAvailable - createdAt - updatedAt SpaServiceInput: type: object properties: name: type: string category: type: string enum: [full_body_massage, head_massage, foot_massage, aromatherapy, facial, beauty_treatment, couples_therapy, wellness_package] description: type: string nullable: true duration: type: integer price: type: number serviceImage: type: string nullable: true isAvailable: type: boolean required: - name - duration - price SpaAppointmentDetail: type: object properties: id: type: integer appointmentRef: type: string spaId: type: integer serviceId: type: integer nullable: true customerId: type: integer ownerId: type: integer customerName: type: string customerMobile: type: string customerEmail: type: string nullable: true serviceName: type: string appointmentDate: type: string appointmentTime: type: string numberOfPersons: type: integer specialRequest: type: string nullable: true amount: type: number nullable: true status: type: string enum: [pending, confirmed, rejected, completed, cancelled] rejectionReason: type: string nullable: true cancelReason: type: string nullable: true confirmedAt: type: string nullable: true completedAt: type: string nullable: true cancelledAt: type: string nullable: true spaName: type: string nullable: true spaCity: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - appointmentRef - spaId - customerId - ownerId - customerName - customerMobile - serviceName - appointmentDate - appointmentTime - numberOfPersons - status - createdAt - updatedAt SpaAppointmentInput: type: object properties: spaId: type: integer serviceId: type: integer nullable: true customerName: type: string customerMobile: type: string customerEmail: type: string nullable: true serviceName: type: string appointmentDate: type: string appointmentTime: type: string numberOfPersons: type: integer specialRequest: type: string nullable: true required: - spaId - customerName - customerMobile - serviceName - appointmentDate - appointmentTime SpaAppointmentsPage: type: object properties: appointments: type: array items: $ref: "#/components/schemas/SpaAppointmentDetail" total: type: integer page: type: integer limit: type: integer required: - appointments - total - page - limit TouristPlace: type: object properties: id: type: integer name: type: string slug: type: string shortDescription: type: string nullable: true description: type: string nullable: true historicalInfo: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true ticketPriceIndian: type: string nullable: true ticketPriceForeign: type: string nullable: true ticketPriceChild: type: string nullable: true bestTimeToVisit: type: string nullable: true address: type: string nullable: true googleMapsLink: type: string nullable: true latitude: type: string nullable: true longitude: type: string nullable: true city: type: string state: type: string country: type: string isActive: type: boolean isFeatured: type: boolean sortOrder: type: integer coverImageUrl: type: string nullable: true createdAt: type: string updatedAt: type: string required: - id - name - slug - city - state - country - isActive - isFeatured - sortOrder - createdAt - updatedAt TouristPlaceImage: type: object properties: id: type: integer placeId: type: integer imageUrl: type: string caption: type: string nullable: true altText: type: string nullable: true imageType: type: string enum: [cover, gallery] isFeatured: type: boolean sortOrder: type: integer createdAt: type: string updatedAt: type: string required: - id - placeId - imageUrl - imageType - isFeatured - sortOrder - createdAt - updatedAt TouristPlaceImageInput: type: object properties: imageUrl: type: string caption: type: string nullable: true altText: type: string nullable: true imageType: type: string enum: [cover, gallery] isFeatured: type: boolean sortOrder: type: integer required: - imageUrl TouristPlaceTip: type: object properties: id: type: integer placeId: type: integer tip: type: string category: type: string nullable: true sortOrder: type: integer createdAt: type: string updatedAt: type: string required: - id - placeId - tip - sortOrder - createdAt - updatedAt TouristPlaceTipInput: type: object properties: tip: type: string category: type: string nullable: true sortOrder: type: integer required: - tip TouristPlaceDistance: type: object properties: id: type: integer placeId: type: integer fromLocation: type: string locationType: type: string enum: [railway_station, airport, bus_stand, city_center] distanceKm: type: string nullable: true estimatedTimeMinutes: type: integer nullable: true createdAt: type: string required: - id - placeId - fromLocation - locationType - createdAt TouristPlaceDistanceInput: type: object properties: fromLocation: type: string locationType: type: string enum: [railway_station, airport, bus_stand, city_center] distanceKm: type: string nullable: true estimatedTimeMinutes: type: integer nullable: true required: - fromLocation - locationType TouristPlaceDetail: type: object properties: id: type: integer name: type: string slug: type: string shortDescription: type: string nullable: true description: type: string nullable: true historicalInfo: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true ticketPriceIndian: type: string nullable: true ticketPriceForeign: type: string nullable: true ticketPriceChild: type: string nullable: true bestTimeToVisit: type: string nullable: true address: type: string nullable: true googleMapsLink: type: string nullable: true latitude: type: string nullable: true longitude: type: string nullable: true city: type: string state: type: string country: type: string isActive: type: boolean isFeatured: type: boolean sortOrder: type: integer coverImageUrl: type: string nullable: true images: type: array items: $ref: "#/components/schemas/TouristPlaceImage" tips: type: array items: $ref: "#/components/schemas/TouristPlaceTip" distances: type: array items: $ref: "#/components/schemas/TouristPlaceDistance" createdAt: type: string updatedAt: type: string required: - id - name - slug - city - state - country - isActive - isFeatured - sortOrder - images - tips - distances - createdAt - updatedAt TouristPlaceInput: type: object properties: name: type: string slug: type: string shortDescription: type: string nullable: true description: type: string nullable: true historicalInfo: type: string nullable: true openingTime: type: string nullable: true closingTime: type: string nullable: true ticketPriceIndian: type: string nullable: true ticketPriceForeign: type: string nullable: true ticketPriceChild: type: string nullable: true bestTimeToVisit: type: string nullable: true address: type: string nullable: true googleMapsLink: type: string nullable: true latitude: type: string nullable: true longitude: type: string nullable: true city: type: string state: type: string country: type: string isActive: type: boolean isFeatured: type: boolean sortOrder: type: integer required: - name - slug TouristPlacesPage: type: object properties: places: type: array items: $ref: "#/components/schemas/TouristPlaceDetail" total: type: integer page: type: integer limit: type: integer required: - places - total - page - limit ReorderImagesInput: type: object properties: imageIds: type: array items: type: integer required: - imageIds FavoriteToggleResult: type: object properties: isFavorited: type: boolean totalFavorites: type: integer required: [isFavorited, totalFavorites] TouristPlaceConnection: type: object properties: id: type: integer fromPlaceId: type: integer toPlaceId: type: integer fromPlaceName: type: string toPlaceName: type: string fromPlaceSlug: type: string toPlaceSlug: type: string distanceKm: type: number nullable: true estimatedTimeMinutes: type: integer nullable: true required: [id, fromPlaceId, toPlaceId, fromPlaceName, toPlaceName, fromPlaceSlug, toPlaceSlug] NearbyVenueItem: type: object properties: id: type: integer name: type: string type: type: string address: type: string nullable: true city: type: string nullable: true rating: type: number nullable: true imageUrl: type: string nullable: true slug: type: string nullable: true required: [id, name, type] NearbyRecommendations: type: object properties: hotels: type: array items: $ref: "#/components/schemas/NearbyVenueItem" restaurants: type: array items: $ref: "#/components/schemas/NearbyVenueItem" spas: type: array items: $ref: "#/components/schemas/NearbyVenueItem" required: [hotels, restaurants, spas] # ─── Payment schemas ─────────────────────────────────── FailPaymentInput: type: object properties: reason: { type: string } required: [reason] CouponValidateInput: type: object properties: code: type: string bookingType: type: string enum: [hotel, restaurant, spa] amount: type: number required: [code, bookingType, amount] CouponValidateResult: type: object properties: valid: type: boolean coupon: type: object properties: id: { type: integer } code: { type: string } name: { type: string } discountType: type: string enum: [percentage, flat] discountValue: { type: number } required: [id, code, name, discountType, discountValue] discountAmount: type: number finalAmount: type: number required: [valid, coupon, discountAmount, finalAmount] CreatePaymentInput: type: object properties: bookingType: type: string enum: [hotel, restaurant, spa] bookingId: type: integer bookingRef: type: string ownerId: type: integer amount: type: number paymentMode: type: string enum: [full, advance] notes: type: string nullable: true couponCode: type: string nullable: true required: [bookingType, bookingId, bookingRef, ownerId, amount, paymentMode] InitiatePaymentInput: type: object properties: paymentMethod: type: string enum: [upi, credit_card, debit_card, net_banking, wallet] paymentGateway: type: string enum: [razorpay, stripe, manual] required: [paymentMethod] ConfirmPaymentInput: type: object properties: gatewayPaymentId: type: string nullable: true gatewaySignature: type: string nullable: true paidAmount: type: number nullable: true utrNumber: type: string nullable: true ownerUpiId: type: string nullable: true required: [] Payment: type: object properties: id: { type: integer } paymentRef: { type: string } bookingType: type: string enum: [hotel, restaurant, spa] bookingId: { type: integer } bookingRef: { type: string } customerId: { type: integer } ownerId: { type: integer } amount: { type: number } paidAmount: { type: number } discountAmount: { type: number } couponCode: { type: string, nullable: true } utrNumber: { type: string, nullable: true } ownerUpiId: { type: string, nullable: true } currency: { type: string } paymentMode: type: string enum: [full, advance] paymentMethod: type: string enum: [upi, credit_card, debit_card, net_banking, wallet] nullable: true paymentStatus: type: string enum: [pending, successful, failed, refunded, partially_refunded] paymentGateway: type: string enum: [razorpay, stripe, manual] gatewayOrderId: { type: string, nullable: true } gatewayPaymentId: { type: string, nullable: true } failureReason: { type: string, nullable: true } notes: { type: string, nullable: true } paidAt: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, paymentRef, bookingType, bookingId, bookingRef, customerId, ownerId, amount, paidAmount, currency, paymentMode, paymentStatus, paymentGateway, createdAt, updatedAt] PaymentDetail: allOf: - $ref: "#/components/schemas/Payment" - type: object properties: customerName: { type: string, nullable: true } customerEmail: { type: string, nullable: true } ownerName: { type: string, nullable: true } transactions: type: array items: $ref: "#/components/schemas/Transaction" refunds: type: array items: $ref: "#/components/schemas/Refund" required: [transactions, refunds] PaymentListResponse: type: object properties: payments: type: array items: $ref: "#/components/schemas/PaymentDetail" total: { type: integer } page: { type: integer } limit: { type: integer } totalPages: { type: integer } required: [payments, total, page, limit, totalPages] PaymentAnalytics: type: object properties: totalRevenue: { type: number } successfulPayments: { type: integer } failedPayments: { type: integer } pendingPayments: { type: integer } refundedAmount: { type: number } totalTransactions: { type: integer } revenueByType: type: array items: type: object properties: bookingType: { type: string } revenue: { type: number } count: { type: integer } required: [bookingType, revenue, count] revenueByMethod: type: array items: type: object properties: paymentMethod: { type: string } revenue: { type: number } count: { type: integer } required: [paymentMethod, revenue, count] revenueByDay: type: array items: type: object properties: date: { type: string } revenue: { type: number } count: { type: integer } required: [date, revenue, count] required: [totalRevenue, successfulPayments, failedPayments, pendingPayments, refundedAmount, totalTransactions, revenueByType, revenueByMethod, revenueByDay] Transaction: type: object properties: id: { type: integer } transactionRef: { type: string } paymentId: { type: integer } type: type: string enum: [payment, refund, partial_refund] amount: { type: number } description: { type: string } status: { type: string } metadata: {} createdAt: { type: string } required: [id, transactionRef, paymentId, type, amount, description, status, createdAt] # ─── Refund schemas ──────────────────────────────────── RefundRequestInput: type: object properties: paymentId: { type: integer } amount: { type: number } reason: { type: string } required: [paymentId, amount, reason] ProcessRefundInput: type: object properties: action: type: string enum: [approve, reject] rejectionReason: { type: string, nullable: true } notes: { type: string, nullable: true } required: [action] Refund: type: object properties: id: { type: integer } refundRef: { type: string } paymentId: { type: integer } amount: { type: number } reason: { type: string } status: type: string enum: [pending, approved, rejected, processed] requestedBy: { type: integer } processedBy: { type: integer, nullable: true } processedAt: { type: string, nullable: true } rejectionReason: { type: string, nullable: true } notes: { type: string, nullable: true } gatewayRefundId: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, refundRef, paymentId, amount, reason, status, requestedBy, createdAt, updatedAt] RefundDetail: allOf: - $ref: "#/components/schemas/Refund" - type: object properties: payment: $ref: "#/components/schemas/Payment" requestedByName: { type: string, nullable: true } processedByName: { type: string, nullable: true } # ─── Hotel Commission Agreement schemas ───────────────────────────────── HotelCommissionAgreement: type: object properties: id: { type: integer } hotelId: { type: integer } ownerId: { type: integer } commissionRate: { type: number } agreed: { type: boolean } agreedAt: { type: string, nullable: true } agreementText: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, hotelId, ownerId, commissionRate, agreed, createdAt, updatedAt] HotelCommissionAgreementInput: type: object properties: hotelId: { type: integer } commissionRate: { type: number } agreementText: { type: string, nullable: true } required: [hotelId] # ─── Commission schemas ──────────────────────────────── CommissionConfig: type: object properties: id: { type: integer } bookingType: type: string enum: [hotel, restaurant, spa] rate: { type: number } isActive: { type: boolean } description: { type: string, nullable: true } updatedBy: { type: integer, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, bookingType, rate, isActive, createdAt, updatedAt] UpdateCommissionConfigInput: type: object properties: configs: type: array items: type: object properties: bookingType: type: string enum: [hotel, restaurant, spa] rate: { type: number } isActive: { type: boolean } description: { type: string, nullable: true } required: [bookingType, rate] required: [configs] # ─── Earnings schemas ────────────────────────────────── OwnerEarning: type: object properties: id: { type: integer } earningRef: { type: string } paymentId: { type: integer } ownerId: { type: integer } bookingType: type: string enum: [hotel, restaurant, spa] grossAmount: { type: number } commissionRate: { type: number } commissionAmount: { type: number } netAmount: { type: number } status: type: string enum: [pending, credited, withdrawn] creditedAt: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, earningRef, paymentId, ownerId, bookingType, grossAmount, commissionRate, commissionAmount, netAmount, status, createdAt, updatedAt] OwnerEarningDetail: allOf: - $ref: "#/components/schemas/OwnerEarning" - type: object properties: paymentRef: { type: string } ownerName: { type: string, nullable: true } OwnerEarningsSummary: type: object properties: totalEarnings: { type: number } pendingEarnings: { type: number } creditedEarnings: { type: number } withdrawnEarnings: { type: number } totalCommission: { type: number } totalGross: { type: number } monthlyRevenue: type: array items: type: object properties: month: { type: string } gross: { type: number } commission: { type: number } net: { type: number } required: [month, gross, commission, net] byBookingType: type: array items: type: object properties: bookingType: { type: string } gross: { type: number } commission: { type: number } net: { type: number } count: { type: integer } required: [bookingType, gross, commission, net, count] required: [totalEarnings, pendingEarnings, creditedEarnings, withdrawnEarnings, totalCommission, totalGross, monthlyRevenue, byBookingType] PlatformEarningsAnalytics: type: object properties: totalPlatformRevenue: { type: number } totalCommissionEarned: { type: number } totalOwnerPayouts: { type: number } pendingPayouts: { type: number } earningsByType: type: array items: type: object properties: bookingType: { type: string } gross: { type: number } commission: { type: number } net: { type: number } count: { type: integer } required: [bookingType, gross, commission, net, count] monthlyCommission: type: array items: type: object properties: month: { type: string } commission: { type: number } gross: { type: number } required: [month, commission, gross] topOwners: type: array items: type: object properties: ownerId: { type: integer } ownerName: { type: string } totalEarnings: { type: number } bookingType: { type: string } required: [ownerId, ownerName, totalEarnings, bookingType] required: [totalPlatformRevenue, totalCommissionEarned, totalOwnerPayouts, pendingPayouts, earningsByType, monthlyCommission, topOwners] # ─── Payout schemas ──────────────────────────────────── Payout: type: object properties: id: { type: integer } payoutRef: { type: string } ownerId: { type: integer } amount: { type: number } status: type: string enum: [pending, approved, rejected, paid] bankDetails: {} notes: { type: string, nullable: true } rejectionReason: { type: string, nullable: true } processedBy: { type: integer, nullable: true } processedAt: { type: string, nullable: true } paidAt: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, payoutRef, ownerId, amount, status, createdAt, updatedAt] PayoutDetail: allOf: - $ref: "#/components/schemas/Payout" - type: object properties: ownerName: { type: string, nullable: true } ownerEmail: { type: string, nullable: true } processedByName: { type: string, nullable: true } RequestPayoutInput: type: object properties: amount: { type: number } bankDetails: type: object properties: accountName: { type: string } accountNumber: { type: string } ifscCode: { type: string } bankName: { type: string } upiId: { type: string, nullable: true } required: [accountName, accountNumber, ifscCode, bankName] notes: { type: string, nullable: true } required: [amount, bankDetails] ProcessPayoutInput: type: object properties: action: type: string enum: [approve, reject, mark_paid] rejectionReason: { type: string, nullable: true } notes: { type: string, nullable: true } required: [action] # ─── Report schemas ──────────────────────────────────── RevenueReport: type: object properties: generatedAt: { type: string } period: type: object properties: from: { type: string } to: { type: string } required: [from, to] summary: type: object properties: totalRevenue: { type: number } totalCommission: { type: number } totalOwnerEarnings: { type: number } totalPayouts: { type: number } totalBookings: { type: integer } required: [totalRevenue, totalCommission, totalOwnerEarnings, totalPayouts, totalBookings] byType: type: array items: type: object properties: bookingType: { type: string } revenue: { type: number } commission: { type: number } ownerEarnings: { type: number } bookings: { type: integer } required: [bookingType, revenue, commission, ownerEarnings, bookings] monthly: type: array items: type: object properties: month: { type: string } revenue: { type: number } commission: { type: number } ownerEarnings: { type: number } required: [month, revenue, commission, ownerEarnings] rows: type: array items: type: object properties: date: { type: string } paymentRef: { type: string } bookingType: { type: string } gross: { type: number } commission: { type: number } net: { type: number } ownerName: { type: string } status: { type: string } required: [date, paymentRef, bookingType, gross, commission, net, ownerName, status] required: [generatedAt, period, summary, byType, monthly, rows] TripPlan: type: object properties: id: { type: integer } tripRef: { type: string } customerId: { type: integer } title: { type: string, nullable: true } arrivalDate: { type: string } departureDate: { type: string } days: { type: integer } adults: { type: integer } children: { type: integer } budget: { type: number } travelType: { type: string, enum: [solo, couple, family, friends, business] } interests: { type: array, items: { type: string } } budgetCategory: { type: string, enum: [budget, standard, premium, luxury] } status: { type: string, enum: [draft, upcoming, ongoing, completed, cancelled] } notes: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, tripRef, customerId, arrivalDate, departureDate, days, adults, children, budget, travelType, interests, budgetCategory, status, createdAt, updatedAt] CreateTripBody: type: object properties: title: { type: string, nullable: true } arrivalDate: { type: string } departureDate: { type: string } days: { type: integer } adults: { type: integer } children: { type: integer } budget: { type: number } travelType: { type: string, enum: [solo, couple, family, friends, business] } interests: { type: array, items: { type: string } } budgetCategory: { type: string, enum: [budget, standard, premium, luxury] } notes: { type: string, nullable: true } required: [arrivalDate, departureDate, days, adults, budget, travelType, interests, budgetCategory] UpdateTripBody: type: object properties: title: { type: string, nullable: true } arrivalDate: { type: string } departureDate: { type: string } days: { type: integer } adults: { type: integer } children: { type: integer } budget: { type: number } travelType: { type: string, enum: [solo, couple, family, friends, business] } interests: { type: array, items: { type: string } } budgetCategory: { type: string, enum: [budget, standard, premium, luxury] } notes: { type: string, nullable: true } SupportTicket: type: object properties: id: { type: integer } ticketRef: { type: string } userId: { type: integer } subject: { type: string } category: { type: string } priority: { type: string } status: { type: string } description: { type: string } assignedTo: { type: integer, nullable: true } userFullName: { type: string, nullable: true } userEmail: { type: string, nullable: true } resolvedAt: { type: string, nullable: true } closedAt: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } required: [id, ticketRef, userId, subject, category, priority, status, description, createdAt, updatedAt] TicketMessage: type: object properties: id: { type: integer } ticketId: { type: integer } senderId: { type: integer } senderName: { type: string } senderRole: { type: string, nullable: true } message: { type: string } attachmentUrl: { type: string, nullable: true } isInternal: { type: boolean } createdAt: { type: string } required: [id, ticketId, senderId, senderName, message, isInternal, createdAt] SupportTicketDetail: allOf: - $ref: '#/components/schemas/SupportTicket' - type: object properties: messages: { type: array, items: { $ref: '#/components/schemas/TicketMessage' } } assignedToName: { type: string, nullable: true } required: [messages] CreateSupportTicketBody: type: object properties: subject: { type: string } category: { type: string } priority: { type: string } description: { type: string } required: [subject, category, description] AddTicketMessageBody: type: object properties: message: { type: string } attachmentUrl: { type: string, nullable: true } isInternal: { type: boolean } required: [message] SupportAnalytics: type: object properties: total: { type: integer } open: { type: integer } inProgress: { type: integer } waitingForCustomer: { type: integer } resolved: { type: integer } closed: { type: integer } byCategory: type: array items: type: object properties: category: { type: string } count: { type: integer } required: [category, count] byPriority: type: array items: type: object properties: priority: { type: string } count: { type: integer } required: [priority, count] required: [total, open, inProgress, waitingForCustomer, resolved, closed, byCategory, byPriority] RequestCancellationInput: type: object properties: bookingType: type: string enum: [hotel, restaurant, spa] bookingRef: { type: string } reason: { type: string } required: [bookingType, bookingRef, reason] ProcessCancellationInput: type: object properties: action: type: string enum: [approve, reject] note: { type: string } required: [action] AdminCancellationInput: type: object properties: action: type: string enum: [approve, reject] adminNote: { type: string } required: [action] CancellationDetail: type: object properties: id: { type: integer } cancelRef: { type: string } bookingType: { type: string } bookingId: { type: integer } bookingRef: { type: string } customerId: { type: integer } ownerId: { type: integer, nullable: true } reason: { type: string } status: { type: string } ownerNote: { type: string, nullable: true } adminNote: { type: string, nullable: true } processedBy: { type: integer, nullable: true } processedAt: { type: string, nullable: true } createdAt: { type: string } updatedAt: { type: string } customerName: { type: string, nullable: true } ownerName: { type: string, nullable: true } required: [id, cancelRef, bookingType, bookingId, bookingRef, customerId, reason, status, createdAt, updatedAt] RefundAnalytics: type: object properties: totalRequests: { type: integer } approvedCount: { type: integer } rejectedCount: { type: integer } processedCount: { type: integer } pendingCount: { type: integer } totalRefundedAmount: { type: number } approvalRate: { type: number } required: [totalRequests, approvedCount, rejectedCount, processedCount, pendingCount, totalRefundedAmount, approvalRate] OverrideRefundInput: type: object properties: action: type: string enum: [approve, reject] reason: { type: string } required: [action] TripRecommendation: type: object properties: id: { type: integer } tripId: { type: integer } tripRef: { type: string } hotels: type: array items: type: object properties: id: { type: integer } name: { type: string } category: { type: string } address: { type: string, nullable: true } googleMapLink: { type: string, nullable: true } amenities: { type: array, items: { type: string } } estimatedCostPerNight: { type: number } required: [id, name, category, estimatedCostPerNight] restaurants: type: array items: type: object properties: id: { type: integer } name: { type: string } cuisineType: { type: string, nullable: true } address: { type: string, nullable: true } estimatedCostPerPerson: { type: number } required: [id, name, estimatedCostPerPerson] spas: type: array items: type: object properties: id: { type: integer } name: { type: string } address: { type: string, nullable: true } estimatedCostPerSession: { type: number } required: [id, name, estimatedCostPerSession] touristPlaces: type: array items: type: object properties: name: { type: string } description: { type: string, nullable: true } ticketPriceIndian: { type: number } googleMapsLink: { type: string } lat: { type: number } lng: { type: number } interests: { type: array, items: { type: string } } bestTime: { type: string, nullable: true } duration: { type: string, nullable: true } required: [name, ticketPriceIndian, googleMapsLink, lat, lng, interests] itinerary: type: array items: type: object properties: day: { type: integer } date: { type: string, nullable: true } title: { type: string } theme: { type: string } dailyCost: { type: number } activities: type: array items: type: object properties: time: { type: string } type: { type: string } name: { type: string } description: { type: string, nullable: true } duration: { type: string, nullable: true } estimatedCost: { type: number, nullable: true } googleMapsLink: { type: string, nullable: true } required: [time, type, name] required: [day, title, theme, dailyCost, activities] costEstimation: type: object nullable: true properties: hotelCost: { type: number } restaurantCost: { type: number } spaCost: { type: number } ticketCost: { type: number } travelCost: { type: number } miscCost: { type: number } totalCost: { type: number } perPersonCost: { type: number } items: type: array items: type: object properties: category: { type: string } label: { type: string } cost: { type: number } breakdown: { type: string } required: [category, label, cost, breakdown] required: [hotelCost, restaurantCost, spaCost, ticketCost, travelCost, miscCost, totalCost, perPersonCost, items] generatedAt: { type: string } updatedAt: { type: string } required: [id, tripId, tripRef, hotels, restaurants, spas, touristPlaces, itinerary, generatedAt, updatedAt] TripAnalytics: type: object properties: totalTrips: { type: integer } recommendationsGenerated: { type: integer } byStatus: { type: object, additionalProperties: { type: integer } } byTravelType: { type: object, additionalProperties: { type: integer } } byBudgetCat: { type: object, additionalProperties: { type: integer } } topInterests: type: array items: type: object properties: interest: { type: string } count: { type: integer } required: [interest, count] topHotels: type: array items: type: object properties: name: { type: string } count: { type: integer } required: [name, count] topRestaurants: type: array items: type: object properties: name: { type: string } count: { type: integer } required: [name, count] topPlaces: type: array items: type: object properties: name: { type: string } count: { type: integer } required: [name, count] required: [totalTrips, recommendationsGenerated, byStatus, byTravelType, byBudgetCat, topInterests, topHotels, topRestaurants, topPlaces]