-
Notifications
You must be signed in to change notification settings - Fork 10
v2.1_locations
Provides a list of all locations car2go is operating for like ulm or austin in either XML or JSON format.
- Access: public
- URL: http://www.car2go.com/api/v2.1/locations
- Method: GET
Name | Mandatory | Description |
---|---|---|
oauth_consumer_key | true | your assigned oauth consumer key |
format | false | defines response format. Value "json" => JSON format, otherwise xml format is used |
callback | false | defines JSONP (JSON with Padding) callback function used as wrapper |
test | false | has currently no effect |
GET http://www.car2go.com/api/v2.1/locations?oauth_consumer_key=consumerkey
GET http://www.car2go.com/api/v2.1/locations?oauth_consumer_key=consumerkey&format=json
Each location consists of:
- returnValue - see OpenApiReturnValue for more details
- locationId - the unique identifier of the location
- locationName - the name of the location
- defaultLanguage - the default language of the location, according to ISO 639-1 alpha-2 code
- countryCode - the country of the location, according to ISO 3166-1 alpha-2 code
- timeZone - the timeZone of the location, Continent/City
- center - center of location (latitude/longitude)
- upperLeft - upper left coordinates of operation area (latitude/longitude)
- lowerRight - lower right coordinates of operation area (latitude/longitude)
A XML response example:
<pre>
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><locationResponse xmlns="http://www.car2go.com/openapi/xmlschema"><returnValue><code>0</code><description>Operation successful.</description></returnValue><location><locationId>1</locationId><locationName>Ulm</locationName><timezone>Europe/Berlin</timezone><countryCode>DE</countryCode><defaultLanguage>de</defaultLanguage><mapSection><center><latitude>48.398917</latitude><longitude>9.99139</longitude></center><upperLeft><latitude>48.4383</latitude><longitude>9.9146</longitude></upperLeft><lowerRight><latitude>48.3446</latitude><longitude>10.0459</longitude></lowerRight></mapSection></location></locationResponse> A JSON response example:
<pre>
{"location":[ {"countryCode":"DE", "defaultLanguage":"de", "locationId":1, "locationName":"Ulm", "mapSection":{ "center":{ "latitude":48.398917, "longitude":9.99139 },"lowerRight":{ "latitude":48.3446, "longitude":10.0459 },"upperLeft":{ "latitude":48.4383, "longitude":9.9146 } },"timezone":"Europe/Berlin" }], "returnValue":{ "code":0, "description":"Operation successful." }}
The following return codes may occur:
Code | Description | Note |
---|---|---|
0 | Operation successful. |
(c) 2010 car2go GmbH. All rights reserved. Generated 30.10.15 17:17