---
updatedAt: 2026-09-23T20:14:42.000Z
agentTools:
  projectIndex: https://mediroutes-api.readme.io/llms.txt
---

# Get Trips For a Rider

Get an array of trips/rides and their details for a single rider/passenger/patient (identified by their external rider id / client code) within a date range. The date range must be 7 days or less.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "version": "V1",
    "title": "MediroutesAPI V1"
  },
  "paths": {
    "/api/v{version}/rides/getTripsByRiderId": {
      "get": {
        "tags": [
          "Rides"
        ],
        "summary": "Get Trips For a Rider",
        "description": "Get an array of trips/rides and their details for a single rider/passenger/patient (identified by their external rider id / client code) within a date range. The date range must be 7 days or less.",
        "operationId": "get-tripsbyriderid",
        "parameters": [
          {
            "name": "api_key",
            "in": "query",
            "description": "",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "rider_id",
            "in": "query",
            "description": "",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "start_date",
            "in": "query",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "end_date",
            "in": "query",
            "description": "",
            "required": true,
            "schema": {
              "type": "string",
              "format": "date-time"
            }
          },
          {
            "name": "version",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "Authorization",
            "in": "header",
            "description": "access token",
            "required": false,
            "schema": {
              "type": "string"
            }
          }
        ],
        "responses": {
          "200": {
            "description": "Trips",
            "content": {
              "application/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripModel"
                  }
                }
              },
              "text/json": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripModel"
                  }
                }
              },
              "application/xml": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripModel"
                  }
                }
              },
              "text/xml": {
                "schema": {
                  "type": "array",
                  "items": {
                    "$ref": "#/components/schemas/TripModel"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or unaligned data. Error message will be returned with response."
          },
          "403": {
            "description": "The api key used does not have access to this resource."
          }
        },
        "x-ai-description": "Returns all trips for ONE rider (identified by their external rider id) across a date range of 7 days or less, within the api_key's funding-source scope. The rider filter is applied at the data layer. Responds 400 when rider_id or a date is missing, the start date is after the end date, or the range exceeds 7 days.",
        "x-ai-when-to-use": "The user wants a specific rider's trips over several days - their recent trip history or upcoming schedule. For a whole day's trips across all riders use GET rides/getRidesByDate; for a single trip use GET rides/.",
        "x-ai-side-effects": "read-only",
        "x-ai-returns": "Array of TripModels for the rider, each with external trip id, TripGuid, rider, addresses, times, and status - ids feed the status, cancel, and detail endpoints.",
        "x-ai-required-permission": "tripManagement",
        "x-ai-display": {
          "title": "Trips for Rider {rider_id}",
          "key": "trip_guid",
          "columns": [
            {
              "field": "rider.last_name",
              "header": "Last Name"
            },
            {
              "field": "rider.first_name",
              "header": "First Name"
            },
            {
              "field": "status",
              "header": "Status"
            },
            {
              "field": "pickup.pickup_time",
              "header": "Pickup"
            },
            {
              "field": "dropoff.appt_time",
              "header": "Appointment"
            },
            {
              "field": "pickup.complete_address",
              "header": "Pickup Address"
            },
            {
              "field": "dropoff.complete_address",
              "header": "Dropoff Address"
            },
            {
              "field": "space_type",
              "header": "Space Type"
            },
            {
              "field": "run_name",
              "header": "Run"
            },
            {
              "field": "funding_source_name",
              "header": "Funding Source"
            },
            {
              "field": "phone",
              "header": "Phone"
            },
            {
              "field": "trip_cost",
              "header": "Charge"
            }
          ]
        },
        "x-ai-inputs": [
          {
            "name": "rider_id",
            "label": "Rider Client Code",
            "control": "text"
          }
        ]
      }
    }
  },
  "servers": [
    {
      "url": "https://api.mediroutes.com"
    }
  ],
  "components": {
    "schemas": {
      "RiderResponseModel": {
        "required": [
          "rider_id",
          "first_name",
          "last_name",
          "space_type"
        ],
        "type": "object",
        "properties": {
          "mediroutes_rider_id": {
            "format": "int32",
            "description": "The Internal id of Mediroutes Rider, this Id is unique per Transportation provider",
            "type": "integer"
          },
          "funding_source_id": {
            "format": "int32",
            "description": "The ID of the Funding Source of the Customer",
            "type": "integer"
          },
          "funding_source_name": {
            "description": "The Name of the Funding Source of the Customer",
            "type": "string"
          },
          "tp_api_key": {
            "description": "The Transportation provider API Key",
            "type": "string"
          },
          "rider_id": {
            "description": "The unique id of the Customer",
            "type": "string"
          },
          "first_name": {
            "description": "The First Name of the Customer",
            "type": "string"
          },
          "last_name": {
            "description": "The Last Name of the Customer",
            "type": "string"
          },
          "middle_name": {
            "description": "The Middle Name of the Customer",
            "type": "string"
          },
          "address": {
            "$ref": "#/components/schemas/Address"
          },
          "phone": {
            "description": "The Phone Number of the customer",
            "type": "string"
          },
          "space_type": {
            "description": "The Space Type of the Customer",
            "type": "string"
          },
          "home_phone": {
            "description": "The Home phone number of the customer",
            "type": "string"
          },
          "mobile_phone": {
            "description": "The Mobile phone number of the customer",
            "type": "string"
          },
          "icd_10_codes": {
            "description": "The ICD10Code of the customer",
            "type": "string"
          },
          "date_of_birth": {
            "description": "The DateOfBirth of the Customer",
            "type": "string"
          },
          "is_male": {
            "description": "Is Male gender",
            "type": "boolean"
          },
          "is_Female": {
            "description": "Is Female gender",
            "type": "boolean"
          },
          "comments": {
            "description": "Comments for the rider",
            "type": "string"
          },
          "private_comments": {
            "description": "Private comments for the rider",
            "type": "string"
          },
          "email": {
            "description": "Email for rider",
            "type": "string"
          }
        }
      },
      "Address": {
        "type": "object",
        "properties": {
          "location_name": {
            "type": "string"
          },
          "address1": {
            "type": "string"
          },
          "address2": {
            "type": "string"
          },
          "city": {
            "type": "string"
          },
          "state": {
            "type": "string"
          },
          "zip": {
            "type": "string"
          },
          "longitude": {
            "format": "double",
            "type": "number"
          },
          "latitude": {
            "format": "double",
            "type": "number"
          }
        }
      },
      "Event": {
        "type": "object",
        "properties": {
          "event_name": {
            "type": "string"
          },
          "event_comment": {
            "type": "string"
          },
          "complete_address": {
            "type": "string"
          },
          "event_location": {
            "$ref": "#/components/schemas/Address"
          },
          "appt_time": {
            "format": "date-time",
            "type": "string"
          },
          "pickup_time": {
            "format": "date-time",
            "type": "string"
          },
          "phone_number": {
            "type": "string"
          },
          "service_id": {
            "format": "int32",
            "type": "integer"
          },
          "odometer": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "AdditionalPassenger": {
        "type": "object",
        "properties": {
          "space_type": {
            "type": "string"
          },
          "count": {
            "format": "int32",
            "type": "integer"
          }
        }
      },
      "TripModel": {
        "type": "object",
        "properties": {
          "tp_api_key": {
            "type": "string"
          },
          "mediroutes_trip_id": {
            "format": "int32",
            "type": "integer"
          },
          "trip_id": {
            "type": "string"
          },
          "trip_guid": {
            "format": "uuid",
            "type": "string",
            "example": "00000000-0000-0000-0000-000000000000"
          },
          "rider": {
            "$ref": "#/components/schemas/RiderResponseModel"
          },
          "pickup": {
            "$ref": "#/components/schemas/Event"
          },
          "dropoff": {
            "$ref": "#/components/schemas/Event"
          },
          "funding_source_id": {
            "format": "int32",
            "type": "integer"
          },
          "funding_source_name": {
            "type": "string"
          },
          "funding_source_account": {
            "type": "string"
          },
          "space_type": {
            "type": "string"
          },
          "billable_distance": {
            "format": "double",
            "type": "number"
          },
          "trip_cost": {
            "format": "double",
            "type": "number"
          },
          "phone": {
            "type": "string"
          },
          "trip_type": {
            "format": "int32",
            "enum": [
              0,
              1,
              2,
              3
            ],
            "type": "integer"
          },
          "additional_passengers": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/AdditionalPassenger"
            }
          },
          "caller": {
            "type": "string"
          },
          "run_id": {
            "type": "string"
          },
          "run_name": {
            "type": "string"
          },
          "created_date": {
            "format": "date-time",
            "type": "string"
          },
          "status": {
            "type": "string"
          },
          "vehicle_id": {
            "format": "int32",
            "type": "integer"
          },
          "will_call_activation_time": {
            "format": "date-time",
            "type": "string"
          },
          "cancellation_reason": {
            "type": "string"
          },
          "driver_noshow_reason": {
            "type": "string"
          }
        }
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```