Updating Bookings using Post Booking API

Updating Bookings using Post Booking API

Overview

The Post Booking contains methods which allow you to perform different actions on a booking in RCM. Two of the methods allow you to update the booking information. The difference between the two methods is the information that you are able to update.

The two methods are listed below:
  1. editbooking
  2. updatebooking
It is important to note that when you call the either the editbooking or updatebooking method, the only optional fees that will be saved to the booking are the ones you pass in. For example, if you have a booking with a Baby Seat already on the booking as an extra fee, if you do not pass this Baby Seat extra fee is an part of the optionalfees data, it will be removed from the booking inside RCM. 

Why two methods?

The original "editbooking" method is available for everyone to use. It will update most of the booking details, but you can't use it to change booking parameters that may affect the availability or rates of the booking - i.e. dates/times, locations or category changes can't be done with this method.
The newer "updatebooking" method is restricted in use, and any agency that wants to use this method must be approved by the Rental Car Company.  As well as all of the existing functionality of "editbooking", this method does allow updates to those fields that may affect rates or availability - i.e. dates/times, locations or category changes can be achieved with this method.

Edit Booking

The editbooking method is our standard option and allows you to make the following changes to a booking:
  1. Update the customer's personal information.
  2. Add/Remove optional fees from the booking
  3. Update the Insurance option.
  4. Update the Kms Charge option.
This method doesn't allow any changes that may affect the availability of the vehicle, e.g. locations, dates or categories.  For these updates please see "updatebooking".

More detailed information about this editbooking method can be found in the Developer's Sandbox. 

Update Booking

The updatebooking method  allows you to make the following changes to a booking:
  1. Update the customer's personal information.
  2. Add/Remove optional fees from the booking
  3. Update the Insurance option.
  4. Update the Kms Charge option.
  5. Change the pickup/drop-off location
  6. Change the pickup/drop-off date and time
  7. Change the Vehicle Category on the booking.
Note that all parameters must be passed in, as per Edit Booking - e.g. if you don't pass in the existing optional fees, they will be removed from the booking.  

Any agencies requiring access to this method will need to be approved to do so by the rental car company.  This may require some configuration updates before you will be granted permission.

We recommend calling the validateupdatebooking method before calling updatebooking, as it will validate the new booking to ensure that the new booking meets all of the rules you have setup in your RCM system.  This allows you to present the user with alternative options in the case of an availability issue.


The "validateupdatebooking" API request should have the following data fields as a minimum:

 

1.  {

    "method""validateupdatebooking",

    "reservationref""002421209C7CB83",

    "bookingtype"2,

    "pickupdatetime""2022-03-18 10:00",

    "pickuplocationid"1,

    "dropoffdatetime""2022-04-20 10:00",

    "dropofflocationid"1,

    "vehiclecategoryid"2,

    "driverageid"10

}

This method will return a success indicator, and one of the following:
1. either a list of validation errors (a list of possible errors is at the end of the article):

{
    "status": "ERR",
    "error": "Validation errors",
    "validation_error_details": [
        {
            "Code": "DATE_OF_BIRTH_MISSING",
            "Message": "Customers Date Of Birth must be provided"
        }
    ],
    "results": []
}
2. or an empty results dataset with status "OK" (if there were no changes that affect rates or availability),
{
    "status": "OK",
    "error": "",
    "validation_error_details":[],
    "results": []
}
3. or the same output as step 3 of the booking process in the results (i.e. new rates, fees) with status "OK"

 {

    "status": "OK",
    "error": "",
    "validation_error_details":[],
    "results": [
            "Availability": {
                 "LocationFees":[ ... etc ... ],
                 "SeasonalRates": [... etc ...],
                 "AvailableCars": [... etc ....],
                 "MandatoryFees": [ ... etc ....],
                      ... 
            }
      ]
}

 

To then update the booking, call the updatebooking method. The request is similar to the EditBooking method but with the additional parameters:

 

1.  {

    "method""updatebooking",

    "reservationref""002421209C7CB83",

    "bookingtype"2,

    "pickupdatetime""2022-03-18 10:00",

    "pickuplocationid"1,

    "dropoffdatetime""2022-04-20 10:00",

    "dropofflocationid"1,

    "vehiclecategoryid"2,

    "driverageid"10,

    "insuranceid"5,

    "extrakmsid"0,

    "transmission"1,

    "customer": {

        "lastname""Test",

        "email""craig@rentalcarmanager.com"

    },

    "optionalfees": [

        {

            "id"1,

            "qty"1

        }

    ]

}

 


This method will return either a list of validation errors or if successful, the booking details (same as the BookingInfo method).

 

In both cases, reservationref, bookingtype, pickupdatetime, pickuplocationid, dropoffdatetime, dropofflocationid, vehiclecategoryid and driverageid are all required.


Validation Errors

Here is a list of the validation errors that you might get from the new UpdateBooking and ValidateUpdateBooking methods:

 

 

Code

Message

Notes

INVALID_PICKUP_LOCATION_ID

Invalid pickup location Id [X].

INVALID_DROPOFF_LOCATION_ID

Invalid dropoff location Id [X].

PICKUP_DATE_IN_PAST

The selected pickup date is in the past

RESERVATION_NOT_FOUND

Reservation XXX could not be found.

RELOCATION_SPECIAL

Bookings for a relocation special cannot be updated using this API method.

PACKAGE

Bookings for packages cannot be updated using this API method.

QUOTE

Quotes cannot be updated using this API method.

AGENT_BOOKING

Agent bookings cannot be updated using this API method.

BOOKING_HIRED

The selected booking has already been hired and cannot be updated.

BOOKING_CANCELLED

The selected booking has been cancelled.

BOOKING_RETURNED

The selected booking has already been returned and cannot be updated.

BOOKING_STATUS

The selected booking cannot be updated.

VEHICLE_CATEGORY_ID

Invalid vehicle category Id [X]

DRIVER_AGE_ID

Invalid Driver Age Id [X]

The driver age id is optional.  If you provide it then it must be valid.  If not provided then you must provide the customer's date of birth so that the correct driver age can be determined for getting the availability and rates.

DATE_OF_BIRTH_MISSING

Customers Date Of Birth must be provided

If you don't provide the driver age in the request then you must provide the customer's date of birth

DATE_OF_BIRTH

Invalid date of birth [dd/MMM/yyyy]

DRIVER_AGE

Could not find matching driver age id for Driver Age [XX]

DO_NOT_MOVE

The selected booking has been marked as 'Do Not Move'.

VEHICLE_AVAILABILITY

No availability for the selected category, location and date range.

LOCATION_AVAILABILITY

The message will vary depending on location availability e.g. location hours, location closed.

 

This is the same message that you would get in the locationinfo dataset from Step 2 of the booking API.

VEHICLE_AVAILABILITY

No availability for the selected category and date range.

VEHICLE_AVAILABILITY

The message will vary depending on vehicle category availability.

 

This is the same message that you would get in the availablecars dataset from Step 2 of the booking API.

 





    Important Articles


      • Related Articles

      • Post Booking API Process

        Overview The RCM Post Booking API allows you to retrieve booking information and also update bookings that already exist within RCM.  The following information cannot be changed on the booking using the Post Booking API: Pickup/drop off locations ...
      • Getting Started with Post Booking API

        Introduction Version 3.2 of the Post-Booking API allows web developers to access the core post-booking methods for Rental Car Manager systems. Note that the methods in this document all refer to post-booking methods, i.e. involving the update of ...
      • Useful Post Booking API Methods

        Overview As well as the methods which are used in the Post Booking Process, there are other methods which are part of the Post Booking API. They are all discussed below. Get Location Details (locationdetails) The locationdetails method can be used to ...
      • API V3.2 Booking Process

        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), ...
      • Export API Methods

        Overview Rental Car Manager offers an Export API to export certain datasets. Each of the methods available is discussed below. For detailed information about getting started with connecting to the Export API, see the article Getting Started with ...