v1

latestOpenAPI 3.0.12026-08-0644438.5 KB
Trips

Get trip

Retrieves a trip by ID.

get/v1/trips/{trip_id}

Path parameters

trip_idstring required

Response

The trip that was retrieved.

idstring required

The ID of the trip.

created_atstring date-time required

The time when the trip was created.

updated_atstring date-time required

The time when the latest trip update happened.

namestring nullable

The name of the trip as seen in the dashboard.

booker_user_idstring required

The 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.

status'PENDING' | 'UPCOMING' | 'IN_PROGRESS' | 'COMPLETED' | 'CANCELED' | 'REFUNDED' | 'VOIDED' | 'DRAFT' | 'DELETED' | 'INVITED' | 'PROCESSING' | 'UNCONFIRMED' | 'AIRLINE_CONTROL' | 'PAYMENT_DECLINED' | 'SCHEDULE_CHANGE' | 'HOLD' | 'APPROVAL_REQUESTED' | 'APPROVAL_DENIED' | 'CANCELLATION_IN_PROGRESS' required

The current status of the trip.

versioninteger required

The current version of the trip.

billable_atstring date-time nullable

The time when the trip became billable. If absent, the trip is currently not billable.

starts_atstring date-time nullable

The time when the first booking in the trip starts.

ends_atstring date-time nullable

The time when the last booking in the trip ends.

trip_referencestring nullable

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 response

{
  "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": "UPCOMING",
  "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",
  "trip_reference": "7117228246"
}