1. Go to this page and download the library: Download konfig/nuitee-lite-php-sdk library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
konfig / nuitee-lite-php-sdk example snippets
onfigure 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;
}