|
accounts_v2_1
car2go API Documentation - Get all accounts
Get all accountsProvides all valid accounts of a user for a given location like Ulm or Austin. Access to this function is restricted. See OAuth documentation for more details. The only supported HTTP method is GET.
Parameters
Request ExamplesGET https://www.car2go.com/api/v2.1/accounts?loc=ulm&format=json GET https://www.car2go.com/api/v2.1/accounts?loc=austin ResponseThe XML file defines a accountResponse tag to receive all valid accounts for any car2go user. The accountResponse tag defines following sub tags:
Response ExamplesA XML response example where user has valid account:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<accountResponse xmlns="http://www.car2go.com/openapi/xmlschema">
<returnValue>
<code>0</code>
<description>Operation successful.</description>
</returnValue>
<account>
<accountId>58</accountId>
<description></description>
</account>
</accountResponse>
A XML response example where user does not have valid account:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<accountResponse xmlns="http://www.car2go.com/openapi/xmlschema">
<returnValue>
<code>3</code>
<description>No valid accounts found.</description>
</returnValue>
</accountResponse>
A JSON response example:
{"returnValue":{"code":0,"description":"Operation successful."},"account":[{"accountId":994,"description":"Max Mustermann11585"}]}
Test ModeResponse contains two test accounts which can be used to create bookings in test mode. Return CodesThe following return codes may occur:
(c) 2010 car2go GmbH. All rights reserved. Generated 03.02.12 08:59 | |||||||||||||||||||||||||||||||||||||
► Sign in to add a comment