|
getbookings_v2_1
car2go API Documentation - Get bookings
Get bookingsProvides a list of all current bookings of a user. Access to this function is restricted. See OAuth documentation for more details.
Parameters
Request ExamplesGET https://www.car2go.com/api/v2.1/bookings?loc=ulm&format=json GET https://www.car2go.com/api/v2.1/bookings?loc=austin ResponseEach booking consists of
Vehicle information consists of Response ExamplesA XML response example:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<bookingResponse xmlns="http://www.car2go.com/openapi/xmlschema">
<returnValue>
<code>0</code>
<description>Operation successful.</description>
</returnValue>
<booking>
<bookingId>4321</bookingId>
<reservationTime>2001-12-31T12:00:00+01:00</reservationTime>
<bookingposition>
<latitude>48.4008</latitude>
<longitude>9.9596</longitude>
<address>Blaubeurer Strasse 128, 89077 Ulm</address>
</bookingposition>
<account>
<accountId>5678</accountId>
<description>Max Mustermann</description>
</account>
<vehicle>
<vin>WME4513001K154451</vin>
<numberPlate>UL-C5713</numberPlate>
<fuel>90</fuel>
<interior>GOOD</interior>
<exterior>GOOD</exterior>
<position>
<latitude>48.4008</latitude>
<longitude>9.9596</longitude>
<address>Blaubeurer Strasse 128, 89077 Ulm</address>
</position>
<engineType>CE</engineType>
</vehicle>
</booking>
<booking>
<bookingId>4321</bookingId>
<reservationTime>2001-12-31T13:00:00+01:00</reservationTime>
<bookingposition>
<latitude>48.1048</latitude>
<longitude>8.1591</longitude>
<address>Lange Strasse 67, 82828 Grossstadt</address>
</bookingposition>
<account>
<accountId>5678</accountId>
<description>Max Mustermann</description>
</account>
</booking>
</bookingResponse>
A JSON example:
Test ModeResponse contains two bookings, one for each test account. The first one has a vehicle assigned, the second one is scheduled in future. Note: Bookings created in test mode won't be returned. 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