This document map deer'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 car-sharing provider deer's API to GBFS.
deer GmbH uses Fleetster as booking service provider. Besides the standard Fleetster API, deer defines a couple of custom properties, that should e taken into account when mapping to GBFS.
This section gives a high level overview of the sharing provider's API and the defined mapping to GBFS.
The Fleetster API is described via a Swagger API documentation.
Open questions are now managed as issues. They should be tagged with deer
.
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 config/deer.json is relevant.
Note: According to fleetster/deer, currently no rental_app uri's exist.
fleetster API has no explicit endpoint for vehicle types, so the need to be collected from vehicle’s information. The vehicles endpoint returns an array, each element is a vehicle, only vehicles meeting the following conditions are considered:
vehicle['active'] is True
vehicle['deleted'] is False
vehicle['typeOfUsage'] == 'carsharing'
- station with ID
vehicle['locationId']
is a valid carsharing station (see station_information)
GBFS Field | Mapping |
---|---|
vehicle_type_id |
normalized, lower cased vehicle['brand'] + '_' + normalized, lower cased vehicle['model'] |
form_factor |
'car' |
rider_capacity |
vehicle['extended']['Properties']['seats'] |
cargo_volume_capacity |
- |
cargo_load_capacity |
- |
propulsion_type |
vehicle[‘engine’]
|
eco_label |
- |
max_range_meters |
Not provided by fleetster/deer. Set to 200000 for all vehicle types (200km) |
name |
normalized vehicle['brand'] + normalized vehicle['model'] |
vehicle_accessories |
air_conditioning if vehicle['extended']['Properties']['aircondition'] doors_${vehicle['extended']['Properties']['doors']} navigation if vehicle['extended']['Properties']['navigation'] |
g_CO2_km |
|
vehicle_image |
|
make |
normalized brand |
model |
vehicle.extended.Properties.color mapped to a (German language) color name. For specific mappings, see deer.py |
wheel_count |
4 |
max_permitted_speed |
vehicle['extended']['Properties']['vMax'] |
rated_power |
vehicle['extended']['Properties']['horsepower'] * 736 (1 PS = 0,736 kW) |
default_reserve_time |
|
return_constraint |
"roundtrip_station" |
vehicle_assets |
- |
default_pricing_plan_id |
|
pricing_plan_ids |
- |
JSON response for /locations
contains array, each representing a station. Only those with the following attributes will be considered:
location['deleted'] is False
location['extended']['PublicCarsharing']['hasPublicCarsharing'] is True
GBFS Field | Mapping |
---|---|
station_id |
location['_id'] |
name |
location['name'] |
short_name |
- |
lat |
location['extended']['GeoPosition']['latitude'] |
lon |
location['extended']['GeoPosition']['longitude'] |
address |
location['streetName'] + ' ' + station['streetNumber'] |
cross_street |
|
region_id |
|
post_code |
location['postcode'] |
rental_methods |
['key'] |
is_virtual_station |
|
station_area |
|
parking_type |
|
parking_hoop |
|
contact_phone |
|
capacity |
|
vehicle_capacity |
|
vehicle_type_capacity |
|
is_valet_station |
|
is_charging_station |
true (every deer station has at least one charging point) |
rental_uris |
No information available |
Returns all stations of /locations
endpoint, criteria see above (station_information.json)
GBFS Field | Mapping |
---|---|
station_id |
location['id'] |
num_bikes_available |
no need to provide, will be deduced from x2gbfs via vehicles' stationIds and availability |
vehicle_types_available |
no need to provide, will be deduced from x2gbfs via vehicles' stationIds and availability |
num_bikes_disabled |
- |
num_docks_available |
- |
vehicle_docks_available |
- |
num_docks_disabled |
- |
is_installed |
true |
is_renting |
true |
is_returning |
true |
last_reported |
Not part of API. Setting to current timestamp. |
Returns all vehicles of /vehicles
endpoint, filtering criteria see above (vehicle_types.json).
GBFS Field | Mapping |
---|---|
bike_id |
vehicle['_id'] |
lat |
- |
lon |
- |
is_reserved |
False , if bookings request does not return any active booking having startDate < now < endDate for this vehicle, else True (see also available_until ). An active booking is a booking which is not in any of the following states: canceled , rejected , keyreturned . |
is_disabled |
- |
rental_uris |
None. fleetster/deer do not provide rental uris for now |
vehicle_type_id |
normalized, lower cased vehicle['brand'] + '_' + normalized, lower cased vehicle['model'] |
last_reported |
|
current_range_meters |
Hard coded to 50000 (50km) as no realtime info is available |
current_fuel_percent |
- |
station_id |
vehicle['locationId'] |
home_station_id |
- |
pricing_plan_id |
- |
vehicle_equipment |
winter_tires if extended.Properties.winterTires |
available_until |
/bookings?endDate%5B%24gte%5D={now}Z returns all bookings ending in the future. If there is no active booking (see above for a definition of an active booking) for this vehicle (vehicleId == booking['vehicleId'] ) which has already started (bookings['startDate'] < now ) ), available_until is the earliest booking's bookings['startDate'] . Unset else. |
Not provided for now. system_hours would describe the whole system, not opening_hours per station.
Not provided for now.
Not provided for now.
Information is manually extracted from the providers website. See config/deer.json.
Not provided for now.
Not provided for now.
This sections describes how Deep Links can be costructed from station_id
or vehicle_id
.
Currently, no deeplinks for deer are provided.