latestOpenAPI 3.0.12026-08-1247158.1 KB

3392373807f9

Trips

List trips

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

get/v1/trips

Query parameters

cursorstring nullable
limitinteger nullable
last_updated_afterstring date-time nullable
load_custom_fieldsboolean nullable

Whether to load custom field values on the returned resources.

Response

A page with a list of trips.

next_cursorstring nullable

Example response

{
  "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": "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",
      "custom_fields": [
        {
          "value": {
            "data": {
              "amount": 700,
              "currency": "USD"
            }
          }
        }
      ]
    }
  ]
}