B2A API Overview
The B2A (Business-to-AI Agent) API enables AI assistants to provide reliable travel recommendations and execute real-time bookings.Base URL
Authentication
All endpoints require an API key in thex-api-key header:
Endpoints
| Endpoint | Method | Description |
|---|---|---|
/api/b2a/recommend | POST | Get context-aware activity recommendations |
/api/b2a/execute_booking | POST | Create a booking with automatic voucher |
/api/b2a/inventory | GET | Check real-time availability |
When to Use Each Endpoint
Recommend
User asks:
- “What should we do today?”
- “Any family activities nearby?”
- “It’s raining, what’s good?”
Execute Booking
User says:
- “Book this one”
- “Reserve for tomorrow”
- “I want to go there”
Inventory
User asks:
- “Is this available?”
- “Any deals today?”
- “What’s the price?”
Request Flow
Response Format
All successful responses follow this structure:Ground Truth Data
PriveTag’s unique advantage is Ground Truth data:When hotel guests actually visit activities and scan their NFC cards, we capture verified user behavior. This means our recommendations are based on real actions, not assumptions.
context_log_id returned from /recommend connects:
- User profile + environment context
- Which activities were recommended
- Which activity was selected
- Whether the user actually visited (QR verification)
Key Features
Context-Aware Recommendations
- Weather Integration: Automatically recommends indoor activities on rainy days
- Time Awareness: Dinner spots in the evening, morning activities early
- User Profile Matching: Family vs couple vs solo traveler optimization
Real-Time Booking
- 99% Success Rate: Live inventory sync
- Instant Vouchers: Email delivered within 30 seconds
- Webhook Callbacks: Get notified when booking completes
Flash Deals
- Same-Day Discounts: 30-50% off for last-minute availability
- AI-Exclusive Rates: Special pricing for AI agent bookings
SDK & Tools
Next Steps
Try the API
Make your first recommendation request