konfig / nuitee-lite-php-sdk
The **Lite API** 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
Requires
- php: ^8.0
- ext-curl: *
- ext-json: *
- ext-mbstring: *
- guzzlehttp/guzzle: ^7.3
- guzzlehttp/psr7: ^1.7 || ^2.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.5
- phpunit/phpunit: ^8.0 || ^9.0
README
The Lite API 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
Installation & Usage
Requirements
This library requires PHP ^8.0
Composer
To install the bindings via Composer, add the following to composer.json
:
{ "repositories": [ { "type": "vcs", "url": "https://github.com/konfig-dev/nuitee-lite-php-sdk.git" } ], "require": { "konfig/nuitee-lite-php-sdk": "1.8.0" } }
Then run composer install
Manual Installation
Download the files and include autoload.php
:
<?php require_once('/path/to/nuitee-lite-php-sdk/vendor/autoload.php');
Getting Started
Please follow the installation procedure and then run the following:
<?php require_once(__DIR__ . '/vendor/autoload.php'); // Configure API key authorization: apikeyAuth $config = Nuitee\Configuration::getDefaultConfiguration()->setApiKey('X-API-Key', 'YOUR_API_KEY'); // Uncomment below to setup prefix (e.g. Bearer) for API key, if needed // $config = Nuitee\Configuration::getDefaultConfiguration()->setApiKeyPrefix('X-API-Key', 'Bearer'); // Setting host path is optional and defaults to https://api.liteapi.travel/v1.0 // Nuitee\Configuration::getDefaultConfiguration()->setHost("https://api.liteapi.travel/v1.0"); $apiInstance = new Nuitee\Api\BookApi( // If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`. // This is optional, `GuzzleHttp\Client` will be used as default. // new GuzzleHttp\Client(), $config ); $book_request = new \Nuitee\Model\BookRequest([ "prebook_id" => "prebook_id_example", ]); try { $result = $apiInstance->book( book_request: $book_request ); print_r($result->$getData()); print_r($result->$getGuestLevel()); print_r($result->$getSandbox()); } catch (\Exception $e) { echo 'Exception when calling BookApi->book: ', $e->getMessage(), PHP_EOL; }
API Endpoints
All URIs are relative to https://api.liteapi.travel/v1.0
Models
- Book400Response
- Book400ResponseData
- Book400ResponseDataBookedRoomsInner
- Book400ResponseDataBookedRoomsInnerRate
- Book400ResponseDataBookedRoomsInnerRateRetailRate
- Book400ResponseDataBookedRoomsInnerRateRetailRateTotal
- Book400ResponseDataBookedRoomsInnerRoomType
- Book400ResponseDataCancellation
- Book400ResponseDataCancellationFee
- Book400ResponseDataCancellationFeePrice
- Book400ResponseDataCancellationPolicies
- Book400ResponseDataCancellationPoliciesCancelPolicyInfosInner
- Book400ResponseDataGuestInfo
- Book400ResponseDataHotel
- Book400ResponseDataHotelAddress
- Book400ResponseDataHotelLocation
- Book401Response
- Book401ResponseData
- Book401ResponseDataBookedRoomsInner
- Book401ResponseDataBookedRoomsInnerRate
- Book401ResponseDataBookedRoomsInnerRateRetailRate
- Book401ResponseDataBookedRoomsInnerRateRetailRateTotal
- Book401ResponseDataBookedRoomsInnerRoomType
- Book401ResponseDataCancellation
- Book401ResponseDataCancellationFee
- Book401ResponseDataCancellationFeePrice
- Book401ResponseDataCancellationPolicies
- Book401ResponseDataCancellationPoliciesCancelPolicyInfosInner
- Book401ResponseDataGuestInfo
- Book401ResponseDataHotel
- Book401ResponseDataHotelAddress
- Book401ResponseDataHotelLocation
- BookRequest
- BookRequestGuestInfo
- BookRequestPayment
- BookResponse
- BookResponseData
- BookResponseDataBookedRoomsInner
- BookResponseDataBookedRoomsInnerRate
- BookResponseDataBookedRoomsInnerRateRetailRate
- BookResponseDataBookedRoomsInnerRateRetailRateTotal
- BookResponseDataBookedRoomsInnerRoomType
- BookResponseDataCancellation
- BookResponseDataCancellationFee
- BookResponseDataCancellationFeePrice
- BookResponseDataCancellationPolicies
- BookResponseDataCancellationPoliciesCancelPolicyInfosInner
- BookResponseDataGuestInfo
- BookResponseDataHotel
- BookResponseDataHotelAddress
- BookResponseDataHotelLocation
- Cancel204Response
- Cancel204ResponseData
- Cancel304Response
- Cancel304ResponseData
- Cancel401Response
- Cancel401ResponseData
- CancelResponse
- CancelResponseData
- GetGuestId400Response
- GetGuestId400ResponseDataInner
- GetGuestId401Response
- GetGuestId401ResponseDataInner
- GetGuestIdResponse
- GetGuestIdResponseDataInner
- GetHotel400Response
- GetHotel400ResponseDataInner
- GetHotel400ResponseDataInnerAdditionalPolicies
- GetHotel400ResponseDataInnerAdditionalPoliciesCotsAndExtraBedsInner
- GetHotel400ResponseDataInnerCheckinCheckoutTimes
- GetHotel400ResponseDataInnerHotelFacilitiesInner
- GetHotel400ResponseDataInnerHotelPhotosInner
- GetHotel400ResponseDataInnerLocation
- GetHotel401Response
- GetHotel401ResponseDataInner
- GetHotel401ResponseDataInnerAdditionalPolicies
- GetHotel401ResponseDataInnerAdditionalPoliciesCotsAndExtraBedsInner
- GetHotel401ResponseDataInnerCheckinCheckoutTimes
- GetHotel401ResponseDataInnerHotelFacilitiesInner
- GetHotel401ResponseDataInnerHotelPhotosInner
- GetHotel401ResponseDataInnerLocation
- GetHotelRates204Response
- GetHotelRates204ResponseError
- GetHotelRates400Response
- GetHotelRates400ResponseError
- GetHotelRatesResponse
- GetHotelRatesResponseDataInner
- GetHotelRatesResponseDataInnerRoomTypesInner
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInner
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInnerCancellationPolicies
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInnerCancellationPoliciesCancelPolicyInfosInner
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInnerRetailRate
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInnerRetailRateTaxesAndFees
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInnerRetailRateTaxesAndFeesOneOfInner
- GetHotelRatesResponseDataInnerRoomTypesInnerRatesInnerRetailRateTotalInner
- GetHotelResponse
- GetHotelResponseDataInner
- GetHotelResponseDataInnerAdditionalPolicies
- GetHotelResponseDataInnerAdditionalPoliciesCotsAndExtraBedsInner
- GetHotelResponseDataInnerCheckinCheckoutTimes
- GetHotelResponseDataInnerHotelFacilitiesInner
- GetHotelResponseDataInnerHotelPhotosInner
- GetHotelResponseDataInnerLocation
- GetHotels204Response
- GetHotels204ResponseDataInner
- GetHotels400Response
- GetHotels400ResponseDataInner
- GetHotels401Response
- GetHotels401ResponseDataInner
- GetHotelsResponse
- GetHotelsResponseDataInner
- ListBookings204Response
- ListBookings204ResponseDataInner
- ListBookings401Response
- ListBookings401ResponseDataInner
- ListBookingsResponse
- ListBookingsResponseDataInner
- ListCities400Response
- ListCities400ResponseDataInner
- ListCities401Response
- ListCities401ResponseDataInner
- ListCitiesResponse
- ListCitiesResponseDataInner
- ListCountries401Response
- ListCountries401ResponseDataInner
- ListCountriesResponse
- ListCountriesResponseDataInner
- ListCurrencies401Response
- ListCurrencies401ResponseDataInner
- ListCurrenciesResponse
- ListCurrenciesResponseDataInner
- ListHotels400Response
- ListHotels400ResponseDataInner
- ListHotels401Response
- ListHotels401ResponseDataInner
- ListHotelsResponse
- ListHotelsResponseDataInner
- ListIataCodes401Response
- ListIataCodes401ResponseDataInner
- ListIataCodesResponse
- ListIataCodesResponseDataInner
- Prebook400Response
- Prebook400ResponseData
- Prebook400ResponseDataRoomTypesInner
- Prebook400ResponseDataRoomTypesInnerRatesInner
- Prebook400ResponseDataRoomTypesInnerRatesInnerCancellationPolicies
- Prebook400ResponseDataRoomTypesInnerRatesInnerCancellationPoliciesCancelPolicyInfosInner
- Prebook400ResponseDataRoomTypesInnerRatesInnerRetailRate
- Prebook400ResponseDataRoomTypesInnerRatesInnerRetailRateTotalInner
- Prebook401Response
- Prebook401ResponseData
- Prebook401ResponseDataRoomTypesInner
- Prebook401ResponseDataRoomTypesInnerRatesInner
- Prebook401ResponseDataRoomTypesInnerRatesInnerCancellationPolicies
- Prebook401ResponseDataRoomTypesInnerRatesInnerCancellationPoliciesCancelPolicyInfosInner
- Prebook401ResponseDataRoomTypesInnerRatesInnerRetailRate
- Prebook401ResponseDataRoomTypesInnerRatesInnerRetailRateTotalInner
- PrebookRequest
- PrebookResponse
- PrebookResponseData
- PrebookResponseDataRoomTypesInner
- PrebookResponseDataRoomTypesInnerRatesInner
- PrebookResponseDataRoomTypesInnerRatesInnerCancellationPolicies
- PrebookResponseDataRoomTypesInnerRatesInnerCancellationPoliciesCancelPolicyInfosInner
- PrebookResponseDataRoomTypesInnerRatesInnerRetailRate
- PrebookResponseDataRoomTypesInnerRatesInnerRetailRateTotalInner
- Retrieve204Response
- Retrieve204ResponseError
- Retrieve401Response
- Retrieve401ResponseError
- RetrieveResponse
- RetrieveResponseData
- RetrieveResponseDataBookedRoomsInner
- RetrieveResponseDataBookedRoomsInnerRate
- RetrieveResponseDataBookedRoomsInnerRateRetailRate
- RetrieveResponseDataBookedRoomsInnerRateRetailRateTotal
- RetrieveResponseDataBookedRoomsInnerRoomType
- RetrieveResponseDataCancellationPolicies
- RetrieveResponseDataCancellationPoliciesCancelPolicyInfos
- RetrieveResponseDataCancellationPoliciesCancelPolicyInfosOneOfInner
- RetrieveResponseDataContact
- RetrieveResponseDataGuestInfo
Authorization
apikeyAuth
- Type: API key
- API key parameter name: X-API-Key
- Location: HTTP header
Tests
To run the tests, use:
composer install vendor/bin/phpunit
About this package
This PHP package is automatically generated by Konfig:
- API version:
1.0.0
- Package version:
1.8.0
- Package version: