diff --git a/gbfs.md b/gbfs.md index 680b290e..51f32737 100644 --- a/gbfs.md +++ b/gbfs.md @@ -126,7 +126,8 @@ Example: `41.890169` for the Colosseum in Rome. * Longitude - WGS84 longitude in decimal degrees. The value must be greater than or equal to -180.0 and less than or equal to 180.0. Example: `12.492269` for the Colosseum in Rome. * Non-negative Integer - An integer greater than or equal to 0. -* Non-negative Float - A floating point number greater than or equal to 0. +* Non-negative Float - A 32-bit floating point number greater than or equal to 0. +* Float *(added in v2.1-RC2)* - A 32-bit floating point number. * Timezone - TZ timezone from the https://www.iana.org/time-zones. Timezone names never contain the space character but may contain an underscore. Refer to http://en.wikipedia.org/wiki/List_of_tz_zones for a list of valid values. Example: `Asia/Tokyo`, `America/Los_Angeles` or `Africa/Cairo`. * URI *(added in v1.1)* - A fully qualified URI that includes the scheme (e.g., `com.abcrental.android://`), and any special characters in the URI must be correctly escaped. See the following http://www.w3.org/Addressing/URL/4_URI_Recommentations.html for a description of how to create fully qualified URI values. Note that URIs may be URLs. @@ -468,6 +469,7 @@ Field Name | Required | Type | Defines \- `vehicle_type_id`
*(added in v2.1-RC)* | Conditionally Required | ID | The vehicle_type_id of this vehicle as described in [vehicle_types.json](#vehicle_typesjson-added-in-v21-rc). This field is required if the [vehicle_types.json](#vehicle_typesjson-added-in-v21-rc) is defined. \- `last_reported`
*(added in v2.1-RC)* | Optional | Timestamp | The last time this vehicle reported its status to the operator's backend. \- `current_range_meters`
*(added in v2.1-RC)* | Conditionally Required | Non-negative float | If the corresponding vehicle_type definition for this vehicle has a motor, then this field is required. This value represents the furthest distance in meters that the vehicle can travel without recharging or refueling with the vehicle's current charge or fuel. +\- `pricing_plan_id`
*(added in v2.1-RC2)* | Optional | ID | The `plan_id` of the pricing plan this vehicle is eligible for as described in [system_pricing_plans.json](#system_pricing_plans.json). Example: @@ -576,10 +578,82 @@ Field Name | Required | Type | Defines \- `url` | Optional | URL | URL where the customer can learn more about this pricing plan. \- `name` | Yes | String | Name of this pricing plan. \- `currency` | Yes | String | Currency used to pay the fare.

This pricing is in ISO 4217 code: http://en.wikipedia.org/wiki/ISO_4217
(e.g. `CAD` for Canadian dollars, `EUR` for euros, or `JPY` for Japanese yen.) -\- `price` | Yes | Non-negative float OR String | Fare price, in the unit specified by currency. If String, must be in decimal monetary value. +\- `price` | Yes | Non-Negative float OR String | Fare price, in the unit specified by currency. If string, must be in decimal monetary value.
*(added in v2.1-RC2)* Note: v3.0 may only allow non-negative float, therefore future implementations should be non-negative float.

In case of non-rate price, this field is the total price. In case of rate price, this field is the base price that is charged only once per trip (e.g., price for unlocking) in addition to `per_km_pricing` and/or `per_min_pricing`. \- `is_taxable` | Yes | Boolean | Will additional tax be added to the base price?

`true` - Yes.
`false` - No.

`false` may be used to indicate that tax is not charged or that tax is included in the base price. \- `description` | Yes | String | Customer-readable description of the pricing plan. This should include the duration, price, conditions, etc. that the publisher would like users to see. +\- `per_km_pricing`
*(added in v2.1-RC2)* | Optional | Array | Array of segments when the price is a function of distance travelled, displayed in kilometers.

Total price is the addition of `price` and all segments in `per_km_pricing` and `per_min_pricing`. If this array is not provided, there are no variable prices based on distance. +  \- `start`
*(added in v2.1-RC2)* | Yes | Non-Negative Integer | Number of kilometers that have to elapse before this segment starts applying. +  \- `rate`
*(added in v2.1-RC2)* | Yes | Float | Rate that is charged for each kilometer `interval` after the `start`. Can be a negative number, which indicates that the traveller will receive a discount. +  \- `interval`
*(added in v2.1-RC2)* | Yes | Non-Negative Integer | Interval in kilometers at which the `rate` of this segment is either reapplied indefinitely, or if defined, up until (but not including) `end` kilometer.

An interval of 0 indicates the rate is only charged once. +  \-  `end`
*(added in v2.1-RC2)* | Optional | Non-Negative Integer | The kilometer at which the rate will no longer apply.

If this field is empty, the price issued for this segment is charged until the trip ends, in addition to following segments. +\- `per_min_pricing`
*(added in v2.1-RC2)* | Optional | Array | Array of segments when the price is a function of time travelled, displayed in minutes.

Total price is the addition of `price` and all segments in `per_km_pricing` and `per_min_pricing`. If this array is not provided, there are no variable prices based on time. +  \- `start`
*(added in v2.1-RC2)* | Yes | Non-Negative Integer | Number of minutes that have to elapse before this segment starts applying. +  \- `rate`
*(added in v2.1-RC2)* | Yes | Float | Rate that is charged for each minute `interval` after the `start`. Can be a negative number, which indicates that the traveller will receive a discount. +  \- `interval`
*(added in v2.1-RC2)* | Yes | Non-Negative Integer | Interval in minutes at which the `rate` of this segment is either reapplied indefinitely, or if defined, up until (but not including) `end` minute.

An interval of 0 indicates the rate is only charged once. +  \-  `end`
*(added in v2.1-RC2)* | Optional | Non-Negative Integer | The minute at which the rate will no longer apply.

If this field is empty, the price issued for this segment is charged until the trip ends, in addition to following segments. +\- `surge_pricing`
*(added in v2.1-RC2)* | Optional | Boolean | Is there currently an increase in price in response to increased demand in this pricing plan? If this field is empty, it means these is no surge pricing in effect.

`true` - Surge pricing is in effect.
`false` - Surge pricing is not in effect. +### Examples *(added in v2.1-RC2)* + +#### Example 1: + +The user does not pay more than the base price for the first 10 km. After 10 km the user pays $1 per km. After 25 km the user pays $0.50 per km and an additional $3 every 5 km, the extension price, in addition to $0.50 per km. + +```jsonc +{ + "plans": { + "plan_id": "plan2", + "name": "One-Way", + "currency": "USD", + "price": 2, + "is_taxable": false, + "description": "Includes 10km, overage fees apply after 10km.", + "per_km_pricing": [ + { + "start": 10, + "rate": 1, + "interval": 1, + "end": 25 + }, + { + "start": 25, + "rate": 0.5, + "interval": 1 + }, + { + "start": 25, + "rate": 3, + "interval": 5 + } + ] + } +} +``` +#### Example 2: + +This example demonstrates a pricing scheme that has a rate both by minute and by km. The user is charged $0.25 per km as well as $0.50 per minute. Both of these rates happen concurrently and are not dependent on one another. +```jsonc +{ + "plans": { + "plan_id": "plan3", + "name": "Simple Rate", + "currency": "CAD", + "price": 3, + "is_taxable": true, + "description": "$3 unlock fee, $0.25 per kilometer and 0.50 per minute.", + "per_km_pricing": [{ + "start": 0, + "rate": 0.25, + "interval": 1 + }], + "per_min_pricing": [{ + "start": 0, + "rate": 0.50, + "interval": 1 + }] + } +} +``` ### system_alerts.json This feed is intended to inform customers about changes to the system that do not fall within the normal system operations. For example, system closures due to weather would be listed here, but a system that only operated for part of the year would have that schedule listed in the system_calendar.json feed.
Obsolete alerts should be removed so the client application can safely present to the end user everything present in the feed.