Skip to main content

Status Codes

This document explains all status codes used in Bundleport APIs, particularly for bookings and search operations.

Booking Status Codes

CONFIRMED

Description: Booking has been confirmed by the provider.

Meaning: The reservation is active and guaranteed. Guest can check in on the specified dates.

Next Actions:

  • Booking is complete
  • Send confirmation to customer
  • Monitor for modifications or cancellations

PENDING

Description: Booking request is being processed.

Meaning: The booking has been submitted but provider hasn't confirmed yet. This is a temporary state.

Next Actions:

  • Wait for confirmation
  • Poll booking status if needed
  • Set up webhook to receive status updates

ON_REQUEST

Description: Provider needs to manually confirm availability.

Meaning: The provider doesn't have real-time availability and must check manually. This may take hours or days.

Next Actions:

  • Inform customer that confirmation is pending
  • Wait for provider confirmation
  • Set up webhook to receive updates
  • May need to follow up with provider

CANCELLED

Description: Booking has been cancelled.

Meaning: The reservation is no longer active. Cancellation may have penalties depending on the cancellation policy.

Next Actions:

  • Process any cancellation penalties
  • Refund customer if applicable
  • Update internal systems
  • Send cancellation confirmation

MODIFIED

Description: Booking details have been changed.

Meaning: The provider or Bundleport has modified the booking (dates, room type, etc.).

Next Actions:

  • Review changes
  • Notify customer of modifications
  • Update internal records
  • Confirm customer acceptance if required

FAILED

Description: Booking could not be completed.

Meaning: The booking request failed and no reservation was created.

Next Actions:

  • Search for alternative options
  • Retry booking if appropriate
  • Contact support if issue persists

Search Response Status

OK

Description: Search completed successfully.

Meaning: All providers responded successfully and results are available.

PARTIAL

Description: Some providers responded, others failed.

Meaning: Partial results available. Check tracing.accessSpans for details.

Next Actions:

  • Results are still usable
  • Review warnings for provider issues
  • Consider retrying failed providers

ERROR

Description: Search failed completely.

Meaning: No providers responded successfully or all failed.

Next Actions:

  • Retry the search
  • Check provider status
  • Verify request parameters
  • Contact support if issue persists

Access Span Status (Per Provider)

OK

Description: Provider responded successfully.

Meaning: Provider returned results without errors.

ERROR

Description: Provider returned an error.

Meaning: Provider encountered an issue. Check errorCode and errorDescription in access span.

Common Causes:

  • Provider system unavailable
  • Invalid credentials
  • Provider-specific validation error
  • Inventory exhausted

TIMEOUT

Description: Provider did not respond within timeout period.

Meaning: Provider took too long to respond. Request was cancelled.

Next Actions:

  • Results from other providers are still available
  • May retry this provider separately if needed

Room Status

AVAILABLE

Description: Room is available for booking.

Meaning: Can be booked immediately.

ON_REQUEST

Description: Room availability must be confirmed by provider.

Meaning: Provider needs to verify availability manually.

SOLD_OUT

Description: Room is not available.

Meaning: No inventory for the requested dates/occupancy.

Payment Status

PENDING

Description: Payment is pending.

Meaning: Payment has been initiated but not yet processed.

AUTHORIZED

Description: Payment has been authorized.

Meaning: Funds are reserved but not yet captured.

CAPTURED

Description: Payment has been captured.

Meaning: Funds have been charged to the customer.

FAILED

Description: Payment failed.

Meaning: Payment could not be processed.

REFUNDED

Description: Payment has been refunded.

Meaning: Funds have been returned to the customer.

Status Code Usage Examples

Checking Booking Status

const booking = await getBooking(bookingId);

switch (booking.status) {
case 'CONFIRMED':
// Booking is confirmed, send confirmation email
break;
case 'PENDING':
case 'ON_REQUEST':
// Still waiting for confirmation
break;
case 'CANCELLED':
// Handle cancellation
break;
case 'MODIFIED':
// Review changes
break;
}

Handling Search Status

const searchResult = await searchHotels(criteria);

if (searchResult.tracing.status === 'OK') {
// All providers responded
processResults(searchResult.options);
} else if (searchResult.tracing.status === 'PARTIAL') {
// Some providers failed, but we have results
processResults(searchResult.options);
logWarnings(searchResult.warnings);
} else {
// All providers failed
handleError(searchResult.errors);
}

Status Transitions

Booking Lifecycle

PENDING → CONFIRMED
PENDING → ON_REQUEST → CONFIRMED
PENDING → FAILED
CONFIRMED → MODIFIED
CONFIRMED → CANCELLED

Note: Status transitions depend on provider behavior and booking policies.

Next Steps