openapi: 3.1.0 info: title: Api version: 0.1.0 description: ARIA — AI Hotel Management System API servers: - url: /api description: Base API path tags: - name: health description: Health operations - name: guests description: Guest management - name: bookings description: Booking management - name: incidents description: Incident management - name: agentActions description: Agent action log - name: rooms description: Room management - name: staff description: Staff management - name: experiences description: Experience catalog - name: dashboard description: Dashboard summary - name: demo description: Demo scenario triggers - name: webhooks description: External service webhooks paths: /healthz: get: operationId: healthCheck tags: [health] summary: Health check responses: "200": description: Healthy content: application/json: schema: $ref: "#/components/schemas/HealthStatus" /guests: get: operationId: listGuests tags: [guests] summary: List all guests ordered by churn score descending responses: "200": description: List of guests content: application/json: schema: type: array items: $ref: "#/components/schemas/Guest" post: operationId: createGuest tags: [guests] summary: Create a new guest requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateGuestRequest" responses: "201": description: Created guest content: application/json: schema: $ref: "#/components/schemas/Guest" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/Error" /guests/{id}: get: operationId: getGuest tags: [guests] summary: Get a guest with bookings, incidents, and agent actions parameters: - name: id in: path required: true schema: type: string responses: "200": description: Guest detail content: application/json: schema: $ref: "#/components/schemas/GuestDetail" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" patch: operationId: updateGuest tags: [guests] summary: Update a guest record parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateGuestRequest" responses: "200": description: Updated guest content: application/json: schema: $ref: "#/components/schemas/Guest" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" delete: operationId: deleteGuest tags: [guests] summary: Delete a guest record parameters: - name: id in: path required: true schema: type: string responses: "204": description: Deleted "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" /bookings: get: operationId: listBookings tags: [bookings] summary: List all bookings responses: "200": description: List of bookings content: application/json: schema: type: array items: $ref: "#/components/schemas/Booking" post: operationId: createBooking tags: [bookings] summary: Create a new booking requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateBookingRequest" responses: "201": description: Created booking content: application/json: schema: $ref: "#/components/schemas/Booking" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/Error" /bookings/{id}: patch: operationId: updateBooking tags: [bookings] summary: Update booking status or details parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateBookingRequest" responses: "200": description: Updated booking content: application/json: schema: $ref: "#/components/schemas/Booking" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" delete: operationId: deleteBooking tags: [bookings] summary: Cancel/delete a booking parameters: - name: id in: path required: true schema: type: string responses: "204": description: Deleted "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" /incidents: get: operationId: listIncidents tags: [incidents] summary: List all incidents ordered by creation date descending responses: "200": description: List of incidents content: application/json: schema: type: array items: $ref: "#/components/schemas/Incident" post: operationId: createIncident tags: [incidents] summary: Manually create an incident requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateIncidentRequest" responses: "201": description: Created incident content: application/json: schema: $ref: "#/components/schemas/Incident" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/Error" /incidents/{id}: get: operationId: getIncident tags: [incidents] summary: Get an incident with all its agent actions parameters: - name: id in: path required: true schema: type: string responses: "200": description: Incident detail content: application/json: schema: $ref: "#/components/schemas/IncidentDetail" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" patch: operationId: updateIncident tags: [incidents] summary: Update incident status or resolution parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateIncidentRequest" responses: "200": description: Updated incident content: application/json: schema: $ref: "#/components/schemas/Incident" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" /agent-actions: get: operationId: listAgentActions tags: [agentActions] summary: List recent agent actions parameters: - name: limit in: query required: false schema: type: integer default: 20 responses: "200": description: List of agent actions content: application/json: schema: type: array items: $ref: "#/components/schemas/AgentAction" /rooms: get: operationId: listRooms tags: [rooms] summary: List all rooms responses: "200": description: List of rooms content: application/json: schema: type: array items: $ref: "#/components/schemas/Room" /rooms/{number}: patch: operationId: updateRoom tags: [rooms] summary: Update room status or pricing parameters: - name: number in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateRoomRequest" responses: "200": description: Updated room content: application/json: schema: $ref: "#/components/schemas/Room" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" /staff: get: operationId: listStaff tags: [staff] summary: List all staff members responses: "200": description: List of staff content: application/json: schema: type: array items: $ref: "#/components/schemas/StaffMember" post: operationId: createStaffMember tags: [staff] summary: Add a new staff member requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateStaffMemberRequest" responses: "201": description: Created staff member content: application/json: schema: $ref: "#/components/schemas/StaffMember" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/Error" /staff/{id}: patch: operationId: updateStaffMember tags: [staff] summary: Update staff member availability or details parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateStaffMemberRequest" responses: "200": description: Updated staff member content: application/json: schema: $ref: "#/components/schemas/StaffMember" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" delete: operationId: deleteStaffMember tags: [staff] summary: Remove a staff member parameters: - name: id in: path required: true schema: type: string responses: "204": description: Deleted "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" /experiences: get: operationId: listExperiences tags: [experiences] summary: List all experiences responses: "200": description: List of experiences content: application/json: schema: type: array items: $ref: "#/components/schemas/Experience" post: operationId: createExperience tags: [experiences] summary: Add a new experience to the catalog requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/CreateExperienceRequest" responses: "201": description: Created experience content: application/json: schema: $ref: "#/components/schemas/Experience" "400": description: Validation error content: application/json: schema: $ref: "#/components/schemas/Error" /experiences/{id}: patch: operationId: updateExperience tags: [experiences] summary: Update an experience parameters: - name: id in: path required: true schema: type: string requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/UpdateExperienceRequest" responses: "200": description: Updated experience content: application/json: schema: $ref: "#/components/schemas/Experience" "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" delete: operationId: deleteExperience tags: [experiences] summary: Remove an experience from the catalog parameters: - name: id in: path required: true schema: type: string responses: "204": description: Deleted "404": description: Not found content: application/json: schema: $ref: "#/components/schemas/Error" /dashboard/summary: get: operationId: getDashboardSummary tags: [dashboard] summary: Get dashboard summary stats responses: "200": description: Dashboard summary content: application/json: schema: $ref: "#/components/schemas/DashboardSummary" /demo/trigger: post: operationId: triggerDemoScenario tags: [demo] summary: Trigger a demo scenario requestBody: required: true content: application/json: schema: $ref: "#/components/schemas/DemoTriggerRequest" responses: "200": description: Scenario triggered content: application/json: schema: $ref: "#/components/schemas/DemoTriggerResponse" "400": description: Bad request content: application/json: schema: $ref: "#/components/schemas/Error" /webhooks/twilio/voice: post: operationId: twilioVoiceWebhook tags: [webhooks] summary: Receive inbound Twilio voice call webhook responses: "200": description: TwiML response content: application/xml: schema: type: string /webhooks/twilio/whatsapp: post: operationId: twilioWhatsappWebhook tags: [webhooks] summary: Receive inbound Twilio WhatsApp message webhook responses: "200": description: Acknowledged content: application/json: schema: $ref: "#/components/schemas/AckResponse" components: schemas: HealthStatus: type: object properties: status: type: string required: - status Error: type: object properties: error: type: string required: - error AckResponse: type: object properties: ok: type: boolean required: - ok Guest: type: object properties: id: type: string name: type: string phone: type: string email: type: ["string", "null"] languagePreference: type: string nationality: type: ["string", "null"] churnRiskScore: type: integer isVip: type: boolean preferenceTags: type: ["array", "null"] items: type: string roomNumber: type: ["string", "null"] checkedInAt: type: ["string", "null"] checkedOutAt: type: ["string", "null"] lastInteractionAt: type: ["string", "null"] createdAt: type: string updatedAt: type: string required: - id - name - phone - languagePreference - churnRiskScore - isVip - createdAt - updatedAt CreateGuestRequest: type: object properties: name: type: string phone: type: string email: type: ["string", "null"] languagePreference: type: string nationality: type: ["string", "null"] churnRiskScore: type: integer isVip: type: boolean preferenceTags: type: ["array", "null"] items: type: string roomNumber: type: ["string", "null"] required: - name - phone UpdateGuestRequest: type: object properties: name: type: string phone: type: string email: type: ["string", "null"] languagePreference: type: string nationality: type: ["string", "null"] churnRiskScore: type: integer isVip: type: boolean preferenceTags: type: ["array", "null"] items: type: string roomNumber: type: ["string", "null"] Booking: type: object properties: id: type: string guestId: type: string roomNumber: type: string roomType: type: string checkInDate: type: string checkOutDate: type: string status: type: string totalAmount: type: string createdAt: type: string updatedAt: type: string required: - id - guestId - roomNumber - roomType - checkInDate - checkOutDate - status - totalAmount - createdAt - updatedAt CreateBookingRequest: type: object properties: guestId: type: string roomNumber: type: string roomType: type: string checkInDate: type: string checkOutDate: type: string totalAmount: type: string required: - guestId - roomNumber - roomType - checkInDate - checkOutDate - totalAmount UpdateBookingRequest: type: object properties: status: type: string totalAmount: type: string Incident: type: object properties: id: type: string guestId: type: ["string", "null"] type: type: string triggerSource: type: string severity: type: string description: type: string status: type: string resolvedBy: type: ["string", "null"] resolutionTimeSeconds: type: ["integer", "null"] resolvedAt: type: ["string", "null"] createdAt: type: string updatedAt: type: string required: - id - type - triggerSource - severity - description - status - createdAt - updatedAt CreateIncidentRequest: type: object properties: guestId: type: ["string", "null"] type: type: string triggerSource: type: string severity: type: string description: type: string required: - type - triggerSource - severity - description UpdateIncidentRequest: type: object properties: status: type: string resolvedBy: type: ["string", "null"] resolutionTimeSeconds: type: ["integer", "null"] AgentAction: type: object properties: id: type: string incidentId: type: ["string", "null"] guestId: type: ["string", "null"] agentName: type: string toolCalled: type: string payload: type: object status: type: string result: type: ["string", "null"] revenueImpact: type: ["string", "null"] firedAt: type: string createdAt: type: string guestName: type: ["string", "null"] required: - id - agentName - toolCalled - payload - status - firedAt - createdAt Room: type: object properties: number: type: string type: type: string status: type: string basePrice: type: string currentPrice: type: string isOccupied: type: boolean createdAt: type: string updatedAt: type: string required: - number - type - status - basePrice - currentPrice - isOccupied - createdAt - updatedAt UpdateRoomRequest: type: object properties: status: type: string currentPrice: type: string isOccupied: type: boolean StaffMember: type: object properties: id: type: string name: type: string phone: type: string department: type: string role: type: string isAvailable: type: boolean createdAt: type: string updatedAt: type: string required: - id - name - phone - department - role - isAvailable - createdAt - updatedAt CreateStaffMemberRequest: type: object properties: name: type: string phone: type: string department: type: string role: type: string isAvailable: type: boolean required: - name - phone - department - role UpdateStaffMemberRequest: type: object properties: name: type: string phone: type: string department: type: string role: type: string isAvailable: type: boolean Experience: type: object properties: id: type: string name: type: string category: type: string description: type: string price: type: string durationMinutes: type: integer isAvailable: type: boolean createdAt: type: string updatedAt: type: string required: - id - name - category - description - price - durationMinutes - isAvailable - createdAt - updatedAt CreateExperienceRequest: type: object properties: name: type: string category: type: string description: type: string price: type: string durationMinutes: type: integer isAvailable: type: boolean required: - name - category - description - price - durationMinutes UpdateExperienceRequest: type: object properties: name: type: string category: type: string description: type: string price: type: string durationMinutes: type: integer isAvailable: type: boolean GuestDetail: allOf: - $ref: "#/components/schemas/Guest" - type: object properties: bookings: type: array items: $ref: "#/components/schemas/Booking" incidents: type: array items: $ref: "#/components/schemas/Incident" agentActions: type: array items: $ref: "#/components/schemas/AgentAction" required: - bookings - incidents - agentActions IncidentDetail: allOf: - $ref: "#/components/schemas/Incident" - type: object properties: agentActions: type: array items: $ref: "#/components/schemas/AgentAction" guest: $ref: "#/components/schemas/Guest" required: - agentActions DashboardSummary: type: object properties: openIncidents: type: integer totalRevenueImpactToday: type: number occupancyPercent: type: number recentActions: type: array items: $ref: "#/components/schemas/AgentAction" agentLastRun: type: object additionalProperties: type: ["string", "null"] required: - openIncidents - totalRevenueImpactToday - occupancyPercent - recentActions - agentLastRun DemoTriggerRequest: type: object properties: scenario: type: string enum: - room_delay - angry_tweet - occupancy_spike - churn_risk - voice_call required: - scenario DemoTriggerResponse: type: object properties: ok: type: boolean message: type: string required: - ok - message