{"openapi": "3.1.0", "info": {"title": "Flight Search API", "description": "Flight Search API (Environment: test)", "version": "1.0.0"}, "paths": {"/api/v1/auth/register": {"post": {"tags": ["Authentication"], "summary": "Register User", "description": "Register user with real email verification", "operationId": "register_user_api_v1_auth_register_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserRegistrationRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AuthResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/auth/verify-email": {"get": {"tags": ["Authentication"], "summary": "Verify Email", "description": "Handle email verification callback from Supabase (API-only JSON response)", "operationId": "verify_email_api_v1_auth_verify_email_get", "parameters": [{"name": "access_token", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Token"}}, {"name": "refresh_token", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refresh Token"}}, {"name": "expires_at", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expires At"}}, {"name": "token_type", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Token Type"}}, {"name": "type", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Type"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/auth/login": {"post": {"tags": ["Authentication"], "summary": "Login User", "description": "Authenticates a user using Supabase credentials", "operationId": "login_user_api_v1_auth_login_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LoginResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/auth/me": {"get": {"tags": ["Authentication"], "summary": "Get current user profile", "description": "Returns the authenticated user's profile from JWT token.", "operationId": "get_me_api_v1_auth_me_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/flight/getFare": {"post": {"tags": ["Flight Search", "Flight Search"], "summary": "Initiate flight search", "description": "Initiates a new flight search request.\nSerializes dates, enriches with user ID, and triggers async search pipeline.", "operationId": "initiate_search_api_v1_flight_getFare_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FlightSearchRequest"}}}, "required": true}, "responses": {"202": {"description": "Search initiated successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FlightSearchResponse"}, "example": {"searchId": "550e8400-e29b-41d4-a716-446655440000", "status": "initiated", "streamUrl": "/api/v1/flight/getFare/stream/550e8400-e29b-41d4-a716-446655440000"}}}}, "400": {"description": "Invalid request"}, "429": {"description": "Rate limit exceeded"}, "500": {"description": "Internal server error"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/flight/getFare/stream/{search_id}": {"get": {"tags": ["Flight Search", "Flight Search"], "summary": "Stream flight search results", "description": "Server-Sent Events stream delivering real-time offers and updates.", "operationId": "stream_results_api_v1_flight_getFare_stream__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Unique search ID returned from initiation", "title": "Search Id"}, "description": "Unique search ID returned from initiation"}, {"name": "Last-Event-ID", "in": "header", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last-Event-Id"}}], "responses": {"200": {"description": "SSE stream", "content": {"text/event-stream": {}}}, "404": {"description": "Search session not found"}, "410": {"description": "Search expired"}, "429": {"description": "Rate limit exceeded"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/flight/getFare/stream-by-gds/{search_id}": {"get": {"tags": ["Flight Search", "Flight Search"], "summary": "Stream flight results grouped by GDS", "description": "Server-Sent Events stream delivering results as each GDS completes.", "operationId": "stream_results_by_gds_api_v1_flight_getFare_stream_by_gds__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Unique search ID", "title": "Search Id"}, "description": "Unique search ID"}], "responses": {"200": {"description": "SSE stream with GDS-grouped results", "content": {"text/event-stream": {}}}, "404": {"description": "Search session not found"}, "410": {"description": "Search expired"}, "429": {"description": "Rate limit exceeded"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/flight/getFare/batch/{search_id}": {"get": {"tags": ["Flight Search", "Flight Search"], "summary": "Get all results at once (batch mode)", "description": "Wait for all GDS to complete (or timeout) and return complete result set.", "operationId": "get_batch_results_api_v1_flight_getFare_batch__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Unique search ID", "title": "Search Id"}, "description": "Unique search ID"}, {"name": "timeout", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 120, "minimum": 5, "description": "Max seconds to wait for all GDS (5-120)", "default": 30, "title": "Timeout"}, "description": "Max seconds to wait for all GDS (5-120)"}], "responses": {"200": {"description": "All results returned at once", "content": {"application/json": {"schema": {}, "example": {"search_id": "abc123", "results_by_gds": {"Amadeus": [{"id": "offer1", "price": 1500}], "Sabre": [{"id": "offer2", "price": 1600}]}, "total_offers": 2, "completed_gds_count": 2, "total_gds_count": 3, "timed_out": true}}}}, "404": {"description": "Search not found"}, "408": {"description": "Timeout - returning partial results"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/airlines/search": {"get": {"tags": ["Airlines"], "summary": "Search Airlines", "description": "Search airlines for autocomplete functionality.\n\nThis endpoint provides intelligent airline search with:\n- Text and exact IATA/ICAO code matching\n- Country-based filtering\n- Advanced matching and ranking strategies\n- Typo-tolerant fuzzy text matching\n- Optimized for autocomplete dropdowns\n- Returns structured airline data with codes and country info\n\n**Usage Examples:**\n- Search by name: `/search?query=American Airlines`\n- Search by IATA code: `/search?query=AA`\n- Search by ICAO code: `/search?query=AAL`\n- Search with limit: `/search?query=AA&limit=5`\n- Minimum 2 characters required for search\n\n**Response includes:**\n- Airline ID, name, IATA/ICAO codes\n- Country information\n- Match type and similarity score for enhanced search capabilities\n- Total count of results", "operationId": "search_airlines_api_v1_airlines_search_get", "parameters": [{"name": "query", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 50, "description": "Search term for airline name or IATA/ICAO code", "examples": ["American Airlines"], "title": "Query"}, "description": "Search term for airline name or IATA/ICAO code"}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 50, "minimum": 1, "description": "Maximum number of suggestions to return", "examples": [10], "default": 10, "title": "Limit"}, "description": "Maximum number of suggestions to return"}, {"name": "country", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "description": "Search results by country name", "title": "Country"}, "description": "Search results by country name"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AirlineSearchResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/airports/search": {"get": {"tags": ["Airports"], "summary": "Search Airports", "description": "Search airports for autocomplete functionality with geographic capabilities.\n\nThis endpoint provides intelligent airport search with:\n- Text and exact IATA (3-letter)/ICAO (4-letter) code matching\n- City name matching\n- Country-based filtering\n- Geographic proximity search\n- Advanced matching and ranking strategies\n- Typo-tolerant fuzzy text matching\n- Optimized for autocomplete dropdowns\n- Returns structured airport data with codes, location, and timezone\n\n**Usage Examples:**\n- Search by name: `/search?query=Kennedy`\n- Search by IATA code: `/search?query=JFK`\n- Search by city: `/search?query=London`\n- Search with limit: `/search?query=Airport&limit=5`\n- Filter by country: `/search?query=Airport&country=United States`\n- Nearby search: `/search?query=Airport&near_lat=40.7&near_lon=-73.9`\n- Minimum 2 characters required for search\n\n**Response includes:**\n- Airport ID, name, IATA/ICAO codes\n- City and country information\n- Geographic coordinates and timezone\n- Match type and similarity score\n- Distance in km (for geographic searches)\n- Total count of results", "operationId": "search_airports_api_v1_airports_search_get", "parameters": [{"name": "query", "in": "query", "required": true, "schema": {"type": "string", "minLength": 2, "maxLength": 50, "description": "Search term for airport name, city, or IATA/ICAO code", "examples": ["ABH"], "title": "Query"}, "description": "Search term for airport name, city, or IATA/ICAO code"}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 50, "minimum": 1, "description": "Maximum number of suggestions to return", "examples": [10], "default": 10, "title": "Limit"}, "description": "Maximum number of suggestions to return"}, {"name": "country", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "description": "Filter results by country name", "examples": ["Saudi Arabia"], "title": "Country"}, "description": "Filter results by country name"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AirportSearchResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/revalidation": {"post": {"tags": ["Bookings", "Bookings", "Pricing", "Bookings"], "summary": "Revalidate flight offer price", "operationId": "price_revalidation_api_v1_bookings_revalidation_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "verbose", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Verbose"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RevalidationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RevalidationNormalizedResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/upsell": {"post": {"tags": ["Bookings", "Bookings", "Pricing", "Bookings"], "summary": "Branded-fare upsell for a flight offer", "description": "Retrieve branded-fare alternatives (Basic / Standard / Flex, \u2026) for a search offer via the GDS upselling endpoint (AQC certified \u00a74.7 Branded Fares Upsell). Send the offer_id from search; the offer is resolved and cleaned server-side. Only GDS providers that support upselling (Amadeus QC) are routed.", "operationId": "upsell_flight_offer_api_v1_bookings_upsell_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RevalidationRequest"}}}, "required": true}, "responses": {"200": {"description": "Branded-fare alternatives retrieved", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Upsell failed / unsupported provider"}, "404": {"description": "Offer not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/bookings/bags/catalogue": {"post": {"tags": ["Bookings", "Bookings", "Pricing", "Bookings"], "summary": "Bag catalogue for a flight offer (pricing?include=bags)", "description": "Step 1 of the AQC \u00a74.3 Bags scenario: price a search offer and return its chargeable-baggage catalogue. Send the offer_id from search; the offer is resolved and priced server-side with ?include=bags. Only GDS providers that support it (Amadeus QC) are routed.", "operationId": "bags_catalogue_api_v1_bookings_bags_catalogue_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RevalidationRequest"}}}, "required": true}, "responses": {"200": {"description": "Priced offer + bag catalogue", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Bags pricing failed / unsupported provider"}, "404": {"description": "Offer not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/bookings/bags/reprice": {"post": {"tags": ["Bookings", "Bookings", "Pricing", "Bookings"], "summary": "Re-price a flight offer with chosen bags", "description": "Step 2 of the AQC \u00a74.3 Bags scenario: re-price the offer with the selected chargeable bags injected, so the new total reflects the charge. Send the offer_id plus selections [{traveler_id?, segment_id?, quantity}].", "operationId": "bags_reprice_api_v1_bookings_bags_reprice_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/BagRepriceRequest"}}}, "required": true}, "responses": {"200": {"description": "Re-priced offer with bag charge", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Re-price failed / unsupported provider"}, "404": {"description": "Offer not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/bookings/fareRules": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Get fare rules for an offer", "description": "Retrieve detailed fare rules and restrictions for a flight offer.\n    \n    **Required Fields:**\n    - `offer_id`: The flight offer ID from search results", "operationId": "fare_rules_for_offer_api_v1_bookings_fareRules_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/FareRulesByOfferRequest"}}}, "required": true}, "responses": {"200": {"description": "Fare rules retrieved successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FareRulesResponse"}}}}, "400": {"description": "Invalid offer ID"}, "404": {"description": "Offer not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/bookings/createPnr": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Create PNR/Booking", "description": "Create a flight booking (PNR) with the airline.\n    \n    **Required Fields:**\n    - `offer_id`: Flight offer ID to book\n    - `currency`: Payment currency\n    - `passengers`: List of passengers with complete details\n    - `contact`: Contact information (email and phone)\n    - `payment_mode`: PAYMENT_FIRST, PNR_FIRST, or PNR_ONLY\n    \n    **Idempotency:**\n    - Requires Idempotency-Key header to prevent duplicate bookings\n    - Same key returns same result for duplicate requests", "operationId": "create_pnr_api_v1_bookings_createPnr_post", "security": [{"BearerAuth": []}, {"HTTPBearer": []}], "parameters": [{"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateBookingRequest"}}}}, "responses": {"200": {"description": "Booking created successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateBookingResponse"}}}}, "400": {"description": "Invalid booking request"}, "409": {"description": "Duplicate request (idempotency conflict)"}, "422": {"description": "Validation error"}, "500": {"description": "Booking creation failed"}, "502": {"description": "BOOKING_PENDING_CONFIRMATION \u2014 the provider has neither confirmed nor rejected the booking. Reconciliation is queued; poll the returned booking_id. DO NOT retry: a retry may create a duplicate reservation."}}}}, "/api/v1/bookings/{booking_id}/authorize": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Authorize payment for booking", "description": "Authorize payment for a created booking.\n    \n    **Required Fields:**\n    - `token`: Payment token from PSP\n    - `currency`: Payment currency  \n    - `amount_minor`: Amount in minor units (e.g., cents)\n    \n    **Idempotency:**\n    - Requires Idempotency-Key header", "operationId": "authorize_payment_api_v1_bookings__booking_id__authorize_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentAuthorizeRequest"}}}}, "responses": {"200": {"description": "Payment authorized successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentAuthorizeResponse"}}}}, "400": {"description": "Invalid payment request"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/payment/capture": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Capture authorized payment", "description": "Capture (charge) an authorized payment.\n    \n    **State Requirement:** Payment must be in AUTHORIZED state.\n    \n    **Parameters:**\n    - `amount_minor`: Amount to capture in minor units (optional, defaults to full authorization)\n    \n    **Idempotency:**\n    - Requires Idempotency-Key header", "operationId": "capture_payment_api_v1_bookings__booking_id__payment_capture_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "amount_minor", "in": "query", "required": false, "schema": {"type": "integer", "description": "Amount to capture (optional)", "title": "Amount Minor"}, "description": "Amount to capture (optional)"}, {"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "responses": {"200": {"description": "Payment captured successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Capture failed (invalid state or amount)"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/payment/void": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Void (cancel) authorized payment", "description": "Void an authorized payment (release held funds).\n    \n    **State Requirement:** Payment must be in AUTHORIZED state (not yet captured).\n    \n    **Use Case:** Cancel booking before ticketing, customer changes mind.\n    \n    **Parameters:**\n    - `reason`: Reason for voiding (optional)\n    \n    **Idempotency:**\n    - Requires Idempotency-Key header", "operationId": "void_payment_api_v1_bookings__booking_id__payment_void_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "reason", "in": "query", "required": false, "schema": {"type": "string", "description": "Reason for voiding", "title": "Reason"}, "description": "Reason for voiding"}, {"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "responses": {"200": {"description": "Payment voided successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Void failed (already captured or invalid state)"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/payment/refund": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Refund captured payment", "description": "Refund a captured payment (full or partial).\n    \n    **State Requirement:** Payment must be in CAPTURED or SETTLED state.\n    \n    **Use Case:** Customer cancellation, service issue, partial refund.\n    \n    **Parameters:**\n    - `amount_minor`: Amount to refund in minor units (optional, defaults to full amount)\n    - `reason`: Reason for refund (optional but recommended)\n    \n    **Idempotency:**\n    - Requires Idempotency-Key header", "operationId": "refund_payment_api_v1_bookings__booking_id__payment_refund_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "amount_minor", "in": "query", "required": false, "schema": {"type": "integer", "description": "Amount to refund (optional, defaults to full)", "title": "Amount Minor"}, "description": "Amount to refund (optional, defaults to full)"}, {"name": "reason", "in": "query", "required": false, "schema": {"type": "string", "description": "Reason for refund", "title": "Reason"}, "description": "Reason for refund"}, {"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "responses": {"200": {"description": "Refund processed successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Refund failed (not captured, insufficient funds, or invalid state)"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Get booking details", "description": "Retrieve complete booking details by booking_id or PNR.\n    \n    **Accepts:**\n    - booking_id (numeric ID)\n    - PNR (6-character alphanumeric code)\n    \n    **Returns:** Complete booking information including passengers, flights, pricing, and status.", "operationId": "get_booking_api_v1_bookings__booking_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Booking retrieved successfully", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/payment/history": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Get payment transaction history", "description": "Get complete payment transaction history for a booking.\n    \n    **Returns:** All payment transactions (authorizations, captures, voids, refunds).", "operationId": "get_payment_history_api_v1_bookings__booking_id__payment_history_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Payment history retrieved successfully", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ticket": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Issue e-tickets", "description": "Issue electronic tickets for a confirmed booking.\n    \n    **Parameters:**\n    - `capture`: Whether to capture authorized payment (default: true)\n    \n    **Idempotency:**\n    - Requires Idempotency-Key header", "operationId": "issue_tickets_api_v1_bookings__booking_id__ticket_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TicketRequest"}}}}, "responses": {"200": {"description": "Tickets issued successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TicketResponse"}}}}, "400": {"description": "Ticketing failed"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/cancel": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Cancel booking", "description": "Cancel an existing booking/PNR.\n    \n    **Response Includes:**\n    - Refund amount (if applicable)\n    - Cancellation fees\n    - Updated booking status", "operationId": "cancel_booking_api_v1_bookings__booking_id__cancel_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Booking cancelled successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CancelResponse"}}}}, "400": {"description": "Cancellation failed"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/seats": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Get seat map for booking", "description": "Retrieve available seats and seating map for a booking.", "operationId": "seat_map_api_v1_bookings__booking_id__seats_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Seat map retrieved successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SeatMapResponse"}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["Bookings", "Bookings"], "summary": "Select seat for passenger", "description": "Select a specific seat for a passenger.\n    \n    **Query Parameters:**\n    - `segment_id`: Flight segment identifier\n    - `seat_number`: Seat number to select  \n    - `passenger_id`: Passenger identifier", "operationId": "select_seat_api_v1_bookings__booking_id__seats_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "segment_id", "in": "query", "required": true, "schema": {"type": "string", "description": "Flight segment ID", "title": "Segment Id"}, "description": "Flight segment ID"}, {"name": "seat_number", "in": "query", "required": true, "schema": {"type": "string", "description": "Seat number (e.g., 12A)", "title": "Seat Number"}, "description": "Seat number (e.g., 12A)"}, {"name": "passenger_id", "in": "query", "required": true, "schema": {"type": "string", "description": "Passenger ID", "title": "Passenger Id"}, "description": "Passenger ID"}], "responses": {"200": {"description": "Seat selected successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SeatSelectResponse"}}}}, "400": {"description": "Seat selection failed"}, "404": {"description": "Booking or segment not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/seats/batch": {"post": {"tags": ["Bookings", "Bookings", "Bookings"], "summary": "Reserve several seats in one GDS session", "description": "Reserve every seat for a booking in a **single** Amadeus session.\n\n    `POST /{booking_id}/seats` opens a full stateful conversation per seat\n    (PNR_Retrieve \u2192 PNR_AddMultiElements \u2192 Security_SignOut). Twelve seats therefore\n    cost twelve sessions. This endpoint batches all of them into one\n    PNR_AddMultiElements, matching the Amadeus reference (five STR elements in a single\n    message) and cutting the round-trips by an order of magnitude.\n\n    **Body:** `{\"seats\": [{\"segment_id\": \"GF249\", \"seat_number\": \"9A\", \"passenger_id\": \"1\"}, ...]}`\n\n    Partial success is expected \u2014 a carrier may refuse individual seats \u2014 so the response\n    reports what was requested and what was stored rather than failing as a whole.", "operationId": "reserve_seats_batch_api_v1_bookings__booking_id__seats_batch_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true, "title": "Payload"}}}}, "responses": {"200": {"description": "Batch processed", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Seat reservation failed"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/seats/issue": {"post": {"tags": ["Bookings", "Bookings", "Ancillaries", "Bookings"], "summary": "Pay for the seats held on a booking (price + EMD)", "description": "Turn the seats already held on the PNR into **paid** seats.\n\n    A seat request only asks the airline for a seat. When the seat is chargeable the\n    airline expects payment, which Amadeus performs by pricing the services on the PNR\n    and issuing an EMD. Without this a chargeable seat stays in `pending` forever.\n\n    Amadeus flow (reference *Meal_Seat* steps 16, 17, 19, 25) \u2014 note that it does **not**\n    use the ancillary catalogue, because the seat has already been chosen from the seat\n    map and is on the PNR:\n\n    `Service_IntegratedPricing` \u2192 `Ticket_CreateTSMFromPricing` \u2192 save (optionCode 11) \u2192\n    `DocIssuance_IssueMiscellaneousDocuments`\n\n    Pass `?issue_emd_documents=false` to price and create the TSMs without issuing.", "operationId": "issue_paid_seats_api_v1_bookings__booking_id__seats_issue_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "issue_emd_documents", "in": "query", "required": false, "schema": {"type": "boolean", "description": "Issue the EMD after pricing", "default": true, "title": "Issue Emd Documents"}, "description": "Issue the EMD after pricing"}], "responses": {"200": {"description": "Seats priced (and issued)", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Paid seats unavailable or pricing failed"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/baggage": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Get baggage allowances", "description": "Retrieve baggage allowances and ancillary information for a booking.", "operationId": "baggage_info_api_v1_bookings__booking_id__baggage_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Baggage information retrieved successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BaggageInfoResponse"}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ancillaries": {"post": {"tags": ["Bookings", "Bookings", "Ancillaries", "Bookings"], "summary": "Add an ancillary SSR (extra baggage, meal, wheelchair\u2026)", "description": "Add a Special Service Request to a booked PNR \u2014 e.g. **XBAG** (extra baggage),\n    **MOML** (meal), **WCHR** (wheelchair).\n\n    **Query params**\n    - `ssr_code`: SSR code, e.g. `XBAG`, `MOML`, `WCHR`\n    - `free_text`: optional detail, e.g. `1PC 23KG`\n    - `segment_id`: optional \u2014 flight id (`GF251`), route (`DAC-DXB`) or 1-based number\n    - `passenger_id`: optional \u2014 1-based traveler index\n\n    **Note:** this records a *request* to the validating carrier on the PNR. It is not a\n    paid ancillary. Chargeable bags are sold as an EMD, which needs the Amadeus\n    ancillary/EMD services enabled for the office.", "operationId": "add_ancillary_api_v1_bookings__booking_id__ancillaries_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "ssr_code", "in": "query", "required": true, "schema": {"type": "string", "description": "SSR code, e.g. XBAG, MOML, WCHR", "title": "Ssr Code"}, "description": "SSR code, e.g. XBAG, MOML, WCHR"}, {"name": "free_text", "in": "query", "required": false, "schema": {"type": "string", "description": "Optional free text, e.g. '1PC 23KG'", "default": "", "title": "Free Text"}, "description": "Optional free text, e.g. '1PC 23KG'"}, {"name": "segment_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Flight id, route code or 1-based number", "title": "Segment Id"}, "description": "Flight id, route code or 1-based number"}, {"name": "passenger_id", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "1-based traveler index", "title": "Passenger Id"}, "description": "1-based traveler index"}], "responses": {"200": {"description": "Ancillary SSR added to the PNR", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Invalid request, or service not available for this booking"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ancillaries/catalogue": {"get": {"tags": ["Bookings", "Bookings", "Ancillaries", "Bookings"], "summary": "List purchasable ancillaries (paid bags / seats / meals)", "description": "Amadeus `Service_StandaloneCatalogue` \u2014 the chargeable services available for this\n    booking, with the identifiers needed to purchase them.\n\n    `service_group`: `BG` baggage \u00b7 `ST` seat \u00b7 `ML` meal \u00b7 empty = everything.\n\n    Each item returns `code`/`rfic`/`rfisc`/`booking_method`/`provider` \u2014 pass those\n    straight back to **POST /{id}/ancillaries/purchase**.", "operationId": "ancillary_catalogue_api_v1_bookings__booking_id__ancillaries_catalogue_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "service_group", "in": "query", "required": false, "schema": {"type": "string", "description": "BG (bags), ST (seats), ML (meals) or empty", "default": "", "title": "Service Group"}, "description": "BG (bags), ST (seats), ML (meals) or empty"}], "responses": {"200": {"description": "Catalogue retrieved", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Not available"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ancillaries/purchase": {"post": {"tags": ["Bookings", "Bookings", "Ancillaries", "Bookings"], "summary": "Book + price paid ancillaries (creates TSMs)", "description": "Books and prices the selected chargeable services on the PNR and creates a TSM for\n    each \u2014 the step before EMD issuance.\n\n    Amadeus flow: `ServiceBookPriceService` (one call per passenger) \u2192\n    `Service_IntegratedPricing` \u2192 `Ticket_CreateTSMFromPricing` \u2192 PNR save.\n\n    **Body:** `{\"products\": [{\"customer_ref_ids\": \"2\", \"code\": \"XBAG\", \"rfic\": \"C\",\n    \"rfisc\": \"0CW\", \"booking_method\": \"1\", \"provider\": \"GF\",\n    \"segment_ref_ids\": \"1 2\"}]}` \u2014 take these from the catalogue.\n\n    Returns `tsm_references`; issue them with **POST /{id}/ancillaries/emd**.", "operationId": "purchase_ancillaries_api_v1_bookings__booking_id__ancillaries_purchase_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"type": "object", "additionalProperties": true, "title": "Payload"}}}}, "responses": {"200": {"description": "Ancillaries priced, TSMs created", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ancillaries/emd": {"post": {"tags": ["Bookings", "Bookings", "Ancillaries", "Bookings"], "summary": "Issue EMD(s) for priced ancillaries", "description": "Amadeus `DocIssuance_IssueMiscellaneousDocuments` \u2014 issues the EMD for each TSM.\n\n    Omit `tsm_references` to issue every TSM on the PNR (they are looked up with\n    `Ticket_RetrieveListOfTSM`). The EMD numbers are read back from the PNR's FA elements\n    after issuance.\n\n    **Body (optional):** `{\"tsm_references\": [\"31\", \"34\"]}`", "operationId": "issue_emd_api_v1_bookings__booking_id__ancillaries_emd_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"content": {"application/json": {"schema": {"type": "object", "additionalProperties": true, "title": "Payload"}}}}, "responses": {"200": {"description": "EMD(s) issued", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ancillaries/cancel": {"post": {"tags": ["Bookings", "Bookings", "Ancillaries", "Bookings"], "summary": "Cancel paid ancillaries (void EMD or remove the element)", "description": "Completes the ancillary lifecycle: **catalogue \u2192 purchase (hold) \u2192 EMD (confirm) \u2192\n    cancel**.\n\n    The right Amadeus message depends on how far the ancillary got, and the server decides\n    per item so the caller does not have to:\n\n    * **EMD already issued** \u2192 the document is voided with `Ticket_CancelDocument`\n      (TRCANQ), exactly as an e-ticket is. Deleting the element instead would leave a live\n      payable document behind.\n    * **Not yet issued** \u2192 the service is only an element on the PNR and is removed with\n      `PNR_Cancel` (`entryType=E`).\n\n    **Body:** `{\"ancillary_ids\": [12, 13]}` \u2014 omit it to cancel every ancillary on the\n    booking that is not already cancelled or refunded.", "operationId": "cancel_ancillaries_api_v1_bookings__booking_id__ancillaries_cancel_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"content": {"application/json": {"schema": {"anyOf": [{"type": "object", "additionalProperties": true}, {"type": "null"}], "title": "Payload"}}}}, "responses": {"200": {"description": "Ancillaries cancelled", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Cancellation failed / unsupported provider"}, "404": {"description": "Booking or ancillary not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ticket/status": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Live ticket-order status", "description": "Read the provider's current ticket-order state.\n\n    Issuance is not always synchronous. A consolidator GDS fare returns success from\n    ticketing as soon as the order is **placed**, and only becomes **ticketed** once the\n    provider works it \u2014 so a booking can legitimately sit between the two. This is how\n    that is observed and recovered; without it a pending order is invisible.\n\n    Returns `issued` plus the raw provider status, e.g. `1 = Placed`, `6 = Ticketed`.\n    Providers that do not expose an async ticketing state return **501**.", "operationId": "ticket_status_api_v1_bookings__booking_id__ticket_status_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Ticket status retrieved", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "501": {"description": "Not supported by this provider"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ticket/document": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Get the e-ticket document (coupons)", "description": "Retrieve the e-ticket document: one **coupon per flight**, each with its own status\n    (OPEN / USED / EXCHANGED / REFUNDED / VOID), plus the issuing IATA number, fare\n    calculation, endorsements and form of payment.\n\n    The coupon is the unit that void, refund and reissue operate on, so this is the\n    subject of every servicing decision. `allow_void` / `allow_refund` /\n    `allow_reissue` report what the document itself permits.\n\n    **LCC content returns the document shape with empty fields** \u2014 no IATA number, no\n    fare calculation \u2014 because no ticket document exists; the airline booking reference\n    *is* the entitlement. That is a valid answer, not an error.", "operationId": "ticket_document_api_v1_bookings__booking_id__ticket_document_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "E-ticket document retrieved", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "501": {"description": "Not supported by this provider"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/ticket/{action}": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Void, refund, or price a reissue on an issued ticket (quote-first)", "description": "Raise a **post-ticketing request** against an issued ticket. `action` is `void`,\n    `refund`, or `reissue`.\n\n    **`reissue` is quote-only.** It prices what changing the ticket would cost and\n    changes nothing; `confirm=true` is refused. Actioning a reissue is not implemented\n    \u2014 MyFareBox has not documented the `reissueQuoteRequestType` values, and a\n    completed reissue produces a new e-ticket that we have nowhere to record, so the\n    booking would lose its own document. Price the change here, then action it with\n    MyFareBox directly. A reissue never changes the booking status: the passenger\n    still flies.\n\n    A ticket bought through a consolidator is issued on *their* IATA number, so\n    reversing it is not something we perform \u2014 it is something we request, and they work\n    it asynchronously (`Requested \u2192 InProcess \u2192 Completed / Rejected`).\n\n    **`confirm=false` (the default) quotes only and changes nothing.** Both actions move\n    money and are irreversible, so the real request is raised only on `confirm=true`.\n    Fare rules are enforced by the provider: a reply such as *\"Voiding window expired.\"*\n    or *\"Ticket is Non-Refundable.\"* is a determination, not a failure.\n\n    On a confirmed, permitted action the booking is transitioned so our ledger follows\n    the document \u2014 which is what makes a subsequent card refund safe.\n\n    Options are query parameters (`confirm`, `note`), but the app's middleware still\n    requires `Content-Type: application/json` on any POST \u2014 send `-d '{}'` with curl.", "operationId": "service_ticket_api_v1_bookings__booking_id__ticket__action__post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "action", "in": "path", "required": true, "schema": {"type": "string", "title": "Action"}}, {"name": "confirm", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Confirm"}}, {"name": "note", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}}], "responses": {"200": {"description": "Quote returned, or request raised", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "501": {"description": "Not supported by this provider"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/servicing": {"get": {"tags": ["Bookings", "Bookings"], "summary": "List post-ticketing requests", "description": "List the post-ticketing requests raised against this booking and their state\n    (`Requested / InProcess / Completed / Deleted / Rejected / QuoteChanged`).\n\n    Servicing is asynchronous, so this is how a raised void, refund or reissue is\n    followed to completion. \"No records found.\" simply means none was ever raised.", "operationId": "servicing_requests_api_v1_bookings__booking_id__servicing_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Servicing requests retrieved", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "501": {"description": "Not supported by this provider"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/notes": {"post": {"tags": ["Bookings", "Bookings"], "summary": "Attach notes to the booking at the provider", "description": "Attach one or more notes to the booking **at the provider**.\n\n    Servicing a consolidator booking happens partly by conversation \u2014 a waiver code, an\n    agent's reference, why a name was corrected. MyFareBox keeps those on the booking\n    itself, which is the only place their staff see them when they work a request. A\n    note held only in our own audit trail is invisible to them.\n\n    Empty and whitespace-only notes are dropped; a request with nothing left is a 400.\n\n    The provider call is best-effort: a note that fails to attach is reported as\n    `success: false` with the reason, **not** as a failed request, because a note is\n    never the reason a booking is broken.\n\n    **The provider is currently the only durable copy.** An audit row is attempted but\n    rejected by RLS today (the request runs on the caller's JWT, while the policy grants\n    `service_role`), so a note that MyFareBox does not accept is not recorded anywhere.", "operationId": "add_booking_notes_api_v1_bookings__booking_id__notes_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BookingNotesRequest"}}}}, "responses": {"200": {"description": "Note request processed; check `success`", "content": {"application/json": {"schema": {}}}}, "400": {"description": "No usable note supplied, or booking not found"}, "501": {"description": "Not supported by this provider"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/rules": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Get fare rules for booking", "description": "Retrieve fare rules and restrictions for an existing booking.", "operationId": "fare_rules_for_booking_api_v1_bookings__booking_id__rules_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Fare rules retrieved successfully", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FareRulesResponse"}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/order": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Retrieve flight order by reference", "description": "Retrieve the live flight order from the GDS by its provider reference (AQC certified).", "operationId": "retrieve_order_api_v1_bookings__booking_id__order_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "responses": {"200": {"description": "Order retrieved successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Retrieval failed"}, "404": {"description": "Booking or order not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/foid": {"patch": {"tags": ["Bookings", "Bookings"], "summary": "Add Form of Identification (FOID) to an order", "description": "Add a FOID to the flight order via GDS PATCH (AQC certified).", "operationId": "add_foid_api_v1_bookings__booking_id__foid_patch", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/FoidRequest"}}}}, "responses": {"200": {"description": "FOID added successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "FOID PATCH failed"}, "404": {"description": "Booking or order not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/order/by-reference": {"get": {"tags": ["Bookings", "Bookings"], "summary": "Retrieve flight order by record locator (by-reference)", "description": "Retrieve the live flight order from the GDS by its PNR / record locator (AQC certified by-reference).", "operationId": "retrieve_order_by_reference_api_v1_bookings__booking_id__order_by_reference_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}, {"name": "reference", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "description": "Record locator to retrieve. Optional, and it must match this booking's own PNR \u2014 it is a confirmation, not a lookup key. Supplying someone else's locator is refused rather than honoured.", "title": "Reference"}, "description": "Record locator to retrieve. Optional, and it must match this booking's own PNR \u2014 it is a confirmation, not a lookup key. Supplying someone else's locator is refused rather than honoured."}], "responses": {"200": {"description": "Order retrieved successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Retrieval failed"}, "404": {"description": "Booking or order not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/bookings/{booking_id}/commission": {"patch": {"tags": ["Bookings", "Bookings"], "summary": "Add FM (agency) commission to an order", "description": "Add a commission to the flight order via GDS PATCH (AQC certified FM Commission). Provide either amount or percentage.", "operationId": "add_commission_api_v1_bookings__booking_id__commission_patch", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CommissionRequest"}}}}, "responses": {"200": {"description": "Commission added successfully", "content": {"application/json": {"schema": {}}}}, "400": {"description": "Commission PATCH failed"}, "404": {"description": "Booking or order not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/health/health": {"get": {"tags": ["System", "System"], "summary": "System Health Check", "description": "Aggregated health check for Redis and MongoDB.\nReturns service availability status.", "operationId": "health_check_health_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/health/health": {"get": {"tags": ["System", "System"], "summary": "System Health Check", "description": "Aggregated health check for Redis and MongoDB.\nReturns service availability status.", "operationId": "health_check_api_v1_health_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/api/v1/hotel/search": {"post": {"tags": ["Hotel", "Hotel"], "summary": "Initiate hotel availability search", "description": "Search available hotels across multiple providers (Amadeus Self-Service, Amadeus Enterprise).\n    Returns a search_id and stream URLs for 3 consumption modes:\n    \n    1. **SSE offer-by-offer** \u2014 `/search/stream/{search_id}` (real-time individual offers)\n    2. **SSE provider-by-provider** \u2014 `/search/stream-by-provider/{search_id}` (grouped by provider)\n    3. **Batch** \u2014 `/search/batch/{search_id}` (wait for all, return at once)\n    \n    Architecture identical to flight search.", "operationId": "initiate_hotel_search_api_v1_hotel_search_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/HotelSearchRequest"}}}, "required": true}, "responses": {"202": {"description": "Search initiated \u2014 use stream URLs for results", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HotelSearchResponse"}}}}, "400": {"description": "Invalid request parameters"}, "429": {"description": "Rate limit exceeded"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/hotel/search/stream/{search_id}": {"get": {"tags": ["Hotel", "Hotel"], "summary": "Stream hotel offers via SSE (offer-by-offer)", "description": "Server-Sent Events stream delivering individual hotel offers in real-time.\n    Each offer is pushed immediately as it arrives from providers.\n    \n    **Events:**\n    - `hotel_offer`: Individual hotel offer data\n    - `heartbeat`: Keep-alive ping\n    - `status_update`: Search status change (completed/failed)", "operationId": "stream_hotel_results_api_v1_hotel_search_stream__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Search ID from initiation", "title": "Search Id"}, "description": "Search ID from initiation"}], "responses": {"200": {"description": "SSE stream", "content": {"text/event-stream": {}}}, "404": {"description": "Search not found"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/search/stream-by-provider/{search_id}": {"get": {"tags": ["Hotel", "Hotel"], "summary": "Stream hotel results grouped by provider", "description": "Server-Sent Events stream delivering complete result sets as each provider finishes.\n    \n    **Events:**\n    - `provider_results`: Complete offer array from a provider\n    - `heartbeat`: Keep-alive ping  \n    - `search_completed`: All providers finished", "operationId": "stream_hotel_by_provider_api_v1_hotel_search_stream_by_provider__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Search ID", "title": "Search Id"}, "description": "Search ID"}], "responses": {"200": {"description": "SSE stream", "content": {"text/event-stream": {}}}, "404": {"description": "Search not found"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/search/batch/{search_id}": {"get": {"tags": ["Hotel", "Hotel"], "summary": "Get all hotel results at once (batch mode)", "description": "Wait for all providers to complete (or timeout) and return complete result set.\n    \n    **Timeout Behavior:**\n    - Returns HTTP 200 if all providers complete within timeout\n    - Returns HTTP 408 if timeout reached (with partial results)\n    \n    **Response includes:**\n    - `results_by_provider`: Results grouped by provider name\n    - `completed_provider_count` / `total_provider_count`: Completion status\n    - `timed_out`: Whether timeout was reached", "operationId": "get_hotel_batch_api_v1_hotel_search_batch__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Search ID", "title": "Search Id"}, "description": "Search ID"}, {"name": "timeout", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 120, "minimum": 5, "description": "Max seconds to wait (5-120)", "default": 30, "title": "Timeout"}, "description": "Max seconds to wait (5-120)"}], "responses": {"200": {"description": "All results returned", "content": {"application/json": {"schema": {}}}}, "408": {"description": "Timeout \u2014 partial results returned"}, "404": {"description": "Search not found"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/search/results/{search_id}": {"get": {"tags": ["Hotel", "Hotel"], "summary": "Poll hotel search results", "description": "Simple polling endpoint \u2014 returns current results + status.\n    Supports filtering by price/star rating and pagination.\n    For real-time updates, use the SSE stream endpoints instead.", "operationId": "get_hotel_results_api_v1_hotel_search_results__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Search Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "description": "Page number", "default": 1, "title": "Page"}, "description": "Page number"}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "description": "Results per page", "default": 20, "title": "Page Size"}, "description": "Results per page"}, {"name": "min_price", "in": "query", "required": false, "schema": {"anyOf": [{"type": "number", "minimum": 0}, {"type": "null"}], "description": "Minimum price filter", "title": "Min Price"}, "description": "Minimum price filter"}, {"name": "max_price", "in": "query", "required": false, "schema": {"anyOf": [{"type": "number", "minimum": 0}, {"type": "null"}], "description": "Maximum price filter", "title": "Max Price"}, "description": "Maximum price filter"}, {"name": "min_stars", "in": "query", "required": false, "schema": {"anyOf": [{"type": "integer", "maximum": 5, "minimum": 1}, {"type": "null"}], "description": "Minimum star rating", "title": "Min Stars"}, "description": "Minimum star rating"}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "description": "Sort: price_asc, price_desc, star_rating", "default": "price_asc", "title": "Sort By"}, "description": "Sort: price_asc, price_desc, star_rating"}], "responses": {"200": {"description": "Current results", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Search not found or expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/check-rate": {"post": {"tags": ["Hotel", "Hotel"], "summary": "Re-validate hotel rate", "description": "Check if a specific room rate is still available and at what price.\n    Equivalent to flight price revalidation \u2014 MUST be called before booking.\n    \n    Uses raw_hotel_offers from Supabase to construct the provider request.", "operationId": "check_rate_api_v1_hotel_check_rate_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/RateCheckRequest"}}}, "required": true}, "responses": {"200": {"description": "Rate check result", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/RateCheckResponse"}}}}, "400": {"description": "Rate check failed"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/hotel/book": {"post": {"tags": ["Hotel", "Hotel"], "summary": "Create hotel booking", "description": "Book a hotel room. Requires a valid rate_key from search/check-rate.\n    Rate is re-validated before confirmation (same as flight booking flow).\n    \n    **Idempotency:** Requires Idempotency-Key header to prevent double bookings.", "operationId": "create_booking_api_v1_hotel_book_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HotelBookingRequest"}}}}, "responses": {"200": {"description": "Booking confirmed", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HotelBookingResponse"}}}}, "400": {"description": "Booking failed"}, "409": {"description": "Duplicate request (idempotency)"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/bookings/{booking_id}": {"get": {"tags": ["Hotel", "Hotel"], "summary": "Get hotel booking details", "description": "Retrieve complete booking details by booking ID.", "operationId": "get_booking_api_v1_hotel_bookings__booking_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Booking details", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/bookings": {"get": {"tags": ["Hotel", "Hotel"], "summary": "List my hotel bookings", "description": "List all hotel bookings for the current user with pagination.", "operationId": "list_bookings_api_v1_hotel_bookings_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/hotel/bookings/{booking_id}/cancel": {"post": {"tags": ["Hotel", "Hotel"], "summary": "Cancel hotel booking", "description": "Cancel an existing hotel booking.\n    Calls the provider cancellation API and updates DB status.\n    \n    **Response includes:**\n    - Cancellation fee (if applicable)\n    - Refund amount\n    - Updated status", "operationId": "cancel_booking_api_v1_hotel_bookings__booking_id__cancel_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Booking cancelled", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HotelCancelResponse"}}}}, "400": {"description": "Cancellation failed"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/search": {"post": {"tags": ["Transport", "Transport"], "summary": "Initiate ground transport search", "description": "Search available transfers across multiple providers (Jayride, GetTransfer, HolidayTaxis).\n    Returns a search_id and stream URLs for 3 consumption modes:\n    \n    1. **SSE offer-by-offer** \u2014 `/search/stream/{search_id}` (real-time individual offers)\n    2. **SSE provider-by-provider** \u2014 `/search/stream-by-provider/{search_id}` (grouped by provider)\n    3. **Batch** \u2014 `/search/batch/{search_id}` (wait for all, return at once)", "operationId": "initiate_transport_search_api_v1_transport_search_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransportSearchRequest"}}}, "required": true}, "responses": {"202": {"description": "Search initiated \u2014 use stream URLs for results", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransportSearchResponse"}}}}, "400": {"description": "Invalid request parameters"}, "429": {"description": "Rate limit exceeded"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/transport/search/stream/{search_id}": {"get": {"tags": ["Transport", "Transport"], "summary": "Stream transport offers via SSE (offer-by-offer)", "description": "Server-Sent Events stream delivering individual transfer offers in real-time.\n    \n    **Events:**\n    - `transport_offer`: Individual transfer offer data\n    - `heartbeat`: Keep-alive ping\n    - `status_update`: Search status change (completed/failed)", "operationId": "stream_transport_results_api_v1_transport_search_stream__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Search ID from initiation", "title": "Search Id"}, "description": "Search ID from initiation"}], "responses": {"200": {"description": "SSE stream", "content": {"text/event-stream": {}}}, "404": {"description": "Search not found"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/search/stream-by-provider/{search_id}": {"get": {"tags": ["Transport", "Transport"], "summary": "Stream transport results grouped by provider", "description": "Server-Sent Events stream delivering complete result sets as each provider finishes.\n    \n    **Events:**\n    - `provider_results`: Complete offer array from a provider\n    - `heartbeat`: Keep-alive ping\n    - `search_completed`: All providers finished", "operationId": "stream_transport_by_provider_api_v1_transport_search_stream_by_provider__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Search ID", "title": "Search Id"}, "description": "Search ID"}], "responses": {"200": {"description": "SSE stream", "content": {"text/event-stream": {}}}, "404": {"description": "Search not found"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/search/batch/{search_id}": {"get": {"tags": ["Transport", "Transport"], "summary": "Get all transport results at once (batch mode)", "description": "Wait for all providers to complete (or timeout) and return complete result set.", "operationId": "get_transport_batch_api_v1_transport_search_batch__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "description": "Search ID", "title": "Search Id"}, "description": "Search ID"}, {"name": "timeout", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 120, "minimum": 5, "description": "Max seconds to wait", "default": 30, "title": "Timeout"}, "description": "Max seconds to wait"}], "responses": {"200": {"description": "All results returned", "content": {"application/json": {"schema": {}}}}, "408": {"description": "Timeout \u2014 partial results returned"}, "404": {"description": "Search not found"}, "410": {"description": "Search expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/search/results/{search_id}": {"get": {"tags": ["Transport", "Transport"], "summary": "Poll transport search results", "description": "Simple polling endpoint \u2014 returns current results + status.", "operationId": "get_transport_results_api_v1_transport_search_results__search_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "search_id", "in": "path", "required": true, "schema": {"type": "string", "title": "Search Id"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "min_price", "in": "query", "required": false, "schema": {"anyOf": [{"type": "number", "minimum": 0}, {"type": "null"}], "title": "Min Price"}}, {"name": "max_price", "in": "query", "required": false, "schema": {"anyOf": [{"type": "number", "minimum": 0}, {"type": "null"}], "title": "Max Price"}}, {"name": "transfer_type", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Transfer Type"}}, {"name": "vehicle_category", "in": "query", "required": false, "schema": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Vehicle Category"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "price_asc", "title": "Sort By"}}], "responses": {"200": {"description": "Current results", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Search not found or expired"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/quote": {"post": {"tags": ["Transport", "Transport"], "summary": "Re-validate transport quote", "description": "Check if a specific transfer quote is still available and at what price.", "operationId": "get_quote_detail_api_v1_transport_quote_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/QuoteDetailRequest"}}}, "required": true}, "responses": {"200": {"description": "Quote detail", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/QuoteDetailResponse"}}}}, "400": {"description": "Quote check failed"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"BearerAuth": []}]}}, "/api/v1/transport/book": {"post": {"tags": ["Transport", "Transport"], "summary": "Book a ground transfer", "description": "Book a ground transfer. Requires a valid quote_id from search results.\n    \n    **Idempotency:** Requires Idempotency-Key header to prevent double bookings.", "operationId": "create_booking_api_v1_transport_book_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "Idempotency-Key", "in": "header", "required": true, "schema": {"type": "string", "title": "Idempotency-Key"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransportBookingRequest"}}}}, "responses": {"200": {"description": "Booking confirmed", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransportBookingResponse"}}}}, "400": {"description": "Booking failed"}, "409": {"description": "Duplicate request (idempotency)"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/bookings/{booking_id}": {"get": {"tags": ["Transport", "Transport"], "summary": "Get transport booking details", "description": "Get transport booking by ID.", "operationId": "get_booking_api_v1_transport_bookings__booking_id__get", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Booking details", "content": {"application/json": {"schema": {}}}}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/bookings": {"get": {"tags": ["Transport", "Transport"], "summary": "List my transport bookings", "description": "List all transport bookings for the current user with pagination.", "operationId": "list_bookings_api_v1_transport_bookings_get", "security": [{"BearerAuth": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/transport/bookings/{booking_id}/cancel": {"post": {"tags": ["Transport", "Transport"], "summary": "Cancel transport booking", "description": "Cancel an existing transport booking.\n    Calls the provider cancellation API and updates DB status.", "operationId": "cancel_booking_api_v1_transport_bookings__booking_id__cancel_post", "security": [{"BearerAuth": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Booking cancelled", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TransportCancelResponse"}}}}, "400": {"description": "Cancellation failed"}, "404": {"description": "Booking not found"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/companies": {"post": {"tags": ["Admin", "Admin - Companies"], "summary": "Create a new company", "description": "Register a new B2B agent company on the platform.", "operationId": "create_company_api_v1_admin_companies_post", "security": [{"HTTPBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateCompanyRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "get": {"tags": ["Admin", "Admin - Companies"], "summary": "List all companies", "description": "Paginated list of all companies with filtering.", "operationId": "list_companies_api_v1_admin_companies_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "company_type", "in": "query", "required": false, "schema": {"type": "string", "title": "Company Type"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/companies/{company_id}": {"get": {"tags": ["Admin", "Admin - Companies"], "summary": "Get company details", "operationId": "get_company_api_v1_admin_companies__company_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "company_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Company Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Admin", "Admin - Companies"], "summary": "Update company details", "operationId": "update_company_api_v1_admin_companies__company_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "company_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Company Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateCompanyRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Admin", "Admin - Companies"], "summary": "Soft-delete company", "operationId": "delete_company_api_v1_admin_companies__company_id__delete", "security": [{"HTTPBearer": []}], "parameters": [{"name": "company_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Company Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/companies/{company_id}/suspend": {"post": {"tags": ["Admin", "Admin - Companies"], "summary": "Suspend a company", "description": "Block all operations for this company. Existing bookings remain.", "operationId": "suspend_company_api_v1_admin_companies__company_id__suspend_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "company_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Company Id"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyStatusChange"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/companies/{company_id}/activate": {"post": {"tags": ["Admin", "Admin - Companies"], "summary": "Re-activate a suspended company", "operationId": "activate_company_api_v1_admin_companies__company_id__activate_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "company_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Company Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/users": {"get": {"tags": ["Admin", "Admin - Users"], "summary": "List all users", "description": "Paginated list of all platform users with filtering by role, company, status.", "operationId": "list_users_api_v1_admin_users_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "role", "in": "query", "required": false, "schema": {"type": "string", "title": "Role"}}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "is_active", "in": "query", "required": false, "schema": {"type": "boolean", "title": "Is Active"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UserListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/users/{user_id}": {"get": {"tags": ["Admin", "Admin - Users"], "summary": "Get user details", "operationId": "get_user_api_v1_admin_users__user_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "title": "User Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserDetailResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Admin", "Admin - Users"], "summary": "Admin update user", "description": "Override user role, status, company assignment.", "operationId": "update_user_api_v1_admin_users__user_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "title": "User Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUpdateUserRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/users/{user_id}/suspend": {"post": {"tags": ["Admin", "Admin - Users"], "summary": "Suspend user", "description": "Suspend a user account with reason. Blocks all operations.", "operationId": "suspend_user_api_v1_admin_users__user_id__suspend_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "title": "User Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SuspendUserRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminUserResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/users/{user_id}/impersonate": {"post": {"tags": ["Admin", "Admin - Users"], "summary": "Impersonate user", "description": "Generate impersonation session for debugging. FULLY AUDITED.", "operationId": "impersonate_user_api_v1_admin_users__user_id__impersonate_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "user_id", "in": "path", "required": true, "schema": {"type": "string", "title": "User Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImpersonateRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ImpersonateResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/bookings": {"get": {"tags": ["Admin", "Admin - Bookings"], "summary": "List all bookings", "description": "Global booking list with filtering by status, company, supplier, date range.", "operationId": "list_bookings_api_v1_admin_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "user_id", "in": "query", "required": false, "schema": {"type": "string", "title": "User Id"}}, {"name": "supplier", "in": "query", "required": false, "schema": {"type": "string", "title": "Supplier"}}, {"name": "pnr", "in": "query", "required": false, "schema": {"type": "string", "title": "Pnr"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/BookingListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/bookings/reconciliation": {"get": {"tags": ["Admin", "Admin - Bookings"], "summary": "View reconciliation queue", "operationId": "get_reconciliation_queue_api_v1_admin_bookings_reconciliation_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ReconciliationQueueResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/bookings/{booking_id}": {"get": {"tags": ["Admin", "Admin - Bookings"], "summary": "Get booking details", "description": "Full booking with passengers, payment, tickets, and audit trail.", "operationId": "get_booking_api_v1_admin_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AdminBookingDetailResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/bookings/{booking_id}/override-status": {"post": {"tags": ["Admin", "Admin - Bookings"], "summary": "Override booking status", "description": "Admin force-change booking status. Requires reason. Fully audited.", "operationId": "override_booking_status_api_v1_admin_bookings__booking_id__override_status_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/OverrideBookingStatusRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/bookings/{booking_id}/reconcile": {"post": {"tags": ["Admin", "Admin - Bookings"], "summary": "Trigger manual reconciliation", "description": "Add booking to reconciliation queue for provider verification.", "operationId": "trigger_reconciliation_api_v1_admin_bookings__booking_id__reconcile_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/TriggerReconciliationRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/hotel-bookings": {"get": {"tags": ["Admin", "Admin - Hotel Bookings"], "summary": "List all hotel bookings", "description": "Global hotel booking list with filtering by status, company, provider, date range.", "operationId": "list_hotel_bookings_api_v1_admin_hotel_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "user_id", "in": "query", "required": false, "schema": {"type": "string", "title": "User Id"}}, {"name": "provider", "in": "query", "required": false, "schema": {"type": "string", "title": "Provider"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/hotel-bookings/stats/summary": {"get": {"tags": ["Admin", "Admin - Hotel Bookings"], "summary": "Hotel bookings statistics", "description": "Summary counts by status for admin dashboard widgets.", "operationId": "hotel_booking_stats_api_v1_admin_hotel_bookings_stats_summary_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/hotel-bookings/{booking_id}": {"get": {"tags": ["Admin", "Admin - Hotel Bookings"], "summary": "Get hotel booking details", "description": "Full hotel booking with guest info and audit trail.", "operationId": "get_hotel_booking_api_v1_admin_hotel_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/hotel-bookings/{booking_id}/override-status": {"post": {"tags": ["Admin", "Admin - Hotel Bookings"], "summary": "Override hotel booking status", "description": "Admin force-change hotel booking status. Fully audited.", "operationId": "override_hotel_booking_status_api_v1_admin_hotel_bookings__booking_id__override_status_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}, {"name": "new_status", "in": "query", "required": true, "schema": {"type": "string", "title": "New Status"}}, {"name": "reason", "in": "query", "required": true, "schema": {"type": "string", "minLength": 5, "title": "Reason"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/transport-bookings": {"get": {"tags": ["Admin", "Admin - Transport Bookings"], "summary": "List all transport bookings", "description": "Global transport booking list with filtering by status, company, provider, date range.", "operationId": "list_transport_bookings_api_v1_admin_transport_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "user_id", "in": "query", "required": false, "schema": {"type": "string", "title": "User Id"}}, {"name": "provider", "in": "query", "required": false, "schema": {"type": "string", "title": "Provider"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/transport-bookings/stats/summary": {"get": {"tags": ["Admin", "Admin - Transport Bookings"], "summary": "Transport bookings statistics", "description": "Summary counts by status for admin dashboard widgets.", "operationId": "transport_booking_stats_api_v1_admin_transport_bookings_stats_summary_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/transport-bookings/{booking_id}": {"get": {"tags": ["Admin", "Admin - Transport Bookings"], "summary": "Get transport booking details", "description": "Full transport booking with passenger info and audit trail.", "operationId": "get_transport_booking_api_v1_admin_transport_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/transport-bookings/{booking_id}/override-status": {"post": {"tags": ["Admin", "Admin - Transport Bookings"], "summary": "Override transport booking status", "description": "Admin force-change transport booking status. Fully audited.", "operationId": "override_transport_booking_status_api_v1_admin_transport_bookings__booking_id__override_status_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}, {"name": "new_status", "in": "query", "required": true, "schema": {"type": "string", "title": "New Status"}}, {"name": "reason", "in": "query", "required": true, "schema": {"type": "string", "minLength": 5, "title": "Reason"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/payments": {"get": {"tags": ["Admin", "Admin - Payments"], "summary": "List all payments", "description": "Global payment list with filtering by state, provider, company.", "operationId": "list_payments_api_v1_admin_payments_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "payment_state", "in": "query", "required": false, "schema": {"type": "string", "title": "Payment State"}}, {"name": "provider_name", "in": "query", "required": false, "schema": {"type": "string", "title": "Provider Name"}}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PaymentListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/payments/settlement-report": {"get": {"tags": ["Admin", "Admin - Payments"], "summary": "Settlement report", "description": "Aggregated settlement data for a period.", "operationId": "settlement_report_api_v1_admin_payments_settlement_report_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "period", "in": "query", "required": false, "schema": {"type": "string", "description": "Period: today, 7d, 30d, this_month", "default": "7d", "title": "Period"}, "description": "Period: today, 7d, 30d, this_month"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/payments/{payment_id}/manual-refund": {"post": {"tags": ["Admin", "Admin - Payments"], "summary": "Process manual refund", "description": "Admin-initiated refund with reason. Audit logged.", "operationId": "manual_refund_api_v1_admin_payments__payment_id__manual_refund_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "payment_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Payment Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ManualRefundRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/gds/status": {"get": {"tags": ["Admin", "Admin - GDS"], "summary": "GDS provider health overview", "description": "Status of all GDS connections including circuit breaker state.", "operationId": "gds_status_api_v1_admin_gds_status_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/GDSOverviewResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/gds/circuit-breakers": {"get": {"tags": ["Admin", "Admin - GDS"], "summary": "Circuit breaker states", "operationId": "circuit_breakers_api_v1_admin_gds_circuit_breakers_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/gds/{provider}/reset-circuit": {"post": {"tags": ["Admin", "Admin - GDS"], "summary": "Reset circuit breaker", "description": "Force-close a provider's circuit breaker.", "operationId": "reset_circuit_breaker_api_v1_admin_gds__provider__reset_circuit_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "provider", "in": "path", "required": true, "schema": {"type": "string", "title": "Provider"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/gds/performance": {"get": {"tags": ["Admin", "Admin - GDS"], "summary": "GDS performance metrics", "operationId": "gds_performance_api_v1_admin_gds_performance_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "provider", "in": "query", "required": false, "schema": {"type": "string", "description": "Filter by specific provider", "title": "Provider"}, "description": "Filter by specific provider"}, {"name": "period", "in": "query", "required": false, "schema": {"type": "string", "description": "Period: 24h, 7d, 30d", "default": "24h", "title": "Period"}, "description": "Period: 24h, 7d, 30d"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/gds/{provider}/config": {"patch": {"tags": ["Admin", "Admin - GDS"], "summary": "Update GDS configuration", "operationId": "update_gds_config_api_v1_admin_gds__provider__config_patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "provider", "in": "path", "required": true, "schema": {"type": "string", "title": "Provider"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateGDSConfigRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/markup-rules": {"get": {"tags": ["Admin", "Admin - Markup"], "summary": "List markup rules", "description": "List all platform markup rules with optional company filter.", "operationId": "list_markup_rules_api_v1_admin_markup_rules_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "is_active", "in": "query", "required": false, "schema": {"type": "boolean", "title": "Is Active"}}, {"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkupRuleListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["Admin", "Admin - Markup"], "summary": "Create markup rule", "description": "Create a new markup rule. Set company_id=null for platform-wide rules.", "operationId": "create_markup_rule_api_v1_admin_markup_rules_post", "security": [{"HTTPBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateMarkupRuleRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkupRuleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/markup-rules/{rule_id}": {"patch": {"tags": ["Admin", "Admin - Markup"], "summary": "Update markup rule", "operationId": "update_markup_rule_api_v1_admin_markup_rules__rule_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Rule Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateMarkupRuleRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkupRuleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Admin", "Admin - Markup"], "summary": "Delete markup rule (soft)", "operationId": "delete_markup_rule_api_v1_admin_markup_rules__rule_id__delete", "security": [{"HTTPBearer": []}], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Rule Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/markup-rules/calculate": {"post": {"tags": ["Admin", "Admin - Markup"], "summary": "Calculate markup for a price", "description": "Preview what markup rules would apply to a given price/route combination.", "operationId": "calculate_markup_api_v1_admin_markup_rules_calculate_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "base_price", "in": "query", "required": true, "schema": {"type": "number", "exclusiveMinimum": 0, "title": "Base Price"}}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}, {"name": "origin", "in": "query", "required": false, "schema": {"type": "string", "title": "Origin"}}, {"name": "destination", "in": "query", "required": false, "schema": {"type": "string", "title": "Destination"}}, {"name": "cabin_class", "in": "query", "required": false, "schema": {"type": "string", "title": "Cabin Class"}}, {"name": "airline", "in": "query", "required": false, "schema": {"type": "string", "title": "Airline"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/reports/dashboard": {"get": {"tags": ["Admin", "Admin - Reports"], "summary": "Platform dashboard KPIs", "description": "High-level stats: bookings, revenue, users, system health.", "operationId": "dashboard_stats_api_v1_admin_reports_dashboard_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/DashboardStatsResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/reports/live": {"get": {"tags": ["Admin", "Admin - Reports"], "summary": "Live system status", "description": "Real-time: active searches, connections, component health.", "operationId": "live_dashboard_api_v1_admin_reports_live_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/LiveDashboardResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/reports/audit": {"get": {"tags": ["Admin", "Admin - Reports"], "summary": "Audit log", "description": "Full audit trail with filtering by event type, user, date range.", "operationId": "audit_logs_api_v1_admin_reports_audit_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Page Size"}}, {"name": "event", "in": "query", "required": false, "schema": {"type": "string", "description": "Filter by event type (partial match)", "title": "Event"}, "description": "Filter by event type (partial match)"}, {"name": "user_id", "in": "query", "required": false, "schema": {"type": "string", "title": "User Id"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AuditLogListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/reports/revenue": {"get": {"tags": ["Admin", "Admin - Reports"], "summary": "Revenue report", "description": "Platform revenue breakdown by company, provider, period.", "operationId": "revenue_report_api_v1_admin_reports_revenue_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "period", "in": "query", "required": false, "schema": {"type": "string", "description": "Period: 7d, 30d, this_month, last_month", "default": "30d", "title": "Period"}, "description": "Period: 7d, 30d, this_month, last_month"}, {"name": "company_id", "in": "query", "required": false, "schema": {"type": "integer", "title": "Company Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/system/health": {"get": {"tags": ["Admin", "Admin - System"], "summary": "System component health", "description": "Detailed health check of all system components (Redis, MongoDB, Supabase, Celery).", "operationId": "system_health_api_v1_admin_system_health_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/SystemHealthResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/system/cache-stats": {"get": {"tags": ["Admin", "Admin - System"], "summary": "Cache statistics", "description": "Redis cache hit/miss ratios and key distribution.", "operationId": "cache_stats_api_v1_admin_system_cache_stats_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/admin/system/clear-cache": {"post": {"tags": ["Admin", "Admin - System"], "summary": "Invalidate cache keys", "description": "Clear specific cache key patterns. Use with caution.", "operationId": "clear_cache_api_v1_admin_system_clear_cache_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "pattern", "in": "query", "required": true, "schema": {"type": "string", "description": "Key pattern to clear (e.g., 'search:*', 'reval:*')", "title": "Pattern"}, "description": "Key pattern to clear (e.g., 'search:*', 'reval:*')"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/admin/system/error-logs": {"get": {"tags": ["Admin", "Admin - System"], "summary": "System error logs", "description": "Recent error logs from all stages (search, booking, payment, ticketing).", "operationId": "error_logs_api_v1_admin_system_error_logs_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 200, "minimum": 1, "default": 50, "title": "Page Size"}}, {"name": "stage", "in": "query", "required": false, "schema": {"type": "string", "description": "Filter by stage: search, booking, payment, ticketing", "title": "Stage"}, "description": "Filter by stage: search, booking, payment, ticketing"}, {"name": "provider", "in": "query", "required": false, "schema": {"type": "string", "title": "Provider"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/profile": {"get": {"tags": ["Company", "Company - Profile"], "summary": "Get company profile", "description": "Get your company's profile details.", "operationId": "get_profile_api_v1_company_profile_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyProfileResponse"}}}}}, "security": [{"HTTPBearer": []}]}, "patch": {"tags": ["Company", "Company - Profile"], "summary": "Update company profile", "operationId": "update_profile_api_v1_company_profile_patch", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateCompanyProfileRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyProfileResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/profile/settings": {"get": {"tags": ["Company", "Company - Profile"], "summary": "Get company settings", "operationId": "get_settings_api_v1_company_profile_settings_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanySettingsResponse"}}}}}, "security": [{"HTTPBearer": []}]}, "patch": {"tags": ["Company", "Company - Profile"], "summary": "Update company settings", "operationId": "update_settings_api_v1_company_profile_settings_patch", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateCompanySettingsRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanySettingsResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/staff": {"get": {"tags": ["Company", "Company - Staff"], "summary": "List company staff", "operationId": "list_staff_api_v1_company_staff_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/StaffListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/staff/invite": {"post": {"tags": ["Company", "Company - Staff"], "summary": "Invite new staff member", "description": "Generate invitation for a new staff member. They'll receive an email with join link.", "operationId": "invite_staff_api_v1_company_staff_invite_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteStaffRequest"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/InviteResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/staff/{staff_id}": {"patch": {"tags": ["Company", "Company - Staff"], "summary": "Update staff member", "operationId": "update_staff_api_v1_company_staff__staff_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "staff_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Staff Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateStaffRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/staff/{staff_id}/deactivate": {"post": {"tags": ["Company", "Company - Staff"], "summary": "Deactivate staff member", "operationId": "deactivate_staff_api_v1_company_staff__staff_id__deactivate_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "staff_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Staff Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/clients": {"get": {"tags": ["Company", "Company - Clients"], "summary": "List company clients", "operationId": "list_clients_api_v1_company_clients_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "client_type", "in": "query", "required": false, "schema": {"type": "string", "title": "Client Type"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClientListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["Company", "Company - Clients"], "summary": "Create client", "operationId": "create_client_api_v1_company_clients_post", "security": [{"HTTPBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateClientRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClientResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/clients/{client_id}": {"get": {"tags": ["Company", "Company - Clients"], "summary": "Get client details", "operationId": "get_client_api_v1_company_clients__client_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "client_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Client Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClientResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "patch": {"tags": ["Company", "Company - Clients"], "summary": "Update client", "operationId": "update_client_api_v1_company_clients__client_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "client_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Client Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateClientRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ClientResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/clients/{client_id}/bookings": {"get": {"tags": ["Company", "Company - Clients"], "summary": "Get client's bookings", "operationId": "get_client_bookings_api_v1_company_clients__client_id__bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "client_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Client Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/bookings": {"get": {"tags": ["Company", "Company - Bookings"], "summary": "List company bookings", "description": "Bookings scoped to your company only.", "operationId": "list_company_bookings_api_v1_company_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyBookingListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/bookings/pending": {"get": {"tags": ["Company", "Company - Bookings"], "summary": "Bookings requiring action", "description": "Payment pending, ticketing pending, and on-hold expiring bookings.", "operationId": "pending_bookings_api_v1_company_bookings_pending_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PendingBookingsResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/bookings/{booking_id}": {"get": {"tags": ["Company", "Company - Bookings"], "summary": "Get booking detail", "operationId": "get_booking_api_v1_company_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/bookings/{booking_id}/assign": {"post": {"tags": ["Company", "Company - Bookings"], "summary": "Assign booking to staff", "operationId": "assign_booking_api_v1_company_bookings__booking_id__assign_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/AssignBookingRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/hotel-bookings": {"get": {"tags": ["Company", "Company - Hotel Bookings"], "summary": "List company hotel bookings", "description": "Hotel bookings scoped to your company only.", "operationId": "list_company_hotel_bookings_api_v1_company_hotel_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/hotel-bookings/pending": {"get": {"tags": ["Company", "Company - Hotel Bookings"], "summary": "Hotel bookings requiring action", "description": "Pending confirmation and on-request hotel bookings for the company.", "operationId": "pending_hotel_bookings_api_v1_company_hotel_bookings_pending_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/hotel-bookings/{booking_id}": {"get": {"tags": ["Company", "Company - Hotel Bookings"], "summary": "Get hotel booking detail", "operationId": "get_company_hotel_booking_api_v1_company_hotel_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/transport-bookings": {"get": {"tags": ["Company", "Company - Transport Bookings"], "summary": "List company transport bookings", "description": "Transport bookings scoped to your company only.", "operationId": "list_company_transport_bookings_api_v1_company_transport_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}, {"name": "search", "in": "query", "required": false, "schema": {"type": "string", "title": "Search"}}, {"name": "date_from", "in": "query", "required": false, "schema": {"type": "string", "title": "Date From"}}, {"name": "date_to", "in": "query", "required": false, "schema": {"type": "string", "title": "Date To"}}, {"name": "sort_by", "in": "query", "required": false, "schema": {"type": "string", "default": "created_at", "title": "Sort By"}}, {"name": "sort_order", "in": "query", "required": false, "schema": {"type": "string", "default": "desc", "title": "Sort Order"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/transport-bookings/pending": {"get": {"tags": ["Company", "Company - Transport Bookings"], "summary": "Transport bookings requiring action", "description": "Pending confirmation and on-hold transport bookings for the company.", "operationId": "pending_transport_bookings_api_v1_company_transport_bookings_pending_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/transport-bookings/{booking_id}": {"get": {"tags": ["Company", "Company - Transport Bookings"], "summary": "Get transport booking detail", "operationId": "get_company_transport_booking_api_v1_company_transport_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/wallet": {"get": {"tags": ["Company", "Company - Wallet"], "summary": "Get wallet balance", "description": "Current balance, credit limit, and available credit.", "operationId": "get_wallet_api_v1_company_wallet_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WalletResponse"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/wallet/transactions": {"get": {"tags": ["Company", "Company - Wallet"], "summary": "Transaction ledger", "description": "Credit/debit transaction history.", "operationId": "get_transactions_api_v1_company_wallet_transactions_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "transaction_type", "in": "query", "required": false, "schema": {"type": "string", "description": "Filter: credit, debit, commission", "title": "Transaction Type"}, "description": "Filter: credit, debit, commission"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/WalletTransactionListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/markup-rules": {"get": {"tags": ["Company", "Company - Markup"], "summary": "List company markup rules", "operationId": "list_markup_rules_api_v1_company_markup_rules_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 50, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkupRuleListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "post": {"tags": ["Company", "Company - Markup"], "summary": "Create company markup rule", "description": "Add markup that will be applied to your clients' prices.", "operationId": "create_markup_rule_api_v1_company_markup_rules_post", "security": [{"HTTPBearer": []}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateMarkupRuleRequest"}}}}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkupRuleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/markup-rules/{rule_id}": {"patch": {"tags": ["Company", "Company - Markup"], "summary": "Update company markup rule", "operationId": "update_markup_rule_api_v1_company_markup_rules__rule_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Rule Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateMarkupRuleRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MarkupRuleResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Company", "Company - Markup"], "summary": "Delete company markup rule", "operationId": "delete_markup_rule_api_v1_company_markup_rules__rule_id__delete", "security": [{"HTTPBearer": []}], "parameters": [{"name": "rule_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Rule Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/reports/dashboard": {"get": {"tags": ["Company", "Company - Reports"], "summary": "Company dashboard KPIs", "operationId": "company_dashboard_api_v1_company_reports_dashboard_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CompanyDashboardStats"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/company/reports/sales": {"get": {"tags": ["Company", "Company - Reports"], "summary": "Sales report", "operationId": "sales_report_api_v1_company_reports_sales_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "period", "in": "query", "required": false, "schema": {"type": "string", "description": "Period: 7d, 30d, this_month", "default": "30d", "title": "Period"}, "description": "Period: 7d, 30d, this_month"}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/reports/top-routes": {"get": {"tags": ["Company", "Company - Reports"], "summary": "Top routes by bookings", "operationId": "top_routes_api_v1_company_reports_top_routes_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "period", "in": "query", "required": false, "schema": {"type": "string", "default": "30d", "title": "Period"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/company/reports/top-clients": {"get": {"tags": ["Company", "Company - Reports"], "summary": "Top clients by revenue", "operationId": "top_clients_api_v1_company_reports_top_clients_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "period", "in": "query", "required": false, "schema": {"type": "string", "default": "30d", "title": "Period"}}, {"name": "limit", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 50, "minimum": 1, "default": 10, "title": "Limit"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/profile": {"get": {"tags": ["Customer", "Customer - Profile"], "summary": "Get my profile", "operationId": "get_profile_api_v1_customer_profile_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileResponse"}}}}}, "security": [{"HTTPBearer": []}]}, "patch": {"tags": ["Customer", "Customer - Profile"], "summary": "Update my profile", "operationId": "update_profile_api_v1_customer_profile_patch", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateProfileRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/ProfileResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/customer/profile/preferences": {"get": {"tags": ["Customer", "Customer - Profile"], "summary": "Get my preferences", "operationId": "get_preferences_api_v1_customer_profile_preferences_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreferencesResponse"}}}}}, "security": [{"HTTPBearer": []}]}, "patch": {"tags": ["Customer", "Customer - Profile"], "summary": "Update my preferences", "operationId": "update_preferences_api_v1_customer_profile_preferences_patch", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdatePreferencesRequest"}}}, "required": true}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/PreferencesResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/customer/bookings": {"get": {"tags": ["Customer", "Customer - Bookings"], "summary": "My bookings", "description": "List of your bookings with pagination.", "operationId": "my_bookings_api_v1_customer_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MyBookingListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/bookings/{booking_id}": {"get": {"tags": ["Customer", "Customer - Bookings"], "summary": "Booking detail", "operationId": "my_booking_detail_api_v1_customer_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MyBookingDetailResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/bookings/{booking_id}/cancel": {"post": {"tags": ["Customer", "Customer - Bookings"], "summary": "Request cancellation", "operationId": "cancel_booking_api_v1_customer_bookings__booking_id__cancel_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CancelBookingRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/CancelBookingResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/hotel-bookings": {"get": {"tags": ["Customer", "Customer - Hotel Bookings"], "summary": "My hotel bookings", "description": "List your hotel bookings with pagination and status filter.", "operationId": "my_hotel_bookings_api_v1_customer_hotel_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/hotel-bookings/{booking_id}": {"get": {"tags": ["Customer", "Customer - Hotel Bookings"], "summary": "Hotel booking detail", "operationId": "my_hotel_booking_detail_api_v1_customer_hotel_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/hotel-bookings/{booking_id}/cancel": {"post": {"tags": ["Customer", "Customer - Hotel Bookings"], "summary": "Cancel hotel booking", "operationId": "cancel_hotel_booking_api_v1_customer_hotel_bookings__booking_id__cancel_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/transport-bookings": {"get": {"tags": ["Customer", "Customer - Transport Bookings"], "summary": "My transport bookings", "description": "List your transport bookings with pagination and status filter.", "operationId": "my_transport_bookings_api_v1_customer_transport_bookings_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}, {"name": "status", "in": "query", "required": false, "schema": {"type": "string", "title": "Status"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/transport-bookings/{booking_id}": {"get": {"tags": ["Customer", "Customer - Transport Bookings"], "summary": "Transport booking detail", "operationId": "my_transport_booking_detail_api_v1_customer_transport_bookings__booking_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/transport-bookings/{booking_id}/cancel": {"post": {"tags": ["Customer", "Customer - Transport Bookings"], "summary": "Cancel transport booking", "operationId": "cancel_transport_booking_api_v1_customer_transport_bookings__booking_id__cancel_post", "security": [{"HTTPBearer": []}], "parameters": [{"name": "booking_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Booking Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/travelers": {"get": {"tags": ["Customer", "Customer - Travelers"], "summary": "List saved travelers", "operationId": "list_travelers_api_v1_customer_travelers_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TravelerListResponse"}}}}}, "security": [{"HTTPBearer": []}]}, "post": {"tags": ["Customer", "Customer - Travelers"], "summary": "Save a new traveler", "operationId": "create_traveler_api_v1_customer_travelers_post", "requestBody": {"content": {"application/json": {"schema": {"$ref": "#/components/schemas/CreateTravelerRequest"}}}, "required": true}, "responses": {"201": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TravelerResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}, "security": [{"HTTPBearer": []}]}}, "/api/v1/customer/travelers/{traveler_id}": {"patch": {"tags": ["Customer", "Customer - Travelers"], "summary": "Update saved traveler", "operationId": "update_traveler_api_v1_customer_travelers__traveler_id__patch", "security": [{"HTTPBearer": []}], "parameters": [{"name": "traveler_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Traveler Id"}}], "requestBody": {"required": true, "content": {"application/json": {"schema": {"$ref": "#/components/schemas/UpdateTravelerRequest"}}}}, "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/TravelerResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}, "delete": {"tags": ["Customer", "Customer - Travelers"], "summary": "Delete saved traveler", "operationId": "delete_traveler_api_v1_customer_travelers__traveler_id__delete", "security": [{"HTTPBearer": []}], "parameters": [{"name": "traveler_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Traveler Id"}}], "responses": {"204": {"description": "Successful Response"}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/payments": {"get": {"tags": ["Customer", "Customer - Payments"], "summary": "My payment history", "operationId": "my_payments_api_v1_customer_payments_get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "page", "in": "query", "required": false, "schema": {"type": "integer", "minimum": 1, "default": 1, "title": "Page"}}, {"name": "page_size", "in": "query", "required": false, "schema": {"type": "integer", "maximum": 100, "minimum": 1, "default": 20, "title": "Page Size"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/MyPaymentListResponse"}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/api/v1/customer/payments/receipts/{payment_id}": {"get": {"tags": ["Customer", "Customer - Payments"], "summary": "Get payment receipt", "operationId": "get_receipt_api_v1_customer_payments_receipts__payment_id__get", "security": [{"HTTPBearer": []}], "parameters": [{"name": "payment_id", "in": "path", "required": true, "schema": {"type": "integer", "title": "Payment Id"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/metrics/redis": {"get": {"tags": ["System"], "summary": "Redis Metrics", "description": "Get Redis performance metrics", "operationId": "redis_metrics_metrics_redis_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/metrics/cache": {"get": {"tags": ["Cache Management"], "summary": "Cache Metrics", "description": "Get cache service metrics", "operationId": "cache_metrics_metrics_cache_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/metrics/combined": {"get": {"tags": ["System"], "summary": "Combined Metrics", "description": "Get combined system metrics", "operationId": "combined_metrics_metrics_combined_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/config": {"get": {"tags": ["System"], "summary": "Get Configuration", "description": "Get current application configuration \u2014 safe public values only", "operationId": "get_configuration_config_get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/admin/cache/clear": {"post": {"tags": ["Cache Management"], "summary": "Clear Cache", "description": "Clear all cache data (development only)", "operationId": "clear_cache_admin_cache_clear_post", "parameters": [{"name": "confirm", "in": "query", "required": false, "schema": {"type": "boolean", "default": false, "title": "Confirm"}}], "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}, "422": {"description": "Validation Error", "content": {"application/json": {"schema": {"$ref": "#/components/schemas/HTTPValidationError"}}}}}}}, "/admin/maintenance/run": {"post": {"tags": ["Cache Management"], "summary": "Run Maintenance", "description": "Manually trigger cache maintenance (development only)", "operationId": "run_maintenance_admin_maintenance_run_post", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}, "/": {"get": {"summary": "Root", "description": "Root endpoint with API information", "operationId": "root__get", "responses": {"200": {"description": "Successful Response", "content": {"application/json": {"schema": {}}}}}}}}, "components": {"schemas": {"AdminBookingDetailResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "status": {"type": "string", "title": "Status"}, "pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pnr"}, "supplier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Supplier"}, "total_cost": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Total Cost"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "adults": {"type": "integer", "title": "Adults", "default": 1}, "children": {"type": "integer", "title": "Children", "default": 0}, "infants": {"type": "integer", "title": "Infants", "default": 0}, "journey_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Journey Type"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}, "passengers": {"items": {"additionalProperties": true, "type": "object"}, "type": "array", "title": "Passengers", "default": []}, "payment": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Payment"}, "tickets": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Tickets"}, "audit_trail": {"items": {"additionalProperties": true, "type": "object"}, "type": "array", "title": "Audit Trail", "default": []}, "price_snapshots": {"items": {"additionalProperties": true, "type": "object"}, "type": "array", "title": "Price Snapshots", "default": []}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "session_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Session Id"}, "transaction_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Transaction Id"}, "ip_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Address"}}, "type": "object", "required": ["booking_id", "status"], "title": "AdminBookingDetailResponse", "description": "Extended booking with all related data"}, "AdminBookingResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "status": {"type": "string", "title": "Status"}, "pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pnr"}, "supplier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Supplier"}, "total_cost": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Total Cost"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "adults": {"type": "integer", "title": "Adults", "default": 1}, "children": {"type": "integer", "title": "Children", "default": 0}, "infants": {"type": "integer", "title": "Infants", "default": 0}, "journey_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Journey Type"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}}, "type": "object", "required": ["booking_id", "status"], "title": "AdminBookingResponse"}, "AdminPaymentResponse": {"properties": {"payment_id": {"type": "integer", "title": "Payment Id"}, "booking_id": {"type": "integer", "title": "Booking Id"}, "payment_state": {"type": "string", "title": "Payment State"}, "provider_name": {"type": "string", "title": "Provider Name"}, "currency": {"type": "string", "title": "Currency"}, "authorized_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Authorized Amount"}, "captured_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Captured Amount"}, "refunded_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Refunded Amount"}, "auth_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Auth Id"}, "capture_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Capture Id"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}}, "type": "object", "required": ["payment_id", "booking_id", "payment_state", "provider_name", "currency"], "title": "AdminPaymentResponse"}, "AdminUpdateUserRequest": {"properties": {"full_name": {"anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}], "title": "Full Name"}, "role": {"anyOf": [{"$ref": "#/components/schemas/UserRoleEnum"}, {"type": "null"}]}, "status": {"anyOf": [{"$ref": "#/components/schemas/UserStatus"}, {"type": "null"}]}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}, "phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Phone"}, "department": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "title": "Department"}}, "type": "object", "title": "AdminUpdateUserRequest", "description": "Admin can override any user field"}, "AdminUserDetailResponse": {"properties": {"id": {"type": "string", "title": "Id"}, "email": {"type": "string", "title": "Email"}, "full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Name"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "role": {"type": "string", "title": "Role"}, "status": {"type": "string", "title": "Status"}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "company_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Code"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "department": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Department"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "last_login_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Login At"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "total_bookings": {"type": "integer", "title": "Total Bookings", "default": 0}, "total_searches": {"type": "integer", "title": "Total Searches", "default": 0}, "last_activity": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Activity"}, "ip_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Address"}}, "type": "object", "required": ["id", "email", "role", "status"], "title": "AdminUserDetailResponse", "description": "Extended user detail with activity stats"}, "AdminUserResponse": {"properties": {"id": {"type": "string", "title": "Id"}, "email": {"type": "string", "title": "Email"}, "full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Name"}, "first_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Name"}, "role": {"type": "string", "title": "Role"}, "status": {"type": "string", "title": "Status"}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "company_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Code"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "department": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Department"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "last_login_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Login At"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["id", "email", "role", "status"], "title": "AdminUserResponse"}, "AirLeg": {"properties": {"origin": {"type": "string", "maxLength": 3, "minLength": 3, "pattern": "^[A-Z]{3}$", "title": "Origin"}, "destination": {"type": "string", "maxLength": 3, "minLength": 3, "pattern": "^[A-Z]{3}$", "title": "Destination"}, "departureDate": {"type": "string", "format": "date", "title": "Departuredate"}, "airline": {"anyOf": [{"type": "string", "maxLength": 2, "minLength": 2, "pattern": "^[A-Z]{2}$"}, {"type": "null"}], "title": "Airline"}, "time": {"anyOf": [{"type": "string", "pattern": "^\\d{2}:\\d{2}(:\\d{2})?$"}, {"type": "null"}], "title": "Time"}, "timeWindow": {"anyOf": [{"type": "string", "pattern": "^\\d{1,2}[HD]$"}, {"type": "null"}], "title": "Timewindow"}}, "type": "object", "required": ["origin", "destination", "departureDate"], "title": "AirLeg"}, "AirlineSearchResponse": {"properties": {"suggestions": {"items": {"$ref": "#/components/schemas/AirlineSuggestion"}, "type": "array", "title": "Suggestions"}, "count": {"type": "integer", "title": "Count"}}, "type": "object", "required": ["suggestions", "count"], "title": "AirlineSearchResponse", "example": {"count": 1, "suggestions": [{"airlineId": "1", "country": "United States", "iata_code": "AA", "icao_code": "AAL", "match_type": "exact_iata", "nameAirline": "American Airlines", "similarity_score": 1.0}]}}, "AirlineSuggestion": {"properties": {"airlineId": {"type": "string", "title": "Airlineid"}, "nameAirline": {"type": "string", "title": "Nameairline"}, "codeiataairline": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Codeiataairline"}, "codeicaoairline": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Codeicaoairline"}, "namecountry": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Namecountry"}, "match_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Match Type", "description": "Type of match: exact_iata, exact_icao, contains_name, fuzzy_name"}, "similarity_score": {"type": "number", "maximum": 1.0, "minimum": 0.0, "title": "Similarity Score"}}, "type": "object", "required": ["airlineId", "nameAirline", "similarity_score"], "title": "AirlineSuggestion", "description": "Lightweight model for autocomplete"}, "AirportSearchResponse": {"properties": {"suggestions": {"items": {"$ref": "#/components/schemas/AirportSuggestion"}, "type": "array", "title": "Suggestions"}, "count": {"type": "integer", "title": "Count"}, "stats": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Stats", "description": "Search statistics like response time, sources, etc."}}, "type": "object", "required": ["suggestions", "count"], "title": "AirportSearchResponse", "description": "Response model for airport searches", "example": {"count": 1, "stats": {"avg_similarity": 1.0, "match_types": {"exact_iata": 1}, "response_time_ms": 42, "source": "primary_database"}, "suggestions": [{"airportId": 50, "city": "Aberdeen", "country": "United Kingdom", "iata_code": "ABZ", "icao_code": "EGPD", "latitude": 57.200253, "longitude": -2.204186, "match_type": "exact_iata", "nameAirport": "Dyce", "similarity_score": 1.0, "timezone": "Europe/London"}]}}, "AirportSuggestion": {"properties": {"airportId": {"type": "integer", "title": "Airportid", "description": "Airport ID from database"}, "nameAirport": {"type": "string", "title": "Nameairport", "description": "Airport name"}, "codeIataAirport": {"type": "string", "title": "Codeiataairport"}, "codeIcaoAirport": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Codeicaoairport"}, "city_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "City Name"}, "nameCountry": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Namecountry"}, "timezone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Timezone"}, "latitude": {"anyOf": [{"type": "number", "maximum": 90.0, "minimum": -90.0}, {"type": "null"}], "title": "Latitude"}, "longitude": {"anyOf": [{"type": "number", "maximum": 180.0, "minimum": -180.0}, {"type": "null"}], "title": "Longitude"}, "match_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Match Type", "description": "Type of match: exact_iata, exact_icao, contains_name, fuzzy_name, etc."}, "similarity_score": {"anyOf": [{"type": "number", "maximum": 1.0, "minimum": 0.0}, {"type": "null"}], "title": "Similarity Score", "description": "Similarity score for the match (0.0-1.0)"}}, "type": "object", "required": ["airportId", "nameAirport", "codeIataAirport"], "title": "AirportSuggestion", "description": "Model for airport search suggestions with proper field mapping"}, "AssignBookingRequest": {"properties": {"staff_user_id": {"type": "string", "title": "Staff User Id", "description": "Staff member to assign"}, "notes": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Notes"}}, "type": "object", "required": ["staff_user_id"], "title": "AssignBookingRequest"}, "AuditLogListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/AuditLogResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}}, "type": "object", "required": ["items", "total", "page", "page_size"], "title": "AuditLogListResponse"}, "AuditLogResponse": {"properties": {"audit_id": {"type": "integer", "title": "Audit Id"}, "event": {"type": "string", "title": "Event"}, "payload": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Payload"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "user_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Email"}, "ip_address": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ip Address"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["audit_id", "event", "created_at"], "title": "AuditLogResponse"}, "AuthResponse": {"properties": {"message": {"type": "string", "title": "Message"}, "user_id": {"type": "string", "title": "User Id"}, "email": {"type": "string", "title": "Email"}, "role": {"type": "string", "title": "Role"}, "requires_email_verification": {"type": "boolean", "title": "Requires Email Verification"}, "access_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Access Token"}, "refresh_token": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Refresh Token"}, "expires_in": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expires In"}, "user": {"additionalProperties": true, "type": "object", "title": "User"}}, "type": "object", "required": ["message", "user_id", "email", "role", "requires_email_verification", "user"], "title": "AuthResponse"}, "BagRepriceRequest": {"properties": {"offer_id": {"type": "string", "title": "Offer Id"}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}, "passengers": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Passengers"}, "selections": {"items": {"$ref": "#/components/schemas/BagSelection"}, "type": "array", "title": "Selections", "default": []}}, "type": "object", "required": ["offer_id"], "title": "BagRepriceRequest"}, "BagSelection": {"properties": {"traveler_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Traveler Id"}, "segment_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Segment Id"}, "quantity": {"type": "integer", "title": "Quantity", "default": 1}}, "type": "object", "title": "BagSelection"}, "BaggageInfoResponse": {"properties": {"booking_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Id"}, "provider": {"type": "string", "title": "Provider"}, "allowances": {"additionalProperties": true, "type": "object", "title": "Allowances"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}}, "type": "object", "required": ["provider", "allowances"], "title": "BaggageInfoResponse"}, "BookingListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/AdminBookingResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "BookingListResponse"}, "BookingNotesRequest": {"properties": {"notes": {"items": {"type": "string"}, "type": "array", "maxItems": 20, "minItems": 1, "title": "Notes"}}, "type": "object", "required": ["notes"], "title": "BookingNotesRequest"}, "BookingStatusEnum": {"type": "string", "enum": ["initiated", "pending_pnr", "pnr_failed", "on_hold", "confirmed", "payment_pending", "payment_failed", "paid", "ticketed", "cancelled", "refunded", "expired"], "title": "BookingStatusEnum"}, "CancelBookingRequest": {"properties": {"reason": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Reason"}}, "type": "object", "title": "CancelBookingRequest"}, "CancelBookingResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "status": {"type": "string", "title": "Status"}, "refund_eligible": {"type": "boolean", "title": "Refund Eligible"}, "estimated_refund": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Estimated Refund"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "message": {"type": "string", "title": "Message"}}, "type": "object", "required": ["booking_id", "status", "refund_eligible", "message"], "title": "CancelBookingResponse"}, "CancelResponse": {"properties": {"booking_id": {"type": "string", "title": "Booking Id"}, "provider": {"type": "string", "title": "Provider"}, "status": {"type": "string", "pattern": "^(voided|cancelled|failed)$", "title": "Status"}, "voided_tickets": {"items": {"type": "string"}, "type": "array", "title": "Voided Tickets"}, "unvoided_tickets": {"items": {"type": "string"}, "type": "array", "title": "Unvoided Tickets"}, "refund_amount_minor": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Refund Amount Minor"}, "currency": {"anyOf": [{"$ref": "#/components/schemas/Currency"}, {"type": "null"}]}, "fee_minor": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Fee Minor"}}, "type": "object", "required": ["booking_id", "provider", "status"], "title": "CancelResponse"}, "CircuitState": {"type": "string", "enum": ["closed", "open", "half_open"], "title": "CircuitState"}, "ClientListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/ClientResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "ClientListResponse"}, "ClientResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "email": {"type": "string", "title": "Email"}, "full_name": {"type": "string", "title": "Full Name"}, "client_type": {"type": "string", "title": "Client Type"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "credit_limit": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Credit Limit"}, "current_balance": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Current Balance"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "total_bookings": {"type": "integer", "title": "Total Bookings", "default": 0}, "total_spent": {"type": "number", "title": "Total Spent", "default": 0}, "notes": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notes"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["id", "email", "full_name", "client_type"], "title": "ClientResponse"}, "ClientType": {"type": "string", "enum": ["traveler", "sub_agent", "corporate"], "title": "ClientType"}, "CommissionRequest": {"properties": {"amount": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Amount"}, "percentage": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Percentage"}, "commission_type": {"type": "string", "title": "Commission Type", "default": "NEW"}, "vat": {"type": "boolean", "title": "Vat", "default": false}, "traveler_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Traveler Ids"}, "segment_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Segment Ids"}}, "type": "object", "title": "CommissionRequest"}, "CompanyBookingListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CompanyBookingResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "CompanyBookingListResponse"}, "CompanyBookingResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "user_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Id"}, "client_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Name"}, "status": {"type": "string", "title": "Status"}, "pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pnr"}, "supplier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Supplier"}, "total_cost": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Total Cost"}, "commission": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Commission"}, "markup_applied": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Markup Applied"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "adults": {"type": "integer", "title": "Adults", "default": 1}, "children": {"type": "integer", "title": "Children", "default": 0}, "infants": {"type": "integer", "title": "Infants", "default": 0}, "journey_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Journey Type"}, "staff_assigned": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Staff Assigned"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["booking_id", "status"], "title": "CompanyBookingResponse"}, "CompanyDashboardStats": {"properties": {"total_bookings_today": {"type": "integer", "title": "Total Bookings Today", "default": 0}, "total_bookings_week": {"type": "integer", "title": "Total Bookings Week", "default": 0}, "total_bookings_month": {"type": "integer", "title": "Total Bookings Month", "default": 0}, "pending_action_count": {"type": "integer", "title": "Pending Action Count", "default": 0}, "revenue_today": {"type": "number", "title": "Revenue Today", "default": 0}, "revenue_week": {"type": "number", "title": "Revenue Week", "default": 0}, "revenue_month": {"type": "number", "title": "Revenue Month", "default": 0}, "commission_earned_month": {"type": "number", "title": "Commission Earned Month", "default": 0}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}, "total_clients": {"type": "integer", "title": "Total Clients", "default": 0}, "active_clients_month": {"type": "integer", "title": "Active Clients Month", "default": 0}, "new_clients_month": {"type": "integer", "title": "New Clients Month", "default": 0}, "total_staff": {"type": "integer", "title": "Total Staff", "default": 0}, "active_staff_today": {"type": "integer", "title": "Active Staff Today", "default": 0}}, "type": "object", "title": "CompanyDashboardStats", "description": "Company KPI dashboard"}, "CompanyListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/CompanyResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "CompanyListResponse"}, "CompanyProfileResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "company_name": {"type": "string", "title": "Company Name"}, "company_code": {"type": "string", "title": "Company Code"}, "company_type": {"type": "string", "title": "Company Type"}, "status": {"type": "string", "title": "Status"}, "contact_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Email"}, "contact_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Phone"}, "currency": {"type": "string", "title": "Currency"}, "credit_limit": {"type": "number", "title": "Credit Limit"}, "current_balance": {"type": "number", "title": "Current Balance"}, "logo_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Logo Url"}, "website": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Website"}, "address": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Address"}, "iata_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Iata Number"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["id", "company_name", "company_code", "company_type", "status", "currency", "credit_limit", "current_balance"], "title": "CompanyProfileResponse"}, "CompanyResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "company_name": {"type": "string", "title": "Company Name"}, "company_code": {"type": "string", "title": "Company Code"}, "company_type": {"$ref": "#/components/schemas/CompanyType"}, "status": {"$ref": "#/components/schemas/CompanyStatus"}, "contact_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Email"}, "contact_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Phone"}, "currency": {"type": "string", "title": "Currency"}, "credit_limit": {"type": "number", "title": "Credit Limit"}, "current_balance": {"type": "number", "title": "Current Balance"}, "address": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Address"}, "parent_company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parent Company Id"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}, "updated_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Updated At"}}, "type": "object", "required": ["id", "company_name", "company_code", "company_type", "status", "currency", "credit_limit", "current_balance", "created_at"], "title": "CompanyResponse"}, "CompanySettingsResponse": {"properties": {"default_currency": {"type": "string", "title": "Default Currency", "default": "GBP"}, "auto_ticket": {"type": "boolean", "title": "Auto Ticket", "default": false}, "notification_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Notification Email"}, "booking_confirmation_cc": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Confirmation Cc"}, "default_markup_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Markup Type"}, "default_markup_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Default Markup Amount"}, "allow_on_hold": {"type": "boolean", "title": "Allow On Hold", "default": true}, "max_hold_hours": {"type": "integer", "title": "Max Hold Hours", "default": 24}, "gds_preferences": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Gds Preferences"}}, "type": "object", "title": "CompanySettingsResponse"}, "CompanyStatus": {"type": "string", "enum": ["active", "suspended", "pending", "inactive"], "title": "CompanyStatus"}, "CompanyStatusChange": {"properties": {"reason": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Reason"}}, "type": "object", "title": "CompanyStatusChange"}, "CompanyType": {"type": "string", "enum": ["travel_agency", "corporate", "consolidator", "sub_agent", "ota"], "title": "CompanyType"}, "Contact": {"properties": {"email": {"type": "string", "title": "Email", "description": "Contact email address"}, "phone": {"type": "string", "title": "Phone", "description": "Contact phone number"}, "countryCode": {"type": "string", "maxLength": 2, "minLength": 2, "title": "Countrycode", "description": "ISO 3166-1 alpha-2 country code (e.g., GB, US)"}, "city": {"type": "string", "minLength": 1, "title": "City", "description": "City name"}, "postalCode": {"type": "string", "minLength": 1, "title": "Postalcode", "description": "Postal/ZIP code"}, "addressLine1": {"type": "string", "minLength": 1, "title": "Addressline1", "description": "Primary address line"}, "addressLine2": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Addressline2", "description": "Secondary address line (optional)"}}, "type": "object", "required": ["email", "phone", "countryCode", "city", "postalCode", "addressLine1"], "title": "Contact"}, "ContactInfo": {"properties": {"email": {"type": "string", "maxLength": 200, "title": "Email"}, "phone": {"type": "string", "maxLength": 30, "title": "Phone"}, "country_code": {"anyOf": [{"type": "string", "maxLength": 5}, {"type": "null"}], "title": "Country Code"}}, "type": "object", "required": ["email", "phone"], "title": "ContactInfo", "description": "Contact details for booking."}, "CreateBookingRequest": {"properties": {"offer_id": {"type": "string", "title": "Offer Id"}, "currency": {"$ref": "#/components/schemas/Currency"}, "passengers": {"items": {"$ref": "#/components/schemas/Passenger"}, "type": "array", "title": "Passengers"}, "contact": {"$ref": "#/components/schemas/Contact"}, "commission_percentage": {"anyOf": [{"type": "number", "maximum": 100.0, "minimum": 0.0}, {"type": "null"}], "title": "Commission Percentage", "description": "Agency commission percentage recorded on the PNR (FM element)."}, "payment_mode": {"anyOf": [{"type": "string", "pattern": "^(PAYMENT_FIRST|PNR_FIRST|PNR_ONLY)$"}, {"type": "null"}], "title": "Payment Mode", "default": "PNR_FIRST"}, "client_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Client Ref"}, "snapshot_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Snapshot Id", "description": "Revalidation snapshot id returned by price_confirm"}, "search_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Search Id", "description": "Optional search session ID for better tracking (recommended)"}, "additional_offer_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Additional Offer Ids", "description": "\u00a74.4 One-Way Combinable: extra offer_ids booked in the SAME flight-order as offer_id. Amadeus QC only; all must be QC offers."}, "order_remarks": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Order Remarks", "description": "\u00a74.6 free-text general order remarks. Amadeus QC only."}, "queue_placement": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Queue Placement", "description": "\u00a74.6 automatedProcess queue placement (Amadeus QC only): {code?, office_id?, queue_number?, queue_category?, delay?}. Missing keys fall back to the AMADEUS_QC_OFFICE_ID/QUEUE_NUMBER/QUEUE_CATEGORY settings."}}, "type": "object", "required": ["offer_id", "currency", "passengers", "contact"], "title": "CreateBookingRequest"}, "CreateBookingResponse": {"properties": {"booking_id": {"type": "string", "title": "Booking Id"}, "pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pnr"}, "provider": {"type": "string", "title": "Provider"}, "status": {"type": "string", "pattern": "^(initiated|on_hold|pending_payment|ticketed|cancelled|voided|refunded|failed)$", "title": "Status"}, "payment_mode": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Payment Mode", "default": "PNR_FIRST"}, "ticket_time_limit": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ticket Time Limit"}, "total_minor": {"type": "integer", "title": "Total Minor"}, "currency": {"$ref": "#/components/schemas/Currency"}, "audit_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Audit Ref"}, "flight_order_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Flight Order Id"}, "airline_pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Airline Pnr"}, "airline_pnr_carrier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Airline Pnr Carrier"}}, "type": "object", "required": ["booking_id", "provider", "status", "total_minor", "currency"], "title": "CreateBookingResponse"}, "CreateClientRequest": {"properties": {"email": {"type": "string", "format": "email", "title": "Email"}, "full_name": {"type": "string", "maxLength": 200, "minLength": 2, "title": "Full Name"}, "client_type": {"$ref": "#/components/schemas/ClientType", "default": "traveler"}, "phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Phone"}, "company_name": {"anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}], "title": "Company Name"}, "credit_limit": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Credit Limit"}, "notes": {"anyOf": [{"type": "string", "maxLength": 1000}, {"type": "null"}], "title": "Notes"}}, "type": "object", "required": ["email", "full_name"], "title": "CreateClientRequest"}, "CreateCompanyRequest": {"properties": {"company_name": {"type": "string", "maxLength": 200, "minLength": 2, "title": "Company Name"}, "company_code": {"type": "string", "maxLength": 50, "minLength": 2, "pattern": "^[A-Z0-9_-]+$", "title": "Company Code"}, "company_type": {"$ref": "#/components/schemas/CompanyType", "default": "travel_agency"}, "contact_email": {"type": "string", "format": "email", "title": "Contact Email"}, "contact_phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Contact Phone"}, "currency": {"type": "string", "maxLength": 3, "title": "Currency", "default": "GBP"}, "credit_limit": {"type": "number", "minimum": 0.0, "title": "Credit Limit", "default": 0}, "address": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Address"}, "parent_company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Parent Company Id"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}}, "type": "object", "required": ["company_name", "company_code", "contact_email"], "title": "CreateCompanyRequest"}, "CreateMarkupRuleRequest": {"properties": {"company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id", "description": "Null = applies to all companies"}, "rule_type": {"$ref": "#/components/schemas/MarkupType"}, "amount": {"type": "number", "exclusiveMinimum": 0.0, "title": "Amount"}, "currency": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Currency"}, "origin": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Origin", "description": "Airport/city code filter"}, "destination": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Destination"}, "cabin_class": {"anyOf": [{"$ref": "#/components/schemas/app__schemas__admin__markup__CabinClass"}, {"type": "null"}]}, "airline": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Airline"}, "gds_provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gds Provider"}, "min_fare": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Min Fare"}, "max_fare": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Max Fare"}, "priority": {"type": "integer", "maximum": 100.0, "minimum": 0.0, "title": "Priority", "description": "Higher = applied first", "default": 0}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "description": {"anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}], "title": "Description"}}, "type": "object", "required": ["rule_type", "amount"], "title": "CreateMarkupRuleRequest"}, "CreateTravelerRequest": {"properties": {"first_name": {"type": "string", "maxLength": 50, "minLength": 1, "title": "First Name"}, "last_name": {"type": "string", "maxLength": 50, "minLength": 1, "title": "Last Name"}, "date_of_birth": {"type": "string", "title": "Date Of Birth", "description": "YYYY-MM-DD"}, "gender": {"$ref": "#/components/schemas/Gender"}, "nationality": {"anyOf": [{"type": "string", "maxLength": 3, "minLength": 2}, {"type": "null"}], "title": "Nationality"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "doc_type": {"anyOf": [{"$ref": "#/components/schemas/DocType"}, {"type": "null"}]}, "doc_number": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Doc Number"}, "doc_expiry": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Expiry"}, "doc_issuing_country": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Doc Issuing Country"}, "is_primary": {"type": "boolean", "title": "Is Primary", "default": false}, "nickname": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Nickname", "description": "For easy identification"}}, "type": "object", "required": ["first_name", "last_name", "date_of_birth", "gender"], "title": "CreateTravelerRequest"}, "Currency": {"type": "string", "enum": ["GBP", "USD", "EUR", "BDT", "SAR", "AED", "BHD", "QAR", "KWD", "OMR", "PKR", "INR", "MYR", "SGD", "LKR"], "title": "Currency"}, "DashboardStatsResponse": {"properties": {"total_bookings_today": {"type": "integer", "title": "Total Bookings Today", "default": 0}, "total_bookings_week": {"type": "integer", "title": "Total Bookings Week", "default": 0}, "total_bookings_month": {"type": "integer", "title": "Total Bookings Month", "default": 0}, "bookings_growth_percent": {"type": "number", "title": "Bookings Growth Percent", "default": 0}, "revenue_today": {"type": "number", "title": "Revenue Today", "default": 0}, "revenue_week": {"type": "number", "title": "Revenue Week", "default": 0}, "revenue_month": {"type": "number", "title": "Revenue Month", "default": 0}, "revenue_currency": {"type": "string", "title": "Revenue Currency", "default": "GBP"}, "total_users": {"type": "integer", "title": "Total Users", "default": 0}, "active_users_today": {"type": "integer", "title": "Active Users Today", "default": 0}, "new_users_week": {"type": "integer", "title": "New Users Week", "default": 0}, "total_companies": {"type": "integer", "title": "Total Companies", "default": 0}, "active_companies": {"type": "integer", "title": "Active Companies", "default": 0}, "active_searches_now": {"type": "integer", "title": "Active Searches Now", "default": 0}, "pending_bookings": {"type": "integer", "title": "Pending Bookings", "default": 0}, "failed_bookings_today": {"type": "integer", "title": "Failed Bookings Today", "default": 0}, "reconciliation_pending": {"type": "integer", "title": "Reconciliation Pending", "default": 0}, "gds_healthy_count": {"type": "integer", "title": "Gds Healthy Count", "default": 0}, "gds_total_count": {"type": "integer", "title": "Gds Total Count", "default": 0}}, "type": "object", "title": "DashboardStatsResponse", "description": "Platform KPIs for admin dashboard"}, "DocType": {"type": "string", "enum": ["passport", "id_card", "visa"], "title": "DocType"}, "FareRulesByOfferRequest": {"properties": {"offer_id": {"type": "string", "title": "Offer Id"}}, "type": "object", "required": ["offer_id"], "title": "FareRulesByOfferRequest"}, "FareRulesResponse": {"properties": {"source": {"type": "string", "title": "Source"}, "rules": {"additionalProperties": true, "type": "object", "title": "Rules"}, "rule_sections": {"anyOf": [{"additionalProperties": {"type": "string"}, "type": "object"}, {"type": "null"}], "title": "Rule Sections"}, "is_refundable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Refundable"}, "fare_basis": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Fare Basis"}, "validating_carrier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Validating Carrier"}, "last_ticketing_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Ticketing Date"}, "data_source": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Data Source"}, "disclaimer": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Disclaimer"}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}}, "type": "object", "required": ["source", "rules"], "title": "FareRulesResponse"}, "FlightSearchRequest": {"properties": {"currency": {"type": "string", "maxLength": 3, "minLength": 3, "title": "Currency"}, "companyCode": {"type": "string", "maxLength": 30, "minLength": 5, "title": "Companycode"}, "userCode": {"type": "string", "maxLength": 30, "minLength": 5, "title": "Usercode"}, "adults": {"type": "integer", "maximum": 9.0, "minimum": 1.0, "title": "Adults", "default": 1}, "children": {"type": "integer", "maximum": 9.0, "minimum": 0.0, "title": "Children", "default": 0}, "infants": {"type": "integer", "maximum": 9.0, "minimum": 0.0, "title": "Infants", "default": 0}, "childAge": {"anyOf": [{"items": {"type": "integer"}, "type": "array", "maxItems": 10}, {"type": "null"}], "title": "Childage"}, "journeyType": {"$ref": "#/components/schemas/JourneyType", "default": "Return"}, "cabinClass": {"$ref": "#/components/schemas/app__schemas__flight__CabinClass", "default": "Economy"}, "airline": {"anyOf": [{"type": "string", "maxLength": 2, "minLength": 2, "pattern": "^[A-Z]{2}$"}, {"type": "null"}], "title": "Airline"}, "searchAirLegs": {"items": {"$ref": "#/components/schemas/AirLeg"}, "type": "array", "minItems": 1, "title": "Searchairlegs"}, "sources": {"anyOf": [{"items": {"type": "string"}, "type": "array", "maxItems": 6}, {"type": "null"}], "title": "Sources"}, "fareType": {"anyOf": [{"items": {"type": "string"}, "type": "array", "maxItems": 5}, {"type": "null"}], "title": "Faretype"}, "corporateCodes": {"anyOf": [{"items": {"type": "string"}, "type": "array", "maxItems": 10}, {"type": "null"}], "title": "Corporatecodes"}, "refundableFare": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Refundablefare"}, "brandedFares": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Brandedfares"}, "addOneWayOffers": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Addonewayoffers"}}, "type": "object", "required": ["companyCode", "userCode", "searchAirLegs"], "title": "FlightSearchRequest"}, "FlightSearchResponse": {"properties": {"searchId": {"type": "string", "title": "Searchid"}, "status": {"type": "string", "title": "Status"}, "streamUrl": {"type": "string", "title": "Streamurl"}}, "type": "object", "required": ["searchId", "status", "streamUrl"], "title": "FlightSearchResponse"}, "FoidRequest": {"properties": {"number": {"type": "string", "title": "Number"}, "identification_type": {"type": "string", "title": "Identification Type", "default": "PASSPORT"}, "carrier_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Carrier Code"}, "traveler_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Traveler Ids"}, "flight_offer_ids": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Flight Offer Ids"}}, "type": "object", "required": ["number"], "title": "FoidRequest"}, "GDSOverviewResponse": {"properties": {"providers": {"items": {"$ref": "#/components/schemas/GDSStatusResponse"}, "type": "array", "title": "Providers"}, "total_active": {"type": "integer", "title": "Total Active"}, "total_healthy": {"type": "integer", "title": "Total Healthy"}, "total_circuit_open": {"type": "integer", "title": "Total Circuit Open"}}, "type": "object", "required": ["providers", "total_active", "total_healthy", "total_circuit_open"], "title": "GDSOverviewResponse"}, "GDSStatusResponse": {"properties": {"provider": {"type": "string", "title": "Provider"}, "enabled": {"type": "boolean", "title": "Enabled"}, "healthy": {"type": "boolean", "title": "Healthy"}, "circuit_state": {"$ref": "#/components/schemas/CircuitState"}, "last_success": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Success"}, "last_failure": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Failure"}, "avg_response_ms": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Avg Response Ms"}, "success_rate_24h": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Success Rate 24H"}, "total_requests_24h": {"type": "integer", "title": "Total Requests 24H", "default": 0}, "config": {"additionalProperties": true, "type": "object", "title": "Config", "default": {}}}, "type": "object", "required": ["provider", "enabled", "healthy", "circuit_state"], "title": "GDSStatusResponse"}, "Gender": {"type": "string", "enum": ["M", "F", "O"], "title": "Gender"}, "HTTPValidationError": {"properties": {"detail": {"items": {"$ref": "#/components/schemas/ValidationError"}, "type": "array", "title": "Detail"}}, "type": "object", "title": "HTTPValidationError"}, "HotelBookingRequest": {"properties": {"rate_key": {"type": "string", "title": "Rate Key", "description": "Rate key from search/check_rate"}, "provider": {"type": "string", "title": "Provider", "description": "Provider name (amadeus_hotel, amadeus_enterprise_hotel)"}, "guests": {"items": {"$ref": "#/components/schemas/HotelGuest"}, "type": "array", "maxItems": 9, "minItems": 1, "title": "Guests"}, "contact_email": {"type": "string", "maxLength": 200, "title": "Contact Email"}, "contact_phone": {"type": "string", "maxLength": 30, "title": "Contact Phone"}, "special_requests": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Special Requests"}, "client_ref": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Client Ref", "description": "Client reference"}}, "type": "object", "required": ["rate_key", "provider", "guests", "contact_email", "contact_phone"], "title": "HotelBookingRequest", "description": "Hotel booking creation request (equivalent to CreateBookingRequest)."}, "HotelBookingResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"type": "string", "title": "Booking Ref"}, "provider_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Ref"}, "status": {"type": "string", "title": "Status"}, "hotel_name": {"type": "string", "title": "Hotel Name"}, "check_in": {"type": "string", "title": "Check In"}, "check_out": {"type": "string", "title": "Check Out"}, "total_price": {"type": "number", "title": "Total Price"}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}, "provider": {"type": "string", "title": "Provider"}, "cancellation_deadline": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cancellation Deadline"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["booking_id", "booking_ref", "status", "hotel_name", "check_in", "check_out", "total_price", "provider"], "title": "HotelBookingResponse", "description": "Hotel booking confirmation (equivalent to CreateBookingResponse)."}, "HotelCancelResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"type": "string", "title": "Booking Ref"}, "status": {"type": "string", "title": "Status", "default": "cancelled"}, "cancellation_fee": {"type": "number", "title": "Cancellation Fee", "default": 0}, "refund_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Refund Amount"}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}, "message": {"type": "string", "title": "Message", "default": "Hotel booking cancelled successfully"}}, "type": "object", "required": ["booking_id", "booking_ref"], "title": "HotelCancelResponse", "description": "Hotel cancellation result (equivalent to CancelResponse)."}, "HotelGuest": {"properties": {"first_name": {"type": "string", "maxLength": 50, "minLength": 1, "title": "First Name"}, "last_name": {"type": "string", "maxLength": 50, "minLength": 1, "title": "Last Name"}, "title": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Title", "default": "MR"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "is_lead": {"type": "boolean", "title": "Is Lead", "default": false}}, "type": "object", "required": ["first_name", "last_name"], "title": "HotelGuest", "description": "Guest information for booking."}, "HotelSearchRequest": {"properties": {"destination": {"type": "string", "maxLength": 100, "minLength": 2, "title": "Destination", "description": "City IATA code, or place name (e.g. 'LON', 'PAR')"}, "check_in": {"type": "string", "format": "date", "title": "Check In", "description": "Check-in date (YYYY-MM-DD)"}, "check_out": {"type": "string", "format": "date", "title": "Check Out", "description": "Check-out date (YYYY-MM-DD)"}, "rooms": {"items": {"$ref": "#/components/schemas/RoomOccupancy"}, "type": "array", "maxItems": 9, "minItems": 1, "title": "Rooms", "description": "Room occupancy list"}, "nationality": {"anyOf": [{"type": "string", "maxLength": 2, "minLength": 2}, {"type": "null"}], "title": "Nationality", "description": "ISO 2-letter country"}, "currency": {"type": "string", "maxLength": 3, "minLength": 3, "title": "Currency", "default": "GBP"}, "min_star_rating": {"anyOf": [{"type": "integer", "maximum": 5.0, "minimum": 1.0}, {"type": "null"}], "title": "Min Star Rating"}, "max_results": {"anyOf": [{"type": "integer", "maximum": 200.0, "minimum": 1.0}, {"type": "null"}], "title": "Max Results"}, "sort_by": {"$ref": "#/components/schemas/HotelSortBy", "default": "price_asc"}, "company_code": {"type": "string", "maxLength": 30, "minLength": 2, "title": "Company Code"}, "user_code": {"type": "string", "maxLength": 30, "minLength": 2, "title": "User Code"}}, "type": "object", "required": ["destination", "check_in", "check_out", "company_code", "user_code"], "title": "HotelSearchRequest", "description": "Hotel availability search request.\nMirrors FlightSearchRequest structure."}, "HotelSearchResponse": {"properties": {"search_id": {"type": "string", "title": "Search Id", "description": "Unique search identifier for polling"}, "status": {"type": "string", "title": "Status", "description": "initiated | searching | completed", "default": "initiated"}, "stream_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Stream Url", "description": "SSE stream URL (offer-by-offer)"}, "stream_by_provider_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Stream By Provider Url", "description": "SSE stream URL (provider-by-provider)"}, "batch_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Batch Url", "description": "Batch results URL (wait & return all)"}, "from_cache": {"type": "boolean", "title": "From Cache", "default": false}}, "type": "object", "required": ["search_id"], "title": "HotelSearchResponse", "description": "Response after initiating hotel search (202 Accepted)."}, "HotelSortBy": {"type": "string", "enum": ["price_asc", "price_desc", "star_rating", "distance"], "title": "HotelSortBy"}, "ImpersonateRequest": {"properties": {"reason": {"type": "string", "maxLength": 500, "minLength": 5, "title": "Reason"}}, "type": "object", "required": ["reason"], "title": "ImpersonateRequest"}, "ImpersonateResponse": {"properties": {"access_token": {"type": "string", "title": "Access Token"}, "expires_in": {"type": "integer", "title": "Expires In"}, "impersonated_user_id": {"type": "string", "title": "Impersonated User Id"}, "impersonated_email": {"type": "string", "title": "Impersonated Email"}, "audit_id": {"type": "string", "title": "Audit Id"}}, "type": "object", "required": ["access_token", "expires_in", "impersonated_user_id", "impersonated_email", "audit_id"], "title": "ImpersonateResponse"}, "InviteResponse": {"properties": {"invite_id": {"type": "string", "title": "Invite Id"}, "email": {"type": "string", "title": "Email"}, "invite_code": {"type": "string", "title": "Invite Code"}, "expires_at": {"type": "string", "format": "date-time", "title": "Expires At"}, "message": {"type": "string", "title": "Message", "default": "Invitation sent successfully"}}, "type": "object", "required": ["invite_id", "email", "invite_code", "expires_at"], "title": "InviteResponse"}, "InviteStaffRequest": {"properties": {"email": {"type": "string", "format": "email", "title": "Email"}, "full_name": {"type": "string", "maxLength": 200, "minLength": 2, "title": "Full Name"}, "role": {"$ref": "#/components/schemas/StaffRole", "default": "company_staff"}, "department": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "title": "Department"}, "phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Phone"}, "permissions": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Permissions"}}, "type": "object", "required": ["email", "full_name"], "title": "InviteStaffRequest"}, "JourneyType": {"type": "string", "enum": ["Return", "OneWay", "MultiCity"], "title": "JourneyType"}, "LiveDashboardResponse": {"properties": {"active_searches": {"type": "integer", "title": "Active Searches", "default": 0}, "active_sse_connections": {"type": "integer", "title": "Active Sse Connections", "default": 0}, "pending_payments": {"type": "integer", "title": "Pending Payments", "default": 0}, "pending_ticketing": {"type": "integer", "title": "Pending Ticketing", "default": 0}, "redis_connected": {"type": "boolean", "title": "Redis Connected", "default": true}, "mongo_connected": {"type": "boolean", "title": "Mongo Connected", "default": true}, "supabase_connected": {"type": "boolean", "title": "Supabase Connected", "default": true}, "celery_workers": {"type": "integer", "title": "Celery Workers", "default": 0}, "cache_hit_rate": {"type": "number", "title": "Cache Hit Rate", "default": 0}, "avg_search_time_ms": {"type": "number", "title": "Avg Search Time Ms", "default": 0}, "uptime_seconds": {"type": "integer", "title": "Uptime Seconds", "default": 0}}, "type": "object", "title": "LiveDashboardResponse", "description": "Real-time system status"}, "LoginRequest": {"properties": {"email": {"type": "string", "title": "Email"}, "password": {"type": "string", "title": "Password"}}, "type": "object", "required": ["email", "password"], "title": "LoginRequest"}, "LoginResponse": {"properties": {"message": {"type": "string", "title": "Message"}, "user": {"additionalProperties": true, "type": "object", "title": "User"}, "access_token": {"type": "string", "title": "Access Token"}, "refresh_token": {"type": "string", "title": "Refresh Token"}, "expires_at": {"type": "integer", "title": "Expires At"}}, "type": "object", "required": ["message", "user", "access_token", "refresh_token", "expires_at"], "title": "LoginResponse"}, "ManualRefundRequest": {"properties": {"amount_minor": {"type": "integer", "exclusiveMinimum": 0.0, "title": "Amount Minor", "description": "Refund amount in minor units (pence/cents)"}, "currency": {"type": "string", "maxLength": 3, "title": "Currency"}, "reason": {"type": "string", "maxLength": 500, "minLength": 5, "title": "Reason"}, "notify_customer": {"type": "boolean", "title": "Notify Customer", "default": true}}, "type": "object", "required": ["amount_minor", "currency", "reason"], "title": "ManualRefundRequest"}, "MarkupRuleListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/MarkupRuleResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "MarkupRuleListResponse"}, "MarkupRuleResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "company_id": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Company Id"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "rule_type": {"type": "string", "title": "Rule Type"}, "amount": {"type": "number", "title": "Amount"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "origin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Origin"}, "destination": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Destination"}, "cabin_class": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cabin Class"}, "airline": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Airline"}, "gds_provider": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gds Provider"}, "min_fare": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Min Fare"}, "max_fare": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Max Fare"}, "priority": {"type": "integer", "title": "Priority", "default": 0}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["id", "rule_type", "amount"], "title": "MarkupRuleResponse"}, "MarkupType": {"type": "string", "enum": ["fixed", "percentage", "per_pax", "per_segment"], "title": "MarkupType"}, "MyBookingDetailResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "status": {"type": "string", "title": "Status"}, "pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pnr"}, "supplier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Supplier"}, "total_cost": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Total Cost"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "adults": {"type": "integer", "title": "Adults", "default": 1}, "children": {"type": "integer", "title": "Children", "default": 0}, "infants": {"type": "integer", "title": "Infants", "default": 0}, "journey_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Journey Type"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "passengers": {"items": {"additionalProperties": true, "type": "object"}, "type": "array", "title": "Passengers", "default": []}, "payment_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Payment Status"}, "ticket_numbers": {"items": {"type": "string"}, "type": "array", "title": "Ticket Numbers", "default": []}, "fare_rules_summary": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Fare Rules Summary"}, "contact_email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Email"}, "contact_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Contact Phone"}}, "type": "object", "required": ["booking_id", "status"], "title": "MyBookingDetailResponse"}, "MyBookingListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/MyBookingResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "MyBookingListResponse"}, "MyBookingResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "status": {"type": "string", "title": "Status"}, "pnr": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Pnr"}, "supplier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Supplier"}, "total_cost": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Total Cost"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "adults": {"type": "integer", "title": "Adults", "default": 1}, "children": {"type": "integer", "title": "Children", "default": 0}, "infants": {"type": "integer", "title": "Infants", "default": 0}, "journey_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Journey Type"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["booking_id", "status"], "title": "MyBookingResponse"}, "MyPaymentListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/MyPaymentResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "MyPaymentListResponse"}, "MyPaymentResponse": {"properties": {"payment_id": {"type": "integer", "title": "Payment Id"}, "booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Ref"}, "payment_state": {"type": "string", "title": "Payment State"}, "currency": {"type": "string", "title": "Currency"}, "authorized_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Authorized Amount"}, "captured_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Captured Amount"}, "refunded_amount": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Refunded Amount"}, "provider_name": {"type": "string", "title": "Provider Name"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["payment_id", "booking_id", "payment_state", "currency", "provider_name"], "title": "MyPaymentResponse"}, "OverrideBookingStatusRequest": {"properties": {"new_status": {"$ref": "#/components/schemas/BookingStatusEnum"}, "reason": {"type": "string", "maxLength": 500, "minLength": 5, "title": "Reason"}, "notify_customer": {"type": "boolean", "title": "Notify Customer", "default": true}}, "type": "object", "required": ["new_status", "reason"], "title": "OverrideBookingStatusRequest"}, "Passenger": {"properties": {"pax_type": {"$ref": "#/components/schemas/PaxType", "description": "Passenger type: ADT, CHD, INF"}, "first_name": {"type": "string", "maxLength": 50, "minLength": 1, "title": "First Name"}, "last_name": {"type": "string", "maxLength": 50, "minLength": 1, "title": "Last Name"}, "dob": {"type": "string", "title": "Dob", "description": "YYYY-MM-DD"}, "gender": {"type": "string", "title": "Gender", "description": "M/F/O"}, "nationality": {"anyOf": [{"type": "string", "maxLength": 3, "minLength": 2}, {"type": "null"}], "title": "Nationality"}, "doc_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Type"}, "doc_number": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Number"}, "doc_expiry": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Expiry"}, "age": {"anyOf": [{"type": "integer", "maximum": 120.0, "minimum": 0.0}, {"type": "null"}], "title": "Age", "description": "Age in years (optional)"}}, "type": "object", "required": ["pax_type", "first_name", "last_name", "dob", "gender"], "title": "Passenger"}, "PassengerInfo": {"properties": {"first_name": {"type": "string", "maxLength": 100, "minLength": 1, "title": "First Name"}, "last_name": {"type": "string", "maxLength": 100, "minLength": 1, "title": "Last Name"}, "title": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Title", "default": "Mr"}}, "type": "object", "required": ["first_name", "last_name"], "title": "PassengerInfo", "description": "Passenger details for booking."}, "PaxType": {"type": "string", "enum": ["ADT", "CHD", "INF"], "title": "PaxType"}, "PaymentAuthorizeRequest": {"properties": {"token": {"type": "string", "title": "Token"}, "currency": {"$ref": "#/components/schemas/Currency"}, "amount_minor": {"type": "integer", "title": "Amount Minor"}}, "type": "object", "required": ["token", "currency", "amount_minor"], "title": "PaymentAuthorizeRequest"}, "PaymentAuthorizeResponse": {"properties": {"booking_id": {"type": "string", "title": "Booking Id"}, "provider": {"type": "string", "title": "Provider"}, "status": {"type": "string", "pattern": "^(pending_payment|failed)$", "title": "Status"}, "authorization_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Authorization Id"}}, "type": "object", "required": ["booking_id", "provider", "status"], "title": "PaymentAuthorizeResponse"}, "PaymentListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/AdminPaymentResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "PaymentListResponse"}, "PendingBookingsResponse": {"properties": {"payment_pending": {"items": {"$ref": "#/components/schemas/CompanyBookingResponse"}, "type": "array", "title": "Payment Pending", "default": []}, "ticketing_pending": {"items": {"$ref": "#/components/schemas/CompanyBookingResponse"}, "type": "array", "title": "Ticketing Pending", "default": []}, "on_hold_expiring": {"items": {"$ref": "#/components/schemas/CompanyBookingResponse"}, "type": "array", "title": "On Hold Expiring", "default": []}, "total_action_required": {"type": "integer", "title": "Total Action Required", "default": 0}}, "type": "object", "title": "PendingBookingsResponse", "description": "Bookings requiring action (payment, ticketing, etc.)"}, "PreferencesResponse": {"properties": {"seat_preference": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Seat Preference"}, "meal_preference": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Meal Preference"}, "cabin_preference": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cabin Preference"}, "preferred_airlines": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Preferred Airlines"}, "notification_email": {"type": "boolean", "title": "Notification Email", "default": true}, "notification_sms": {"type": "boolean", "title": "Notification Sms", "default": false}}, "type": "object", "title": "PreferencesResponse"}, "ProfileResponse": {"properties": {"id": {"type": "string", "title": "Id"}, "email": {"type": "string", "title": "Email"}, "full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Name"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "date_of_birth": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Date Of Birth"}, "nationality": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Nationality"}, "preferred_language": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Language"}, "preferred_currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Preferred Currency"}, "role": {"type": "string", "title": "Role"}, "company_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Name"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}, "last_login_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Login At"}}, "type": "object", "required": ["id", "email", "role"], "title": "ProfileResponse"}, "QuoteDetailRequest": {"properties": {"quote_id": {"type": "string", "title": "Quote Id"}, "provider": {"type": "string", "title": "Provider"}}, "type": "object", "required": ["quote_id", "provider"], "title": "QuoteDetailRequest", "description": "Request for detailed quote."}, "QuoteDetailResponse": {"properties": {"quote_id": {"type": "string", "title": "Quote Id"}, "provider": {"type": "string", "title": "Provider"}, "available": {"type": "boolean", "title": "Available", "default": true}, "price": {"type": "number", "title": "Price"}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}, "vehicle_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Vehicle Name"}, "estimated_duration_minutes": {"type": "integer", "title": "Estimated Duration Minutes", "default": 0}, "cancellation_policy": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cancellation Policy"}, "extras": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Extras"}}, "type": "object", "required": ["quote_id", "provider", "price"], "title": "QuoteDetailResponse", "description": "Detailed quote response."}, "RateCheckRequest": {"properties": {"rate_key": {"type": "string", "title": "Rate Key", "description": "Rate/offer ID from search"}, "provider": {"type": "string", "title": "Provider", "description": "Provider name"}}, "type": "object", "required": ["rate_key", "provider"], "title": "RateCheckRequest", "description": "Rate re-validation request (equivalent to revalidation in flights)."}, "RateCheckResponse": {"properties": {"available": {"type": "boolean", "title": "Available"}, "rate_key": {"type": "string", "title": "Rate Key"}, "total_price": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Total Price"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}, "is_refundable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Refundable"}, "cancellation_deadline": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cancellation Deadline"}, "price_changed": {"type": "boolean", "title": "Price Changed", "default": false}, "original_price": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Original Price"}}, "type": "object", "required": ["available", "rate_key"], "title": "RateCheckResponse", "description": "Rate re-validation result."}, "ReconciliationQueueResponse": {"properties": {"pending": {"type": "integer", "title": "Pending"}, "in_progress": {"type": "integer", "title": "In Progress"}, "resolved_found": {"type": "integer", "title": "Resolved Found"}, "resolved_not_found": {"type": "integer", "title": "Resolved Not Found"}, "failed": {"type": "integer", "title": "Failed"}, "items": {"items": {"additionalProperties": true, "type": "object"}, "type": "array", "title": "Items"}}, "type": "object", "required": ["pending", "in_progress", "resolved_found", "resolved_not_found", "failed", "items"], "title": "ReconciliationQueueResponse"}, "RevalidationNormalizedResponse": {"properties": {"offer_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Offer Id"}, "snapshot_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Snapshot Id"}, "valid": {"type": "boolean", "title": "Valid"}, "provider": {"type": "string", "title": "Provider"}, "currency": {"type": "string", "title": "Currency"}, "total_minor": {"type": "integer", "title": "Total Minor"}, "base_minor": {"type": "integer", "title": "Base Minor"}, "tax_minor": {"type": "integer", "title": "Tax Minor"}, "fees_minor": {"type": "integer", "title": "Fees Minor"}, "diff_minor": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Diff Minor"}, "expires_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Expires At"}, "expires_in_seconds": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Expires In Seconds"}, "last_ticketing_date": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Last Ticketing Date"}, "fare_family_alternatives": {"anyOf": [{"items": {"additionalProperties": true, "type": "object"}, "type": "array"}, {"type": "null"}], "title": "Fare Family Alternatives"}, "cabin_class": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cabin Class"}, "is_refundable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Refundable"}, "number_of_bookable_seats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Number Of Bookable Seats"}, "price_breakdown": {"additionalProperties": true, "type": "object", "title": "Price Breakdown"}, "traveler_pricings": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Traveler Pricings"}, "segments": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Segments"}, "baggage_allowance": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Baggage Allowance"}, "fare_information": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Fare Information"}, "warnings": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Warnings"}, "error": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error"}, "error_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Error Code"}, "retryable": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Retryable"}, "revalidated_offer": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Revalidated Offer"}, "fx_snapshot": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Fx Snapshot"}}, "type": "object", "required": ["offer_id", "valid", "provider", "currency", "total_minor", "base_minor", "tax_minor", "fees_minor", "expires_at", "cabin_class", "is_refundable", "number_of_bookable_seats", "price_breakdown", "traveler_pricings", "segments", "baggage_allowance", "fare_information", "warnings", "error"], "title": "RevalidationNormalizedResponse"}, "RevalidationPassenger": {"properties": {"pax_type": {"$ref": "#/components/schemas/PaxType", "description": "Passenger type: ADT, CHD, INF"}, "age": {"anyOf": [{"type": "integer", "maximum": 120.0, "minimum": 0.0}, {"type": "null"}], "title": "Age", "description": "Age in years (recommended for children/infants)"}}, "type": "object", "required": ["pax_type"], "title": "RevalidationPassenger"}, "RevalidationRequest": {"properties": {"offer_id": {"type": "string", "minLength": 3, "title": "Offer Id", "description": "Flight offer ID from search results"}, "currency": {"$ref": "#/components/schemas/Currency", "description": "Pricing currency (e.g., GBP, USD, EUR, BDT)"}, "passengers": {"anyOf": [{"items": {"$ref": "#/components/schemas/RevalidationPassenger"}, "type": "array"}, {"type": "null"}], "title": "Passengers", "description": "Optional simplified passengers (only required if stored offer lacks travelerPricings)"}}, "type": "object", "required": ["offer_id", "currency"], "title": "RevalidationRequest"}, "RoomOccupancy": {"properties": {"adults": {"type": "integer", "maximum": 6.0, "minimum": 1.0, "title": "Adults", "description": "Adults in this room", "default": 2}, "children_ages": {"items": {"type": "integer"}, "type": "array", "maxItems": 4, "title": "Children Ages", "description": "Ages of children (0-17)"}}, "type": "object", "title": "RoomOccupancy", "description": "Occupancy specification per room."}, "Seat": {"properties": {"number": {"type": "string", "title": "Number"}, "row": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Row"}, "column": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Column"}, "available": {"type": "boolean", "title": "Available", "default": true}, "cabin": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cabin"}, "occupation": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Occupation"}, "characteristics": {"items": {"type": "string"}, "type": "array", "title": "Characteristics"}, "chargeable": {"type": "boolean", "title": "Chargeable", "default": false}, "price": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Price"}, "paid": {"type": "boolean", "title": "Paid", "default": false}, "amount_minor": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Amount Minor"}, "currency": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Currency"}}, "type": "object", "required": ["number"], "title": "Seat", "description": "A single seat as parsed from Air_RetrieveSeatMap (SMPRES).\n\nMirrors the rich per-seat data the GDS returns so the frontend can render a real\nseat map. `cabin` is optional because the SMPRES reply carries cabin/class at the\ncompartment level, not always per seat."}, "SeatMapResponse": {"properties": {"booking_id": {"type": "string", "title": "Booking Id"}, "provider": {"type": "string", "title": "Provider"}, "segments": {"items": {"$ref": "#/components/schemas/SeatMapSegment"}, "type": "array", "title": "Segments"}, "available": {"type": "boolean", "title": "Available", "default": true}, "unavailable_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unavailable Reason"}, "unavailable_segments": {"items": {"$ref": "#/components/schemas/SeatMapSegment"}, "type": "array", "title": "Unavailable Segments"}, "chargeable_seats_unpriced": {"type": "integer", "title": "Chargeable Seats Unpriced", "default": 0}, "message": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Message"}}, "type": "object", "required": ["booking_id", "provider", "segments"], "title": "SeatMapResponse"}, "SeatMapSegment": {"properties": {"segment_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Segment Id"}, "carrier": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Carrier"}, "flightNumber": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Flightnumber"}, "aircraft": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Aircraft"}, "departure": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Departure"}, "arrival": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Arrival"}, "seats": {"items": {"$ref": "#/components/schemas/Seat"}, "type": "array", "title": "Seats"}, "totalSeats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Totalseats"}, "availableSeats": {"anyOf": [{"type": "integer"}, {"type": "null"}], "title": "Availableseats"}, "seat_map_available": {"type": "boolean", "title": "Seat Map Available", "default": true}, "unavailable_reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Unavailable Reason"}}, "type": "object", "title": "SeatMapSegment"}, "SeatSelectResponse": {"properties": {"booking_id": {"type": "string", "title": "Booking Id"}, "provider": {"type": "string", "title": "Provider"}, "segment_id": {"type": "string", "title": "Segment Id"}, "seat_number": {"type": "string", "title": "Seat Number"}, "status": {"type": "string", "pattern": "^(on_hold|pending|ticketed|failed)$", "title": "Status"}, "gds_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gds Status"}, "status_meaning": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Status Meaning"}, "reason": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reason"}}, "type": "object", "required": ["booking_id", "provider", "segment_id", "seat_number", "status"], "title": "SeatSelectResponse"}, "StaffListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/StaffResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "StaffListResponse"}, "StaffResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "user_id": {"type": "string", "title": "User Id"}, "email": {"type": "string", "title": "Email"}, "full_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Full Name"}, "role": {"type": "string", "title": "Role"}, "department": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Department"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "is_active": {"type": "boolean", "title": "Is Active", "default": true}, "last_login_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Login At"}, "joined_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Joined At"}, "total_bookings": {"type": "integer", "title": "Total Bookings", "default": 0}}, "type": "object", "required": ["id", "user_id", "email", "role"], "title": "StaffResponse"}, "StaffRole": {"type": "string", "enum": ["company_admin", "company_staff"], "title": "StaffRole"}, "SuspendUserRequest": {"properties": {"reason": {"type": "string", "maxLength": 500, "minLength": 5, "title": "Reason"}, "duration_hours": {"anyOf": [{"type": "integer", "minimum": 1.0}, {"type": "null"}], "title": "Duration Hours", "description": "Auto-unsuspend after N hours"}}, "type": "object", "required": ["reason"], "title": "SuspendUserRequest"}, "SystemHealthResponse": {"properties": {"status": {"type": "string", "title": "Status"}, "components": {"additionalProperties": {"additionalProperties": true, "type": "object"}, "type": "object", "title": "Components"}, "timestamp": {"type": "string", "format": "date-time", "title": "Timestamp"}, "version": {"type": "string", "title": "Version"}, "uptime_seconds": {"type": "integer", "title": "Uptime Seconds"}}, "type": "object", "required": ["status", "components", "timestamp", "version", "uptime_seconds"], "title": "SystemHealthResponse"}, "TicketRequest": {"properties": {"capture": {"type": "boolean", "title": "Capture", "default": true}}, "type": "object", "title": "TicketRequest"}, "TicketResponse": {"properties": {"booking_id": {"type": "string", "title": "Booking Id"}, "provider": {"type": "string", "title": "Provider"}, "status": {"type": "string", "pattern": "^(ticketed|ticket_order_placed|failed)$", "title": "Status"}, "ticket_numbers": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Ticket Numbers"}, "etr_refs": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Etr Refs"}, "ticketing_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ticketing Status"}, "ticket_order_status": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Ticket Order Status"}, "note": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Note"}, "warning": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Warning"}}, "type": "object", "required": ["booking_id", "provider", "status"], "title": "TicketResponse"}, "TransportBookingRequest": {"properties": {"quote_id": {"type": "string", "title": "Quote Id", "description": "Quote ID from search results"}, "provider": {"type": "string", "title": "Provider", "description": "Provider name"}, "passengers": {"items": {"$ref": "#/components/schemas/PassengerInfo"}, "type": "array", "minItems": 1, "title": "Passengers"}, "contact": {"$ref": "#/components/schemas/ContactInfo"}, "flight_number": {"anyOf": [{"type": "string", "maxLength": 20}, {"type": "null"}], "title": "Flight Number"}, "hotel_name": {"anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}], "title": "Hotel Name"}, "special_requests": {"anyOf": [{"type": "string", "maxLength": 500}, {"type": "null"}], "title": "Special Requests"}}, "type": "object", "required": ["quote_id", "provider", "passengers", "contact"], "title": "TransportBookingRequest", "description": "Request to book a transfer."}, "TransportBookingResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"type": "string", "title": "Booking Ref"}, "provider_ref": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Provider Ref"}, "status": {"type": "string", "title": "Status"}, "provider": {"type": "string", "title": "Provider"}, "vehicle_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Vehicle Name"}, "pickup_location": {"type": "string", "title": "Pickup Location"}, "dropoff_location": {"type": "string", "title": "Dropoff Location"}, "pickup_datetime": {"type": "string", "title": "Pickup Datetime"}, "total_price": {"type": "number", "title": "Total Price"}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}, "driver_name": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Driver Name"}, "driver_phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Driver Phone"}, "cancellation_deadline": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cancellation Deadline"}, "created_at": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["booking_id", "booking_ref", "status", "provider", "pickup_location", "dropoff_location", "pickup_datetime", "total_price"], "title": "TransportBookingResponse", "description": "Booking confirmation response."}, "TransportCancelResponse": {"properties": {"booking_id": {"type": "integer", "title": "Booking Id"}, "booking_ref": {"type": "string", "title": "Booking Ref"}, "status": {"type": "string", "title": "Status", "default": "cancelled"}, "cancellation_fee": {"type": "number", "title": "Cancellation Fee", "default": 0.0}, "refund_amount": {"anyOf": [{"type": "number"}, {"type": "null"}], "title": "Refund Amount"}, "currency": {"type": "string", "title": "Currency", "default": "GBP"}}, "type": "object", "required": ["booking_id", "booking_ref"], "title": "TransportCancelResponse", "description": "Cancellation response."}, "TransportSearchRequest": {"properties": {"pickup_location": {"type": "string", "maxLength": 500, "minLength": 2, "title": "Pickup Location", "description": "Pickup address, airport code (IATA), or coordinates (lat,lng)"}, "dropoff_location": {"type": "string", "maxLength": 500, "minLength": 2, "title": "Dropoff Location", "description": "Dropoff address, airport code (IATA), or coordinates (lat,lng)"}, "pickup_datetime": {"type": "string", "title": "Pickup Datetime", "description": "Pickup date and time in ISO format (YYYY-MM-DDTHH:MM:SS)"}, "passengers": {"type": "integer", "maximum": 50.0, "minimum": 1.0, "title": "Passengers", "description": "Number of passengers", "default": 2}, "luggage": {"type": "integer", "maximum": 50.0, "minimum": 0.0, "title": "Luggage", "description": "Number of luggage pieces", "default": 2}, "return_datetime": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Return Datetime", "description": "Return datetime for round-trip (ISO format)"}, "transfer_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Transfer Type", "description": "Preferred transfer type filter"}, "currency": {"type": "string", "maxLength": 3, "minLength": 3, "title": "Currency", "description": "Currency code", "default": "GBP"}}, "type": "object", "required": ["pickup_location", "dropoff_location", "pickup_datetime"], "title": "TransportSearchRequest", "description": "Request to search for ground transfers."}, "TransportSearchResponse": {"properties": {"search_id": {"type": "string", "title": "Search Id"}, "status": {"type": "string", "title": "Status", "default": "initiated"}, "stream_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Stream Url"}, "stream_by_provider_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Stream By Provider Url"}, "batch_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Batch Url"}, "from_cache": {"type": "boolean", "title": "From Cache", "default": false}}, "type": "object", "required": ["search_id"], "title": "TransportSearchResponse", "description": "Initial response after search initiation \u2014 includes stream URLs for 3 modes."}, "TravelerListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/TravelerResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}}, "type": "object", "required": ["items", "total"], "title": "TravelerListResponse"}, "TravelerResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "first_name": {"type": "string", "title": "First Name"}, "last_name": {"type": "string", "title": "Last Name"}, "date_of_birth": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Date Of Birth"}, "gender": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Gender"}, "nationality": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Nationality"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "doc_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Type"}, "doc_number_masked": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Number Masked"}, "doc_expiry": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Expiry"}, "doc_issuing_country": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Issuing Country"}, "is_primary": {"type": "boolean", "title": "Is Primary", "default": false}, "nickname": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Nickname"}, "created_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Created At"}}, "type": "object", "required": ["id", "first_name", "last_name"], "title": "TravelerResponse"}, "TriggerReconciliationRequest": {"properties": {"force": {"type": "boolean", "title": "Force", "description": "Force reconciliation even if recently checked", "default": false}}, "type": "object", "title": "TriggerReconciliationRequest"}, "UpdateClientRequest": {"properties": {"full_name": {"anyOf": [{"type": "string", "maxLength": 200, "minLength": 2}, {"type": "null"}], "title": "Full Name"}, "phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Phone"}, "credit_limit": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Credit Limit"}, "notes": {"anyOf": [{"type": "string", "maxLength": 1000}, {"type": "null"}], "title": "Notes"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}}, "type": "object", "title": "UpdateClientRequest"}, "UpdateCompanyProfileRequest": {"properties": {"company_name": {"anyOf": [{"type": "string", "maxLength": 200, "minLength": 2}, {"type": "null"}], "title": "Company Name"}, "contact_email": {"anyOf": [{"type": "string", "format": "email"}, {"type": "null"}], "title": "Contact Email"}, "contact_phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Contact Phone"}, "logo_url": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Logo Url"}, "website": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Website"}, "address": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Address"}, "business_registration": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "title": "Business Registration"}, "iata_number": {"anyOf": [{"type": "string", "maxLength": 20}, {"type": "null"}], "title": "Iata Number"}}, "type": "object", "title": "UpdateCompanyProfileRequest"}, "UpdateCompanyRequest": {"properties": {"company_name": {"anyOf": [{"type": "string", "maxLength": 200, "minLength": 2}, {"type": "null"}], "title": "Company Name"}, "contact_email": {"anyOf": [{"type": "string", "format": "email"}, {"type": "null"}], "title": "Contact Email"}, "contact_phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Contact Phone"}, "currency": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Currency"}, "credit_limit": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Credit Limit"}, "address": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Address"}, "settings": {"anyOf": [{"additionalProperties": true, "type": "object"}, {"type": "null"}], "title": "Settings"}}, "type": "object", "title": "UpdateCompanyRequest"}, "UpdateCompanySettingsRequest": {"properties": {"default_currency": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Default Currency"}, "auto_ticket": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Auto Ticket"}, "notification_email": {"anyOf": [{"type": "string", "format": "email"}, {"type": "null"}], "title": "Notification Email"}, "booking_confirmation_cc": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Booking Confirmation Cc"}, "default_markup_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Default Markup Type"}, "default_markup_amount": {"anyOf": [{"type": "number", "minimum": 0.0}, {"type": "null"}], "title": "Default Markup Amount"}, "allow_on_hold": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Allow On Hold"}, "max_hold_hours": {"anyOf": [{"type": "integer", "maximum": 72.0, "minimum": 1.0}, {"type": "null"}], "title": "Max Hold Hours"}}, "type": "object", "title": "UpdateCompanySettingsRequest"}, "UpdateGDSConfigRequest": {"properties": {"enabled": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Enabled"}, "timeout": {"anyOf": [{"type": "integer", "maximum": 120.0, "minimum": 5.0}, {"type": "null"}], "title": "Timeout"}, "max_results": {"anyOf": [{"type": "integer", "maximum": 200.0, "minimum": 1.0}, {"type": "null"}], "title": "Max Results"}, "priority": {"anyOf": [{"type": "integer", "maximum": 10.0, "minimum": 1.0}, {"type": "null"}], "title": "Priority"}}, "type": "object", "title": "UpdateGDSConfigRequest"}, "UpdateMarkupRuleRequest": {"properties": {"amount": {"anyOf": [{"type": "number", "exclusiveMinimum": 0.0}, {"type": "null"}], "title": "Amount"}, "currency": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Currency"}, "origin": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Origin"}, "destination": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Destination"}, "cabin_class": {"anyOf": [{"$ref": "#/components/schemas/app__schemas__admin__markup__CabinClass"}, {"type": "null"}]}, "airline": {"anyOf": [{"type": "string", "maxLength": 10}, {"type": "null"}], "title": "Airline"}, "priority": {"anyOf": [{"type": "integer", "maximum": 100.0, "minimum": 0.0}, {"type": "null"}], "title": "Priority"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}, "description": {"anyOf": [{"type": "string", "maxLength": 200}, {"type": "null"}], "title": "Description"}}, "type": "object", "title": "UpdateMarkupRuleRequest"}, "UpdatePreferencesRequest": {"properties": {"seat_preference": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Seat Preference"}, "meal_preference": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Meal Preference"}, "cabin_preference": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Cabin Preference"}, "preferred_airlines": {"anyOf": [{"items": {}, "type": "array"}, {"type": "null"}], "title": "Preferred Airlines"}, "notification_email": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Notification Email"}, "notification_sms": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Notification Sms"}}, "type": "object", "title": "UpdatePreferencesRequest"}, "UpdateProfileRequest": {"properties": {"full_name": {"anyOf": [{"type": "string", "maxLength": 200, "minLength": 2}, {"type": "null"}], "title": "Full Name"}, "phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Phone"}, "date_of_birth": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Date Of Birth"}, "nationality": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Nationality"}, "preferred_language": {"anyOf": [{"type": "string", "maxLength": 5}, {"type": "null"}], "title": "Preferred Language"}, "preferred_currency": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Preferred Currency"}}, "type": "object", "title": "UpdateProfileRequest"}, "UpdateStaffRequest": {"properties": {"role": {"anyOf": [{"$ref": "#/components/schemas/StaffRole"}, {"type": "null"}]}, "department": {"anyOf": [{"type": "string", "maxLength": 100}, {"type": "null"}], "title": "Department"}, "phone": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Phone"}, "permissions": {"anyOf": [{"items": {"type": "string"}, "type": "array"}, {"type": "null"}], "title": "Permissions"}, "is_active": {"anyOf": [{"type": "boolean"}, {"type": "null"}], "title": "Is Active"}}, "type": "object", "title": "UpdateStaffRequest"}, "UpdateTravelerRequest": {"properties": {"first_name": {"anyOf": [{"type": "string", "maxLength": 50, "minLength": 1}, {"type": "null"}], "title": "First Name"}, "last_name": {"anyOf": [{"type": "string", "maxLength": 50, "minLength": 1}, {"type": "null"}], "title": "Last Name"}, "date_of_birth": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Date Of Birth"}, "gender": {"anyOf": [{"$ref": "#/components/schemas/Gender"}, {"type": "null"}]}, "nationality": {"anyOf": [{"type": "string", "maxLength": 3, "minLength": 2}, {"type": "null"}], "title": "Nationality"}, "email": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Email"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "doc_type": {"anyOf": [{"$ref": "#/components/schemas/DocType"}, {"type": "null"}]}, "doc_number": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Doc Number"}, "doc_expiry": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Doc Expiry"}, "doc_issuing_country": {"anyOf": [{"type": "string", "maxLength": 3}, {"type": "null"}], "title": "Doc Issuing Country"}, "nickname": {"anyOf": [{"type": "string", "maxLength": 50}, {"type": "null"}], "title": "Nickname"}}, "type": "object", "title": "UpdateTravelerRequest"}, "UserListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/AdminUserResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "total_pages": {"type": "integer", "title": "Total Pages"}}, "type": "object", "required": ["items", "total", "page", "page_size", "total_pages"], "title": "UserListResponse"}, "UserRegistrationRequest": {"properties": {"email": {"type": "string", "format": "email", "title": "Email"}, "password": {"type": "string", "title": "Password"}, "full_name": {"type": "string", "title": "Full Name"}, "role": {"type": "string", "title": "Role", "default": "customer"}, "company_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Company Code"}, "user_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "User Code"}, "department": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Department"}, "phone": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Phone"}, "registration_type": {"type": "string", "title": "Registration Type", "default": "individual"}, "invite_code": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Invite Code"}}, "type": "object", "required": ["email", "password", "full_name"], "title": "UserRegistrationRequest"}, "UserRoleEnum": {"type": "string", "enum": ["super_admin", "company_admin", "company_staff", "customer"], "title": "UserRoleEnum"}, "UserStatus": {"type": "string", "enum": ["active", "pending", "suspended", "inactive"], "title": "UserStatus"}, "ValidationError": {"properties": {"loc": {"items": {"anyOf": [{"type": "string"}, {"type": "integer"}]}, "type": "array", "title": "Location"}, "msg": {"type": "string", "title": "Message"}, "type": {"type": "string", "title": "Error Type"}}, "type": "object", "required": ["loc", "msg", "type"], "title": "ValidationError"}, "WalletResponse": {"properties": {"company_id": {"type": "integer", "title": "Company Id"}, "company_name": {"type": "string", "title": "Company Name"}, "current_balance": {"type": "number", "title": "Current Balance"}, "credit_limit": {"type": "number", "title": "Credit Limit"}, "available_credit": {"type": "number", "title": "Available Credit"}, "currency": {"type": "string", "title": "Currency"}, "total_spent": {"type": "number", "title": "Total Spent"}, "total_credited": {"type": "number", "title": "Total Credited"}, "last_transaction_at": {"anyOf": [{"type": "string", "format": "date-time"}, {"type": "null"}], "title": "Last Transaction At"}}, "type": "object", "required": ["company_id", "company_name", "current_balance", "credit_limit", "available_credit", "currency", "total_spent", "total_credited"], "title": "WalletResponse"}, "WalletTransactionListResponse": {"properties": {"items": {"items": {"$ref": "#/components/schemas/WalletTransactionResponse"}, "type": "array", "title": "Items"}, "total": {"type": "integer", "title": "Total"}, "page": {"type": "integer", "title": "Page"}, "page_size": {"type": "integer", "title": "Page Size"}, "balance": {"type": "number", "title": "Balance"}, "currency": {"type": "string", "title": "Currency"}}, "type": "object", "required": ["items", "total", "page", "page_size", "balance", "currency"], "title": "WalletTransactionListResponse"}, "WalletTransactionResponse": {"properties": {"id": {"type": "integer", "title": "Id"}, "transaction_type": {"type": "string", "title": "Transaction Type"}, "amount": {"type": "number", "title": "Amount"}, "currency": {"type": "string", "title": "Currency"}, "balance_after": {"type": "number", "title": "Balance After"}, "reference_type": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reference Type"}, "reference_id": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Reference Id"}, "description": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Description"}, "created_by": {"anyOf": [{"type": "string"}, {"type": "null"}], "title": "Created By"}, "created_at": {"type": "string", "format": "date-time", "title": "Created At"}}, "type": "object", "required": ["id", "transaction_type", "amount", "currency", "balance_after", "created_at"], "title": "WalletTransactionResponse"}, "app__schemas__admin__markup__CabinClass": {"type": "string", "enum": ["economy", "premium_economy", "business", "first"], "title": "CabinClass"}, "app__schemas__flight__CabinClass": {"type": "string", "enum": ["Economy", "Premium", "Business", "First"], "title": "CabinClass"}}, "securitySchemes": {"BearerAuth": {"type": "http", "scheme": "bearer", "bearerFormat": "JWT", "description": "Get token from /api/v1/auth/login"}}}, "security": [{"BearerAuth": []}]}
