Wheelmate API
The Wheelmate App API is designed specifically for the purposes of Wheelmate app.
API Version: 1.0.47
Authentication
The Wheelmate API requires an API key in order to access its REST endpoints (over HTTP). The API key is unique per client platform (iOS, Android, …) and must be provided in a special HTTP header in each HTTP request to the API.
Example:
X-WHEELMATE-API-KEY: tJD9ppZbAsY1Q+rTiLSKi54wif1TUVw4
The API key should be configurable in client apps, and may differ between different backend environments.
API Root ¶
Wheelmate API Root ¶
This resource offers the initial entry point for using the API. It is recommended to follow the url-link values or ‘Location’ header where applicable to retrieve resources, instead of constructing your own URLs, to keep your client decoupled from implementation details.
A ‘Link’ object has the following attributes:
-
rel - The link identifier
-
href - The URL to the resource
Entry pointGET/api
Example URI
200
Headers
Content-Type: application/json
Body
{
"links": [
{
"rel": "self",
"href": "/api"
},
{
"rel": "geoobjects",
"href": "/api/geoobjects"
}
]
}
Geoobjects ¶
This resource offers actions for querying and managing geographical features (objects).
Geographic data is stored according to the GeoJSON standard (https://tools.ietf.org/html/rfc7946). The GeoJSON specification specifies longitude first and latitude second. Like in other mapping applications, longitude and latitude are angles and represented in terms of degrees. Longitude values are measured from the Prime Meridian and are between -180 degrees and 180.0 degrees, and latitude values are measured from the equator and are between -90.0 degrees and 90.0 degrees. The underlying database engine interprets coordinates as represented per the WGS-84 reference system.
Geoobject
A Geoobject has the following attributes:
-
id - A global unique identifier for the object (GUID)
-
label - The common name for the geographical feature (optional)
-
countryCode - The country in whihc the feature resides
-
location - The geographical coordinates of the feature, consisting of an array with a longitude and latitude pair.
-
type - The type of feature (see Type below)
-
tags - A list of tags (see Tags below) which describes specific aspects of the geographical object.
Type
The type attribute in Geoobject can be (but is not limited to) one of the following values:
-
toilet
- A regular (non-HC) toilet -
disabledToilet
- A handicap-friendly toilet -
parking
- A parking lot/place
Tags
The tags list in Geoobject can contain (but is not limited to) the following values:
-
paid
- The parking or the toilet is not for free -
eu-key
- The toilet requires a special EU-key for opening -
hc-friendly
- The toilet is handicap-friendly (same asdisabledToilet
type)
Geoobjects resource ¶
Get by IDGET/api/geoobjects/{id}
Gets a specific geographic object by its unique identifier.
Example URI
- id
string
(required) Example: 8CE76930-38C6-43B5-9E43-770733760852A globally unique identifier (GUID) for the object. The GUID must be uppercased.
200
Headers
Content-Type: application/json
Body
{
"id": "8CE76930-38C6-43B5-9E43-770733760852",
"label": "Mark's Restaurant",
"address": {
"street": "Bladgade 2",
"zipCode": "1234",
"city": "København K"
},
"type": "toilet",
"countryCode": "DK",
"location": [
12.233455,
55.123
],
"tags": [
"paid",
"eu-key"
],
"counters": {
"likes": 21,
"dislikes": 4
}
}
Query by polygonGET/api/geoobjects?within={within}&type={type}
Retrieves a list of objects that are contained within the specified geographic polygon.
Example URI
- within
string
(required) Example: [15,56],[10,56],[10,54],[15,54],[15,56]A list of coordinates defining a polygon (in counter-clockwise order) that the features must be within. Each coordinate is defined with longitude first and latitude second. The GeoJSON specification requires that for valid Polygons, the last coordinate pair provided should be the same as the first, to create a closed shape.
- type
string
(optional) Example: toiletFilter by a specific object type
200
Headers
Content-Type: application/json
Body
[
{
"id": "8CE76930-38C6-43B5-9E43-770733760852",
"label": "Mark's Restaurant",
"address": {
"street": "Bladgade 2",
"zipCode": "1234",
"city": "København K"
},
"type": "toilet",
"countryCode": "DK",
"location": [
12.233455,
55.123
],
"tags": [
"paid",
"eu-key"
],
"counters": {
"likes": 21,
"dislikes": 4
}
}
]
Query by circleGET/api/geoobjects?center={center}&radius={radius}&type={type}
Retrieves a list of objects contained in the specified geographic circle.
Example URI
- center
string
(required) Example: [12,55]A center coordinate for the circle that the features must be within. The coordinates are a longitude first and latitude second.
- radius
string
(required) Example: 34.2The radius, in meters of the circle that the features must be within.
- type
string
(optional) Example: toiletFilter by a specific object type
200
Headers
Content-Type: application/json
Body
[
{
"id": "8CE76930-38C6-43B5-9E43-770733760852",
"label": "Mark's Restaurant",
"address": {
"street": "Bladgade 2",
"zipCode": "1234",
"city": "København K"
},
"type": "toilet",
"countryCode": "DK",
"location": [
12.233455,
55.123
],
"tags": [
"paid",
"eu-key"
],
"counters": {
"likes": 21,
"dislikes": 4
}
}
]
CreatePOST/api/geoobjects
Creates a new geoobject (geographical feature).
The address
field is optional. Set it to null
if the geoobject shouldn’t be associated with an address.
Example URI
Headers
Content-Type: application/json
Body
{
"label": "Mark's Restaurant",
"address": {
"street": "Bladgade 2",
"zipCode": "1234",
"city": "København K"
},
"type": "toilet",
"countryCode": "DK",
"location": [
12.233455,
55.123
],
"tags": [
"paid",
"eu-key"
]
}
201
Headers
Content-Type: application/json
Location: /api/geoobjects/8CE76930-38C6-43B5-9E43-770733760852
Body
{
"id": "8CE76930-38C6-43B5-9E43-770733760852",
"label": "Mark's Restaurant",
"address": {
"street": "Bladgade 2",
"zipCode": "1234",
"city": "København K"
},
"type": "toilet",
"countryCode": "DK",
"location": [
12.233455,
55.123
],
"tags": [
"paid",
"eu-key"
],
"counters": {
"likes": 0,
"dislikes": 0
}
}
LikePOST/api/geoobjects/{id}/like
Submits a “like” on a geoobject
Example URI
- id
string
(required) Example: 8CE76930-38C6-43B5-9E43-770733760852A globally unique identifier (GUID) for the object. The GUID must be uppercased.
Headers
Content-Type: application/json
201
Headers
Content-Type: application/json
Body
{
"likes": 22
}
DislikePOST/api/geoobjects/{id}/dislike
Submits a “dislike” on a geoobject
Example URI
- id
string
(required) Example: 8CE76930-38C6-43B5-9E43-770733760852A globally unique identifier (GUID) for the object. The GUID must be uppercased.
Headers
Content-Type: application/json
201
Headers
Content-Type: application/json
Body
{
"dislikes": 5
}