Skip to main content

Quote an Option

The quote endpoint (recheck) validates that a specific option is still available at the advertised price. Always quote immediately before booking to ensure accurate pricing and avoid booking failures.

Endpoint

POST /hotels/v1/recheck

Why Quote Before Booking?

  1. Price Validation - Prices can change between search and booking
  2. Availability Confirmation - Inventory may have been sold
  3. Policy Updates - Cancellation policies may have changed
  4. Required for Booking - Some suppliers require a fresh quote

Request

Required Parameters

ParameterTypeDescription
optionRefIdstringOption reference ID from search

Optional Parameters

ParameterTypeDescription
settingsobjectRequest settings (accessIds, timeout)

Example Request

{
"optionRefId": "OPT-123456789",
"settings": {
"accessIds": ["ACCESS_1"],
"requestId": "quote-001"
}
}

Response

Success Response

{
"optionQuote": {
"optionRefId": "OPT-123456789",
"hotel": {
"code": "12345",
"name": "Example Hotel Barcelona"
},
"rooms": [
{
"description": "Standard Double Room",
"boardCode": "BB",
"price": {
"currency": "EUR",
"net": 150.00,
"suggested": 180.00,
"binding": true
}
}
],
"price": {
"currency": "EUR",
"net": 150.00,
"suggested": 180.00,
"binding": true
},
"cancelPolicy": {
"refundable": true,
"cancelPenalties": []
},
"warnings": []
},
"errors": []
}

Price Changed Response

If the price has changed:

{
"optionQuote": {
"optionRefId": "OPT-123456789",
"price": {
"currency": "EUR",
"net": 165.00, // Price increased from 150.00
"suggested": 198.00,
"binding": true
}
},
"warnings": [
{
"code": "PRICE_CHANGED",
"description": "Price has changed since search"
}
]
}

Option No Longer Available

If the option is no longer available:

{
"errors": [
{
"code": "OPTION_EXPIRED",
"message": "Option is no longer available",
"type": "CLIENT"
}
]
}

Key Fields

binding Price

When price.binding is true, the price is guaranteed and will not change before booking. When false, the price may still change.

Price Changes

If the price changes:

  1. Check warnings for PRICE_CHANGED
  2. Compare price.net with your stored value
  3. Present updated price to user
  4. Book with new price if acceptable

Option Expiration

If optionRefId has expired:

  1. Perform a new search
  2. Select a new option
  3. Quote the new option
  4. Book immediately

Best Practices

1. Always Quote Before Booking

// ✅ Good - Quote then book
const search = await searchHotels(criteria);
const option = search.options[0];

// Quote immediately
const quote = await quoteOption(option.optionRefId);

// Check for price changes
if (quote.warnings.some(w => w.code === 'PRICE_CHANGED')) {
// Show updated price to user
showPriceUpdate(quote.price);
}

// Book with quoted option
const booking = await bookOption(option.optionRefId, travellerData);

// ❌ Bad - Book without quoting
const search = await searchHotels(criteria);
const option = search.options[0];
// Price may have changed or option may be sold out
const booking = await bookOption(option.optionRefId, travellerData);

2. Handle Price Changes

const quote = await quoteOption(optionRefId);

// Check for price changes
const priceChanged = quote.warnings.some(w => w.code === 'PRICE_CHANGED');

if (priceChanged) {
const oldPrice = storedOption.price.net;
const newPrice = quote.price.net;

if (newPrice > oldPrice) {
// Ask user to confirm new price
const confirmed = await confirmPriceChange(newPrice);
if (!confirmed) {
// User declined, search again
return searchHotels(criteria);
}
}
}

// Proceed with booking
const booking = await bookOption(optionRefId, travellerData);

3. Check Option Availability

const quote = await quoteOption(optionRefId);

if (quote.errors.length > 0) {
const error = quote.errors[0];

if (error.code === 'OPTION_EXPIRED' || error.code === 'NO_AVAILABILITY') {
// Option no longer available
// Search again for alternatives
return searchHotels(criteria);
}

// Other error - handle appropriately
throw new Error(error.message);
}

Code Examples

curl -X POST https://api.bundleport.com/hotels/v1/recheck \
-H "Authorization: ApiKey YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"optionRefId": "OPT-123456789",
"settings": {
"accessIds": ["ACCESS_1"]
}
}'

Next Steps