Updating your Current Web Booking Module to use the new API endpoint

Updating your Current Web Booking Module to use the new API endpoint

Rental Car Manager has embarked on a major infrastructure upgrade, and part of this involved moving our systems off our legacy servers.  


Note: This article is for developers for a Rental Car Company's own booking website. If you are a developer for a Booking Agency please click here


API V3.2

SUMMARY OF CHANGES:

API URL structure is changing:

  1. API domain is changing to https://apis.rentalcarmanager.com/
  2. /api/3.2/ in URL is changing to /booking/v3.2/
  3. For methods other than “main”, you must now add ?apikey=<key> to the end of the URL

E.g. From:  https://<old_server_domain>/api/3.2/<method>/<key>

To:  https://apis.rentalcarmanager.com/booking/v3.2/<method>/<key>?apikey=<key>

 

Where RCM standard web steps are being used, it is even simpler as these only call the “main” method:

From:  https://<old_server_domain>/api/3.2/main/<key>

To:  https://apis.rentalcarmanager.com/booking/v3.2/main/<key>

 

EXAMPLE OF PROCESS TO FOLLOW:

  1. Search for “.rentalcarmanager.com” in all pages… This will give you a start on what to change next:
  2. (a) If the web.config (AppSetting “ServerUrl”) is the only place that has this change, go to Step 3 below.
    (b) If this is found in the source pages, such as step1mini.aspx or Site.Master, go to Step 4 below.
  3. Simply changing the web.config AppSetting “ServerUrl” will not provide the appropriate update, as the domain is changing as well as the structure of the two parameters that come afterwards.  You will need to update the web.config AppSetting “ServerUrl” to be https://apis.rentalcarmanger.com AND ALSO make the changes as per Step 4 below, continuing to use this AppSetting.  Alternatively, remove this AppSetting altogether and follow Step 4 with hard-coded URL
  4. Search for “/api/3.2/” to find all references to our API.  For each instance,
    •  make sure the URL domain that comes before it is https://apis.rentalcarmanager.com . If you changed this in the web.config, and the API call is using the AppSetting “ServerUrl” then there is no need to change anything here.
    • Change “/api/3.2/” to “/booking/v3.2/” wherever this occurs
    • For any method other than “main”, add “?apikey=<key>” to the end of the URL (where <key> is the APIKey value.  Note that in these instances, the key will now be occurring twice in the URL (one is required for our WAF rules, the other to validate against the company)

SAMPLE 1 BEFORE (step1mini.aspx calling “main” method):
<script src='<%=ConfigurationManager.AppSettings("ServerUrl")%>/api/3.2/main/<%= ConfigurationManager.AppSettings("APIKey")%>' type="text/javascript"></script>


SAMPLE 1 AFTER:
<script src='https://apis.rentalcarmanager.com/booking/v3.2/main/<%=ConfigurationManager.AppSettings("APIKey")%>' type="text/javascript"></script>

 

SAMPLE 2 BEFORE (direct calling any method other than “main”):
https://secure2.rentalcarmanager.com/api/3.2/TEST_KEY_HERE    
SAMPLE 2 AFTER:
https://apis.rentalcarmanager.com/booking/v3.2/TEST_KEY_HERE?apikey=TEST_KEY_HERE

 

API V3.1

SUMMARY OF CHANGES:

API URL structure is changing:

  1. API domain is changing to https://apis.rentalcarmanager.com/
  2. /api/3.1/ in URL is changing to /booking/v3.1/
  3. For methods other than “main”, you must now add ?apikey=<key> to the end of the URL, or &apikey=<key> where there are other querystring parameters present

E.g. Fromhttps://<old_server_domain>/api/3.1/<key>/<method>/<params>

Tohttps://apis.rentalcarmanager.com/booking/v3.1/<key>/<method>/<params>?apikey=<key>

 

Where RCM standard web steps are being used it is even simpler, as it only calls the “main” method:

Fromhttps://<old_server_domain>/api/3.1/main/<key>

To: https://apis.rentalcarmanager.com/booking/v3.1/main/<key>

 

EXAMPLE OF PROCESS TO FOLLOW:

  1. Search for “.rentalcarmanager.com” in all pages… These are all the places that will need updating.  Expect the following (depending on version of standard steps):
    •  Index.aspx
    • Step1Mini.aspx
    • Step2.aspx
    • Step3.aspx
    • Step3update.aspx
    • Step4.aspx
    • Step4confirm.aspx
    • Step5.aspx
  2. In each of these files, it should be the line that calls the “main” javascript file. 

SAMPLE 1 BEFORE (step1mini.aspx calling “main” method):

<script src="https://secure20.rentalcarmanager.com.au/api/3.1/main/<%=tst("Key")%>" type="text/javascript"></script>

 

SAMPLE 1 AFTER:

<script src="https://apis.rentalcarmanager.com/booking/v3.1/main/<%=tst("Key")%>" type="text/javascript"></script>

 

SAMPLE 2 BEFORE (direct calling step2 method):

https://secure20.rentalcarmanager.com.au/api/3.1/TEST_KEY_HERE/search/1/1/16_07_2020/11_54/1/23_07_2020/12_54/9/0/-/-

 

SAMPLE 2 AFTER:

https://apis.rentalcarmanager.com/booking/v3.1/TEST_KEY_HERE/search/1/1/16_07_2020/11_54/1/23_07_2020/12_54/9/0/-/-?apikey=TEST_KEY_HERE

 

TROUBLESHOOTING

Access Denied

If you receive an error Http Status 401 or "Access denied due to invalid subscription key. Make sure to provide a valid key for an active subscription." please try the following:

1. Make sure you've included apikey=XYZ on your querystring (where XYZ is your key).

2. Make sure the apikey value is not encoded in any way.  For e.g. if you have a "=" in your key, you must use "=" and not "%3D".  If this is not possible, please see Alternative Subscription Key method below.


Alternative Subscription Key

Where it is not possible to add apikey=XYZ to the URL, you can use the Request Headers instead.  Add a new Request Header named "Ocp-Apim-Subscription-Key", and add your API Key as the value.



    Important Articles


      • Related Articles

      • Updating your AGENT API to use the new API Endpoint

        Rental Car Manager has embarked on a major infrastructure upgrade, and part of this involved moving our systems off our legacy servers.   All Booking Agencies will be required to make some minor changes to use a new API URL in order for them to ...
      • Setting up your Web Booking Module

        Overview There are typically two options available when installing the Rental Car Manager Web Booking Module.    The first approach is to simply ‘style’ the supplied pages to match your existing website and then link to these pages directly from your ...
      • Responsive Version of Web Booking Module

        Overview Our Client Web Service API is a fully responsive Web Booking Module which will run on both mobile and non-mobile devices. This will make it unnecessary to have two versions of the web booking module. This responsive version of the web ...
      • Booking Module - Adding and Updating a Reservation

        Adding a Reservation The booking module handles adding new quotes, unallocated bookings and allocated bookings. It replaces the previous booking module and is split up into the following pages/ steps: Drivers Details Booking Details Booking Fees ...
      • Configuring the RCM Web Booking Module

        Below is a list of the most frequently asked questions when it comes to configuring the Web Booking Module within RCM.  Why are vehicles not displaying on my website? How do I setup the availability of vehicles for the online bookings? Why is there ...