availability
This API request is to confirm whether a trip on selected date time with selected prices and price units is available to book. If the agent booking system can not determine place number for each price (eg. Audult is one place and Family is 4 places), then use this request which agent booking system supplies the booking prices and unit and the response will confirm whether place is available for the availability request or not.
/Availability
Usage and SDK Samples
curl -X POST\
-H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/Availability?operator_id=&integrator_ref=&booking_type=&bookingarr=&pricearr="
import io.swagger.client.*;
import io.swagger.client.auth.*;
import io.swagger.client.model.*;
import io.swagger.client.api.DefaultApi;
import java.io.File;
import java.util.*;
public class DefaultApiExample {
public static void main(String[] args) {
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 operatorId = operatorId_example; // String | Required. Operator ID obtained from API portal or the operator.
String bookingType = bookingType_example; // String | Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline)
array[bookingarr] bookingarr = ; // array[bookingarr] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
array[pricearr] pricearr = ; // array[pricearr] | Required. Object array contains elements of booking price details. See developer page for more details.
String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
try {
Availability result = apiInstance.availability(operatorId, bookingType, bookingarr, pricearr, integratorRef);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#availability");
e.printStackTrace();
}
}
}
import io.swagger.client.api.DefaultApi;
public class DefaultApiExample {
public static void main(String[] args) {
DefaultApi apiInstance = new DefaultApi();
String operatorId = operatorId_example; // String | Required. Operator ID obtained from API portal or the operator.
String bookingType = bookingType_example; // String | Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline)
array[bookingarr] bookingarr = ; // array[bookingarr] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
array[pricearr] pricearr = ; // array[pricearr] | Required. Object array contains elements of booking price details. See developer page for more details.
String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
try {
Availability result = apiInstance.availability(operatorId, bookingType, bookingarr, pricearr, integratorRef);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DefaultApi#availability");
e.printStackTrace();
}
}
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: BasicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
String *operatorId = operatorId_example; // Required. Operator ID obtained from API portal or the operator.
String *bookingType = bookingType_example; // Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline) (default to 1)
array[bookingarr] *bookingarr = ; // Required. Object array contains elements of trip date and time etc. See developer page for more details.
array[pricearr] *pricearr = ; // Required. Object array contains elements of booking price details. See developer page for more details.
String *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)
DefaultApi *apiInstance = [[DefaultApi alloc] init];
[apiInstance availabilityWith:operatorId
bookingType:bookingType
bookingarr:bookingarr
pricearr:pricearr
integratorRef:integratorRef
completionHandler: ^(Availability output, NSError* error) {
if (output) {
NSLog(@"%@", output);
}
if (error) {
NSLog(@"Error: %@", error);
}
}];
var EsyTravelAgentApiElementsOpenApi31 = require('esy_travel_agent_api_elements___open_api_31');
var defaultClient = EsyTravelAgentApiElementsOpenApi31.ApiClient.instance;
// Configure HTTP basic authorization: BasicAuth
var BasicAuth = defaultClient.authentications['BasicAuth'];
BasicAuth.username = 'YOUR USERNAME'
BasicAuth.password = 'YOUR PASSWORD'
var api = new EsyTravelAgentApiElementsOpenApi31.DefaultApi()
var operatorId = operatorId_example; // {{String}} Required. Operator ID obtained from API portal or the operator.
var bookingType = bookingType_example; // {{String}} Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline)
var bookingarr = ; // {{array[bookingarr]}} Required. Object array contains elements of trip date and time etc. See developer page for more details.
var pricearr = ; // {{array[pricearr]}} Required. Object array contains elements of booking price details. See developer page for more details.
var opts = {
'integratorRef': integratorRef_example // {{String}} Optional. Booking agent (Integrator) own reference for its own use.
};
var callback = function(error, data, response) {
if (error) {
console.error(error);
} else {
console.log('API called successfully. Returned data: ' + data);
}
};
api.availability(operatorId, bookingType, bookingarr, pricearr, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;
namespace Example
{
public class availabilityExample
{
public void main()
{
// Configure HTTP basic authorization: BasicAuth
Configuration.Default.Username = "YOUR_USERNAME";
Configuration.Default.Password = "YOUR_PASSWORD";
var apiInstance = new DefaultApi();
var operatorId = operatorId_example; // String | Required. Operator ID obtained from API portal or the operator.
var bookingType = bookingType_example; // String | Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline) (default to 1)
var bookingarr = new array[bookingarr](); // array[bookingarr] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
var pricearr = new array[pricearr](); // array[pricearr] | Required. Object array contains elements of booking price details. See developer page for more details.
var integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use. (optional)
try
{
Availability result = apiInstance.availability(operatorId, bookingType, bookingarr, pricearr, integratorRef);
Debug.WriteLine(result);
}
catch (Exception e)
{
Debug.Print("Exception when calling DefaultApi.availability: " + e.Message );
}
}
}
}
<?php
require_once(__DIR__ . '/vendor/autoload.php');
// Configure HTTP basic authorization: BasicAuth
Swagger\Client\Configuration::getDefaultConfiguration()->setUsername('YOUR_USERNAME');
Swagger\Client\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD');
$api_instance = new Swagger\Client\ApiDefaultApi();
$operatorId = operatorId_example; // String | Required. Operator ID obtained from API portal or the operator.
$bookingType = bookingType_example; // String | Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline)
$bookingarr = ; // array[bookingarr] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
$pricearr = ; // array[pricearr] | Required. Object array contains elements of booking price details. See developer page for more details.
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
try {
$result = $api_instance->availability($operatorId, $bookingType, $bookingarr, $pricearr, $integratorRef);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling DefaultApi->availability: ', $e->getMessage(), PHP_EOL;
}
?>
use Data::Dumper;
use WWW::SwaggerClient::Configuration;
use WWW::SwaggerClient::DefaultApi;
# Configure HTTP basic authorization: BasicAuth
$WWW::SwaggerClient::Configuration::username = 'YOUR_USERNAME';
$WWW::SwaggerClient::Configuration::password = 'YOUR_PASSWORD';
my $api_instance = WWW::SwaggerClient::DefaultApi->new();
my $operatorId = operatorId_example; # String | Required. Operator ID obtained from API portal or the operator.
my $bookingType = bookingType_example; # String | Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline)
my $bookingarr = []; # array[bookingarr] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
my $pricearr = []; # array[pricearr] | Required. Object array contains elements of booking price details. See developer page for more details.
my $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.
eval {
my $result = $api_instance->availability(operatorId => $operatorId, bookingType => $bookingType, bookingarr => $bookingarr, pricearr => $pricearr, integratorRef => $integratorRef);
print Dumper($result);
};
if ($@) {
warn "Exception when calling DefaultApi->availability: $@\n";
}
from __future__ import print_statement
import time
import swagger_client
from swagger_client.rest import ApiException
from pprint import pprint
# Configure HTTP basic authorization: BasicAuth
swagger_client.configuration.username = 'YOUR_USERNAME'
swagger_client.configuration.password = 'YOUR_PASSWORD'
# create an instance of the API class
api_instance = swagger_client.DefaultApi()
operatorId = operatorId_example # String | Required. Operator ID obtained from API portal or the operator.
bookingType = bookingType_example # String | Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline) (default to 1)
bookingarr = # array[bookingarr] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
pricearr = # array[pricearr] | Required. Object array contains elements of booking price details. See developer page for more details.
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)
try:
api_response = api_instance.availability(operatorId, bookingType, bookingarr, pricearr, integratorRef=integratorRef)
pprint(api_response)
except ApiException as e:
print("Exception when calling DefaultApi->availability: %s\n" % e)
Parameters
| Name | Description |
|---|---|
| operator_id* |
String
Required. Operator ID obtained from API portal or the operator.
Required
|
| integrator_ref |
String
Optional. Booking agent (Integrator) own reference for its own use.
|
| booking_type* |
String
Optional. (Default) = 1 is for new booking check (this will check new booking deadline); = 2 is edit existing booking check (this will check change booking deadline)
Required
|
| bookingarr* |
array[bookingarr]
Required. Object array contains elements of trip date and time etc. See developer page for more details.
Required
|
| pricearr* |
array[pricearr]
Required. Object array contains elements of booking price details. See developer page for more details.
Required
|