Skip to content

Commit 5f695ac

Browse files
committed
Reorganizing data types and passenger services
1 parent d5337ea commit 5f695ac

2 files changed

Lines changed: 22 additions & 27 deletions

File tree

data-types.md

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
- [Stops](#stops)
1212
- [Stop Status](#stop-status)
1313
- [Trips](#trips)
14-
- [Trip Attributes](#trip-attributes)
15-
- [Reservation Data](#reservation-data)
16-
- [Reservation Type](#reservation-type)
17-
- [Reservation Method](#reservation-method)
1814

1915
## Vehicles
2016

@@ -199,8 +195,12 @@ A Trip is defined by the following structure:
199195
| Field | Type | Required/Optional | Comments |
200196
| ----- | ---- | ----------------- | -------- |
201197
| `provider_id` | UUID | Required | A UUID for the Provider, unique within MDS. See MDS [provider list](/providers.csv). |
198+
| `provider_name` | String | Required | The public-facing name of the Provider |
202199
| `data_provider_id` | UUID | Optional | If different than `provider_id`, a UUID for the data solution provider managing this data endpoint. See MDS [provider list](/providers.csv) which includes both service operators and data solution providers. |
203200
| `device_id` | UUID | Required | A unique device ID in UUID format |
201+
`vehicle_id` | String | Required | The Vehicle Identification Number visible on the vehicle itself |
202+
| `vehicle_type` | Enum | Required | See [vehicle types][vehicle-types] table |
203+
| `propulsion_types` | Enum[] | Required | Array of [propulsion types][propulsion-types]; allows multiple values |
204204
| `journey_id` | UUID | Optional | A unique [journey ID](/modes#journey-id) for associating collections of trips for its [mode] |
205205
| `trip_type` | Enum | Optional | **[Mode](/modes#list-of-supported-modes) Specific**. The [trip type](/modes#trip-type) describing the purpose of a trip segment |
206206
| `trip_id` | UUID | Required | A unique ID for each trip |
@@ -213,29 +213,18 @@ A Trip is defined by the following structure:
213213
| `duration` | Integer | Required | Time, in Seconds |
214214
| `distance` | Integer | Required | Trip Distance, in Meters |
215215
| `publication_time` | [Timestamp][ts] | Optional | Date/time that trip became available through the trips endpoint |
216-
| `reservation_attributes` | [Reservation](#reservation-data) | Required if available | Reservation details, if a reservation initiated this trip
217-
| `accessibility_options` | Enum[] | Optional | The **union** of any accessibility options requested, and used. E.g. if the passenger requests a vehicle with `wheelchair_accessible`, but doesn’t utilize the features during the trip, the trip payload will include `accessibility_options: ['wheelchair_accessible']`. See [accessibility-options][accessibility-options] |
218-
219-
[Top][toc]
220-
221-
### Trip Attributes
222-
223-
Examples of mode-specific `trip_attributes`:
224-
225-
| Field | Type | Required/Optional | Comments |
226-
| ----- | -------- | ----------------- | ----- |
227-
| `dispatch_time` | [Timestamp][ts] | Conditionally Required | Time the vehicle was dispatched to the customer (required if trip was dispatched) |
228-
| `quoted_trip_start_time` | [Timestamp][ts] | Required | Time the trip was estimated or scheduled to start, that was provided to the passenger |
229-
| `requested_trip_start_location` | [GPS](gps) | Conditionally Required | Location where the customer requested the trip to start (required if this is within jurisdictional boundaries) |
230-
| `cancellation_reason` | String | Conditionally Required | The reason why a *driver* cancelled a reservation. (required if a driver cancelled a trip, and a `driver_cancellation` event_type was part of the trip) |
231-
| `accessibility_options` | Enum[] | Optional | The **union** of any accessibility options requested, and used. E.g. if the passenger requests a vehicle with `wheelchair_accessible`, but doesn’t utilize the features during the trip, the trip payload will include `accessibility_options: ['wheelchair_accessible']`. See [accessibility-options][accessibility-options] |
232-
| `parking_verification_url` | String | Optional | A URL to a photo (or other evidence) of proper vehicle parking |
216+
| `accessibility_options` | Enum[] | Optional | **[Mode](/modes#list-of-supported-modes) Specific**. [Accessibility options](/modes#accessibility-options) given as an array of enumerated values. The **union** of any accessibility options requested, and used. E.g. if the passenger requests a vehicle with `wheelchair_accessible`, but doesn’t utilize the features during the trip, the trip payload will include `accessibility_options: ['wheelchair_accessible']`. |
217+
| `parking_verification_url` | URL | Optional | A URL to a photo (or other evidence) of proper vehicle parking |
218+
| `standard_cost` | Integer | Optional | The cost, in the currency defined in `currency`, that it would cost to perform that trip in the standard operation of the System (see [Costs & Currencies][costs-and-currencies]) |
219+
| `actual_cost` | Integer | Optional | The actual cost, in the currency defined in `currency`, paid by the customer of the *mobility as a service* provider (see [Costs & Currencies][costs-and-currencies]) |
220+
| `currency` | String | Optional, USD cents is implied if null.| An [ISO 4217 Alphabetic Currency Code][iso4217] representing the currency of the payee (see [Costs & Currencies][costs-and-currencies]) |
233221

234222
[Top][toc]
235223

236224
[agency]: /agency/README.md
237225
[accessibility-options]: /modes/README.md#accessibility-options
238226
[decimal-degrees]: https://en.wikipedia.org/wiki/Decimal_degrees
227+
[costs-and-currencies]: /general-information.md#costs-and-currencies
239228
[event-times]: /general-information.md#event-times
240229
[hdop]: https://en.wikipedia.org/wiki/Dilution_of_precision_(navigation)
241230
[gbfs-station-info]: https://github.com/NABSA/gbfs/blob/master/gbfs.md#station_informationjson

modes/passenger-services.md

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ See the [modes overview](/modes) for how the mode specific information below app
88

99
## Taxi vs. TNC implementation differences
1010

11-
Taxis typically require explicit tracking of maintenance while TNCs typically do not. Public agency regulations, legal authority, differ based on local, state, and federal laws and jursidictions between taxis, TNCs, CTAs, PHV, etc.
11+
Taxis typically require explicit tracking of maintenance while TNCs typically do not. Public agency regulations, legal authority, differ based on local, state, and federal laws and jurisdictions between taxis, TNCs, CTAs, PHV, etc.
1212

1313
## Table of Contents
1414

@@ -94,14 +94,18 @@ The `trip_attributes` array **may** have the following key value pairs:
9494
- `hail_type` (enumerated, required): `street_hail`, `phone_dispatch`, `phone`, `text`, `app`
9595
- `app_name` (text, optional): name of the app used to reserve the trip which could be provider's app or 3rd party app
9696
- `passenger_count` (integer, required): unique count of passengers transported during trip duration
97-
- `request_time` (timestamp, required): when the passenger requested the trip
97+
- `requested_time` (timestamp, required): when the passenger requested the trip
98+
- `requested_trip_start_location` ([GPS](gps), Conditionally Required): Location where the customer requested the trip to start (required if this is within jurisdictional boundaries)
99+
- `quoted_trip_start_time` ([Timestamp][ts], Required): Time the trip was estimated or scheduled to start, that was provided to the passenger
100+
- `dispatch_time` ([Timestamp][ts], Conditionally Required): Time the vehicle was dispatched to the customer (required if trip was dispatched)
98101
- `trip_wait_time` (milliseconds, optional): part of the passenger trip where the vehicle was moving slow or stopped (e.g. <12mph), which is a different fare rate in some jurisdictions
99102
- `trip_fare_time` (milliseconds, optional): part of the passenger trip where the vehicle was moving more quickly (e.g. >12mph), which is a different fare rate in some jurisdictions
100103
- `pickup_address` (text, optional): street address where the trip originated from
101104
- `dropoff_address` (text, optional): street address where the trip ended
102-
- `permit_licence_number` (string, optional) - The permit licence number of the organization that dispatched the vehicle
105+
- `permit_license_number` (string, optional) - The permit license number of the organization that dispatched the vehicle
103106
- `driver_id` (string, optional): Universal identifier of a specific driver, static across operators, like a driver's license number. Could also be used as a lookup in an agency's internal driver system.
104107
- `wheelchair_transported` (boolean, optional) - was a wheelchair transported as part of this trip?
108+
- `cancellation_reason` (String, Conditionally Required): The reason why a *driver* cancelled a reservation. (required if a driver cancelled a trip, and a `driver_cancellation` event_type was part of the trip)
105109

106110
_See more available trip attributes for any mode in the [trips endpoint](/provider#trips)._
107111

@@ -113,7 +117,7 @@ The `fare_attributes` array **may** have the following key value pairs:
113117

114118
- `payment_type` (enumerated, required): `cash`, `credit_card`, `mobile`, `voucher`, `paratransit`, `no payment`, `test`
115119
- `fare_type` (enumerated, required): `meter_fare`, `upfront_pricing`, `flat_rate`. Indicator of which rate was charged.
116-
- `meter_fare_amount` (currency, conditionally required): if `upfront_pricing` is used as a `fare_type` include what the metered fare would have been if `meter_fare` would have been used. Allows cost comparison in evalutation of programs and pilots.
120+
- `meter_fare_amount` (currency, conditionally required): if `upfront_pricing` is used as a `fare_type` include what the metered fare would have been if `meter_fare` would have been used. Allows cost comparison in evaluation of programs and pilots.
117121
- `tolls` (currency, optional) - Sum of any and all tolls charged for the trip, such as bridge tolls
118122
- `base_rate` (currency, optional) - Minimum fare to be charged as soon as the trip starts.
119123
- `exit_fee` (currency, optional) - Fee to exit location, like an airport
@@ -142,7 +146,7 @@ The `vehicle_attributes` array **may** have the following key value pairs:
142146
- `color` (string, optional)
143147
- `vin` (string, optional) - the Vehicle Identification Number of the vehicle
144148
- `placard_number` (string, optional) - the registered placard number of the vehicle
145-
- `license_plate` (string, optional) - the registered vehicle license/number/registartion plate identifer on the vehicle
149+
- `license_plate` (string, optional) - the registered vehicle license/number/registration plate identifier on the vehicle
146150
- `inspection_date` (date YYYY-MM-DD, optional) - the date of the last inspection of the vehicle
147151

148152
_See more available vehicle attributes for any mode in the [vehicles endpoint](/provider#vehicles)._
@@ -232,7 +236,7 @@ This is the list of `vehicle_state` and `event_type` pairings that constitute th
232236
| `non_operational` | `non_contactable` | N/A | `comms_lost` | The vehicle has went out of comms while not operating commercially |
233237
| `on_trip` | `elsewhere` | N/A | `leave_jurisdiction` | The vehicle has left jurisdictional boundaries while on a trip |
234238
| `on_trip` | `stopped` | `stopped` | `trip_stop` | The vehicle has stopped while on a trip |
235-
| `on_trip` | `unon_contactable` | N/A | `comms_lost` | The vehicle has gone out of comms while on a trip |
239+
| `on_trip` | `non_contactable` | N/A | `comms_lost` | The vehicle has gone out of comms while on a trip |
236240
| `removed` | `non_operational` | N/A | `maintenance_end` | The vehicle has left the depot |
237241
| `removed` | `non_operational` | N/A | `recommissioned` | The vehicle has been re-added to the Provider's fleet after being previously `decommissioned` |
238242
| `removed` | `non_contactable` | N/A | `comms_lost` | The vehicle has gone out of comms while removed |
@@ -297,8 +301,10 @@ if t.any(state == ‘reserved’):
297301

298302
[MDS Home][home]
299303

304+
[gps]: /data-types.md#gps-data
300305
[home]: /README.md
301306
[modes]: /modes/README.md
302307
[toc]: #table-of-contents
308+
[ts]: /general-information.md#timestamps
303309
[vehicle-states]: /modes/vehicle_states.md
304310
[vehicle-events]: /modes/event_types.md

0 commit comments

Comments
 (0)