RentACar

Using this API

Use the RentACar Rest API to Search, Check Policies and Book Cars with over 100 different suppliers all over the world.

The RentACar Rest API has the following methods to be consumed, in this order:

  • SearchAvailability: Used to define what types of car you want, which Checkin date, number of days and how you want to see your results.

  • GetPaymentPolicies: Used to check the Cancellation Policies for the chosen car.

  • DoBooking: Used to confirm a reservation, send the passenger information and the payment. Read more about possible status here.

  • CancelBooking: Used to cancel a reservation.

  • GetServiceDetails: Serves to view the details of your reservation.

The API works with Json in its requests and responses, so text parameters can be identified by being enclosed in double quotation marks ("example"), the parameters in the numeric or boolean formats can be sent normally.

Below you will find further information about the rules, possibilities, points of attention and most important properties for each method.

RentACar API endpoint

Each Operator will have its own instance of the Cangooroo Booking Engine and, with that, each will have its own endpoint. Unless specified otherwise, your Operator's endpoint will curently be:

    • {{URL}}/ws/Rest/RentACar.svc/Search

Please note the words in BOLD on the example above since those will vary depending on the server you're integrating against.

Search

This is where everything begins. The Search Availability Request is where you will pass your Credentials, define the types of cars and the desired model, the date of rental of the vehicle, the number of days and how you want to return your result.

To see all properties contained in the Search Request and Response, please refer to this reference page.

Search Request

The Search Request is pretty simple, below you will find the most common usage of this method as well as some examples for the most Frequently Asked Questions we have.

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

"Criteria":{

"Pickup": {

"Date": "2019-04-01",

"Hour": 12,

"Minutes": 00,

"LocationCode": "MCO",

"LocationType": "Airport"

},

"Dropoff": {

"Date": "2019-04-07",

"Hour": 12,

"Minutes": 00,

"LocationCode": "MIA",

"LocationType": "Airport"

}

}

}

Credentials

The credentials tag is fairly simple and only has the UserName and the Password as shown below:

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

The UserName space is where you're supposed to put in the UserName given you by the Operator. While the Password is where you're supposed to insert the Password given you by the Operator.

Criteria

The Criteria section is where you define the places of delivery and withdrawal of the vehicle, informing the date, time, location code and type of place to withdraw the vehicle; You'll find the explanation for all the most important sections and properties.

PickUp and DropOff

The PickUp and DropOff fields are the vehicle delivery and withdrawal location specifications, which means that the date, time, and type of pickup location must be entered next to the place code.

For example, to search available cars between 05/15/2019 at 12:00 and 05/16/2019 until 12:00, you should do this:

"Criteria":{

"Pickup": {

"Date": "2019-05-15",

"Hour": 12,

"Minutes": 00,

"LocationCode": "MCO",

"LocationType": "Airport"

},

"Dropoff": {

"Date": "2019-05-16",

"Hour": 12,

"Minutes": 00,

"LocationCode": "MIA",

"LocationType": "Airport"

}

}

It is important to understand that when renting a car, the user will automatically be placed as the main driver (Driver) of the vehicle and must be aware of the cancellation policies of the service.

Date, Hour and Minutes

Here the user can specify the dates and that he wishes to withdraw \ return the vehicle that will be rented.

"Pickup": {

"Date": "2019-05-15",

"Hour": 12,

"Minutes": 00,

[...]

},

"Dropoff": {

"Date": "2019-05-16",

"Hour": 12,

"Minutes": 00,

[...]

LocationCode

The Location Code field is where you should send us the destination ID of the city, store or airport that you want the Cangooroo API to search for and where the vehicle will be returned after the end of the service.

The LocationCode of the destination of the user, must be informed the code and specify the type of place (for example, if the user wants to remove the vehicle at the airport, he must inform the city code of destination next to the type of place, in the case example of an airport).

LocationType

LocationType is the field where the type of pickup location \ delivery of the rented vehicle will be specified, which can be Hotel, Airport, Store or undefined.


It is also very important to remember to never send us any Timezone information. You should build your Request regardless of the Timezone from where you are and to where your passenger will go.

Search Availability Response

Token and information about the number of results

The Token field is extremely important, as explained on our Services page. You will need this token to confirm the rental of the vehicle and this information should be transported with each subsequent request.

A Token will always be unique and the combination of Token + Credentials + expiration ensures that we will never have matching results stored on our servers.

The TotalCarResults field provides information on the total number of results found, how many of them have been shown to you after any used filters - if any - and lastly the number of results in this single response.

When your search provides larger sets of results, those that affect the performance of your application and on those occasions, you will have to work with filters and paging our results.

Cars and Supplies

The SearchAvailability Response will always be the composition of several cars, each belonging to a supplier, thus creating a list of cars and their specifications. This is important to keep in mind because you will probably have to go through each of them to analyze all the results that we returned.

Other properties in the SearchAvailability Response

We return a lot of information for each result. The decision of which of them you will use and how will depend largely on your Operator's strategy and your integration purpose.

GetPaymentPolicies

The GetPaymentPolicies is the method you should call after receiving the SearchAvailability Response and after you've selected the car you wish to book. This is a mandatory step for our booking process, which means that you will must make this call before attempting to confirm your booking.

It is important to be aware that many Suppliers work with cached information to decrease response time when responding to availability requests. Therefore, some values may change from the Search Availability Response for Payment Policy Response, such as price, rate information, and other properties. That is why it is important to compare, verify and update your information and properly notify the user in case of changes.

To see all properties contained in the GetPaymentPolicies Request and Response, please refer to this reference page.

GetPaymentPolicies Request

The GetPaymentPolicies Request is straightforward and simple and below you will find an example along with the Frequently Asked Questions we have about it.

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

"Token": "917eb346-660e-4e7d-9717-25cb381a4221",

"CarId": 1

}

Credentials

The credentials tag is the same as required on the SearchAvailability Request with a UserName and a Password as shown below:

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

The UserName field is where you're supposed to put in the UserName given you by the Operator. While the Password is where you're supposed to insert the Password given you by the Operator.

Token

As stated before, the Token you received on the SearchAvailability Response is extremely important because it is this information that binds the booking process together.

You must pass the Token in the "Token" field as shown below, since the combination of your Credentials + Token + expiration time will ensure that you have access to the cars returned to you on the SearchAvailability Response.

"Token": "dca28fe1-7f51-4aab-9faa-c7a990da8451",

Car Id

Pretty straightforward, the CarId field is where you must pass the desired car ID chosen in the SearchAvailability Response before. It's important to note that you can only call the GetPaymentPolicies method for one car ID at a time, which means you can not have more than one car ID in the same request.

"CarId": 1408

Get Payment Policies Response

Since a lot of suppliers works with cache in SearchAvailability method to decrease response time, sometimes the price, cancellation policies and other properties may change values between searchAvailability and getPaymentPolicies. Because of that it's a very important always to update all the values with method getPaymentPolicies.

In getPaymentPoliciesReponse you will see the fields called "PickUpLocation" and "DropOffLocation". These fields return the data from which the car will be taked and returned, such as location address, latitude, longitude and name of the establishment and provider telephone number. It is mandatory to show this information to your customer.

DoBooking

The DoBooking method is used to perform the reservation of the vehicle that was chosen in Search and dealt with in GetPaymentPolices, this is another simple but very important step because it will inform the main passenger (driver) of the vehicle.

To see all properties contained in the DoBooking Request and Response, please refer to this reference page.

DoBooking Request

The DoBookingRequest method is simple to use, as we can see in the example below, we need to enter the Credential, Token, CarID and User Driver details.

It is important to note that the "Driver" field must always be true, so that the passenger informed by the user is taken as the principal (Driver)

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

"Token": "dca28fe1-7f51-4aab-9faa-c7a990da8451",

"CarId": 1408,

"Driver":{

"Name": "Caique",

"Surname": "NoBook",

"Age": 25,

"Cpf": "40028922080",

"Title": "Mr",

}

}

DoBooking Response

After entering the data in the DoBookingRequest, the DoBookingResponse method will return the reservation information with updated payment policies, provider details and car details and its driver (Driver) along with the status of your reservation, which may have been confirmed or not depending on some incorrect parameter that has been reported in the DoBookingRequest or some problem with the chosen vehicle.

it is worth mentioning that the "BookingId" and "ServiceId" fields have been informed, these numbers will be necessary for the identification of the reservation of a user and also for the cancellation.

CancelBooking

If the User changes his mind about his reservation, he can call the CancelBooking method to cancel the requested service.

To see all properties contained in the Cancel Request and Response, please refer to this reference page.

CancelBooking Request

This is the method used to cancel a reservation, where you will be prompted to provide the ServiceId along with the user credentials.

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

"ServiceId": 1394

}

CancelBooking Response

Returns the response of the previous method, informing if the reservation was canceled or not, according to the ServiceId informed.

GetServiceDetails

Used to check the details of a reservation, the user can see all the details of the reserved service without making any changes in it.

To see all properties contained in the GetServiceDetails Request and Response, please refer to this reference page.

GetServiceDetails Request

To use this method, inform the user credential with the ServiceId (integer) of your reservation, as can be seen in the following example.

{

"Credential": {

"Username": "Your_Username",

"Password": "Your_Password"

},

"ServiceId": 1394

}

GetServiceDetails Response

Used to return the reservation details inserted in the previous method, in the user can check all the details of your reservation.