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 supplier.

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 supplier 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: Supplier needs to manually confirm availability.

Meaning: The supplier 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 supplier confirmation
  • Set up webhook to receive updates
  • May need to follow up with supplier

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 supplier 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 suppliers responded successfully and results are available.

PARTIAL

Description: Some suppliers responded, others failed.

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

Next Actions:

  • Results are still usable
  • Review warnings for supplier issues
  • Consider retrying failed suppliers

ERROR

Description: Search failed completely.

Meaning: No suppliers responded successfully or all failed.

Next Actions:

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

Access Span Status (Per Supplier)

OK

Description: Supplier responded successfully.

Meaning: Supplier returned results without errors.

ERROR

Description: Supplier returned an error.

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

Common Causes:

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

TIMEOUT

Description: Supplier did not respond within timeout period.

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

Next Actions:

  • Results from other suppliers are still available
  • May retry this supplier 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 supplier.

Meaning: Supplier 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 suppliers responded
processResults(searchResult.options);
} else if (searchResult.tracing.status === 'PARTIAL') {
// Some suppliers failed, but we have results
processResults(searchResult.options);
logWarnings(searchResult.warnings);
} else {
// All suppliers 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 supplier behavior and booking policies.

Next Steps