Introduction
The API supports the required processes in order to integrate wheels rental products into a website
- search of quotes based on specific route and dates
- storage of a quote
- customization quote
- sending of quote PDF by e-mail
- change of dates/route
- requesting of a booking
API Address
The test environment is accessed via:
http://api.globecampers.com/prep
The production environment is accessed via:
https://api.globecampers.com/v1
Authentication |
API Authentication is based on token authentication, whereas a token must be requested via the authenticate method, and then embedded in the url (token=) or request header (authorisation bearer:) for each request. | if a token has expired, a new token needs to be requested using credentials | POST authenticate |
---|---|---|---|
description | request a valid authentication token with credentials | ||
resource | https://api.globecampers.com/v1/authenticate |
||
parameters | user | username of credentials | example: e.sample | password | password of credentials | example: ***** |
sample | GET me |
||
description | get the current user information with token | ||
resource | https://api.globecampers.com/v1/me |
||
sample | World Data |
basic regional data objects for selection lists | GET currencies |
description | Selection list of valid currencies | ||
resource | https://api.globecampers.com/v1/currencies |
||
sample | GET languages |
||
description | Selection list of valid languages | ||
resource | https://api.globecampers.com/v1/languages |
||
sample | Search |
value lists for search criteria of a search mask; the only mandatory lists are pick-up cities and drop-off cities. | note: the drop-off cities can be different than the pick-up cities due to different routes offered by the suppliers | GET brands |
description | get a list of valid brands | ||
resource | https://api.globecampers.com/v1/brands |
||
optional | category | bike, car, camper, motor-home or travel-trailer | example: bike | region | valid region slug | example: nam | GET regions |
description | Selection list of applicable regions | ||
resource | https://api.globecampers.com/v1/regions |
GET countries |
|
description | Selection list of applicable countries | ||
resource | https://api.globecampers.com/v1/countries |
||
optional | region | valid region slug | example: nam |
sample | GET cities |
||
description | get a list of valid pick-up cities or drop-off cities for a pick-up city | ||
resource | https://api.globecampers.com/v1/cities |
||
optional | brand | valid brand slug | example: road-bear-us | country | valid country slug, or iso code | example: de | pickUpCity | valid city slug, code or alias | example: nyc |
sample | Quotes |
in order to retrieve a list of quotes, use the GET quotes method. | each quote result has a query attribute which contains all the parameters required for the method GET quotes/view | note: where as the pick-up city parameter refers in to a city, which can have several locations of different brands, and is therefore used for quote search. the pick-up location parameter however refers to a location of a specific brand and can not be selected from a list, but must be retrieved from the parameters of the result item. | GET quotes |
description | Get a list of quotes for search criteria | ||
resource | https://api.globecampers.com/v1/quotes |
||
parameters | pickUpCity | valid city slug, code or alias | example: nyc | dropOffCity | valid city slug, code or alias | example: nyc | pickUpDate | YYYY-MM-DD | example: 2017-04-07 | dropOffDate | YYYY-MM-DD | example: 2016-05-02 |
optional | brand | valid brand slug | example: road-bear-us | vehicle | valid brand specific vehicle slug | example: c25 | category | bike, car, camper, motor-home or travel-trailer | example: bike | driverAge | number, age of youngest Driver | example: 32 | passengers | number, travelling Passengers | example: 4 | gender | male/female or m/f or ms/mr | example: female | firstName | text | example: John | lastName | text | example: Smith | example: s.sample@gmx.net | check | boolean | example: true | cache | string | example: 372900af71d2361a873e858c5b394e776f50027257e3d72c6af727d15a62 |
sample | GET quotes/view |
||
description | Get a detail view for a specific quote | ||
resource | https://api.globecampers.com/v1/quotes/view |
||
parameters | brand | valid brand slug | example: road-bear-us | program | valid brand specific program slug | example: winter-2016-2017 | vehicle | valid brand specific vehicle slug | example: c25 | pickUpLocation | valid brand specific location slug | example: berlin | dropOffLocation | valid brand specific location slug | example: frankfurt | pickUpDate | YYYY-MM-DD | example: 2017-04-07 | dropOffDate | YYYY-MM-DD | example: 2016-05-02 |
optional | driverAge | number, age of youngest Driver | example: 32 | passengers | number, travelling Passengers | example: 4 | gender | male/female or m/f or ms/mr | example: female | firstName | text | example: John | lastName | text | example: Smith | example: s.sample@gmx.net |
sample | GET availabilities/{availabilityToken} |
||
description | Get brand level availabilities for a specific availability token (checkAvailabilities) | ||
resource | https://api.globecampers.com/v1/quotes/availabilities/{availabilityToken} |
||
parameters | availabilityToken | string | example: 372900af71d2361a873e858c5b394e776f50027257e3d72c6af727d15a62 | GET availability/{availabilityToken} |
description | Get quote level availability for a specific availability token (checkAvailability) | ||
resource | https://api.globecampers.com/v1/quotes/availability/{availabilityToken} |
||
parameters | availabilityToken | string | example: 372900af71d2361a873e858c5b394e776f50027257e3d72c6af727d15a62 | Sales |
in order to perform further steps with a quote, it must be converted into a sale and receives a unique code, which references all the input parameters and client information. | the sale prices are not stored until a booking is requested, at which point all net prices are freezed. | POST sale |
description | get a unique code for quote input parameters | ||
resource | https://api.globecampers.com/v1/sale |
||
parameters | brand | valid brand slug | example: road-bear-us | program | valid brand specific program slug | example: winter-2016-2017 | vehicle | valid brand specific vehicle slug | example: c25 | pickUpLocation | valid brand specific location slug | example: berlin | dropOffLocation | valid brand specific location slug | example: frankfurt | pickUpDate | YYYY-MM-DD | example: 2017-04-07 | dropOffDate | YYYY-MM-DD | example: 2016-05-02 |
optional | driverAge | number, age of youngest Driver | example: 32 | passengers | number, travelling Passengers | example: 4 | client | json object with gender, firstName and lastName | example: { gender:m, firstName:John, lastName:Smith } | gender | male/female or m/f or ms/mr | example: female | firstName | text | example: John | lastName | text | example: Smith | address | json object with street, postalCode, city and country | example: { street:"Sampleroad 34", city:Zurich, country:ch } | street | text | example: Sampleroad 34 | city | text | example: Zurich | postalCode | text | example: 8800 | country | valid country slug, or iso code | example: de | example: s.sample@gmx.net | phone | text | example: +41 44 378 8999 | language | valid 2-letter language code | example: de | selected | key-value array, where key = component key, value = selected quantity or true | example: unlimited-mileage-package:1, personal-convenience-kit:3 | specials | key-value array, where key= special key, value = true or false | example: early-bird-special:true |
sample | GET sale/{code} |
||
description | Get a detail view for a specific sale | ||
resource | https://api.globecampers.com/v1/sale/{code} |
||
parameters | code | text | example: 57eg4g |
optional | locale | valid 2-letter language code | example: de |