Architecture
This document explains Bundleport's architecture and how requests flow through the system.
High-Level Architecture
┌─────────────────────────────────────────────────────────────┐
│ Your Application │
│ (OTA, TMC, Booking Engine, AI Assistant, etc.) │
└──────────────────────┬──────────────────────────────────────┘
│
│ REST / GraphQL / MCP
│
┌──────────────────────▼──────────────────────────────────────┐
│ Bundleport API Gateway │
│ • Authentication & Authorization │
│ • Rate Limiting │
│ • Request Routing │
│ • Response Aggregation │
└──────────────────────┬──────────────────────────────────────┘
│
│
┌──────────────────────▼──────────────────────────────────────┐
│ Bundleport Core Services │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ Connect Hotels Service │ │
│ │ • Booking Flow (Search, Quote, Book, Cancel) │ │
│ │ • Content Catalog (Hotels, Rooms, Destinations) │ │
│ │ • Business Rules & Normalization │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ GraphQL Service │ │
│ │ • Hotel-X Compatible Schema │ │
│ │ • Query/Mutation Adapters │ │
│ └──────────────────────────────────────────────────────┘ │
│ ┌──────────────────────────────────────────────────────┐ │
│ │ MCP Service │ │
│ │ • Tool-based Interface │ │
│ │ • AI-Optimized Responses │ │
│ └──────────────────────────────────────────────────────┘ │
└──────────────────────┬──────────────────────────────────────┘
│
│
┌──────────────────────▼──────────────────────────────────────┐
│ Supplier Integrations Layer │
│ ┌──────────┐ ┌──────────┐ ┌──────────┐ ┌──────────┐ │
│ │Supplier A│ │Supplier B│ │Supplier C│ │Supplier D│ │
│ │ (Bedbank)│ │(Wholesaler)│ │ (Direct) │ │ (GDS) │ │
│ └──────────┘ └──────────┘ └──────────┘ └──────────┘ │
└──────────────────────────────────────────────────────────────┘
Request Flow
1. Search Request
Your App
↓ POST /hotels/v1/search
API Gateway
↓ Authenticate, Rate Limit
Connect Hotels Service
↓ Parse & Validate Request
↓ Apply Business Rules
Supplier Integrations
↓ Parallel Requests
├─→ Supplier A (Search)
├─→ Supplier B (Search)
└─→ Supplier C (Search)
↓ Collect Responses
Connect Hotels Service
↓ Normalize Data
↓ Deduplicate Hotels
↓ Apply Ranking Rules
↓ Aggregate Results
API Gateway
↓ Format Response
Your App
← JSON Response with Options
2. Booking Request
Your App
↓ POST /hotels/v1/bookings
API Gateway
↓ Authenticate, Rate Limit
Connect Hotels Service
↓ Validate OptionRefId
↓ Extract Supplier Info
Supplier Integration
↓ POST Booking to Supplier
↓ Wait for Confirmation
Connect Hotels Service
↓ Normalize Response
↓ Store Booking References
↓ Trigger Webhooks
API Gateway
↓ Format Response
Your App
← Booking Confirmation
Key Components
API Gateway
Responsibilities:
- Authentication (API key validation)
- Rate limiting (per service account)
- Request routing
- Response formatting
- Logging and monitoring
The API Gateway acts as the entry point for all API requests, handling security, rate limiting, and routing before requests reach backend services.
Connect Hotels Service
Responsibilities:
- Request validation
- Business rule application
- Data normalization
- Supplier orchestration
- Response aggregation
- Deduplication and ranking
Key Features:
- Multi-supplier aggregation
- Parallel request execution
- Fault tolerance (partial failures)
- Caching strategies
Supplier Integrations
Responsibilities:
- Protocol translation (REST, SOAP, etc.)
- Data mapping (supplier format → Bundleport format)
- Error handling
- Retry logic
- Connection pooling
Supported Protocols:
- REST APIs
- SOAP/XML
- Binary protocols
- Custom integrations
Content Service
Responsibilities:
- Hotel catalog management
- Content synchronization
- Data quality assurance
- Multi-language support
- Media management
Data Flow
Normalization Process
Supplier Response (Format A)
↓
Parse & Extract
↓
Map to Bundleport Schema
↓
Apply Business Rules
↓
Normalized Response
Example:
- Supplier A:
hotel_id,room_type,meal_plan - Supplier B:
propertyCode,accommodationType,boardBasis - Normalized:
hotel.code,room.code,boardCode
Deduplication
When the same hotel appears from multiple suppliers:
- Identify - Match hotels by location, name, or supplier mapping
- Consolidate - Merge options from all suppliers
- Rank - Apply business rules to select best option
- Present - Return single result with supplier metadata
Multi-Supplier Aggregation
Parallel Execution
All suppliers are queried in parallel for faster responses:
Search Request
├─→ Supplier A (500ms)
├─→ Supplier B (800ms)
└─→ Supplier C (1200ms)
Total Time: ~1200ms (not 2500ms)
Partial Failures
If one supplier fails, others continue:
Search Request
├─→ Supplier A ✅ (45 hotels)
├─→ Supplier B ✅ (32 hotels)
└─→ Supplier C ❌ (Timeout)
Result: 77 hotels from A & B
Status: PARTIAL
Warning: Supplier C timeout
Caching Strategy
Content API
- Cache Duration: Hours to days
- Cache Key: Connection code + content type
- Invalidation: On content updates
Booking API
- Cache Duration: None (always real-time)
- Reason: Availability and pricing change frequently
Scalability
Horizontal Scaling
- API Gateway: Stateless, scales horizontally
- Services: Stateless, scales horizontally
- Database: Read replicas for content queries
Performance Optimizations
- Connection pooling to suppliers
- Parallel request execution
- Response caching (where appropriate)
- Database query optimization
Security
Authentication
- API key validation at gateway
- Service account scopes
- IP allowlisting (optional)
Data Protection
- HTTPS/TLS for all communications
- PCI compliance for payment data
- Secure credential storage
Monitoring & Observability
Metrics
- Request rates
- Response times
- Error rates
- Supplier performance
Tracing
- Request IDs for end-to-end tracking
- Per-supplier response times
- Error tracking
Logging
- Request/response logging
- Error logging
- Audit trails
Next Steps
- Key Concepts - Understand domain concepts
- Connect Hotels Overview - Learn about the product
- Quickstart - Start building