Rent a car

Rent a car contracts

Search

This is where everything begins, your booking flow should start here. Use the credential provided by the Cangooroo license owner (see the section authentication and authorization). The response will have the token that allows you to use the next methods and complete your booking flow.

Request

Below you find an example of our search request

{

"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 be. Use the actual time that the pick will occur, so if you are at GMT+1 and the pickup will be 9:00am use:

"Pickup": {

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

"Hour": 09,

"Minutes": 00,

[...]

}

Response

Find below some explanation about API search response

Token

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.

Total car results, cars options and suppliers

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.

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.

GetBookingConditions

This method is part of the booking flow and must be called before the doBooking. The response will return important information regarding the option choosen in order to procced to the booking.

Request

The request is very simple as the example below:

{

"Credential": {

"Username": "your_Username",

"Password": "your_Password"

},

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

"CarId": 1

}

Where carId is the option that the user chooses.

Response

The response is detailed booking details information.

doBooking

This method is used to confirme the booking. Besides the credential an token that need to be informed you can also

  • Credentials

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

"Credential": {

"Username": "your_Username",

"Password": "your_Password"

},

  • Token

As stated before, the Token you received on the search response is extremely important because it is this information that binds the booking process together. To learn more about the Token, click here.

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

"Token": "99f97a37-5b71-468e-995b-56db85081a12",

CarId

To reserve the chosen car, the roomId must be informed:

"CarId": 123456

Driver

Here you will be informed the data of the driver must inform their name, surname, CPF among others.

"Driver": [{

"Name": "test",

"Surname": "NoBook",

"Age": 25,

"Cpf": "011.400.289-22",

"Title": "Mr",

"MainPax": true,

"isChild": false,

"Address": "Rua do Rocio",

"City": "São Paulo",

"ZipCode": "04552000",

"State": "São Paulo",

"AddressNumber": "123",

"Email": "emailtest@t4w.com.br",

"PhoneDDD": "11",

"PhoneDDI": "55",

"PhoneNumber": "40028922"

}]

Payment

This field refers to the payment data of the user, if the user chooses to make the payment, or if the agency is anticipated and the reservation is in penalty, cangooroo will make the payment.

"Payment":{

"CreditCard": {

"Holder": "Nikolas K",

"CardNumber": "4111111111111111",

"SecurityCode": "123",

"YearExpiration": 2020,

"MonthExpiration": 12,

"Installments": 3,

"CardOperator": "VISA"

}

}


  • SetWaitingPayment

When you send SetWaitingPayment as true, your reservation will be created with the status awaiting payment. The reservation will be available for confirmation until the token expires and if it is not paid, it will be rejected. When paying within the period, the reservation will be sent to the supplier for confirmation.

To see all the properties contained in the Booking Request, please see our reference page.

CancelAllRentACarServices

Use this methodo to cancel all rent a car services in a file (reservation). Please be aware that only rent a car services will be cancelled using this method. If you want to cancel all services from a file please use some backoffice method.

CancelByService

Use this method to cancel a specific service in a file (reservation). Please be aware that some services cannot be canceled alone, all services need to cancelled and in this case this method return an error.

URL and Examples

SOAP

http://ws-[clientIdentification].cangooroo.net/API/SOAP/RentACar.svc

REST

REST: http://ws-[clientIdentification].cangooroo.net/API/REST/RentACar.svc