This document map MOQO's sharing API to GBFS.
This documentation refers to v2.3.
- Introduction
- General Information
- Open Issues or Questions
- Files
- gbfs.json
- gbfs_versions.json (added in v1.1)
- system_information.json
- vehicle_types.json (added in v2.1)
- station_information.json
- station_status.json
- free_bike_status.json
- system_hours.json
- system_calendar.json
- system_regions.json
- system_pricing_plans.json
- system_alerts.json
- geofencing_zones.json (added in v2.1)
This specification describes the mapping of MOQO's API to GBFS.
This section gives a high level overview of the sharing provider's API and the defined mapping to GBFS.
Official API documentation is access restricted, hence not included.
Examples from th
Open questions are managed as issues. They should be tagged with moqo
.
Standard file, feed will be provided in feed language de
only.
Optional file, will not be provided. Only GBFSv2.3 supported.
System information is manually extracted from the providers homepage. Only the real configuration in e.g. config/stadtwerk-tauberfranken.json is relevant.
Vehicle Types, vehicles are extracted from the cars
endpoint, extracting this from the returned cars.
GBFS Field | Mapping |
---|---|
vehicle_type_id |
lowercased row['car_model_name'] , spaces transformed in underscore |
form_factor |
row['vehicle_type'] mapped to GBFS vehicle types. |
rider_capacity |
- |
cargo_volume_capacity |
- |
cargo_load_capacity |
- |
propulsion_type |
row['fuel_type'] mapped to GBFS vehicle types. |
eco_label |
- |
max_range_meters |
Not availabe via API, set to 250.000 |
name |
row['car_model_name'] |
g_CO2_km |
- |
vehicle_image |
- |
make |
first word of row['car_model_name'] |
model |
all words after the first word of row['car_model_name'] |
wheel_count |
- |
max_permitted_speed |
- |
rated_power |
- |
default_reserve_time |
- |
return_constraint |
roundtrip_station |
vehicle_assets |
- |
default_pricing_plan_id |
all_hour_daytime or, if defined in the provider's config, {vehicle_type}_hour_daytime . Both values are defined as constants in the MoqoProvider implementation (DEFAULT_PRICING_PLAN_ID and DEFAULT_PRICING_PLAN_PATTERN) and may be overwritten by subclasses, if necessary |
pricing_plan_ids |
All pricing plans defined in the provider's config, if they start with {vehicle_type} . If none matches, all pricing plan ids starting with all_ , or, if still none matches, none. |
Station information is extracted from parkings
endpoint.
GBFS Field | Mapping |
---|---|
station_id |
row['id'] |
name |
row['name'] |
short_name |
- |
lat |
row['center']['lat'] |
lon |
row['center']['lon'] |
address |
row['town'] + ', ' + row['street'] + ' ' + row['street_number'] |
cross_street |
- |
region_id |
- |
post_code |
row['zipcode'] |
rental_methods |
['key'] |
is_virtual_station |
- |
station_area |
- |
parking_type |
- |
parking_hoop |
- |
contact_phone |
- |
capacity |
row['capacity_max'] |
vehicle_capacity |
- |
vehicle_type_capacity |
deduced from vehicles assigned to this station free_bike_status.station_id |
is_valet_station |
- |
is_charging_station |
- |
rental_uris |
- |
Describe endpoint from which information is extracted and potential filter rules to be applied
GBFS Field | Mapping |
---|---|
station_id |
row['lon']_row['lat'] |
num_bikes_available |
deduced by x2gbfs from free_bike_status.station_id |
vehicle_types_available |
deduced by x2gbfs from free_bike_status.station_id |
num_docks_available |
- |
vehicle_docks_available |
- |
num_docks_disabled |
- |
is_installed |
True |
is_renting |
True (Note: the API does not return opening hours information yet) |
is_returning |
True (Note: the API does not return opening hours information yet) |
last_reported |
row['UTC Timestamp'] |
Free vehicles are extracted from cars
endpoint. As currently unavailable cars have no latest_parking
set, we filter them out. We request availablity status as being available in the next 3 hours.
GBFS Field | Mapping |
---|---|
bike_id |
row['id'] |
lat |
- Vehicles are at station, so we don't provide coords |
lon |
- Vehicles are at station, so we don't provide coords |
is_reserved |
row['available'] is not True |
is_disabled |
- |
rental_uris |
- |
vehicle_type_id |
see section vehicle_types |
last_reported |
curent time |
license_plate : `row['license'].split(' |
')[0].strip()` (at least Stadtwerk Tauberfranken seems to append station name after the license plate) |
current_range_meters |
vehicle_type['max_rang_meters'] * vehicle['fuel_level'] / 100.0 |
current_fuel_percent |
vehicle['fuel_level'] / 100.0 |
station_id |
row['laatest_parking']['id'] , if set |
home_station_id |
- |
pricing_plan_id |
- |
vehicle_equipment |
- |
available_until |
- (API does not provide this information explicitly) |
No endpoint.
No endpoint.
No endpoint.
No endpoint. Manually defined in the provider's config in feed_data/pricing_plans
.
No endpoint.
No endpoint.
Deep links seem not to be available for vehicles yet.