Skip to content

Brex: List trips

Brex travel.travelListTrips: arguments, response, policy and SDK examples.

← Travel operations · Get started

Operation brex.travel_listtrips

Provider route: GET /v1/trips. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/brex with npm, or alter-sdk-brex with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { BrexIntegration } from "@alter-ai/brex";
async function execute(input: Parameters<BrexIntegration["travel"]["travelListTrips"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new BrexIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.travel.travelListTrips(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_brex import BrexIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = BrexIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.travel.travel_list_trips(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
queryobjectOptionalAdditional keys: not allowed
query.cursorJSONOptional
query.cursor (anyOf 1)stringAlternative
query.cursor (anyOf 2)nullAlternative
query.limitJSONOptional
query.limit (anyOf 1)integerAlternativeFormat: int64
query.limit (anyOf 2)nullAlternative
query.last_updated_afterJSONOptional
query.last_updated_after (anyOf 1)stringAlternativeFormat: date-time
query.last_updated_after (anyOf 2)nullAlternative
query.load_custom_fieldsJSONOptional
query.load_custom_fields (anyOf 1)booleanAlternative
query.load_custom_fields (anyOf 2)nullAlternative

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand List trips — response body

Referenced models: List trips — response body

20 more schemas are linked from the tables above, on the schema pages.

List trips — response body
FieldTypePresenceDescription and constraints
$objectRoot
itemsarrayRequired within parent
items[]ModelEach itemExpand Get trip — response body
next_cursorJSONOptional
next_cursor (anyOf 1)stringAlternative
next_cursor (anyOf 2)nullAlternative

Referenced models: Get trip — response body

Get trip — response body
FieldTypePresenceDescription and constraints
$objectRootA trip representation.
billable_atJSONOptional
billable_at (anyOf 1)stringAlternativeThe time when the trip became billable. If absent, the trip is currently not billable.
Format: date-time
billable_at (anyOf 2)nullAlternative
booker_user_idstringRequired within parentThe ID of the user who booked the trip. If the trip was created on copilot mode, this will be the ID of the user on behalf of whom the trip was booked.
created_atstringRequired within parentThe time when the trip was created.
Format: date-time
custom_fieldsJSONOptional
custom_fields (anyOf 1)arrayAlternativeCustom field values associated with this resource.
custom_fields (anyOf 1)[]ModelEach itemExpand Get trip — response body — custom fields Custom field values associated with this resource item
custom_fields (anyOf 2)nullAlternative
ends_atJSONOptional
ends_at (anyOf 1)stringAlternativeThe time when the last booking in the trip ends.
Format: date-time
ends_at (anyOf 2)nullAlternative
idstringRequired within parentThe ID of the trip.
nameJSONOptional
name (anyOf 1)stringAlternativeThe name of the trip as seen in the dashboard.
Maximum length: 100
name (anyOf 2)nullAlternative
starts_atJSONOptional
starts_at (anyOf 1)stringAlternativeThe time when the first booking in the trip starts.
Format: date-time
starts_at (anyOf 2)nullAlternative
statusJSONRequired within parent
status (allOf 1)stringAll variants applyThe current status of a trip.
Known values: PENDING, UPCOMING, IN_PROGRESS, COMPLETED, CANCELED, REFUNDED, VOIDED, DRAFT, DELETED, PROCESSING, UNCONFIRMED, AIRLINE_CONTROL, PAYMENT_DECLINED, SCHEDULE_CHANGE, HOLD, APPROVAL_REQUESTED, APPROVAL_DENIED, CANCELLATION_IN_PROGRESS
status (allOf 2)JSONAll variants applyThe current status of the trip.
travelerJSONOptional
traveler (anyOf 1)JSONAlternative
traveler (anyOf 1) (allOf 1)ModelAll variants applyExpand Get trip — response body — traveler / type: EMPLOYEE, GUEST type: EMPLOYEE, GUEST
traveler (anyOf 1) (allOf 2)JSONAll variants applyInformation on the person who will be traveling.
traveler (anyOf 2)nullAlternative
trip_referenceJSONOptional
trip_reference (anyOf 1)stringAlternativeThe 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.
trip_reference (anyOf 2)nullAlternative
updated_atstringRequired within parentThe time when the latest trip update happened.
Format: date-time
versionJSONRequired within parent
version (anyOf 1)integerAlternativeThe current version of the trip.
Format: int32
Minimum: 1
version (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Get trip — response body — custom fields Custom field values associated with this resource item, Get trip — response body — traveler / type: EMPLOYEE, GUEST type: EMPLOYEE, GUEST

Get trip — response body — traveler / type: EMPLOYEE, GUEST type: EMPLOYEE, GUEST
FieldTypePresenceDescription and constraints
$objectRootInformation on the person who will be traveling.
guest_emailJSONOptional
guest_email (anyOf 1)stringAlternativeIf the traveler is a guest, this is their email.
guest_email (anyOf 2)nullAlternative
nameJSONOptional
name (anyOf 1)JSONAlternative
name (anyOf 1) (allOf 1)ModelAll variants applyExpand Get trip — response body — traveler / type: EMPLOYEE, GUEST type: EMPLOYEE, GUEST name The name of the traveler The name of the traveler
name (anyOf 1) (allOf 2)JSONAll variants apply
name (anyOf 2)nullAlternative
typestringRequired within parentWhether the trip is for an employee or a guest.
Known values: EMPLOYEE, GUEST
user_idJSONOptional
user_id (anyOf 1)stringAlternativeIf the traveler is an employee, this is their user ID.
user_id (anyOf 2)nullAlternative

Referenced models: Get trip — response body — traveler / type: EMPLOYEE, GUEST type: EMPLOYEE, GUEST name The name of the traveler The name of the traveler

Get trip — response body — custom fields Custom field values associated with this resource item value The value of the custom field Boolean list value
FieldTypePresenceDescription and constraints
$objectRootBoolean list value for a custom field
dataJSONOptional
data (anyOf 1)arrayAlternative
data (anyOf 1)[]booleanEach itemThe data of the custom field.
data (anyOf 2)nullAlternative
data_typeJSONRequired within parent
data_type (allOf 1)stringAll variants applyThe type of the custom field data.
Known values: STRING, DECIMAL, BOOLEAN, ENUM, TIMESTAMP, DATE, MONEY, OPTION_STRING
data_type (allOf 2)JSONAll variants applyThe type of the custom field data.
$ (allOf 1)ModelAll variants applyExpand Get trip — response body — custom fields Custom field values associated with this resource item value The value of the custom field Date list value Base class for custom field values
$ (allOf 2)ModelAll variants applyExpand Get trip — response body — custom fields Custom field values associated with this resource item value Base class for custom field values

Referenced models: Get trip — response body — custom fields Custom field values associated with this resource item value Base class for custom field values, Get trip — response body — custom fields Custom field values associated with this resource item value The value of the custom field Date list value Base class for custom field values

Get trip — response body — custom fields Custom field values associated with this resource item value The value of the custom field Boolean value
FieldTypePresenceDescription and constraints
$objectRootBoolean value for a custom field
dataJSONOptional
data (anyOf 1)booleanAlternativeThe data of the custom field.
data (anyOf 2)nullAlternative
data_typeJSONRequired within parent
data_type (allOf 1)stringAll variants applyThe type of the custom field data.
Known values: STRING, DECIMAL, BOOLEAN, ENUM, TIMESTAMP, DATE, MONEY, OPTION_STRING
data_type (allOf 2)JSONAll variants applyThe type of the custom field data.
$ (allOf 1)ModelAll variants applyExpand Get trip — response body — custom fields Custom field values associated with this resource item value The value of the custom field Date value Base class for custom field values
$ (allOf 2)ModelAll variants applyExpand Get trip — response body — custom fields Custom field values associated with this resource item value Base class for custom field values

Referenced models: Get trip — response body — custom fields Custom field values associated with this resource item value Base class for custom field values, Get trip — response body — custom fields Custom field values associated with this resource item value The value of the custom field Date value Base class for custom field values

Get trip — response body — custom fields Custom field values associated with this resource item value Base class for custom field values
FieldTypePresenceDescription and constraints
$objectRootBase class for custom field values
data_typeJSONRequired within parent
data_type (allOf 1)stringAll variants applyThe type of the custom field data.
Known values: STRING, DECIMAL, BOOLEAN, ENUM, TIMESTAMP, DATE, MONEY, OPTION_STRING
data_type (allOf 2)JSONAll variants applyThe type of the custom field data.
value_typeJSONRequired within parent
value_type (allOf 1)stringAll variants applyThe type of the custom field value.
Known values: SINGLE_VALUE, LIST
value_type (allOf 2)JSONAll variants applyThe type of the custom field value.

SDK function policy ID: brex.travel_listtrips. Catalog operation: travel:listTrips. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["travel.trips", "travel.trips.readonly"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.