All URIs are relative to https://api.unifapi.com, except if the operation defines another base path.
| Method | HTTP request | Description |
|---|---|---|
| hotelsInfoPost() | POST /hotels/info | Get Hotels detail |
| hotelsSearchPost() | POST /hotels/search | Search Hotels |
hotelsInfoPost($hotel_info_request): \Unifapi\\Sdk\Model\HotelsInfoPost200ResponseGet Hotels detail
Run one live Hotels detail lookup for a hotel id from /hotels/search and receive the full profile, including class rating, address, phone, description, guest reviews, images, and prices.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\HotelsApi(
// 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
);
$hotel_info_request = new \Unifapi\\Sdk\Model\HotelInfoRequest(); // \Unifapi\\Sdk\Model\HotelInfoRequest
try {
$result = $apiInstance->hotelsInfoPost($hotel_info_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling HotelsApi->hotelsInfoPost: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| hotel_info_request | \Unifapi\Sdk\Model\HotelInfoRequest | [optional] |
\Unifapi\Sdk\Model\HotelsInfoPost200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
hotelsSearchPost($hotel_search_request): \Unifapi\\Sdk\Model\HotelsSearchPost200ResponseSearch Hotels
Run one live Hotels search and receive ranked hotel listings for a location and stay dates, including hotel id, class rating, guest reviews, and nightly prices. Pass a hotel id to /hotels/info for full details.
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure Bearer authorization: bearerAuth
$config = Unifapi\\Sdk\Configuration::getDefaultConfiguration()->setAccessToken('YOUR_ACCESS_TOKEN');
$apiInstance = new Unifapi\\Sdk\Api\HotelsApi(
// 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
);
$hotel_search_request = new \Unifapi\\Sdk\Model\HotelSearchRequest(); // \Unifapi\\Sdk\Model\HotelSearchRequest
try {
$result = $apiInstance->hotelsSearchPost($hotel_search_request);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling HotelsApi->hotelsSearchPost: ', $e->getMessage(), PHP_EOL;
}| Name | Type | Description | Notes |
|---|---|---|---|
| hotel_search_request | \Unifapi\Sdk\Model\HotelSearchRequest | [optional] |
\Unifapi\Sdk\Model\HotelsSearchPost200Response
- Content-Type:
application/json - Accept:
application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]