# List trip bookings

Lists the bookings within a trip.

Endpoint: GET /v1/trips/{trip_id}/bookings
Version: 1.0
Security: OAuth2

## Query parameters:

  - `cursor` (string,null)

  - `limit` (integer,null)

  - `load_custom_fields` (boolean,null)
    Whether to load custom field values on the returned resources.

## Path parameters:

  - `trip_id` (string, required)

## Response 200 fields (application/json):

  - `next_cursor` (string,null)

  - `items` (array, required)

  - `items.id` (string, required)
    The ID of the booking.
    Example: "booking_cl9t5dnu800040m3071dandeq"

  - `items.created_at` (string, required)
    The time when the booking was created.
    Example: "2017-12-27T15:42:30Z"

  - `items.updated_at` (string, required)
    The time when the booking was last updated.
    Example: "2017-12-27T15:42:30Z"

  - `items.trip_id` (string, required)
    The ID of the trip to which this booking belongs.
    Example: "trip_cl9rh1n8g001e0j84w6fb4fd1"

  - `items.version` (integer, required)
    The current version of the booking.
    Example: 2

  - `items.type` (string, required)
    The type of a booking.
    Enum: "AIR", "CAR_RENTAL", "LODGING", "RAIL"

  - `items.status` (string, 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.
    Enum: "HOLD", "PENDING", "CONFIRMED", "COMPLETED", "CANCELED", "IN_PROGRESS", "REFUNDED", "VOIDED", "PROCESSING", "UNCONFIRMED", "AIRLINE_CONTROL", "PAYMENT_DECLINED", "SCHEDULE_CHANGE", "APPROVAL_REQUESTED", "APPROVAL_DENIED", "CANCELLATION_IN_PROGRESS"

  - `items.source` (string, 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.
    Enum: "BREX_TRAVEL", "EXTERNAL"

  - `items.booking_data` (object, required)
    Type-specific booking data.

  - `items.booking_reference` (string,null)
    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.
    Example: "7117228246"

  - `items.trip_reference` (string,null)
    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: "7117228246"

  - `items.policy` (object,null)
    The result of evaluating the customer's travel policy against this booking, as shown to the traveler when the booking was made. Mirrors the policy information available in the booking export. May be null when no policy was evaluated for the booking.

  - `items.policy.out_of_policy` (boolean, required)
    Whether the booking is out of policy, i.e. at least one travel policy rule was broken.
    Example: true

  - `items.policy.violations` (array)
    The specific travel policy rules that this booking violated. Empty when the booking is in policy.

  - `items.policy.violations.code` (string, required)
    A machine-readable code identifying the policy rule that was violated:
  * MIN_DAYS_IN_ADVANCE - The booking was made less than the minimum number of days in advance.
  * MAX_FARE_PER_TRAVELER - The fare exceeds the maximum allowed per traveler.
  * TICKET_REFUNDABILITY - The ticket refundability does not meet policy requirements.
  * TICKET_CHANGEABILITY - The ticket changeability does not meet policy requirements.
  * AMOUNT_LIMIT_BY_FLIGHT_DURATION - The fare exceeds the maximum allowed for the flight duration.
  * ALLOWED_CABIN_CLASSES_BY_DURATION - The cabin class is not allowed for the flight duration.
  * ALLOWED_CABIN_CLASSES_BY_DURATION_DOMESTIC - The cabin class is not allowed for the domestic flight duration.
  * ALLOWED_CABIN_CLASSES_BY_DURATION_INTERNATIONAL - The cabin class is not allowed for the international flight duration.
  * MEDIAN_PRICE - The price exceeds the median price.
  * LOWEST_LOGICAL_FARE - The price exceeds the lowest logical fare.
  * MAX_STARS - The hotel rating exceeds the maximum allowed.
  * DEFAULT_NIGHTLY_RATE - The nightly rate exceeds the maximum allowed.
  * NIGHTLY_RATE_FOR_LOCATION - The nightly rate exceeds the maximum allowed for the location.
  * MAX_HOTEL_BOOKING_PRICE - The hotel booking price exceeds the maximum allowed.
  * ALLOWED_CAR_CLASSES - The car class is not allowed.
  * MAX_DAILY_RATE - The daily rate exceeds the maximum allowed.
  * OTHER - A policy violation that is not covered by the other codes.
    Enum: "MIN_DAYS_IN_ADVANCE", "MAX_FARE_PER_TRAVELER", "TICKET_REFUNDABILITY", "TICKET_CHANGEABILITY", "AMOUNT_LIMIT_BY_FLIGHT_DURATION", "ALLOWED_CABIN_CLASSES_BY_DURATION", "ALLOWED_CABIN_CLASSES_BY_DURATION_DOMESTIC", "ALLOWED_CABIN_CLASSES_BY_DURATION_INTERNATIONAL", "MEDIAN_PRICE", "LOWEST_LOGICAL_FARE", "MAX_STARS", "DEFAULT_NIGHTLY_RATE", "NIGHTLY_RATE_FOR_LOCATION", "MAX_HOTEL_BOOKING_PRICE", "ALLOWED_CAR_CLASSES", "MAX_DAILY_RATE", "OTHER"

  - `items.policy.violations.description` (string, required)
    A human-readable description of the policy violation.
    Example: "Fare exceeds maximum allowed"

  - `items.custom_fields` (array,null)
    Custom field values associated with this resource.

  - `items.custom_fields.key` (string, required)
    The key of the custom field.

  - `items.custom_fields.value` (any, required)


## Response 400 fields

## Response 401 fields

## Response 403 fields

## Response 404 fields

## Response 500 fields
