November 9, 2020 5:32 pm

The price is right! đź’¸

In our last episode in the GBFS community…

Looks fun & easy to use, but how much will it cost?

…V2.1-RC, the General Bikeshare Feed Specification (GBFS) was extended to represent dockless mobility systems. Read all about it here. Since that release, pricing information was extended and clarifications were made to better represent individual vehicles. With that, we are pleased to announce the release of v2.1-RC2!

Pricing Information đź’°

Previously in GBFS, pricing wasn’t described in much detail. To put it simply, operators could only share a sentence that included the pricing information. Now, pricing information in GBFS is able to capture a wide variety of pricing schemes that can be ingested programmatically and displayed accurately in relation to the trip the user is planning.

Bird in-app pricing (left), Google Maps pricing with Lime (right)

Now, GBFS can represent price — whether it is a function of distance traveled or time traveled, or in some cases, both. Other pricing elements, like overage charges and price limits can also be represented in this new extension. The way pricing is displayed to travelers may vary from app to app, with some potentially opting for a range like shown above, or others showing the price per minute or kilometer/mile, or other options we haven’t even thought of!

See the “Data Examples” section below if you’re still curious.

Transformation of free_bike_status.json đź›´

If you recall from our previous article GBFS Now Fully Supports Dockless Systemsexamples of station_status.json and free_bike_status.json seemingly displayed very similar bits of information, describing the current status of individual vehicles. In a nutshell, free_bike_status.json described those vehicles not at a station, also known as free-floating, hence the free_bike_status.json.

station_status.json described the current status of individual vehicles but for vehicles at stations, be it physical or virtual stations. This approach created an inefficiently large file. The new update moves all individual vehicle descriptions into free_bike_status.json, transforming free_bike_status.json to refer to all free (i.e., available for rental) vehicles.

Data Examples

Pricing

Previously, GBFS pricing was only represented by a description; see here an example of Hamilton Bikeshare’s system_pricing_plans.json file. In this example, the pricing plan is human readable, however it is not easily computable. We can imagine that with every system, the description is written differently and is therefore lacking the standardization required for system interoperability.

{
  "last_updated": 1600264878,
  "ttl": 180,
  "data": {
    "plans": [
      {
        "plan_id": "payment_plan_739",
        "name": "Pay As You Go",
        "url": "https://widget.socialbicycles.com/24/739",
        "currency": "CAD",
        "price": 0,
        "is_taxable": 1,
        "description": "15¢/minute - the most flexible Hamilton Bike
                        Share plan. No reoccurring subscription   
                        fees."
      }
    ]
  }
}

With the new extension, the description remains the same to allow the user to understand the pricing scheme, but we’ve added standardized fields that can be interpreted across platforms and calculated against the estimated distance and duration of the trip to return a total estimated price.

{
  "last_updated": 1600264878,
  "ttl": 180,
  "data": {
    "plans": [
      {
        "plan_id": "payment_plan_739",
        "name": "Pay As You Go",
        "url": "https://widget/socialbicycles.com/24/739",
        "currency": "CAD",
        "price": 0,
        "is_taxable": true,
        "description": "$0.15/minute - the most flexible Hamilton
                        Bike Share plan. No reoccuring subscription   
                        fees.",
        "per_min_pricing": {
          "start": 0,
          "rate": 0.15,
          "interval": 0
        }
      }
    ]
  }
}

The above example is just scratching the surface of pricing schemes that can be represented with this new extension. In the example below, 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.

{
  "plans": {
    "plan_id": "plan2",
    "vehicle_type_id": "bike1",
    "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
      }
    ]
  }
}

Transformation of free_bike_status.json

In free_bike_status.json, now both free-floating vehicles and station-based vehicles are able to be represented. In this example, bike ghi789,located at station 86, is available to rent. bike jkl012, with its associated latitude and longitude fields, is a free-floating vehicle that is also available for rent. With v2.1-RC2, both of these types of vehicles can now be represented within free_bike_status.json.

{
 "last_updated": 1434054678,
  "ttl": 0,
  "version": "3.0",
  "data": {
    "bikes": [
      {
        "bike_id": "ghi789",
        "last_reported": 1434054678,
        "is_reserved": false,
        "is_disabled": false,
        "vehicle_type_id": "abc123",
        "current_range_meters": 6543,
        "station_id": 86
      }, {
        "bike_id": "jkl012",
        "last_reported": 1434054687,
        "lat": 12.34,
        "lon": 56.78,
        "is_reserved": false,
        "is_disabled": false,
        "vehicle_type_id": "def456",
        "pricing_plan_id": "plan3"
      }
    ]
  }
}

Visit the GBFS GitHub and the #gbfs Slack channel for more information or to get involved!