List of zones GBFS supports
The Dott’s GBFS API allows external parties to get real-time feeds information about vehicles, zones, pricing, stations and system information.
Requirements
Before being able to get the list of gbfs zones you need to comply with the following items:
- Have a valid JWT (See Generating and Signing a Valid JWT Guide).
- Have confirmation from
partner integrationsteam, about access being provided at least for one region.
Code samples
Perform following request(s) for receiving data about:
- Low speed zone
- No park zone/No start zone
- No riding zone
- Parking zone
- Designated parking zone
- cURL
- Node.js
# Global endpoint (all regions which partner is allowed to receive information for).
curl \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
'https://gbfs.api.ridedott.com/v2/geofencing_zones.json'
# OR
# Reginal endpoint (:regionName should be equal to one of
# regions names which partner is allowed to receive information for).
curl \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
'https://gbfs.api.ridedott.com/v2/:regionName/geofencing_zones.json'
import fetch from 'node-fetch';
const TOKEN = 'JWT_TOKEN';
// Global endpoint (all regions which partner is allowed to receive information for).
const globalEndpoint = 'https://gbfs.api.ridedott.com/v2/geofencing_zones.json';
// Reginal endpoint (:regionName should be equal to one of
// regions names which partner is allowed to receive information for).
const regionalEndpoint =
'https://gbfs.api.ridedott.com/v2/:regionName/geofencing_zones.json';
// Select one of the available endpoints - `globalEndpoint` or `regionalEndpoint`
const url = globalEndpoint;
const response = await fetch(url, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer: ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);
Perform following request(s) for receiving data about:
- Parking spots
- cURL
- Node.js
# Global endpoint (all regions which partner is allowed to receive information for).
curl \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
'https://gbfs.api.ridedott.com/v2/station_information.json'
# OR
# Reginal endpoint (:regionName should be equal to one of
# regions names which partner is allowed to receive information for).
curl \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
'https://gbfs.api.ridedott.com/v2/:regionName/station_information.json'
import fetch from 'node-fetch';
const TOKEN = 'JWT_TOKEN';
// Global endpoint (all regions which partner is allowed to receive information for).
const globalEndpoint =
'https://gbfs.api.ridedott.com/v2/station_information.json';
// Reginal endpoint (:regionName should be equal to one of
// regions names which partner is allowed to receive information for).
const regionalEndpoint =
'https://gbfs.api.ridedott.com/v2/:regionName/station_information.json';
// Select one of the available endpoints - `globalEndpoint` or `regionalEndpoint`
const url = globalEndpoint;
const response = await fetch(url, {
method: 'GET',
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer: ${TOKEN}`,
},
});
const data = await response.json();
console.log(data);
Zones definition and examples
After successfully performed requests, data in json format will be received.
Following list will help to define zones by specified gbfs rules.
Rules must be combined together and never be separated from each other. There
could be a situation in which free parking is forbidden (denoted by the
ride_allowed being set to false ), but station parking is allowed (denoted
by the station_parking being set to true) in the same zone.
Low speed zone
- Rule
maximum_speed_kphis set and its value is lower than the one of the main region settings.
{
"data": {
"features": [
{
"type": "Feature",
"properties": {
"name": "🇩🇪 Bonn",
"rules": [
{
// MAIN REGION VALUE
"maximum_speed_kph": 25,
"vehicle_type_id": [ "dott_bicycle" ],
...
},
]
},
"geometry": {...}
},
{
// THIS IS 'Low speed zone'
"type": "Feature",
"properties": {
"name": "NPZ",
"rules": [
{
// VALUE IS LESS THAN MAIN REGION
"maximum_speed_kph": 18,
"vehicle_type_id": [ "dott_bicycle" ],
...
}
]
},
"geometry": {...}
}
]
}
}
No park zone/No start zone
- Rule
ride_allowedis set to false.
In GBFS currently these always go together.
There will not be a No park zone alone or No start alone, if we have either,
GBFS will express it as both no start and no park.
{
"data": {
"features": [
// THIS IS 'No park zone/No start zone'
{
"type": "Feature",
"properties": {
"name": "🇩🇪 Bonn",
"rules": [
{
"ride_allowed": false,
"vehicle_type_id": [ "dott_bicycle" ],
...
},
]
},
"geometry": {...}
},
}
}
No riding zone
- Rule
ride_through_allowedis set to false .
{
"data": {
"features": [
// THIS IS 'No riding zone'
{
"type": "Feature",
"properties": {
"name": "🇩🇪 Bonn",
"rules": [
{
"ride_through_allowed": false,
"vehicle_type_id": [ "dott_bicycle" ],
...
},
]
},
"geometry": {...}
},
}
}
Parking zone
- This cannot be expressed via GBFS by itself (see item #2 of this list).
- Rule
ride_allowedis set to true.
{
"data": {
"features": [
// THIS IS 'Parking zone'
{
"type": "Feature",
"properties": {
"name": "🇩🇪 Bonn",
"rules": [
{
"ride_allowed": true,
"vehicle_type_id": [ "dott_bicycle" ],
...
},
]
},
"geometry": {...}
},
}
}
Designated parking zone
- Rule
station_parkingis set to true.
{
"data": {
"features": [
// THIS IS 'Designated parking zone'
{
"type": "Feature",
"properties": {
"name": "🇩🇪 Bonn",
"rules": [
{
"station_parking": true,
"vehicle_type_id": [ "dott_bicycle" ],
...
},
]
},
"geometry": {...}
},
}
}
Parking spots
{
"data": {
"stations": [
// THIS IS 'Parking spot'
{
"is_virtual_station": true,
"lat": 50.585581,
"lon": 5.556997,
"name": "All. de la Decouverte",
"region_id": "e44c471f-26ab-4037-b00c-c71149ba7680",
"station_id": "d36bfb31-5666-4258-9e06-e27c3684f178",
"vehicle_capacity": {
"dott_bicycle": 5,
"dott_scooter": 5
}
},
...
}
}