# GBFS Definitions

Before you proceed with this section, if you haven't already done so, verify the
[supported micromobility systems](https://developers.google.com/micromobility/reference/introduction#supported-micromobility-systems)
you're building the feed for.

In the following sections, each header has the following format:
`Required|Optional|Conditionally required: Feed name (System supported)`. The
following systems are supported:

- Docked system
- Dockless system
- Docked and dockless system

To successfully integrate with Google, provide only the files needed for the
system your feed describes, and specify the required fields included in the
relevant sections. For conditionally required fields, refer to the field's
description for guidance. You can also specify optional fields that add
information and provide a better user experience.
**Note:** Fields defined in this section might differ, and
therefore override, the definitions from the publicly available GBFS. For
example, we require some fields that are optional in the publicly available
GBFS. We do this to either display the field in the UI or provide additional
clarification in other fields.

Differences are identified in the relevant
field descriptions by notices that say "Public GBFS differences."

## Required header for Micromobility feeds

Micromobility feeds are feeds that contain either docked or dockless
Micromobility structured data as defined in this article.

All feeds must always specify the fields included in the following table at the
top level of the JSON object, known collectively as the *common GBFS header*.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `last_updated` | Timestamp | Required | A POSIX timestamp, which specifies a number of seconds since January 1, 1970 00:00:00 UTC. Set to the last time that the data in the feed was updated. |
| `ttl` | Non-negative integer | Required | A non-negative integer that represents the number of seconds that remain until it's time to update the feed. If the data must be updated at a constant rate, set this value to `0`. |
| `data` | JSON | Required | JSON that contains the data fields for the individual feed. |

For example, an aggregated `free_bike_status.json` feed which specifies the
*common GBFS header*, might be as follows:

    {
        "ttl": 30,
        "last_updated": 1576123774,
        "data": {
            "bikes": [ ... ]  // GBFS free bike status objects.
        }
    }

## Required: system_information.json (Docked and dockless system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#system_informationjson)
as needed.

This feed provides details regarding the system operator.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `system_id` | ID | Required | A globally unique identifier for the vehicle share system. This value is intended to remain the same over the life of the system. Each distinct system or geographic area in which vehicles are operated SHOULD have its own system_id. Systems IDs SHOULD be recognizable as belonging to a particular system as opposed to random strings - for example, bcycle_austin or biketown_pdx. |
| `name` | String | Required | Name of the system, which is displayed to customers. |
| `rental_apps` | Object | Required | A JSON object that contains the rental app's information for Android and iOS in their respective fields. > [!IMPORTANT] > **Public GBFS differences:** This is an optional field in V2.2 but is required for implementation with Google. |
| `rental_apps.android` | Object | Conditionally required | Contains rental app download and app discovery information for the Android platform in the `store_uri` and `discovery_uri` fields. If the system provider has an Android rental app, this field is required. > [!IMPORTANT] > **Public GBFS differences:** This is an optional field in V2.2 but is conditionally required for implementation with Google. |
| `rental_apps.android.store_uri` | URI | Required | URI where the rental Android app can be downloaded from. This is typically a URI to an app store such as Google Play. If the URI points to an app store such as Google Play, we recommend that the URI follows Android best practices so the viewing app can directly open the URI to the native app store app instead of a website. > [!IMPORTANT] > **Public GBFS differences:** This is a conditionally required field in V2.2 but is required for implementation with Google. |
| `rental_apps.android.discovery_uri` | URI | Required | URI that has the form `your_custom_scheme://your/path/here`. The URI can be used by `PackageManager.queryIntentActivities()` to discover whether the rental Android app is installed on the device. > [!IMPORTANT] > **Public GBFS differences:** In V2.2, this is a conditionally required field that has no requirements for the URI format. However, this is a required field for implementation with Google and must be in the form of `your_custom_scheme://your/path/here`. |
| `rental_apps.ios` | Object | Conditionally required | Contains rental app download and app discovery information for the iOS platform in the `store_uri` and `discovery_uri` fields. If the system provider has an iOS rental app, this field is required. > [!IMPORTANT] > **Public GBFS differences:** This is an optional field in V2.2 but is conditionally required for implementation with Google. |
| `rental_apps.ios.store_uri` | URI | Required | URI where the rental iOS app can be downloaded from. This is typically a URI to an app store such as the Apple App Store. If the URI points to an app store such as the Apple App Store, we recommend that the URI follows iOS best practices so the viewing app can directly open the URI to the native app store app instead of a website. > [!IMPORTANT] > **Public GBFS differences:** This is a conditionally required field in V2.2 but is required for implementation with Google. |
| `rental_apps.ios.discovery_uri` | URI | Required | URI that has the form `your_custom_scheme://`. The URI can be used by `UIApplication canOpenURL:` to discover whether the rental iOS app is installed on the device. > [!IMPORTANT] > **Public GBFS differences:** In V2.2, this is a conditionally required field that has no requirements for the URI format. However, this is a required field for implementation with Google and must be in the form of `your_custom_scheme://`. |

## Required: free_bike_status.json (Dockless system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#free_bike_statusjson)
as needed.

This feed defines the locations and attributes for available free-standing
vehicles. For privacy reasons, vehicles that are part of an active rental must
not appear in this feed.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `bikes` | Array | Required | An array of currently available, stopped bikes where each bike is an object. |
| `bikes[].bike_id` | ID | Required | The identifier of a bike. To protect privacy, the ID can be changed to a random string after each trip. > [!IMPORTANT] > **Public GBFS differences:** If the ID is changed more frequently than this, reach out to Micromobility partner support, as some features might not work. |
| `bikes[].lat` | Latitude | Required | The WGS 84 latitude of the bike, in decimal degrees format. > [!IMPORTANT] > **Public GBFS differences:** This is conditionally required in v2.2 but is required for implementation with Google. |
| `bikes[].lon` | Longitude | Required | The WGS 84 longitude of the bike, in decimal degrees format. > [!IMPORTANT] > **Public GBFS differences:** This is conditionally required in v2.2 but is required for implementation with Google. |
| `bikes[].is_reserved` | Boolean | Required | Whether the bike is currently reserved, as follows: - If the bike is currently reserved, set to `true`. - If the bike isn't currently reserved, set to `false`. > [!IMPORTANT] > **Public GBFS differences:** If the bike is reserved, it's not shown. |
| `bikes[].is_disabled` | Boolean | Required | Whether the bike is currently disabled or broken, as follows: - If the bike is currently disabled, set to `true`. - If the bike isn't currently disabled, set to `false`. > [!IMPORTANT] > **Public GBFS differences:** If the bike is disabled, it's not shown. |
| `bikes[].rental_uris` | Object | Required | A JSON object that contains rental URIs for Android, iOS, and web in their respective fields. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 but is required for implementation with Google. |
| `bikes[].rental_uris.android` | URI | Conditionally required | A URI that can be passed to an Android app with an `android.intent.action.VIEW` Android intent to support [Android Deep Links](https://developer.android.com/training/app-links/deep-linking). The `rental_uris` provided must be [Android App Links](https://developer.android.com/training/app-links) so that the viewing app doesn't need to manually manage the redirect of the user to the app store in the event that the user doesn't have the provider application installed. This URI must be a deep link specific to the individual bike, not a general rental page that includes information for more than one bike. The deep link must take the user directly to the bike without any prompts, interstitial pages, or logins. Ensure that users can see the bike even if they've never opened the application. URIs aren't necessarily required to include the `bike_id` for the bike, as long as the partner has other means to identify the respective bike. For example, the rental app can use other identifiers within the URI to uniquely identify the bike. If the partner has an Android rental app, this field is required. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 and doesn't have any requirements on what type of link is provided. However, for implementation with Google, this field is conditionally required and the `rental_uris` provided must be [Android App Links](https://developer.android.com/training/app-links). Android App Links example: `https://www.example.com/app?sid=1234567890&platform=android` |
| `bikes[].rental_uris.ios` | URI | Conditionally required | A URI that can be used on iOS to launch the rental app for the bike. For more information about this, refer to Apple's article about [iOS custom URL schemes](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content/communicating_with_other_apps_using_custom_urls?language=objc). The `rental_uris` provided must be [iOS Universal Links](https://developer.apple.com/ios/universal-links/) so that the viewing app doesn't need to manually manage the redirect of the user to the app store in the event that the user doesn't have the provider application installed. This URI must be a deep link specific to the individual bike, not a general rental page that includes information for more than one bike. The deep link must take the user directly to the bike without any prompts, interstitial pages, or logins. Ensure that users can see the bike even if they've never opened the application. URIs aren't necessarily required to include the bike_id for the bike, as long as the partner has other means to identify the respective bike. For example, the rental app can use other identifiers within the URI to uniquely identify the bike. If the partner has an iOS rental app, this field is required. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 and doesn't have any requirements on what type of link is provided. However, for implementation with Google, this field is conditionally required and the `rental_uris` provided must be [iOS Universal Links](https://developer.apple.com/ios/universal-links/). iOS Universal Links example: `https://www.example.com/app?sid=1234567890&platform=ios` |
| `bikes[].rental_uris.web` | URL | Optional | A URL that can be used by a web browser to show more information about renting a vehicle at this vehicle. This URL must be a deep link specific to the individual bike, not a general rental page that includes information for more than one bike. The deep link must take the user directly to the bike without any prompts, interstitial pages, or logins. Ensure that users can see the bike even if they've never opened the application. URLs aren't necessarily required to include the `bike_id` for the bike or otherwise follow the semantic conventions of the rental URLs for Android or iOS. The rental app can use other identifiers within the URL that uniquely identify the bike. If this field is unset, it means that deep links aren't supported for the web browser. Example value: `https://www.example.com/app?sid=1234567890` |
| `bikes[].vehicle_type_id` | ID | Required | The `vehicle_type_id` of the vehicle as described in the `https://developers.google.com/micromobility/reference/gbfs-definitions#required-vehicle-types` section. > [!IMPORTANT] > **Public GBFS differences:** This field is conditionally required in V2.2 but is required for implementation with Google. |
| `bikes[].pricing_plan_id` | ID | Required | Identifier of the price plan that's applied when this vehicle type is rented as described in the `https://developers.google.com/micromobility/reference/dockless-micromobility#required-system-pricing-plans` section. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 but is required for implementation with Google. |
| `bikes[].current_range_meters` | Non-negative float | Conditionally required | If the `vehicle_type` definition that corresponds to the vehicle has a motor, then this field is required. Set to the furthest distance in meters that the vehicle can travel without the need for recharge or refuel, given the vehicle's current charge or fuel level. |
| `bikes[].last_reported` | Timestamp | Optional | Set to the last time the vehicle reported its status to the operator's backend. > [!IMPORTANT] > **Public GBFS differences:** The timestamp is used to filter out stale bikes from the UI, and so that the bike data freshness can be monitored. Data freshness refers to how up-to-date the data is. If this field is unset, we use the `last_updated` feed timestamp instead. |

The following is an example for `free_bike_status.json`:

    "bikes": [{
        "bike_id": "xyz123",
        "lat": 12.34,
        "lon": 56.78,
        "is_reserved": true,
        "is_disabled": false,
        "rental_uris":{
          "android": "https://www.example.com/app?sid=1234567890&platform=android",
          "ios": "https://www.example.com/app?sid=1234567890&platform=ios",
          "web": "https://www.example.com/app?sid=1234567890"
        },
        "vehicle_type_id": "scooter_electric",
        "pricing_plan_id": "sydneyPlan1",
        "current_range_meters": 4500,
        "last_reported": 1434054678
    },
    {
        "bike_id": "abc123",
        "lat": 1.34,
        "lon": 146.78,
        "is_reserved": false,
        "is_disabled": true,
        "rental_uris":{
          "android": "https://www.example.com/app?sid=1234567890&platform=android",
          "ios": "https://www.example.com/app?sid=1234567890&platform=ios",
          "web": "https://www.example.com/app?sid=1234567890"
        },
        "vehicle_type_id": "bike_manual",
        "pricing_plan_id": "sydneyPlan1",
        "last_reported": 1434054241
    }
    ]

## Required: vehicle_types.json (Docked and dockless system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#vehicle_typesjson-added-in-v21)
as needed.

This feed defines the details of individual vehicle types, as referred to in the
[`free_bike_status.json`](https://developers.google.com/micromobility/reference/gbfs-definitions#required-free-bike-status) section.

> [!IMPORTANT]
> **Public GBFS differences:** This file is conditionally required in V2.2 but is required for implementation with Google.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `vehicle_types` | Array | Required | An array of objects, where each object defines a distinct vehicle type in the provider's catalog. There can only be one object for a given vehicle type. |
| `vehicle_types[].vehicle_type_id` | ID | Required | A unique identifier for a given vehicle type. |
| `vehicle_types[].form_factor` | Enum | Required | An enum that represents the vehicle's general form factor, from the following list of currently valid values: - `bicycle` - `scooter` - `other` > [!IMPORTANT] > **Public GBFS differences:** `moped` and `car` values aren't supported by Google. |
| `vehicle_types[].propulsion_type` | Enum | Required | An enum that represents the vehicle's primary propulsion type, from the following list of currently valid values: - `human`: Pedal or foot propulsion - `electric_assist`: Provides power only alongside human propulsion - `electric`: Contains throttle mode with a battery-powered motor - `combustion`: Contains throttle mode with a gas engine-powered motor |
| `vehicle_types[].max_range_meters` | Non-negative float | Conditionally required | If `propulsion_type` isn't set to `human`, the vehicle has a motor, and then this field is therefore required. Set to the furthest distance in meters that the vehicle can travel without the need for recharge or refuel, when the vehicle is fully fueled or fully charged. |

The following is an example for `vehicle_types.json`:

    "vehicle_types": [
      {
        "vehicle_type_id": "bike_manual",
        "form_factor": "bicycle",
        "propulsion_type": "human"
      },
      {
        "vehicle_type_id": "scooter_electric",
        "form_factor": "scooter",
        "propulsion_type": "electric",
        "max_range_meters": 10000
      }
    ]

## Required: system_pricing_plans.json (Dockless system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#system_pricing_plansjson)
as needed.

This feed defines the price plans for free-standing vehicles. We require
providers to show price information for free-standing vehicles.

> [!IMPORTANT]
> **Public GBFS differences:** This file is optional in V2.2 but is required for implementation with Google.

> [!NOTE]
> **Note:** The specification doesn't provide any fare multipliers to model surge prices. If there are price fluctuations due to surge prices, the fare model must be updated in the `system_pricing_plans.json` file.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `plans` | Array | Required | An array of objects where each object defines a given price plan. |
| `plans[].plan_id` | ID | Required | A string that represents a unique identifier for the given price plan that the provider offers. |
| `plans[].url` | URL | Optional | The URL that points end-users to more information about the price plan. |
| `plans[].currency` | String | Required | The [ISO 4217](http://wikipedia.org/wiki/ISO_4217) standard for the price plan. |
| `plans[].price` | Non-negative float | Required | The price plan must be defined either as a non-rated price plan or a rated price plan: **Non-rated price plan** :   This plan is a single, flat fare. Set the following field: - **`price`:** The flat price of the entire trip. **Rated price plan** :   This plan is a piecewise, linear rate price. Set the following field: - **`price`:** The base price, which is charged exactly once per trip. Set one or both of the following fields: - **`per_km_pricing`:** The price of the trip specified at the rate per kilometer. - **`per_min_pricing`:** The price of the trip specified at the rate per minute. > [!IMPORTANT] > **Key Point:** The `price` field is defined by the ISO 4217 standard, includes the appropriate number of decimal places, and omits the currency symbol. For example, if the price is $9.95 USD, set `price` to `9.95`. > [!IMPORTANT] > **Public GBFS differences:** String values are accepted in V2.2, but Google only accepts non-negative float values. |
| `plans[].per_km_pricing` | Array | Conditionally required | If the price is a function of distance travelled, displayed in kilometers, then this field is required. An array of objects where each object defines a given distance-divided segment. Each segment's `start` value must be less than or equal to the `start` value of the next segment. To determine the total price of the given plan add the given plan's `plans[].price` value to accrued prices for segments in `plans[].per_km_pricing` and `plans[].per_min_pricing`. If this field isn't set, there are no variable prices based on distance and therefore, none are included as part of the total price. > [!IMPORTANT] > **Public GBFS differences:** Each segment's `start` value must be less than or equal to the `start` value of the next segment. |
| `plans[].per_km_pricing[].start` | Non-negative integer | Required | The number of kilometers at which the segment rate starts to be charged. This field is set to the [inclusive value](https://wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints) that starts the segment's range. Thus, once the number of kilometers have elapsed, the `rate` is charged once. |
| `plans[].per_km_pricing[].rate` | Float | Required | The rate that's charged for each `interval`, which begins at the inclusive `start` of the segment. If this field is set to a negative number, the traveller receives a discount. |
| `plans[].per_km_pricing[].interval` | Non-negative integer | Required | The interval in kilometers at which the `rate` of the segment is reapplied indefinitely unless the segment's `end` is set to any non-negative integer. The `rate` is reapplied once at the start of each `interval` and no rounding of the distance is taken into consideration. If the segment's `end` is set to any non-negative integer, the `rate` of the segment is reapplied up until, but not including, the segment's `end` value. If this field is set to `0`, the `rate` is charged exactly once at the `start` of the segment. |
| `plans[].per_km_pricing[].end` | Non-negative integer | Optional | The number of kilometers at which point the `rate` for the segment is no longer applied. This field is set to the [exclusive value](https://wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints) that ends the segment's range. For example, if `end` is set to `40`, the `rate` no longer applies at 40 kilometers. If this field isn't set or is empty, the `rate` for the segment is charged until the trip ends, in addition to any additional segments that follow it. |
| `plans[].per_min_pricing` | Array | Conditionally required | If the price is a function of time passed, displayed in minutes, then this field is required. An array of objects where each object defines a given time-divided segment. Each segment's `start` value must be less than or equal to the `start` value of the next segment. To determine the total price of the given plan add the given plan's `plans[].price` value to accrued prices for segments in `plans[].per_km_pricing` and `plans[].per_min_pricing`. If this field isn't set, there are no variable prices based on time and therefore none are included as part of the total price. > [!IMPORTANT] > **Public GBFS differences:** Each segment's `start` value must be less than or equal to the `start` value of the next segment. |
| `plans[].per_min_pricing[].start` | Float | Required | The number of minutes at which the segment rate starts to be charged. This field is set to the [inclusive value](https://wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints) that starts the segment's range. Thus, once the set number of minutes elapse, the `rate` is be charged once. |
| `plans[].per_min_pricing[].rate` | Float | Required | The rate that's charged for each `interval`. The rate starts at the inclusive `start` of the segment. If this field is set to a negative number, the traveller receives a discount. |
| `plans[].per_min_pricing[].interval` | Non-negative integer | Required | The interval in minutes at which the `rate` of the segment is reapplied indefinitely unless the segment's `end` is set to any non-negative integer. The `rate` is reapplied once at the start of each `interval` and no rounding of the travel time is taken into consideration. If the segment's `end` is set to any non-negative integer, the `rate` of the segment is reapplied up until, but not including, the segment's `end` value. If this field is set to `0`, the `rate` is charged exactly once at the `start` of the segment. |
| `plans[].per_min_pricing[].end` | Non-negative integer | Optional | The number of minutes at which point the `rate` for the segment is no longer applied. This field is set to the [exclusive value](https://wikipedia.org/wiki/Interval_(mathematics)#Including_or_excluding_endpoints) that ends the segment's range. For example, if `end` is set to `20`, the `rate` no longer applies at 20 minutes. If this field isn't set or is empty, the `rate` for the segment is charged until the trip ends, in addition to any additional segments that follow it. |

### Examples for system_pricing_plans.json

This section provides informative `system_pricing_plans.json` code samples. Each
example's relevant details and results are also provided.

#### Example 1 for system_pricing_plans.json

The following price plan code sample shows charges based on the journey time for
the following intervals:

- \[0,1): $2 USD
  - If the journey is less than a minute, the user pays $2 USD.
  - Example: 59-secs trip
- \[1,2): $3 USD
  - If the journey is longer or equal to one minute but less than two minutes, the user pays $2 + $1 = $3 USD.
  - Examples: 1-min trip; 1-min 45-secs trip
- *x* number of minutes where *x* is more than or equals to 2: $3 + (($2 + $1) \* (*x* - 2 + 1)) USD
  - If the journey is longer or equal to two minutes the user pays $3 for the portion of the journey less than two minutes and ($1 \[continuing from the first entry of the`per_min_pricing` list\] + $2 \[the second entry of the `per_min_pricing` list\]) for every minute after and inclusive of two minutes.
  - Examples:
    - 2-mins trip cost $3 + ($2 + $1) = $6 USD
    - 2-mins 30-secs trip cost $3 + ($2 + $1) = $6 USD
    - 3-mins trip cost $3 + (($2 + $1) \* 2) = $9 USD
    - 10-mins trip cost $3 + (($2 + $1) \* 9) = $30 USD

    {
      "plans": {
        "plan_id": "plan1",
        "currency": "USD",
        "price": 2,
        "per_min_pricing": [
          {
              "interval": 1,
              "rate": 1,
              "start": 1
          },
          {
              "interval": 1,
              "rate": 2,
              "start": 2
          }
        ],
      }
    }

#### Example 2 for system_pricing_plans.json

In this example, we show a code sample for a price price plan that is charged at
a rate of both minutes and kilometers:

- Specifically, the end-user is charged $0.25 CAD per km as well as $0.50 CAD per minute.
- Both of these rates happen concurrently and aren't dependent on one another.
- Therefore, a one-kilometer trip that lasts for 10 minutes costs $9 CAD. The breakdown of the cost is as follows:
  - $3, base price
  - $0.25 \* 2, charged once at the start of the trip and once at the 1-km mark.
  - $0.5 \* 11, charged once at the start of every minute. Charges starts at 0 seconds, with the last interval charged at 10 minutes.

    {
      "plans": {
        "plan_id": "plan2",
        "currency": "CAD",
        "price": 3,
        "per_km_pricing": [{
          "start": 0,
          "rate": 0.25,
          "interval": 1
        }],
        "per_min_pricing": [{
          "start": 0,
          "rate": 0.50,
          "interval": 1
        }]
      }
    }

## Conditionally required: geofencing_zones.json (Docked and dockless system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#geofencing_zonesjson-added-in-v21)
as needed.

> [!IMPORTANT]
> **Important:** If a city's legislation forbids vehicles from ending a trip in a certain area, a geofencing zone is mandatory.

This feed defines the geofencing data for free-standing vehicles. Geofencing
data includes the geographic boundaries that specify where vehicles are allowed
to begin the ride and finish the ride, along with the speed at which the
vehicles can go. This speed is either the vehicle's maximum speed or the speed
limit of the road the vehicle is on, whichever is lower. Drivers must adhere to
local laws and ordinances.

We use this data so that when a user searches for a given route, if the end of
the trip falls outside the specific geofences, the Micrimobility result is
filtered out. If geofences aren't provided, Google treats the service as though
it has no boundary restrictions.

> [!IMPORTANT]
> **Public GBFS differences:** For this file, Google doesn't support the specification of `start` and `end` times. Instead, the presence of geofencing data in the feed indicates that it's active, and the absence of it indicates it no longer applies.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `geofencing_zones` | Object | Required | A `FeatureCollection` object as described by the [IETF RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3) is an object that has a field, named `features`. The value of `features` is a JSON array. Each element of the JSON array is a `Feature` object. Each geofenced zone, its associated rules and attributes, and the definitions of the `FeatureCollection` are specified here as part of the `geofencing_zones.json` feed definitions. |
| `geofencing_zones.type` | String | Required | Set to `FeatureCollection` as described by the [IETF RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3). |
| `geofencing_zones.features` | Array | Required | A JSON array, where each element of the JSON array is a `Feature` object. |
| `geofencing_zones.features[].type` | String | Required | Set to `Feature` as described by the [IETF RFC 7946](https://tools.ietf.org/html/rfc7946#section-3.3). |
| `geofencing_zones.features[].geometry` | GeoJSON Multipolygon | Required | A GeoJSON Multipolygon that describes where rides aren't able to start, end, go through, in addition to other limitations. A clockwise arrangement of points defines the area enclosed by the polygon, while a counterclockwise order defines the area outside the polygon. For more information about this, refer to the [right-hand rule](https://tools.ietf.org/html/rfc7946#section-3.1.6). |
| `geofencing_zones.features[].properties` | Object | Required | An object that defines the travel allowances and limitations. |
| `geofencing_zones.features[].properties.rules` | Array | Optional | An array of objects, where each object defines one and only one rule. If two or more rules overlap, collide, or otherwise conflict in some way, the earliest defined rule in the order of the JSON file takes precedence. |
| `geofencing_zones.features[].properties.rules[].vehicle_type_id` | Array | Optional | An array of vehicle type IDs, where each element is a `vehicle_type_id`, for which any restrictions must be applied. If no `vehicle_type_id` is specified, then the restrictions apply to all vehicle types. |
| `geofencing_zones.features[].properties.rules[].ride_allowed` | Boolean | Required | Whether the free-standing "undocked" bike ride can start and end in the zone, as follows: - If the undocked bike ride can start and end in the zone, set to `true`. - If the undocked bike ride can't start and end in the zone, set to `false`. > [!NOTE] > **Note:** Google uses the data in the following > ways: > - Regardless of where a ride starts, if it ends in a zone where `ride_allowed=false`, Google doesn't show the bikesharing result to the user. > - In all other cases, Google shows the bikesharing result to the user. For example, if a ride starts in a zone where `ride_allowed=false` or in a location not defined in geofences, Google shows the bikesharing result to the user. |

The following is an example for `geofencing_zones.json`:

    "geofencing_zones":{
      "type":"FeatureCollection",
      "features":[{
        "type":"Feature",
        "properties":{
          "rules":[{
            "vehicle_type_id":"scooter",
            "ride_allowed": false
          }]
        },
        "geometry":{
          "type":"MultiPolygon",
          "coordinates":[[[
            [-122.66780376434326, 45.49896266763551],
            [-122.66810417175292, 45.49824825558575],
            [-122.66830801963805, 45.49632305799116],
            [-122.66780376434326, 45.49896266763551]
          ]]]
        }
      }]
    }

## Required: station_information.json (Docked system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#station_informationjson)
as needed.

This feed defines the general information about public bikesharing stations.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `stations` | Array | Required | An array of objects where each object defines one and only one station. |
| `stations[].station_id` | String | Required | The identifier of the station. |
| `stations[].name` | String | Required | The public name of the station in the local language of the city the station is located in. The `name` must adhere to what's used on signages at the station, where available, or it must be a reflection of the station location through the use of a cross street or local landmark. Dont use abbreviations such as "St." for "Street" unless it's explicitly used in signages, and the `name` must be in mixed case following local conventions for capitalization of place names and not in all caps. > [!IMPORTANT] > **Public GBFS differences:** In GBFS V2.2, it doesn't specify the language the `name` should be in, but for implementation with Google, the `name` must be in the local language of the city the station is located in. |
| `stations[].lat` | Latitude | Required | The WGS 84 latitude of the station, in decimal degrees format. |
| `stations[].lon` | Longitude | Required | The WGS 84 longitude of the station, in decimal degrees format. |
| `stations[].capacity` | Non-negative integer | Optional | A non-negative integer that represents the total number of docking points installed at the station, both available and unavailable. |
| `stations[].rental_uris` | Object | Required | A JSON object that contains rental URIs for Android, iOS, and web in their respective fields. If these URIs are specified, they override the default deep links that were set when the provider was onboarded. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 but is required for implementation with Google. |
| `stations[].rental_uris.android` | URI | Conditionally required | A URI that can be passed to an Android app with an `android.intent.action.VIEW` Android intent to support [Android Deep Links](https://developer.android.com/training/app-links/deep-linking). The `rental_uris` provided must be [Android App Links](https://developer.android.com/training/app-links) so that the viewing app doesn't need to manually manage the redirect of the user to the app store in the event that the user doesn't have the provider application installed. This URI must be a deep link specific to the individual station, not a general rental page that includes information for more than one station. The deep link must take the user directly to the station without any prompts, interstitial pages, or logins. Ensure that users can see the station even if they've never opened the application. URIs aren't necessarily required to include the `station_id` for the station, as long as the partner has other means to identify the respective station. For example, the rental app can use other identifiers within the URI to uniquely identify the station. If the partner has an Android rental app, this field is required. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 and doesn't have any requirements on what type of link to provide. However, for implementation with Google, this field is conditionally required and the `rental_uris` provided must be [Android App Links](https://developer.android.com/training/app-links). Android App Links example: `https://www.example.com/app?sid=1234567890&platform=android` |
| `stations[].rental_uris.ios` | URI | Conditionally required | A URI that can be used on iOS to launch the rental app for the station. For more information about this, refer to Apple's article about [iOS custom URL schemes](https://developer.apple.com/documentation/uikit/core_app/allowing_apps_and_websites_to_link_to_your_content/communicating_with_other_apps_using_custom_urls?language=objc). The `rental_uris` provided must be [iOS Universal Links](https://developer.apple.com/ios/universal-links/) so that the viewing app doesn't need to manually manage the redirect of the user to the app store in the event that the user doesn't have the provider application installed. This URI must be a deep link specific to the individual station, not a general rental page that includes information for more than one station. The deep link must take the user directly to the station without any prompts, interstitial pages, or logins. Ensure that users can see the station even if they've never opened the application. URIs aren't necessarily required to include the `station_id` for the station. The rental app can use other identifiers within the URI to uniquely identify the station. If the partner has an iOS rental app, this field is required. > [!IMPORTANT] > **Public GBFS differences:** This field is optional in V2.2 and doesn't have any requirements on what type of link is provided. However, for implementation with Google, this field is conditionally required and the `rental_uris` provided must be [iOS Universal Links](https://developer.apple.com/ios/universal-links/). iOS Universal Links example: `https://www.example.com/app?sid=1234567890&platform=ios` |
| `stations[].rental_uris.web` | URL | Optional | A URL that can be used by a web browser to show more information about how to rent a vehicle at this station. This URL must be a deep link specific to the individual station, not a general rental page that includes information for more than one station. The deep link must take the user directly to the station without any prompts, interstitial pages, or logins. Ensure that users can see the station even if they've never opened the application. URLs aren't necessarily required to include the `station_id` for the station or otherwise follow the semantic conventions of the rental URLs for Android or iOS. The rental app can use other identifiers within the URL that uniquely identify the station. If this field is unset, it means that deep links aren't supported for the web browser. Example value: `https://www.example.com/app?sid=1234567890` |

The following is an example for `station_information.json`:

    "stations": [
      {
        "station_id": "597",
        "name": "Silverthorne Road, Battersea",
        "lat": 51.472865,
        "lon": -0.148059,
        "capacity": 10,
        "rental_uris": {
            "android": "https://www.example.com/app?sid=1234567890&platform=android",
            "ios": "https://www.exampleexample.com/app?sid=1234567890&platform=ios",
            "web": "https://www.example.com/app?sid=1234567890&platform=web"
        }
      },
    ]

## Required: station_status.json (Docked system)

Refer to the
[GBFS specification](https://github.com/NABSA/gbfs/blob/v2.2/gbfs.md#station_statusjson)
as needed.

This feed defines the up-to-date, current status of public bikesharing stations.

| Field name | Type | Requirement | Description |
|---|---|---|---|
| `stations` | Array | Required | An array of objects, where each object defines one and only one station. |
| `stations[].station_id` | String | Required | The identifier of the station. |
| `stations[].num_bikes_available` | Non-negative integer | Required | A non-negative integer that represents the number of functional bikes that are physically at the station and that might be offered for rental. To determine whether the station currently rents bikes, you must inspect the station's `is_renting` field and find a true Boolean value. |
| `stations[].vehicle_types_available` | Array | Optional | An array of objects that defines the total number of vehicles, categorized by the individual vehicle type available at a station. Each object models the total number of vehicle for the associated vehicle type. The total number of vehicles from each of these objects must add up to match the value specified in the `num_bikes_available` field. > [!IMPORTANT] > **Public GBFS differences:** This field is conditionally required in V2.2 but is optional for implementation with Google. |
| `stations[].vehicle_types_available[].vehicle_type_id` | ID | Required | The `vehicle_type_id` of each vehicle type available at the station as described in [vehicle_types.json](https://developers.google.com/micromobility/reference/gbfs-definitions#required-vehicle-types). |
| `stations[].vehicle_types_available[].count` | Non-negative integer | Required | The total number of available vehicles for the corresponding `vehicle_type_id` at the station as defined in [vehicle_types.json](https://developers.google.com/micromobility/reference/gbfs-definitions#required-vehicle-types). |
| `stations[].num_docks_available` | Non-negative integer | Conditionally required | The field is required, unless the station has unlimited docking capacity. For example, virtual stations have unlimited docking capacities and the field isn't required. A non-negative integer that represents the total number of functional docks physically at the station that are able to accept vehicle returns. To determine whether the station currently accepts bike returns, you must inspect the station's `is_returning` field, and find a `true` Boolean value. |
| `stations[].is_installed` | Boolean | Required | A Boolean that indicates whether it's true that the station is currently on the street and installed. If the station is installed on the street, set to `true`. If the station isn't installed on the street, set to `false`. |
| `stations[].is_renting` | Boolean | Required | A Boolean that indicates whether it's true that the station currently rents bikes. If the station currently rents bikes, set to `true`. Even if the station is empty, if it's set to allow rentals `is_renting` is set to `true`. If the station doesn't currently rent bikes, set to `false`. |
| `stations[].is_returning` | Boolean | Required | A Boolean that indicates whether it's true that the station currently accepts bike returns. If the station currently accepts bike returns, set to `true`. Even if the station is full, but would allow a return if it wasn't, `is_returning` is set to `true`. If the station doesn't currently accept bike returns, set to `false`. |

The following is an example of `station_status.json`:

    "stations": [
            {
              "station_id": "2",
              "num_bikes_available": 6,
              "vehicle_types_available": [
                {
                  "vehicle_type_id" : "scooter_electric",
                  "count" : 2
                },
                {
                  "vehicle_type_id" : "bike_manual",
                  "count" : 4
                }
              ],
              "num_docks_available": 30,
              "is_installed": true,
              "is_renting": true,
              "is_returning": true,
              "last_reported": 1576119631
            },
    ]