All URIs are relative to https://localhost/api/v2
Method | HTTP request | Description |
---|---|---|
availabilityProductCodeGet | GET /availability/{product_code} | Availability with Product Code |
bookProvisionCodePost | POST /book/{provision_code} | Book with Provision Code |
bookingsBookingCodeGet | GET /bookings/{booking_code} | Get Booking Detail |
bookingsGet | GET /bookings/ | Get Booking List |
cancelBookingCodePost | POST /cancel/{booking_code} | Cancel Booking with Booking Code |
hotelAvailabilityGet | GET /hotel-availability/ | Hotel Availability with Hotel Code and Search Code |
provisionProductCodePost | POST /provision/{product_code} | Provision with Product Code |
searchPost | POST /search/ | Search with Hotel Code(Hotel Code List) or Destination Code or Geolocation |
AvailabilityResponse availabilityProductCodeGet(productCode)
Availability with Product Code
Check Availability of Selected Product
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
String productCode = "productCode_example"; // String | product code that returned in Search(or Hotel Availability) Response
try {
AvailabilityResponse result = apiInstance.availabilityProductCodeGet(productCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#availabilityProductCodeGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
productCode | String | product code that returned in Search(or Hotel Availability) Response |
- Content-Type: application/json
- Accept: application/json
BookResponse bookProvisionCodePost(name, provisionCode)
Book with Provision Code
Returns Book Response
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
List<String> name = Arrays.asList("name_example"); // List<String> | A person's name.
String provisionCode = "provisionCode_example"; // String |
try {
BookResponse result = apiInstance.bookProvisionCodePost(name, provisionCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#bookProvisionCodePost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
name | List<String> | A person's name. | |
provisionCode | String |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
BookResponse bookingsBookingCodeGet(bookingCode)
Get Booking Detail
Returns past booking(s) data.
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
String bookingCode = "bookingCode_example"; // String | This is the code that taken from the response of bookings request
try {
BookResponse result = apiInstance.bookingsBookingCodeGet(bookingCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#bookingsBookingCodeGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
bookingCode | String | This is the code that taken from the response of bookings request |
- Content-Type: application/json
- Accept: application/json
BookingListResponse bookingsGet(fromDate, toDate, format)
Get Booking List
Returns past booking(s) data.
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
String fromDate = "fromDate_example"; // String | This is the booking date for filtering the bookings from the from_date(YYYY-MM-DD).
String toDate = "toDate_example"; // String | This is the booking date for filtering the bookings until the to_date(YYYY-MM-DD).
String format = "format_example"; // String | Only JSON supported
try {
BookingListResponse result = apiInstance.bookingsGet(fromDate, toDate, format);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#bookingsGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
fromDate | String | This is the booking date for filtering the bookings from the from_date(YYYY-MM-DD). | [optional] |
toDate | String | This is the booking date for filtering the bookings until the to_date(YYYY-MM-DD). | [optional] |
format | String | Only JSON supported | [optional] |
- Content-Type: application/json
- Accept: application/json
CancelResponse cancelBookingCodePost(bookingCode)
Cancel Booking with Booking Code
Cancel the Booking
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
String bookingCode = "bookingCode_example"; // String | Booking Code that returned in Book Response
try {
CancelResponse result = apiInstance.cancelBookingCodePost(bookingCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#cancelBookingCodePost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
bookingCode | String | Booking Code that returned in Book Response |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
HotelAvailabilityResponse hotelAvailabilityGet(searchCode, hotelCode)
Hotel Availability with Hotel Code and Search Code
Check Availability of Selected Hotel
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
String searchCode = "searchCode_example"; // String | search code that returned in search response
String hotelCode = "hotelCode_example"; // String | requested hotel code
try {
HotelAvailabilityResponse result = apiInstance.hotelAvailabilityGet(searchCode, hotelCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#hotelAvailabilityGet");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
searchCode | String | search code that returned in search response | |
hotelCode | String | requested hotel code |
- Content-Type: application/json
- Accept: application/json
ProvisionResponse provisionProductCodePost(productCode)
Provision with Product Code
Provision of Selected Product
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
String productCode = "productCode_example"; // String | product code that returned in Search(or Hotel Availability) Response
try {
ProvisionResponse result = apiInstance.provisionProductCodePost(productCode);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#provisionProductCodePost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
productCode | String | product code that returned in Search(or Hotel Availability) Response |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json
SearchResponse searchPost(pax, checkin, checkout, clientNationality, currency, hotelCode, destinationCode, lat, lon, radius, maxProduct)
Search with Hotel Code(Hotel Code List) or Destination Code or Geolocation
Returns list of products
// Import classes:
//import hotelspro_client.ApiClient;
//import hotelspro_client.ApiException;
//import hotelspro_client.Configuration;
//import hotelspro_client.auth.*;
//import hotelspro_client.api.DefaultApi;
ApiClient defaultClient = Configuration.getDefaultApiClient();
// Configure HTTP basic authorization: basicAuth
HttpBasicAuth basicAuth = (HttpBasicAuth) defaultClient.getAuthentication("basicAuth");
basicAuth.setUsername("YOUR USERNAME");
basicAuth.setPassword("YOUR PASSWORD");
DefaultApi apiInstance = new DefaultApi();
List<String> pax = Arrays.asList("pax_example"); // List<String> | Number of pax
String checkin = "checkin_example"; // String | Checkin
String checkout = "checkout_example"; // String | Checkout
String clientNationality = "clientNationality_example"; // String | Client Nationality
String currency = "currency_example"; // String | Currency (Supported Currencies USD, EUR, GBP, TRY)
String hotelCode = "hotelCode_example"; // String | Requested Hotel Code
String destinationCode = "destinationCode_example"; // String | Requested Destination Code
String lat = "lat_example"; // String | Requested Latitude Code(lat, lon and radius should be given together)
String lon = "lon_example"; // String | Requested Longitude Code(lat, lon and radius should be given together)
String radius = "radius_example"; // String | Requested Radius Code(lat, lon and radius should be given together)
Integer maxProduct = 56; // Integer | Max Product
try {
SearchResponse result = apiInstance.searchPost(pax, checkin, checkout, clientNationality, currency, hotelCode, destinationCode, lat, lon, radius, maxProduct);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#searchPost");
e.printStackTrace();
}
Name | Type | Description | Notes |
---|---|---|---|
pax | List<String> | Number of pax | |
checkin | String | Checkin | |
checkout | String | Checkout | |
clientNationality | String | Client Nationality | |
currency | String | Currency (Supported Currencies USD, EUR, GBP, TRY) | [enum: USD, EUR, GBP, TRY, AED] |
hotelCode | String | Requested Hotel Code | [optional] |
destinationCode | String | Requested Destination Code | [optional] |
lat | String | Requested Latitude Code(lat, lon and radius should be given together) | [optional] |
lon | String | Requested Longitude Code(lat, lon and radius should be given together) | [optional] |
radius | String | Requested Radius Code(lat, lon and radius should be given together) | [optional] |
maxProduct | Integer | Max Product | [optional] |
- Content-Type: application/x-www-form-urlencoded
- Accept: application/json