Overview
The RCM API and Agent API allow you to make unallocated bookings for a specified vehicle category, for a specified pickup and drop off date. An unallocated booking is a booking that has been made for a
particular category (e.g. small car), but has not been allocated to a particular vehicle. Allocation of a booking to a specific vehicle is done by the rental car company.
Booking Flow
To make a booking through the API, you need to use the following process:
- Get the locations and vehicle categories
- Get the available vehicles and rates for the selected date range, driver age and vehicle category
- Select a vehicle and get fees & insurances
- Submit a booking or quote
- Submit payment information (not applicable for agent bookings)
It is important that you follow this process in the order mentioned above. You can’t just assume that all locations or categories have been made available by the rental car company for online bookings.
The following is the booking flow for a booking being made via your own website.
The following is the booking flow for a booking being made via an Agent.
Booking Steps
Step 1 - Get Locations and Vehicle Categories
In order to make a booking, you first need to know what locations and vehicle categories have been
made available by the rental car company for selection on their website or for selection by agents.
Step 2 - Get Available Vehicles and Rates
When the end user or agent has selected the booking dates, driver age and category type, then a call is
made to the server to get the availability of different vehicles within the selected category type.
Step 3 - Select a vehicle type and get rates and insurances
The user or agent then selects a particular category of vehicle, and receives back the appropriate
insurance options, mandatory fees and optional extras as setup by the rental car company.
Booking
The selected category and optional extras are then sent to the server along with customer details via an
API call to make a booking or quote.
Via the API, you can create either:
- A quote,
- An “on request” booking, or
- An unallocated reservation.
SavePayment or GetVaultURL
The next stage of the process is the payment. If you are collecting payment for the booking, then you can save the payment information through the API so that the payment will be recorded against the
reservation in Rental Car Manager. Alternatively you are able to save the credit card information in a secure vault so the Rental Car Company can use it at a later date to charge customers.
Agent API
The Agent API is the same as the RCM API except that agents have access to extra methods that allow developers to:
- Cancel bookings, and
- Get a list of bookings for an agent
These extra methods are only available if you have been issued an API key that is set up for an Agent.
Note that some RCM companies do not allow Agents to cancel bookings directly. If this has been set within the RCM system, then the agent will not be able to use the cancel booking method.
Making a Booking
Each of these methods below is described in more detail in our sandbox area. Within the sandbox area there is
an API Test page which includes a parameter list, sample code and the full listing of the returned datasets for each method: https://sandbox.rentalcarmanager.com/developer/apitest_3_2. The relevant method name is shown in the brackets below for each step.
Step 1 - Get locations and vehicle categories (step1)
Method “step1” returns important information to start the booking process, including renting locations, office times, information about vehicle categories, holidays etc.
Note: You will need this step to be able to pass in the correct identifiers for future steps.
Step 2 - Get available vehicles and rates (step2 or search)
Method “step2” takes pickup and drop-off locations, dates and times, and returns a listing of the vehicle categories and their availability status. The rental rates and any mandatory fee information is also
returned.
This allows you to display a listing of the categories so that the customer can choose a vehicle category.
Step 3 - Select a vehicle and get fees and insurances (step3)
Step3 returns information for the selected vehicle category, pickup and drop off locations and dates.
The rental rates and any mandatory fee information is also returned along with any optional extra fees, insurance options, and any Kms options are also returned.
Step 4 - Make a booking or quotation (booking)
The booking method is called to save the customer’s booking request as either an unallocated booking or a quote within Rental Car Manager.
Standard bookings:
When a booking is made using the API, it is saved as a quote by default until either payment has been confirmed by calling the confirmpayment method, or the credit card has been entered into the Credit
Card Vault by calling the vaultentry method. The rental car company can override this default behaviour by changing a system setting that forces all bookings made through the API to be saved as an unallocated
booking even if payment has not been submitted.
Agent Bookings:
Agent bookings don’t use the confirmpayment method. These bookings will be saved as the booking type that you specify in the API call. For example, if you set the booking_type parameter to 2 then is will
be saved as a booking and does not change.
- If you are processing a payment at the time of booking, then you will need to integrate directly with your payment gateway, and then save the payment information against the booking by calling the confirmpayment method.
- If you are saving a tokenised credit card for future payments, then you can integrate directly with your payment gateway, and then save the token information against the booking by calling the rebillingtoken method.
- For companies using VostroPay as their payment gateway, you can call our createpaymenttransaction method to save the credit card token without having to integrate directly with the payment gateway. We will be adding more features to this API method as time goes on, for now it will save a VostroPay rebilling token without taking any payment. For further information please see Integrating with VostroPay on your website
Note that for each of these methods, there is no need to call our separate API method to send an email to the customer. The email will be sent upon calling confirmpayment, rebillingtoken or createpaymenttransaction if the conditions have been met for sending emails (see next section “Sending Email Confirmations”).
Sending Email Confirmations
For quotes:
The confirmation email gets sent when either the method booking is successful or, in the case of an Agent booking, if the agent has been setup to receive emails.
For Unallocated Bookings:
The confirmation email gets sent in the following circumstances:
- the payment/card collection has been successful (through the confirmpayment method or the vaultentry method), or
- the Rental Car Company has been setup not to save cards, or
- in the case of an Agent booking, the agent has been setup to receive emails.
Setting the sendemail parameter value to 2 in the booking method will force the email to be sent after a successful booking.
There is a system parameter in Rental Car Manager that can be used to turn off email confirmations if
you want to handle this yourself. Contact RCM support (support@rentalcarmanager.com) if you would like to use this feature.Once a booking has been made, you can use the bookinginfo method to get all of the finalised information about the booking in one call.
There are two ways that you can call this method, depending on when you are making this call in relation to when the initial call was made to create the booking.
Method call Option 1:
If you are making this call straight after the booking has been entered, use a single parameter reservationref. This value is returned from the “booking” call.
Sample json request data:
{"method":"bookinginfo","reservationref":"32604971D2548D2"}
Method call Option 2:
If you are making this call to get booking information at a later time (i.e. not at the time of original booking), you may not have the value for reservationref. In this case you can use the Reservation
Number along with something to identify the customer.
Parameters:
- reservationno: The customer’s booking number, which will appear on all correspondence between RCM and the customer, for e.g. confirmation email. This is an integer.
- Either “lastname” or “email” – to identify the customer along with the reservationno.
Sample json request data:
{"method":"bookinginfo","reservationno":233064,"lastname":"Cunningham"}
OR
Other Useful API Methods
There are other methods which make up this API, which are not part of the booking process, but which are helpful. They are discussed in more detail in the following article
Useful API V3.2 Methods.
edit booking
cancel booking
agent bookings
location details