Skip to main content

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

https://api.privetag.com

Authentication

All endpoints require an API key in the x-api-key header:
x-api-key: your-api-key-here

Endpoints

EndpointMethodDescription
/api/b2a/recommendPOSTGet context-aware activity recommendations
/api/b2a/execute_bookingPOSTCreate a booking with automatic voucher
/api/b2a/inventoryGETCheck 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:
{
  "success": true,
  "data": {
    // Response data
  }
}
Error responses:
{
  "success": false,
  "error": "Error message",
  "code": "ERROR_CODE",
  "details": "Additional information"
}

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.
The context_log_id returned from /recommend connects:
  1. User profile + environment context
  2. Which activities were recommended
  3. Which activity was selected
  4. Whether the user actually visited (QR verification)
This creates a feedback loop that improves recommendations over time.

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