B2A Blue Pillow

Quickstart

Make your first /v1/decide call in under 5 minutes. No signup, no sandbox.

1. Grab a key

Visit b2a.bluepillow.com to auto-issue an anonymous key, or call POST /v1/keys programmatically.

B2A_API_KEY=<your-key>

2. Make your first call

Build an Intent (location + dates + guests) and POST it. The Idempotency-Key header is required on all write endpoints.

curl https://api.b2a.bluepillow.com/v1/decide \
  -H "Authorization: Bearer $B2A_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "location": {"type": "destination_id", "value": "dest_<id>"},
    "dates":    {"check_in": "2026-06-10", "check_out": "2026-06-13"},
    "guests":   {"adults": 2},
    "context":  {"end_user_country": "IT", "currency": "EUR"}
  }'

3. Read the response

One recommended option plus up to five alternatives. Every option carries a Property with live price and OTA name.

{
  "recommended": {
    "property": {
      "id": "prop_abc123",
      "name": "Hotel Blue Sky",
      "property_type": "hotel",
      "rating": 4.7,
      "price": {"amount": 210.00, "currency": "EUR", "ota": "Booking"}
    }
  },
  "alternatives": [],
  "metadata": {
    "total_options_considered": 47,
    "request_id": "req_..."
  }
}

4. Hand off the booking

Pass the chosen property.id to POST /v1/bookings/initiate for a tracked deep link.

That’s it. Your agent now has a booking decision — no parsing, no ranking logic to implement. Anonymous rate limit: 60 req/min, 5000 req/day.