The Right Software are a web and mobile app development company and we provide third-party API integration services to South African web and app development clients. We recently used NightsBridge platform and API integration as PHP Laravel developers.In this article, we’ll discuss how to
- Setup NightsBridge booking system as an Affiliate Agency
- Getting NightsBridge properties
- Sending affiliate traffic back to NightsBridge through white label
- Update your website using NightsBridge API calls
- Bread and Breakfast (B&B)
- Guest houses
- Game lodges
- Boutique halls
- Self catering
- Apartments
- and more.
How does NightsBridge work?
NightsBridge provides an online portal on their website where property owners and managers can register their properties, accommodation types and prices. After property addition, NightsBridge provides the public page for each property which the owners can share over social media and public to garner NightsBridge bookings.All NightsBridge affiliates have an ID called NBID and properties have an ID called BBID.Following are the necessary steps which must be followed for NightsBridge integration into your own website.Create NightsBridge Affiliate Account
To use NightsBridge properties in your website, first, you need to create an account with NightsBridge. When you create an account and login, NightsBridge will provide you a back office (an interface) where you will be able to manage all your properties.Property owners can approach Affiliate site owners to request listing their properties on third-party websites. For that, they send a request to affiliates to add their website.Affiliate can activate the property by assigning your internal code which will move it into the active property list.Listing NightsBridge properties on your own website
To show NightsBridge properties on Affiliate websites, there is currently no API to bring all approved properties and you have to add properties manually through the database or run a web scraping script. We created a custom Laravel website with back office to handle properties on our website.While listing NightsBridge property on your own website, make sure that you save NightsBridge property ID called bbid in your database.After listing properties from NightsBridge, you have to send traffic back to the NightsBridge for conversion and also make updates to your PHP website. Here we discuss both.NightsBridge Partial White Label Solution
Partial white label is when you an affiliate sends traffic to the NightsBridge property listing but the NightsBridge property page shows affiliate logo for increased branding. This is the method to send users to NightsBridge for booking properties.Using NightsBridge partial white label, you can create link (as given below) to individual properties on NightsBridge where online bookings can be made.https://www.NightsBridge.co.za/bridge/book?bbid=xxxxx&nbid=xxxWhere “bbid” is NightsBridge property ID which is unique for each property while nbid is your NightsBridge agency code for affiliates, that was emailed to you once you create account with NightsBridge.Note that it’s very important to open this link in a new browser window instead of iFrame so that the security certificate is enabled. For example,
<a href=”https://www.NightsBridge.co.za/bridge/book?bbid=xxxxx&nbid=xxx” target=”_blank”>Book now</a>Along with sending traffic to NightsBridge, there are some API calls available that you can use to update properties on Affiliate side.
NightsBridge Availability Search API
NightsBridge also provides Webservice API for searching NightsBridge database for property availability. You will pass property’s bbid and start and end dates in the API call.The API in response will return property details showing whether property is available for booking on the specified dates or not.The NightsBridge is offered in both JSON as well as XML format.Json Formatcode sample removed
Xml Formatcode sample removed
messagename “availRQ” is Availabilty Request API. Where nbid and password stands for your NightsBridge agency code and password respectively. While bbid’s stands for NightsBridge properties id’s.This API needs to run once a day at least and also on each search just in case. NightsBridge From Price API
The From Price API call is used to import the lowest prices for properties (multiple at a time). Like NightsBridge Availability Search API, From Price API is also provided in both JSON as well as XML format.JSON Formatcode sample removed
XML Formatcode sample removed
In order to update prices in your database, you need to call this API at least once a day. Sample Code
Here’s the sample PHP Code with Curl calls to interact with the NightsBridge APIs discussed above.code sample removed
Note: code sample has been removed upon request. It can be recreated for your website.Following this tutorial, you can set up an affiliate website with NightsBridge booking system and API Integration. Contact us if you want to setup an Agency website with integration with NightsBridge properties and TripAdvisor reviews.