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.
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": []}
{
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
}
]
}
In both cases, reservationref, bookingtype, pickupdatetime, pickuplocationid, dropoffdatetime, dropofflocationid, vehiclecategoryid and driverageid are all required.
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. |