Friday, January 8, 2021

#822 - OIC and Oracle Hospitality (OHIP)










Back in the pre-Covid days, Micros/Oracle Hospitality was probably the Oracle App with which I had the most interactions, albeit vicariously through hotel staff checking me in and out.

So I was delighted when Luis Weir introduced me to the latest release of the Oracle Hospitality Integration Platform - OHIP. At Oracle, we love our acronyms. So let's have a look at OIC leveraging OHIP.


Introduction to OHIP

So what is OHIP? I'll let Luis answer that -

OHIP is our next-generation integration solution, which centralizes, consolidates, and streamlines all our interface capabilities and related processes into a single and unified platform.

It will allow users an unprecedented self-service experience, from discovering our rich set of Hospitality REST APIs to adopting them in customer or partner applications to publishing their usage in our cloud marketplace. The benefits for all are quite clear: We are making it simpler, quicker, and less expensive to integrate with Oracle Hospitality Cloud applications.



   






Check out the page here

Net, net - just think of 3000+ Oracle Hospitality api capabilities, made available to you via an API Gateway developer portal.








Both images above courtesy of Luis Weir.

First Steps with OHIP apis

Let's check out the developer portal -










OK, so I want to do the following - 

1. Check for a hotel room availability at the recently opened Commiskey Towers Hotel in Dublin's hip and upcoming Harmonstown district.

2. If room is available at the inn - then reserve.

Essentially I need to execute 3 api calls - 

1. Get an OAuth token

2. Apply token and check for availability

3. Apply token and reserve the room.


Getting the OAuth token - here is the documentation -














I also need to create an Application and get the relevant Application Key











I will need to pass this when making REST requests.

Now to POSTMAN - I create the request to get an OAuth token -










Client_ID / Client_Secret will be provided by OHIP.

I add the Header x-app-key -














I copy the access_token returned - 

Now to checking room availability - the api 

/YourOHIPHost/par/v0/hotels/{{HotelId}}/availability

Parameters can include -

limit=20

roomStayStartDate=2021-02-01

roomStayEndDate=2021-02-02

roomStayQuantity=1

adults=1

children=0

ratePlanCode=PlanCode














Check out the Response format - 



 











I get back different rates, e.g. Single (SGL) at $150 the night.














Double (DBL) at $200 the night and so on.

I can, of course, add a parameter to the Request, specifying roomType required -




So we're good in respect of checking availability.

Now to the actual reservation - /rsv/v1/hotels/{{HotelId}}/reservations/



Let's look at the Request body - 


Headers: Note the Authorisation, app key and HotelID headers.

Body includes the fields you would expect - 
source of sale -
sourceType = PMS (Property Management System)
sourceCode = HotelID

stay details include nr of adults/children, roomType etc.
arrivalDate, departureDate, hold until 6pm etc.


The response I'm interested in is the Header Location -




 My reservation code is 26038579.

Leveraging OHIP from OIC

Here I create 2 integrations - one for getting availability, the other for making the reservation.

The processing logic is very simple - as you can see, I have not added any error handling etc.

I begin by just extrapolating from the POSTMAN calls above.

Check4Availability - 





The REST connection to OHIP is defined as follows - 


Note: No Security Policy specified - I will do that later - Custom 2 Legged OAuth.

The Invoke is configured as follows - 






Mapping - 






ContentType set to application/json
Authorization set to Bearer + token for test purposes I use an OIC Lookup. 

X-HotelId set to a default id I use for testing. Again, I have externalized this to an OIC Lookup,
same with the X-App-Key.

Template Parameter Hotel Id set to that from the OIC lookup.

Query parameters are set to the incoming REST trigger request fields.

The same modus operandi for the CreateReservation Integration - 


Again, just the bare bones - no error handling etc.

Now to testing the 2 integrations - for this I create a simple VB app -




Note: roomRate field has been populated - $200

Now I click on Reserve




Note the reservationCode field has been populated.

I also received a confirmation email -





Final Note

To opt into the Early Adopter APIs please email hospitality_apis_ww_group@oracle.com providing a business justification.

So what do we have here? 
OHIP is your one stop shop for Opera Cloud apis. 
Combine this with OIC and you have a very compelling offering for customers, SIs etc. who need to implement cross pillar business processes that span apps including Oracle Hospitality, e.g. Oracle Hospitality to your CRM etc.












 
 







No comments: