v1

latestOpenAPI 3.0.12026-08-0644438.5 KB
Trips

Get booking

Retrieves a booking by trip and booking ID.

get/v1/trips/{trip_id}/bookings/{booking_id}

Path parameters

trip_idstring required
booking_idstring required

Response

The booking that was retrieved.

idstring required

The ID of the booking.

created_atstring date-time required

The time when the booking was created.

updated_atstring date-time required

The time when the booking was last updated.

trip_idstring required

The ID of the trip to which this booking belongs.

versioninteger required

The current version of the booking.

type'AIR' | 'CAR_RENTAL' | 'LODGING' | 'RAIL' required

The type of a booking.

status'HOLD' | 'PENDING' | 'CONFIRMED' | 'COMPLETED' | 'CANCELED' | 'IN_PROGRESS' | 'REFUNDED' | 'VOIDED' | 'PROCESSING' | 'UNCONFIRMED' | 'AIRLINE_CONTROL' | 'PAYMENT_DECLINED' | 'SCHEDULE_CHANGE' | 'APPROVAL_REQUESTED' | 'APPROVAL_DENIED' | 'CANCELLATION_IN_PROGRESS' required

The status of the booking:

  • HOLD - The booking is a hold, and may be canceled without being charged.
  • PENDING - Some action needs to be completed before the booking is confirmed. Usually the action is the payment being confirmed.
  • CONFIRMED - The booking is confirmed.
  • COMPLETED - The booking has already happened.
  • CANCELED - The booking has been canceled.
  • IN_PROGRESS - The booking is currently in progress.
  • REFUNDED - A refund has been issued. It may or may not be a full refund.
  • VOIDED - Voided is similar to (and can be treated the same as) canceled.
  • PROCESSING - The booking has been created or changed, but confirmation from the vendor has not been received yet.
  • UNCONFIRMED - The booking was in the PROCESSING state for too long and some action is probably required to get this booking confirmed.
  • AIRLINE_CONTROL - The airline has taken control of the booking and further updates may not be visible.
  • PAYMENT_DECLINED - The payment for the booking has failed.
  • SCHEDULE_CHANGE - Some change has happened to the booking schedule, e.g. the flight getting canceled and the passenger reallocated to another flight. Travel support should reach out to confirm the traveler accepts the new schedule.
  • APPROVAL_REQUESTED - The booking is subject to approval, and it is waiting for a review.
  • APPROVAL_DENIED - A reviewer has denied the booking, or the deadline to approve the booking has passed and it got canceled.
  • CANCELLATION_IN_PROGRESS - The booking is currently being canceled.
source'BREX_TRAVEL' | 'EXTERNAL' required

The original source of a booking:

  • BREX_TRAVEL - The booking was created via Brex Travel.
  • EXTERNAL - The booking was manually inserted, e.g. a hotel room block for a group event.
booking_referencestring nullable

The booking reference number shown in the dashboard and used when contacting Brex Support. This is the reference from the travel provider, not the Brex internal booking ID. May be null if the booking has no associated reference.

trip_referencestring nullable

The trip reference number shown in the dashboard and used when contacting Brex Support. This is the reference from the travel provider, not the Brex internal trip ID. May be null if the trip has no associated reference.

Example response

{
  "id": "booking_cl9t5dnu800040m3071dandeq",
  "created_at": "2017-12-27T15:42:30Z",
  "updated_at": "2017-12-27T15:42:30Z",
  "trip_id": "trip_cl9rh1n8g001e0j84w6fb4fd1",
  "version": 2,
  "type": "AIR",
  "status": "CONFIRMED",
  "source": "BREX_TRAVEL",
  "booking_data": {
    "journeys": [
      {
        "flights": [
          {
            "origin": {
              "airport_code": "GIG",
              "terminal": "T2",
              "gate": "B13",
              "airport_location": {
                "country": "Brazil",
                "administrative_area": "RJ",
                "city": "Rio de Janeiro",
                "postal_code": "21941-900",
                "address_line_1": "Av. Vinte de Janeiro, S/N",
                "address_line_2": "Ilha do Governador",
                "coordinates": {
                  "latitude": -22.8145373,
                  "longitude": -43.2465548
                },
                "timezone": "America/Sao_Paulo"
              }
            },
            "destination": {
              "airport_code": "GIG",
              "terminal": "T2",
              "gate": "B13",
              "airport_location": {
                "country": "Brazil",
                "administrative_area": "RJ",
                "city": "Rio de Janeiro",
                "postal_code": "21941-900",
                "address_line_1": "Av. Vinte de Janeiro, S/N",
                "address_line_2": "Ilha do Governador",
                "coordinates": {
                  "latitude": -22.8145373,
                  "longitude": -43.2465548
                },
                "timezone": "America/Sao_Paulo"
              }
            },
            "departure_time": {
              "timestamp": "2017-12-27T15:42:30Z"
            },
            "arrival_time": {
              "timestamp": "2017-12-27T15:42:30Z"
            },
            "duration": "PT4h20M",
            "confirmation_code": "PWZRTQ",
            "cabin_class": "ECONOMY",
            "marketing_flight": {
              "airline_code": "G3",
              "number": "1234",
              "airline_name": "GOL Linhas Aereas S.A."
            },
            "operating_flight": {
              "airline_code": "G3",
              "number": "1234",
              "airline_name": "GOL Linhas Aereas S.A."
            },
            "seat": {
              "number": "31D",
              "status": "CONFIRMED"
            }
          }
        ],
        "status": "CONFIRMED",
        "cabin_display_name": "Flexible Economy"
      }
    ],
    "tickets": [
      {
        "number": "0017959463925",
        "issue_date": "2017-12-27"
      }
    ],
    "redress_number": {
      "issuing_country": "BR",
      "document_number": "1231231"
    },
    "known_traveler_number": {
      "issuing_country": "BR",
      "document_number": "1231231"
    }
  },
  "booking_reference": "7117228246",
  "trip_reference": "7117228246"
}