## πŸ“˜ Booking Workflow with Booking API This document outlines a high-level workflow for integrating a venue booking system using the Booking API. The process includes: 1. Searching for venues 2. Checking availability 3. Creating a booking or a booking enquiry Each step uses specific API endpoints to provide a complete user experience. ## πŸ” 1. Search for Venues *Objective*: Retrieve a list of venues matching user-defined filters. Api Endpoint: GET /venues **Expected Response:** A list of venues, each including compositeID, name, address, and contact information. ## πŸ“… 2. Check Venue Availability *Objective*: Verify if a specific venue is available at a given date and time. Api Endpoint: GET /venues/{compositeId}/availability *Note*: Composite Id are inside json node "products" ### Parameters: `date`: Booking date `time`: Booking time `duration`: Duration in hours **Expected Response**: An object that specifies whether the venue is available, suggests potential alternatives if it's not, or indicates if an enquiry can be submitted. ## βœ… 3. Create an Instant Booking or Booking Enquiry **Objective**: Finalize the reservation by submitting an instant booking or a booking enquiry. ### booking information: | Field | Type | Required | Description | | --- | --- | --- | --- | | `firstName` | string | βœ… | Guest's first name. Example: `John` | | `lastName` | string | βœ… | Guest's last name. Example: `Doe` | | `partySize` | integer | βœ… | Number of people for the booking. Example: `4` | | `date` | string | βœ… | Booking date in format `YYYY-MM-DD`. Example: `2025-02-15` | | `time` | string | βœ… | Booking time in `HH:mm` format (24h). Example: `18:30` | | `type` | string | βœ… | Availability type: `book` (instant) or `request` (manual approval). | | `duration` | integer | ❌ | Duration of the booking in minutes. Example: `120` | | `email` | string | βœ… | Guest’s email address. Example: `john.doe@example.com` | | `phone` | string | βœ… | Guest’s phone number. Example: `+1234567890` | | `notes` | string | ❌ | Additional notes or requests. Example: `Please prepare a birthday cake.` | Api Endpoint: POST /venues/{compositeId}/bookings **Expected Response**: A booking confirmation or enquiry acknowledgment containing a unique booking ID, status, and relevant details. ## πŸ”³ 4.Basic Flow ```mermaid flowchart TD %% Define style for the nodes classDef startEnd fill:#1e293b,stroke:#fff,color:#fff; classDef action fill:#2563eb,stroke:#1e3a8a,color:#fff; classDef decision fill:#f59e0b,stroke:#b45309,color:#fff; %% Nodes A[ Booking Workflow with API]:::startEnd B{ Search for Venues}:::decision C{ Check Venue Availability}:::decision D[ Create a Booking/Booking Enquiry]:::action %% Flow A --> B B --> C C -- Available as an instant booking or booking request --> D C -- Closed or Not Available --> B ```