Skip to content

Commit dcd6287

Browse files
committed
minor fixes
2 parents 209c9de + af2cd64 commit dcd6287

4 files changed

Lines changed: 114 additions & 17 deletions

File tree

general-information.md

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -219,23 +219,7 @@ Accept: application/vnd.mds+json;version=0.3
219219
> * The `agency` API must respond as if version `0.3` was requested.
220220
> * The `policy` API must respond as if version `0.4` was requested.
221221
222-
If an unsupported or invalid version is requested, the API must respond with a status of `406 Not Acceptable`. If this occurs, a client can explicitly negotiate available versions.
223-
224-
A client negotiates available versions using the `OPTIONS` method to an MDS endpoint. For example, to check if `trips` supports either version `0.2` or `0.3` with a preference for `0.2`, the client would issue the following request:
225-
226-
```http
227-
OPTIONS /trips/ HTTP/1.1
228-
Host: provider.example.com
229-
Accept: application/vnd.mds+json;version=0.2,application/vnd.mds+json;version=0.3;q=0.9
230-
```
231-
232-
The response will include the most preferred supported version in the `Content-Type` header. For example, if only `0.3` is supported:
233-
234-
```http
235-
Content-Type: application/vnd.mds+json;version=0.3
236-
```
237-
238-
The client can use the returned value verbatim as a version request in the `Accept` header.
222+
If an unsupported or invalid version is requested, the API must respond with a status of `406 Not Acceptable`.
239223

240224
[Top][toc]
241225

policy/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ The goal of this specification is to enable Agencies to create, revise, and publ
3030
- Cap allowances (e.g. "Up to 500 additional scooters are permitted near train stations")
3131
- Speed-limit restrictions (e.g. "15 mph outside of downtown, 10 mph downtown")
3232
- Idle-time and disabled-time limitations (e.g. "5 days idle while rentable, 12 hours idle while unrentable, per device")
33+
- Trip fees and subsidies (e.g. "A 25 cent fee applied when a trip ends downtown")
3334

3435
The machine-readable format allows Providers to obtain policies and compute compliance where it can be determined entirely by data obtained internally.
3536

@@ -183,6 +184,7 @@ An individual `Policy` object is defined by the following fields:
183184
| `policy_id` | UUID | Required | Unique ID of policy |
184185
| `provider_ids` | UUID[] | Optional | Providers for whom this policy is applicable; empty arrays and `null`/absent implies all Providers |
185186
| `description` | String | Required | Description of policy |
187+
| `currency` | String | Optional | An ISO 4217 Alphabetic Currency Code representing the [currency](../provider#costs--currencies) of all Rules of [type](#rule-types) `rate`.|
186188
| `start_date` | [timestamp][ts] | Required | Beginning date/time of policy enforcement |
187189
| `end_date` | [timestamp][ts] | Optional | End date/time of policy enforcement |
188190
| `published_date` | [timestamp][ts] | Required | Timestamp that the policy was published |
@@ -205,6 +207,8 @@ An individual `Rule` object is defined by the following fields:
205207
| `propulsion_types` | `propulsion_type[]` | Optional | Applicable vehicle [propulsion types][propulsion-types], default "all". |
206208
| `minimum` | integer | Optional | Minimum value, if applicable (default 0) |
207209
| `maximum` | integer | Optional | Maximum value, if applicable (default unlimited) |
210+
| `rate_amount` | integer | Optional | The amount of a rate applied when this rule applies, if applicable (default zero). A positive integer rate amount represents a fee, while a negative integer represents a subsidy. Rate amounts are given in the `currency` defined in the [Policy](#policy). |
211+
| `rate_recurrence` | enum | Optional | Recurrence of the rate (see [Rate Recurrences](#rate-recurrences)) |
208212
| `start_time` | ISO 8601 time `hh:mm:ss` | Optional | Beginning time-of-day when the rule is in effect (default 00:00:00). |
209213
| `end_time` | ISO 8601 time `hh:mm:ss` | Optional | Ending time-of-day when the rule is in effect (default 23:59:59). |
210214
| `days` | day[] | Optional | Days `["sun", "mon", "tue", "wed", "thu", "fri", "sat"]` when the rule is in effect (default all) |
@@ -218,6 +222,7 @@ An individual `Rule` object is defined by the following fields:
218222
| `count` | Fleet counts based on regions. Rule `max`/`min` refers to number of devices. |
219223
| `time` | Individual limitations on time spent in one or more vehicle-states. Rule `max`/`min` refers to increments of time in [Rule Units](#rule-units). |
220224
| `speed` | Global or local speed limits. Rule `max`/`min` refers to speed in [Rule Units](#rule-units). |
225+
| `rate` | **[Beta feature](/general-information.md#beta-features):** Yes (as of 1.0.0). Fees or subsidies based on regions and time spent in one or more vehicle-states. Rule `rate_amount` refers to the rate charged according to the [Rate Recurrence](#rate_recurrence). Agencies and Providers must agree on terms of use prior to utilizing the `rate` rule type. |
221226
| `user` | Information for users, e.g. about helmet laws. Generally can't be enforced via events and telemetry. |
222227

223228
### Rule Units
@@ -227,6 +232,7 @@ An individual `Rule` object is defined by the following fields:
227232
| `seconds` | Seconds |
228233
| `minutes` | Minutes |
229234
| `hours` | Hours |
235+
| `days` | Days |
230236
| `mph` | Miles per hour |
231237
| `kph` | Kilometers per hour |
232238

@@ -242,6 +248,15 @@ An individual `Rule` object is defined by the following fields:
242248
| `publish_date` | [timestamp][ts] | Required | Timestamp that the policy was published, i.e. made immutable |
243249
| `prev_geographies` | UUID[] | Optional | Unique IDs of prior geographies replaced by this one |
244250

251+
### Rate Recurrences
252+
253+
Rate recurrences specify when a rate is applied – either once, or periodically according to a `time_unit` specified using [Rule Units](#rule-units). A `time_unit` refers to a unit of time as measured in local time for the juristiction – a day begins at midnight local time, an hour begins at the top of the hour, etc.
254+
255+
| Name | Description |
256+
| --------- | ------------------- |
257+
| `once` | Rate is applied once to vehicles entering a matching status from a non-matching status. |
258+
| `each_time_unit` | During each `time_unit`, rate is applied once to vehicles entering or remaining in a matching status. Requires a `time_unit` to be specified using `rule_units`. |
259+
| `per_complete_time_unit` | Rate is applied once per complete `time_unit` that vehicles remain in a matching status. Requires a `time_unit` to be specified using `rule_units`. |
245260

246261
### Messages
247262

policy/examples.md

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ This file presents a series of [Policy object](./README.md#policy) examples for
88
- [Provider Cap](#provider-cap)
99
- [Idle Time](#idle-time)
1010
- [Speed Limits](#speed-limits)
11+
- [Per Trip Fees](#per-trip-fees)
12+
- [Vehicle Right of Way Fees](#vehicle-right-of-way-fees)
13+
- [Metered Parking Fees](#metered-parking-fees)
1114

1215
## Prohibited Zone
1316

@@ -219,5 +222,99 @@ This Policy sets a 15 MPH speed limit in greater LA, and a 10 MPH speed limit in
219222
}]
220223
}
221224
```
225+
[Top](#table-of-contents)
226+
227+
## Per Trip Fees
228+
This policy sets a 25 cent per-trip fee that is applied for trips that start in the municipal boundary.
229+
230+
231+
```json
232+
{
233+
"policy_id": "d2567b3c-3071-48a6-bbeb-3424721dbd12",
234+
"published_date": 1586736000000,
235+
"name": "Trip Fees",
236+
"start_date": 1586822400000,
237+
"end_date": 1587427200000,
238+
"prev_policies": null,
239+
"rules": [{
240+
"name": "City Wide Trip Fee",
241+
"rule_type": "rate",
242+
"rate_amount": 25,
243+
"rate_recurrence": "once",
244+
"geography": MUNICIPAL_BOUNDARY_GEOGRAPHY,
245+
"statuses": {
246+
"trip": ["trip_start"]
247+
}
248+
}]
249+
}
250+
```
251+
[Top](#table-of-contents)
252+
253+
## Vehicle Right of Way Fees
254+
This policy sets a Right-of-Way fee that is charged once a day for vehicles deployed in a given area. It charges a 25 cents per day for vehicles deployed downtown, and 5 cents per day for vehicles deployed in a historically underserved neighborhood. In the case where a vehicle is deployed twice in both areas in the same day, the higher fee would apply (because it appears first in the rules).
222255

256+
```json
257+
{
258+
"policy_id": "4137a47c-836a-11ea-bc55-0242ac130003",
259+
"published_date": 1586736000000,
260+
"name": "Right of Way Fees",
261+
"start_date": 1586822400000,
262+
"end_date": 1587427200000,
263+
"prev_policies": null,
264+
"rules": [
265+
{
266+
"name": "Downtown Right of Way Fee",
267+
"rule_type": "rate",
268+
"rate_amount": 25,
269+
"rate_recurrence": "each_time_unit",
270+
"rule_units": "days",
271+
"geography": DOWNTOWN_GEOGRAPHY,
272+
"statuses": {
273+
"available": ["service_start"]
274+
}
275+
},
276+
{
277+
"name": "Decreased Right of Way Fee",
278+
"rule_type": "rate",
279+
"rate_amount": 5,
280+
"rate_recurrence": "each_time_unit",
281+
"rule_units": "days",
282+
"geography": HISTORICALLY_UNDERSERVED_NEIGHBORHOOD_GEOGRAPHY,
283+
"statuses": {
284+
"available": ["service_start"]
285+
}
286+
}
287+
]
288+
}
289+
```
290+
[Top](#table-of-contents)
291+
292+
## Metered Parking Fees
293+
This policy sets a 10 cent per hour metered parking charge that is applied while a vehicle is parked in a congested area during rush hour.
294+
295+
```json
296+
{
297+
"policy_id": "6a3dd008-836a-11ea-bc55-0242ac130003",
298+
"published_date": 1586736000000,
299+
"name": "Parking Fees",
300+
"start_date": 1586822400000,
301+
"end_date": 1587427200000,
302+
"prev_policies": null,
303+
"rules": [{
304+
"name": "Downtown Peak-Hour Parking Fee",
305+
"rule_type": "rate",
306+
"rate_amount": 10,
307+
"rate_recurrence": "per_complete_time_unit",
308+
"rule_units": "hours",
309+
"geography": INNER_CITY_GEOGRAPHY,
310+
"days": ["mon","tue","wed","thu","fri"],
311+
"start_time": "7:00:00",
312+
"end_time": "8:30:00",
313+
"statuses": {
314+
"available": [],
315+
"unavailable": [],
316+
}
317+
}]
318+
}
319+
```
223320
[Top](#table-of-contents)

providers.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ Baus,638ba503-4006-4c53-bf34-cd625cc03d61,https://bausmoves.com,https://mds.bird
2222
Bolt Technology,7ea695ca-9de7-4b3b-9f3c-241b2045a1fe,https://bolt.eu,https://mds.bolt.eu,https://mds.bolt.eu/gbfs/1
2323
Grin,8a0ecfce-5fb3-451e-8069-434b79c8b01a,https://ongrin.com,https://open-data.grow.mobi/mds/,https://open-data.grow.mobi/api/v1/gbfs/
2424
Dott,0a899e3a-705a-46f2-9189-d78cc83a2db4,https://ridedott.com,https://mds.api.ridedott.com,https://gbfs.api.ridedott.com
25+
Superpedestrian,420e6e94-55a6-4946-b6b3-4398fe22e912,https://www.superpedestrian.com,https://wrangler-mds-production.herokuapp.com/mds,

0 commit comments

Comments
 (0)