Travel API (1.0)

Download OpenAPI specification:Download

Brex Travel External API.

Trips

Endpoints for getting trip data.

List trips

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

SecurityOAuth2
Request
query Parameters
cursor
string or null
limit
integer or null <int64>
last_updated_after
string or null <date-time>
Responses
200

A page with a list of trips.

400

Bad request

401

Unauthorized

403

Forbidden

500

Internal server error

get/v1/trips
Request samples
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Get trip

Retrieves a trip by ID.

SecurityOAuth2
Request
path Parameters
trip_id
required
string
Responses
200

The trip that was retrieved.

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

get/v1/trips/{trip_id}
Request samples
Response samples
application/json
{
  • "id": "trip_cl9rh1n8g001e0j84w6fb4fd1",
  • "created_at": "2017-12-27T15:42:30Z",
  • "updated_at": "2017-12-27T15:42:30Z",
  • "name": "Trip to Rio de Janeiro",
  • "booker_user_id": "cuuser_cky0xs54b004h01pidi0pcuz1",
  • "status": "string",
  • "traveler": {
    },
  • "version": 2,
  • "billable_at": "2017-12-27T15:42:30Z",
  • "starts_at": "2017-12-27T15:42:30Z",
  • "ends_at": "2017-12-27T15:42:30Z"
}

List trip bookings

Lists the bookings within a trip.

SecurityOAuth2
Request
path Parameters
trip_id
required
string
query Parameters
cursor
string or null
limit
integer or null <int64>
Responses
200

A page with a list of bookings.

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

get/v1/trips/{trip_id}/bookings
Request samples
Response samples
application/json
{
  • "next_cursor": "string",
  • "items": [
    ]
}

Get booking

Retrieves a booking by trip and booking ID.

SecurityOAuth2
Request
path Parameters
trip_id
required
string
booking_id
required
string
Responses
200

The booking that was retrieved.

400

Bad request

401

Unauthorized

403

Forbidden

404

Not Found

500

Internal server error

get/v1/trips/{trip_id}/bookings/{booking_id}
Request samples
Response samples
application/json
{
  • "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": {
    }
}
Copyright © Brex 2019–2022. All rights reserved.