Download OpenAPI specification:Download
Brex Travel External API.
Lists trips according to the filters passed in the query string.
A page with a list of trips.
Bad request
Unauthorized
Forbidden
Internal server error
{- "next_cursor": "string",
- "items": [
- {
- "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": {
- "type": "EMPLOYEE",
- "name": {
- "first_name": "John",
- "middle_name": "Paul",
- "last_name": "Doe",
- "suffix": "Jr."
}, - "guest_email": "guest@gmail.com",
- "user_id": "cuuser_cky0xs54b004h01pidi0pcuz1"
}, - "version": 2,
- "billable_at": "2017-12-27T15:42:30Z",
- "starts_at": "2017-12-27T15:42:30Z",
- "ends_at": "2017-12-27T15:42:30Z"
}
]
}
Retrieves a trip by ID.
The trip that was retrieved.
Bad request
Unauthorized
Forbidden
Not Found
Internal server error
{- "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": {
- "type": "EMPLOYEE",
- "name": {
- "first_name": "John",
- "middle_name": "Paul",
- "last_name": "Doe",
- "suffix": "Jr."
}, - "guest_email": "guest@gmail.com",
- "user_id": "cuuser_cky0xs54b004h01pidi0pcuz1"
}, - "version": 2,
- "billable_at": "2017-12-27T15:42:30Z",
- "starts_at": "2017-12-27T15:42:30Z",
- "ends_at": "2017-12-27T15:42:30Z"
}
Lists the bookings within a trip.
A page with a list of bookings.
Bad request
Unauthorized
Forbidden
Not Found
Internal server error
{- "next_cursor": "string",
- "items": [
- {
- "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": null,
- "destination": null,
- "departure_time": null,
- "arrival_time": null,
- "duration": null,
- "confirmation_code": null,
- "cabin_class": null,
- "marketing_flight": null,
- "operating_flight": null,
- "seat": null
}
], - "status": "string",
- "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"
}, - "type": "string"
}
}
]
}
Retrieves a booking by trip and booking ID.
The booking that was retrieved.
Bad request
Unauthorized
Forbidden
Not Found
Internal server error
{- "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": null,
- "administrative_area": null,
- "city": null,
- "postal_code": null,
- "address_line_1": null,
- "address_line_2": null,
- "coordinates": null,
- "timezone": null
}
}, - "destination": {
- "airport_code": "GIG",
- "terminal": "T2",
- "gate": "B13",
- "airport_location": {
- "country": null,
- "administrative_area": null,
- "city": null,
- "postal_code": null,
- "address_line_1": null,
- "address_line_2": null,
- "coordinates": null,
- "timezone": null
}
}, - "departure_time": {
- "local_time": "2019-08-24T14:15:22Z",
- "timestamp": "2017-12-27T15:42:30Z"
}, - "arrival_time": {
- "local_time": "2019-08-24T14:15:22Z",
- "timestamp": "2017-12-27T15:42:30Z"
}, - "duration": "PT4h20M",
- "confirmation_code": "PWZRTQ",
- "cabin_class": "string",
- "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": "string"
}
}
], - "status": "string",
- "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"
}, - "type": "string"
}
}