---
title: Trips
editUrl: false
head: []
template: doc
prev: false
next: false
sidebar:
  hidden: false
  attrs: {}
pagefind: true
draft: false
---

Defined in: [src/travel/client.gen.ts:8](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/travel/client.gen.ts#L8)

## Constructors

### Constructor

> **new Trips**(`_core`): `Trips`

Defined in: [src/travel/client.gen.ts:9](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/travel/client.gen.ts#L9)

#### Parameters

##### \_core

[`BrexCore`](/brex/api/index/classes/brexcore/)

#### Returns

`Trips`

## Methods

### get()

> **get**(`tripId`, `options?`): `Promise`\<\{ `billable_at?`: `string` \| `null`; `booker_user_id`: `string`; `created_at`: `string`; `ends_at?`: `string` \| `null`; `id`: `string`; `name?`: `string` \| `null`; `starts_at?`: `string` \| `null`; `status`: `"DELETED"` \| `"INVITED"` \| `"PROCESSING"` \| `"CANCELED"` \| `"REFUNDED"` \| `"DRAFT"` \| `"IN_PROGRESS"` \| `"APPROVAL_DENIED"` \| `"PENDING"` \| `"HOLD"` \| `"COMPLETED"` \| `"VOIDED"` \| `"UNCONFIRMED"` \| `"AIRLINE_CONTROL"` \| `"PAYMENT_DECLINED"` \| `"SCHEDULE_CHANGE"` \| `"APPROVAL_REQUESTED"` \| `"CANCELLATION_IN_PROGRESS"` \| `"UPCOMING"`; `traveler?`: \{ `guest_email?`: `string` \| `null`; `name?`: \{ `first_name?`: `string`; `last_name?`: `string`; `middle_name?`: `string` \| `null`; `suffix?`: `string` \| `null`; \}; `type`: `"EMPLOYEE"` \| `"GUEST"`; `user_id?`: `string` \| `null`; \}; `updated_at`: `string`; `version`: `number`; \}\>

Defined in: [src/travel/client.gen.ts:18](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/travel/client.gen.ts#L18)

Get trip

Retrieves a trip by ID.

`GET /v1/trips/{trip_id}` — requires OAuth scope: `travel.trips`, `travel.trips.readonly`

#### Parameters

##### tripId

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `billable_at?`: `string` \| `null`; `booker_user_id`: `string`; `created_at`: `string`; `ends_at?`: `string` \| `null`; `id`: `string`; `name?`: `string` \| `null`; `starts_at?`: `string` \| `null`; `status`: `"DELETED"` \| `"INVITED"` \| `"PROCESSING"` \| `"CANCELED"` \| `"REFUNDED"` \| `"DRAFT"` \| `"IN_PROGRESS"` \| `"APPROVAL_DENIED"` \| `"PENDING"` \| `"HOLD"` \| `"COMPLETED"` \| `"VOIDED"` \| `"UNCONFIRMED"` \| `"AIRLINE_CONTROL"` \| `"PAYMENT_DECLINED"` \| `"SCHEDULE_CHANGE"` \| `"APPROVAL_REQUESTED"` \| `"CANCELLATION_IN_PROGRESS"` \| `"UPCOMING"`; `traveler?`: \{ `guest_email?`: `string` \| `null`; `name?`: \{ `first_name?`: `string`; `last_name?`: `string`; `middle_name?`: `string` \| `null`; `suffix?`: `string` \| `null`; \}; `type`: `"EMPLOYEE"` \| `"GUEST"`; `user_id?`: `string` \| `null`; \}; `updated_at`: `string`; `version`: `number`; \}\>

***

### getBooking()

> **getBooking**(`tripId`, `bookingId`, `options?`): `Promise`\<\{ `booking_data`: \{ `journeys`: `object`[]; `known_traveler_number?`: \{ `document_number`: `string`; `issuing_country`: `string`; \}; `redress_number?`: \{ `document_number`: `string`; `issuing_country`: `string`; \}; `tickets`: `object`[]; `type`: `"AIR"`; \} \| \{ `car_details`: \{ `car_class?`: `"OTHER"` \| `"ECONOMY"` \| `"COMPACT"` \| `"INTERMEDIATE"` \| `"PREMIUM"` \| `"LUXURY"` \| `"CONVERTIBLE"` \| `"COMPACT_SUV"` \| `"INTERMEDIATE_SUV"` \| `"PREMIUM_SUV"` \| `"LUXURY_SUV"` \| `"MINI_VAN"` \| `"PASSENGER_VAN"` \| `"PICKUP_TRUCK"` \| `"HYBRID"` \| `"ELECTRIC"` \| `"MINI"` \| `"STANDARD"` \| `"FULL_SIZE"` \| `"SUV"` \| `"SPORTS"` \| `"SPECIAL"` \| `"RECREATIONAL_VEHICLE"`; `display_name`: `string`; \}; `reservation_details`: \{ `confirmation_code?`: `string` \| `null`; `drop_off`: \{ `location`: \{ `address_line_1?`: `string` \| `null`; `address_line_2?`: `string` \| `null`; `administrative_area?`: `string` \| `null`; `city?`: `string` \| `null`; `coordinates?`: \{ `latitude`: `number`; `longitude`: `number`; \}; `country?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `timezone?`: `string` \| `null`; \}; `time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; \}; `pickup`: \{ `location`: \{ `address_line_1?`: `string` \| `null`; `address_line_2?`: `string` \| `null`; `administrative_area?`: `string` \| `null`; `city?`: `string` \| `null`; `coordinates?`: \{ `latitude`: `number`; `longitude`: `number`; \}; `country?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `timezone?`: `string` \| `null`; \}; `time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; \}; `rental_company?`: `string` \| `null`; \}; `type`: `"CAR_RENTAL"`; \} \| \{ `lodging_details`: \{ `brand_name?`: `string` \| `null`; `chain_name?`: `string` \| `null`; `contact_information?`: \{ `email?`: `string` \| `null`; `fax?`: `string` \| `null`; `phone?`: `string` \| `null`; \}; `display_name`: `string`; `location?`: \{ `address_line_1?`: `string` \| `null`; `address_line_2?`: `string` \| `null`; `administrative_area?`: `string` \| `null`; `city?`: `string` \| `null`; `coordinates?`: \{ `latitude`: `number`; `longitude`: `number`; \}; `country?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `timezone?`: `string` \| `null`; \}; `star_rating?`: `number` \| `null`; \}; `reservation_details`: \{ `check_in_time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; `checkout_time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; `confirmation_code?`: `string` \| `null`; `room?`: \{ `bed_count?`: `number` \| `null`; `bed_type?`: `string` \| `null`; `description?`: `string` \| `null`; `display_name?`: `string` \| `null`; \}; \}; `type`: `"LODGING"`; \} \| \{ `journeys`: `object`[]; `type`: `"RAIL"`; \}; `created_at`: `string`; `id`: `string`; `source`: `"BREX_TRAVEL"` \| `"EXTERNAL"`; `status`: `"PROCESSING"` \| `"CANCELED"` \| `"REFUNDED"` \| `"IN_PROGRESS"` \| `"APPROVAL_DENIED"` \| `"PENDING"` \| `"CONFIRMED"` \| `"HOLD"` \| `"COMPLETED"` \| `"VOIDED"` \| `"UNCONFIRMED"` \| `"AIRLINE_CONTROL"` \| `"PAYMENT_DECLINED"` \| `"SCHEDULE_CHANGE"` \| `"APPROVAL_REQUESTED"` \| `"CANCELLATION_IN_PROGRESS"`; `trip_id`: `string`; `type`: `"CAR_RENTAL"` \| `"LODGING"` \| `"AIR"` \| `"RAIL"`; `updated_at`: `string`; `version`: `number`; \}\>

Defined in: [src/travel/client.gen.ts:36](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/travel/client.gen.ts#L36)

Get booking

Retrieves a booking by trip and booking ID.

`GET /v1/trips/{trip_id}/bookings/{booking_id}` — requires OAuth scope: `travel.trips`, `travel.trips.readonly`

#### Parameters

##### tripId

`string`

##### bookingId

`string`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

`Promise`\<\{ `booking_data`: \{ `journeys`: `object`[]; `known_traveler_number?`: \{ `document_number`: `string`; `issuing_country`: `string`; \}; `redress_number?`: \{ `document_number`: `string`; `issuing_country`: `string`; \}; `tickets`: `object`[]; `type`: `"AIR"`; \} \| \{ `car_details`: \{ `car_class?`: `"OTHER"` \| `"ECONOMY"` \| `"COMPACT"` \| `"INTERMEDIATE"` \| `"PREMIUM"` \| `"LUXURY"` \| `"CONVERTIBLE"` \| `"COMPACT_SUV"` \| `"INTERMEDIATE_SUV"` \| `"PREMIUM_SUV"` \| `"LUXURY_SUV"` \| `"MINI_VAN"` \| `"PASSENGER_VAN"` \| `"PICKUP_TRUCK"` \| `"HYBRID"` \| `"ELECTRIC"` \| `"MINI"` \| `"STANDARD"` \| `"FULL_SIZE"` \| `"SUV"` \| `"SPORTS"` \| `"SPECIAL"` \| `"RECREATIONAL_VEHICLE"`; `display_name`: `string`; \}; `reservation_details`: \{ `confirmation_code?`: `string` \| `null`; `drop_off`: \{ `location`: \{ `address_line_1?`: `string` \| `null`; `address_line_2?`: `string` \| `null`; `administrative_area?`: `string` \| `null`; `city?`: `string` \| `null`; `coordinates?`: \{ `latitude`: `number`; `longitude`: `number`; \}; `country?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `timezone?`: `string` \| `null`; \}; `time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; \}; `pickup`: \{ `location`: \{ `address_line_1?`: `string` \| `null`; `address_line_2?`: `string` \| `null`; `administrative_area?`: `string` \| `null`; `city?`: `string` \| `null`; `coordinates?`: \{ `latitude`: `number`; `longitude`: `number`; \}; `country?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `timezone?`: `string` \| `null`; \}; `time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; \}; `rental_company?`: `string` \| `null`; \}; `type`: `"CAR_RENTAL"`; \} \| \{ `lodging_details`: \{ `brand_name?`: `string` \| `null`; `chain_name?`: `string` \| `null`; `contact_information?`: \{ `email?`: `string` \| `null`; `fax?`: `string` \| `null`; `phone?`: `string` \| `null`; \}; `display_name`: `string`; `location?`: \{ `address_line_1?`: `string` \| `null`; `address_line_2?`: `string` \| `null`; `administrative_area?`: `string` \| `null`; `city?`: `string` \| `null`; `coordinates?`: \{ `latitude`: `number`; `longitude`: `number`; \}; `country?`: `string` \| `null`; `postal_code?`: `string` \| `null`; `timezone?`: `string` \| `null`; \}; `star_rating?`: `number` \| `null`; \}; `reservation_details`: \{ `check_in_time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; `checkout_time`: \{ `local_time`: `string`; `timestamp?`: `string` \| `null`; \}; `confirmation_code?`: `string` \| `null`; `room?`: \{ `bed_count?`: `number` \| `null`; `bed_type?`: `string` \| `null`; `description?`: `string` \| `null`; `display_name?`: `string` \| `null`; \}; \}; `type`: `"LODGING"`; \} \| \{ `journeys`: `object`[]; `type`: `"RAIL"`; \}; `created_at`: `string`; `id`: `string`; `source`: `"BREX_TRAVEL"` \| `"EXTERNAL"`; `status`: `"PROCESSING"` \| `"CANCELED"` \| `"REFUNDED"` \| `"IN_PROGRESS"` \| `"APPROVAL_DENIED"` \| `"PENDING"` \| `"CONFIRMED"` \| `"HOLD"` \| `"COMPLETED"` \| `"VOIDED"` \| `"UNCONFIRMED"` \| `"AIRLINE_CONTROL"` \| `"PAYMENT_DECLINED"` \| `"SCHEDULE_CHANGE"` \| `"APPROVAL_REQUESTED"` \| `"CANCELLATION_IN_PROGRESS"`; `trip_id`: `string`; `type`: `"CAR_RENTAL"` \| `"LODGING"` \| `"AIR"` \| `"RAIL"`; `updated_at`: `string`; `version`: `number`; \}\>

***

### list()

> **list**(`query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/travel/client.gen.ts:60](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/travel/client.gen.ts#L60)

List trips

Lists trips according to the filters passed in the query string.

`GET /v1/trips` — requires OAuth scope: `travel.trips`, `travel.trips.readonly`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### query?

###### cursor?

`string` \| `null`

###### last_updated_after?

`string` \| `null`

###### limit?

`number` \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

***

### listBookings()

> **listBookings**(`tripId`, `query?`, `options?`): [`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>

Defined in: [src/travel/client.gen.ts:77](https://github.com/slingshot/brex/blob/9dff46b5d5637a0dd072bca56d02d8a0f4425312/src/travel/client.gen.ts#L77)

List trip bookings

Lists the bookings within a trip.

`GET /v1/trips/{trip_id}/bookings` — requires OAuth scope: `travel.trips`, `travel.trips.readonly`
Await for a single page, or `for await` to iterate items across all pages.

#### Parameters

##### tripId

`string`

##### query?

###### cursor?

`string` \| `null`

###### limit?

`number` \| `null`

##### options?

[`RequestOptions`](/brex/api/index/interfaces/requestoptions/)

#### Returns

[`PagePromise`](/brex/api/index/classes/pagepromise/)\<\{ `items`: `object`[]; `next_cursor?`: `string` \| `null`; \}\>