Recommendations
API reference

POST /recommendations/by-hotel

Find the best OTA for a property the user has already picked. Same response shape as /decide, but anchored to a single property_id.

POST /v1/recommendations/by-hotel
ParameterTypeDescription
property_idrequiredstringPrefix prop_.
datesrequiredStayDatesISO 8601 check-in / check-out.
guestsrequiredGuestsParty composition.

Request

curl -X POST https://api.b2a.bluepillow.com/v1/recommendations/by-hotel \
  -H "Authorization: Bearer $B2A_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "property_id": "prop_abc123",
    "dates":  {"check_in": "2026-06-10", "check_out": "2026-06-13"},
    "guests": {"adults": 2}
  }'

Response 200

{
  "recommended": {
    "property": {
      "id": "prop_abc123",
      "name": "Hotel Blue Sky",
      "offers": [
        {"ota": "Booking", "amount": 210.00, "currency": "EUR", "refundable": true},
        {"ota": "Expedia", "amount": 218.50, "currency": "EUR", "refundable": false}
      ],
      "price": {"amount": 210.00, "currency": "EUR", "ota": "Booking"},
      "availability_status": "available"
    }
  },
  "alternatives": [],
  "metadata": {"total_options_considered": 1, "request_id": "req_..."}
}

Errors

400 invalid_request · 401 authentication_failed · 404 not_found · 429 rate_limited