An agents practical guide to using the Narnoo Booking Gateway API

Overview:

Holiday’s Inc is an online travel agency the sells tours and attractions to customers via their various digital platforms.

Holiday’s Inc wants to provide an easy way to offer live availability and instant bookings confirmation to their customers. They sign up to Narnoo.com so that they can offer this service and not have to worry about the cost it takes to develop a stand alone solution for every booking system in the marketplace.

The following information is passed on to Holiday’s Inc developers so that they can integrate Narnoo into Holiday’s Inc application.

Steps:

First step is for Holiday’s Inc to create an application on Narnoo and receive their authentication access and secret keys. These authentication keys are used to authenticate their requests through the Narnoo API.

Second step is for Holiday’s Inc application to authenticate the access key and secret keys and return a bearer token:

POST https://apis.narnoo.com/api/v1/authenticate/token

With this bear token Holiday Inc can now perform requests on the Narnoo API.

Next Holiday’s Inc needs to create a list of suppliers that they want to connect with. When connecting to a supplier an agent is by default provided access to the supplier’s’ public media as well as their products. Suppliers do have the control to only grant agents access to their products and not their media.

Holiday Inc’s needs to first find suppliers to connect with. There are a number ways to perform this through the API:

https://narnoocom.github.io/api-documentation/#find-business-to-follow

https://narnoocom.github.io/api-documentation/#search-for-operators

 

  1. POST https://apis.narnoo.com/api/v1/connect/find
  2. POST https://apis.narnoo.com/api/v1/connect/search {“name”:“narnoo”}

 

Using either one of these endpoints allows Holiday’s Inc to search for suppliers or find a list of suppliers based on suggests from Narnoo.com

When Holiday’s Inc discovers an operator that they want to connect with they use the connect add API endpoint to register this connection.

https://narnoocom.github.io/api-documentation/#connect-with-an-operator

POST https://apis.narnoo.com/api/v1/connect/add {“type”:“operator”,“id”:85}

When the agent connects to the supplier the supplier will be notified that this connection has taken place.

Now that Holiday’s Inc has a list of connected businesses they are now able to call their connected businesses products. As Holiday’s Inc is only interested in each supplier’s bookable products they use the endpoint:

https://narnoocom.github.io/api-documentation/#get-supplier-bookable-products

GET https://apis.narnoo.com/api/v1/booking/bookable_products/{operator_id}

This endpoint only returns the supplier’s products that have been mapped to at least one reservation system.

Holiday’s Inc stores the ID for these products and where needed, matches them to any products that are in their database.

With this information Holiday’s Inc can now start building queries to book these products live. There are three important steps when creating a booking reservation.

The first step is retrieving the product booking code. This is done with the API endpoint:

https://narnoocom.github.io/api-documentation/#get-product-booking-information

GET https://apis.narnoo.com/api/v1/booking/product/{operator_id}/{product_id}

This endpoint returns bookingCodes in the request. These are the codes Narnoo uses to Map the product to third party reservation systems. A booking code is made up of the request:

[bookingCodes][id]

If a [bookingCodes][productTime][id] exists then this needs to be amended to the bookingCode for further calls.

bookingCode[‘id’]:productTimes[‘id’]

The codes are separated by a ‘ : ’

The next step is to return all the information required to work with the product by using the endpoint:

https://narnoocom.github.io/api-documentation/#get-product-booking-details

GET https://apis.narnoo.com/api/v1/booking/details/{operator_id}/{product_id}?id=<bookingCode>

This endpoint returns live pricing and all requirements needed to make a booking for the customer – minus availability as that comes next.

To return availability for a product, Holiday’s Inc uses the endpoint:

https://narnoocom.github.io/api-documentation/#get-product-availability-and-pricing-details

GET https://apis.narnoo.com/api/v1/booking/availability/{operator_id}/{product_id}?id={bookingCode}&startDate=<d-m-Y>&endDate=<d-m-Y>

This endpoint returns availability options and prices for the date range provided.

[productAvailability][‘bookingDate’] is needed when creating a reservation

[productAvailability][‘availability’] states the numbers available.

Once a date has been confirmed and the product is available then Holiday’s Inc can create a booking using:

https://narnoocom.github.io/api-documentation/#get-product-availability-and-pricing-details

POST https://apis.narnoo.com/api/v1/booking/create

 

Note: Request JSON body format coming this week 24-07-2018