liteapi-travel
Advanced tools
Comparing version 2.0.4 to 2.0.5-updates
{ | ||
"name": "liteapi-travel", | ||
"version": "2.0.4", | ||
"version": "2.0.5-updates", | ||
"description": "The **liteAPI** can be used to to do the following Get room rates & availability for a set of hotels Select a specific hotel with room availability and make a booking Manage the bookings - retrieve and cancel existing bookings Get static content for hotels, search hotels by destination", | ||
@@ -19,7 +19,10 @@ "main": "index.js", | ||
"booking", | ||
"vacation" | ||
"vacation", | ||
"Accommodation", | ||
"Liteapi", | ||
"Nuitee" | ||
], | ||
"author": "Nuitée Travel LTD <hfadili@berkeley.systems>", | ||
"author": "liteAPI Travel", | ||
"license": "ISC", | ||
"homepage": "https://github.com/liteapi-travel/nodejs-sdk.git#readme" | ||
} |
107
README.md
@@ -28,22 +28,33 @@ <h1 style="font-weight: 500;">liteAPI SDK</h1> | ||
- [Guests](#guests) | ||
- [Example Project](#example-project) | ||
# Introduction | ||
[liteAPI](https://www.liteapi.travel/) The fastest way to build travel apps | ||
Launch your hospitality product in minutes. Effortlessly monetize by selling accommodations at over 2 million properties worldwide. | ||
[liteAPI](https://www.liteapi.travel/) is an innovative and robust collection of infrastructure APIs that cater to the travel industry. It is designed to empower developers, offering them the fastest way to build and launch comprehensive travel applications. | ||
At the heart of LiteAPI's power is its extensive network of over 2 million properties worldwide. By incorporating LiteAPI into an app, developers can effortlessly tap into the vast inventory, allowing users to search and book accommodations at these properties. | ||
The liteAPI can be used to to do the following: | ||
- Get room rates & availability for a set of hotels. | ||
- Select a specific hotel with room availability and make a booking | ||
- Manage the bookings | ||
- retrieve and cancel existing bookings. | ||
- Get static content for hotels. | ||
- Search hotels by destination. | ||
But that's not all. With LiteAPI, monetization is made even more simple. Developers can generate revenue through their hospitality products by selling accommodations from LiteAPI's broad portfolio of properties. This means that not only can developers launch their products quickly, they can also start generating profits in no time. | ||
LiteAPI opens up a range of powerful functions for travel and hospitality applications. Its features include: | ||
<h3 style="font-weight: 500; display:inline">Hotel Search:</h3> Developers can incorporate a robust search function that allows users to find hotels based on their preferred destination. This can help users discover accommodations that suit their travel plans. | ||
<br><br> | ||
<h3 style="font-weight: 500; display:inline">Static Content for Hotels:</h3> LiteAPI also provides access to static content for hotels, including descriptions, images, and amenity details. This is essential for developers to present comprehensive and accurate information to the end users, aiding their decision-making process. | ||
<br><br> | ||
<h3 style="font-weight: 500; display:inline">Room Rates & Availability:</h3> One of the most significant features of LiteAPI is the ability to pull data on room rates and availability for a selected set of hotels. This feature ensures users have real-time, accurate information to assist in their booking decisions. | ||
<br><br> | ||
<h3 style="font-weight: 500; display:inline">Hotel Booking:</h3> Beyond just providing information, LiteAPI also allows developers to integrate a seamless booking function. Users can select a specific hotel with room availability and proceed to make a booking directly within the app. | ||
<br><br> | ||
<h3 style="font-weight: 500; display:inline">Booking Management:</h3> With LiteAPI, managing bookings becomes a straightforward task. The booking management functions allow for the tracking and management of all bookings made through the app, ensuring users can keep track of their travel plans. | ||
<br><br> | ||
<h3 style="font-weight: 500; display:inline">Booking Retrieval and Cancellation:</h3> Lastly, LiteAPI offers the capability to retrieve and cancel existing bookings. This added flexibility is crucial for users who might need to alter their travel plans. | ||
<br><br> | ||
All these features make LiteAPI a comprehensive solution for travel app development, offering a plethora of functionalities, from search and booking to management and cancellation. Developers can harness these powerful tools to create high-quality, user-friendly travel applications. | ||
<br><br> | ||
Don't have an account yet? Sign Up [Here](https://dashboard.liteapi.travel/register/). | ||
# Installing | ||
Install the package with: | ||
Install the package using the following npm or yarn commands: | ||
@@ -57,6 +68,5 @@ ```sh | ||
# Usage | ||
The package needs to be configured with your account's apikey, which is | ||
available in the [liteAPI Dashboard](https://dashboard.liteapi.travel/apikeys/). Require it with the key's | ||
value: | ||
After you have installed the LiteAPI package, you need to configure it with your API key. The API key is available in the [liteAPI Dashboard](https://dashboard.liteapi.travel/apikeys/). Here's the step to add the API key to the package. | ||
```js | ||
@@ -68,5 +78,7 @@ const liteApi = require('liteapi-travel')(YOUR_API_KEY); | ||
Static data can be directly fetched from the functions below. Alternatively, LiteAPI also provides an option to download static data directly from the [Github URL](STATICDATA.md). | ||
## List of cities | ||
The API returns a list of city names from a specific country. The country codes must be in ISO-2 format. To get the country codes in ISO-2 for all countries please use the GET Country list endpoint | ||
The getCitiesByCountryCode function returns a list of city names from a specific country. The country codes must be in ISO-2 format. To get the country codes in ISO-2 for all countries please use the getCountries function. | ||
@@ -97,3 +109,3 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
The API returns the list of countries available along with its ISO-2 code. | ||
The getCountries function returns the list of countries available along with its ISO-2 code. | ||
@@ -106,3 +118,3 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
This endpoint does not need any parameter. | ||
The function does not need any additional parameter. | ||
@@ -122,5 +134,4 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Return type :</h4> | ||
The API returns all available currency codes along with its name and the list of supported countries that the currency applies to. | ||
The getCurrencies function returns all available currency codes along with its name and the list of supported countries that the currency applies to. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -132,3 +143,3 @@ ```js | ||
This endpoint does not need any parameter. | ||
This function does not need any additional parameters. | ||
@@ -149,3 +160,3 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Return type :</h4> | ||
The API returns a list of hotels available based on different search criterion. The minimum required information is the county code in ISO-2 format. | ||
The getHotels function returns a list of hotels available based on different search criteria. The minimum required information is the country code in ISO-2 format. | ||
@@ -208,3 +219,3 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
The hotel details API returns all the static contents details of a hotel or property if the hotel ID is provided. The static content include name, description, address, amenities, cancellation policies, images and more. | ||
The getHotelDetails function returns all the static contents details of a hotel or property when given a hotel ID. The static content includes name, description, address, amenities, cancellation policies, images and more. | ||
@@ -254,3 +265,3 @@ | ||
The API returns the IATA (International Air Transport Association) codes for all available airports along with the name of the airport, geographical coordinates and country code in ISO-2 format. | ||
The getIataCodes function returns the IATA (International Air Transport Association) codes for all available airports along with the name of the airport, geographical coordinates and country code in ISO-2 format. | ||
@@ -264,3 +275,3 @@ | ||
This endpoint does not need any parameter. | ||
This function does not need any additional parameters. | ||
@@ -283,3 +294,3 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Return type :</h4> | ||
liteAPI is a comprehensive and simple to implement Hotel Booking API. The booking flow consists of 3 section: Search, Book, and | ||
liteAPI offers a comprehensive and simple way to implement Hotel Booking flow. The booking flow consists of 3 sections: Search, Book, and | ||
booking management. | ||
@@ -293,12 +304,6 @@ | ||
------ | ||
Hotel Minimum Rates API is to search and return the minimum room rates that are available for a list of hotel ID's on the specified search dates. | ||
The getMinimumRates function is used to retrieve the minimum room rates that are available for a list of hotel ID's on the specified search dates. | ||
For each hotel ID, the minimum room rate that is available is returned. | ||
The API also has a built in loyalty rewards system. The system rewards return users who have made prior bookings. | ||
If the search is coming from a known guest ID, the guest level is also returned along with the pricing that's appropriate for the guest level. | ||
If it is a new user, the guest ID will be generated at the time of the first confirmed booking. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -356,13 +361,4 @@ ```js | ||
------ | ||
The Full Rates API is to search and return all available rooms along with its rates, cancellation policies for a list of hotel ID's based on the search dates. | ||
The getFullRates function return the rates of all available rooms along with its cancellation policies for a list of hotel ID's based on the search dates. | ||
For each hotel ID, all available room information is returned. | ||
The API also has a built in loyalty rewards system. The system rewards return users who have made prior bookings. | ||
If the search is coming from a known guest ID, the guest level is also returned along with the pricing that's appropriate for the guest level. | ||
If it is a new user, the guest ID will be generated at the time of the first confirmed booking. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -434,8 +430,5 @@ ```js | ||
This API is used to confirm if the room and rates for the search criterion. The input to the endpoint is a specific rate Id coming from the GET hotel full rates availability API. | ||
The preBook function is used to confirm if the room rates are still available before a booking function can be called. The input to the function is a specific rate Id coming from the getFullRates function. | ||
The function returns a prebook Id, a new rate Id and also contains information if the price, cancellation policy or boarding information changed. | ||
In response, the API generates a prebook Id, a new rate Id and contains information if price, cancellation policy or boarding information has changed. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -495,3 +488,3 @@ ```js | ||
This API confirms a booking when the prebook Id and the rate Id from the pre book stage along with the guest and payment information are passed. | ||
The book function confirms a booking when the prebook Id and the rate Id from the pre book stage along with the guest and payment information are passeed. | ||
@@ -504,3 +497,2 @@ The guest information is an object that should include the guest first name, last name and email. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -581,3 +573,3 @@ | ||
------ | ||
The API returns the list of booking Id's for a given guest Id. | ||
The getBookingListByGuestID function returns the list of all booking Id's for a given guest Id. | ||
@@ -610,5 +602,4 @@ * <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
------ | ||
The API returns the status and the details for the a specific booking Id. | ||
The retrievedBooking function returns the status and the details of a specific booking Id. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -665,4 +656,5 @@ ```js | ||
This API is used to request a cancellation of an existing confirmed booking. Cancellation policies and conditions will be used to determine the success of the cancellation. For example a booking with non-refundable (NRFN) tag or a booking with a cancellation policy that was requested past the cancellation date will not be able to cancel the confirmed booking. | ||
The cancelBooking function is used to request a cancellation of an existing confirmed booking. Cancellation policies and conditions will be used to determine the success of the cancellation. For example a booking with non-refundable (NRFN) tag or a booking with a cancellation policy that was requested past the cancellation date will not be able to cancel the confirmed booking. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -696,4 +688,5 @@ ```js | ||
## Guests | ||
The guests API returns the unique guest IDs | ||
The getGuestIds function returns the unique guestID when an email is passed as a parameter. The email that is passed to the book function is used to create a guestID. This guestID can be used to build loyalty programs in the application. | ||
* <h4 style="color:#9155fd; font-weight: 800;"> Example :</h4> | ||
@@ -703,3 +696,5 @@ ```js | ||
``` | ||
If you want to retrieve the guest IDs of a specific user based on their email, you can provide the email as an optional parameter: | ||
```js | ||
@@ -724,1 +719,5 @@ const email = "johndoe@nlite.ml"; //Optional | ||
| **guestId** | **string** | The guest ID. | | ||
# Example Project | ||
To see an example project demonstrating how to integrate the SDK, visit [liteAPI-nodejs-sdk-examples](https://github.com/liteapi-travel/nodejs-sdk-examples) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
140224
5
2
700