ESY Travel Agent API Elements - OpenAPI 3.1

Download OpenAPI Swagger File Download
Specifications

Default

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

Query 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

Responses

Status: 200 - Place Available

Status: 400 - Request is not valid


bookingStatus

This API request is to fetch booking details including scheduled trip date time, status of the booking and others. Booking can be a specified booking or all bookings within selected date ranges (by scheduled trip date and or booking created date).If op_booking_id parameter in the request is specified, it fetches one booking onlly regardless the value of date and days parameters in the request.If op_booking_id parameter in the request is not specified (empty or not provided), it fetches all bookings made by the agent within the selected date ranges.The date ranges can be either booking created date (between date_created and date_end) or booking trip scheduled date (between date_start and date_end) or both if both dates are set. At least one date range is required.Use parameter date_end as the last date of the search date range.The maximum number of days (date length in between) can be no more than 180 days.The oldest date can go back is 180 days before operator today.All dates in the request and response shall be the local date in operator timezone.


/BookingStatus

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/BookingStatus?operator_id=&integrator_ref=&op_booking_id=&date_created_start=&date_created_end=&date_start=&date_end=&language_id="
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 integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String opBookingId = opBookingId_example; // String | Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking.
        String dateCreatedStart = dateCreatedStart_example; // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
        String dateCreatedEnd = dateCreatedEnd_example; // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
        String dateStart = dateStart_example; // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
        String dateEnd = dateEnd_example; // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
        String languageId = languageId_example; // String | Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese.
        try {
            BookingStatus result = apiInstance.bookingStatus(operatorId, integratorRef, opBookingId, dateCreatedStart, dateCreatedEnd, dateStart, dateEnd, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#bookingStatus");
            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 integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String opBookingId = opBookingId_example; // String | Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking.
        String dateCreatedStart = dateCreatedStart_example; // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
        String dateCreatedEnd = dateCreatedEnd_example; // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
        String dateStart = dateStart_example; // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
        String dateEnd = dateEnd_example; // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
        String languageId = languageId_example; // String | Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese.
        try {
            BookingStatus result = apiInstance.bookingStatus(operatorId, integratorRef, opBookingId, dateCreatedStart, dateCreatedEnd, dateStart, dateEnd, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#bookingStatus");
            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 *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)
String *opBookingId = opBookingId_example; // Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking. (optional)
String *dateCreatedStart = dateCreatedStart_example; // Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end (optional)
String *dateCreatedEnd = dateCreatedEnd_example; // Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end (optional)
String *dateStart = dateStart_example; // Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end. (optional)
String *dateEnd = dateEnd_example; // Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end. (optional)
String *languageId = languageId_example; // Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese. (optional) (default to 1)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance bookingStatusWith:operatorId
    integratorRef:integratorRef
    opBookingId:opBookingId
    dateCreatedStart:dateCreatedStart
    dateCreatedEnd:dateCreatedEnd
    dateStart:dateStart
    dateEnd:dateEnd
    languageId:languageId
              completionHandler: ^(BookingStatus 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 opts = { 
  'integratorRef': integratorRef_example, // {{String}} Optional. Booking agent (Integrator) own reference for its own use.
  'opBookingId': opBookingId_example, // {{String}} Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking.
  'dateCreatedStart': dateCreatedStart_example, // {{String}} Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
  'dateCreatedEnd': dateCreatedEnd_example, // {{String}} Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
  'dateStart': dateStart_example, // {{String}} Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
  'dateEnd': dateEnd_example, // {{String}} Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
  'languageId': languageId_example // {{String}} Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.bookingStatus(operatorId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class bookingStatusExample
    {
        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 integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 
            var opBookingId = opBookingId_example;  // String | Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking. (optional) 
            var dateCreatedStart = dateCreatedStart_example;  // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end (optional) 
            var dateCreatedEnd = dateCreatedEnd_example;  // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end (optional) 
            var dateStart = dateStart_example;  // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end. (optional) 
            var dateEnd = dateEnd_example;  // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end. (optional) 
            var languageId = languageId_example;  // String | Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese. (optional)  (default to 1)

            try
            {
                BookingStatus result = apiInstance.bookingStatus(operatorId, integratorRef, opBookingId, dateCreatedStart, dateCreatedEnd, dateStart, dateEnd, languageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.bookingStatus: " + 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.
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
$opBookingId = opBookingId_example; // String | Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking.
$dateCreatedStart = dateCreatedStart_example; // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
$dateCreatedEnd = dateCreatedEnd_example; // String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
$dateStart = dateStart_example; // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
$dateEnd = dateEnd_example; // String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
$languageId = languageId_example; // String | Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese.

try {
    $result = $api_instance->bookingStatus($operatorId, $integratorRef, $opBookingId, $dateCreatedStart, $dateCreatedEnd, $dateStart, $dateEnd, $languageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->bookingStatus: ', $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 $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.
my $opBookingId = opBookingId_example; # String | Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking.
my $dateCreatedStart = dateCreatedStart_example; # String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
my $dateCreatedEnd = dateCreatedEnd_example; # String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
my $dateStart = dateStart_example; # String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
my $dateEnd = dateEnd_example; # String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
my $languageId = languageId_example; # String | Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese.

eval { 
    my $result = $api_instance->bookingStatus(operatorId => $operatorId, integratorRef => $integratorRef, opBookingId => $opBookingId, dateCreatedStart => $dateCreatedStart, dateCreatedEnd => $dateCreatedEnd, dateStart => $dateStart, dateEnd => $dateEnd, languageId => $languageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->bookingStatus: $@\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.
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)
opBookingId = opBookingId_example # String | Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking. (optional)
dateCreatedStart = dateCreatedStart_example # String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end (optional)
dateCreatedEnd = dateCreatedEnd_example # String | Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end (optional)
dateStart = dateStart_example # String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end. (optional)
dateEnd = dateEnd_example # String | Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end. (optional)
languageId = languageId_example # String | Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese. (optional) (default to 1)

try: 
    api_response = api_instance.booking_status(operatorId, integratorRef=integratorRef, opBookingId=opBookingId, dateCreatedStart=dateCreatedStart, dateCreatedEnd=dateCreatedEnd, dateStart=dateStart, dateEnd=dateEnd, languageId=languageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->bookingStatus: %s\n" % e)

Parameters

Query 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.
op_booking_id
String
Optional. Operator's booking ID of the booking to be checked. If not empty, fetch only this booking.
date_created_start
String
Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
date_created_end
String
Optional. If this is set, it will search bookings for booking created date between date_created_start and date_created_end
date_start
String
Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
date_end
String
Optional. If this is set, it will search bookings for booking trip departure date between date_start and date_end.
language_id
String
Optional. Used in response for product and price name. (Default) =1 English; =2 Chinese.

Responses

Status: 200 - Bookings are found

Status: 400 - Request is NOT valid


cancelBooking

This API request is to cancel a booking either it is unconfirmed or confirmed. This cancellation will cancel the booking and restore the places for others to book. If the booking is a confirmed booking, it will be verified by the booking change deadline condition set by the individual operator (usually the deadline is a number of days or hours before the scheduled trip date time).


/CancelBooking

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/CancelBooking?operator_id=&integrator_ref=&op_booking_id=&ag_booking_ref="
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 opBookingId = opBookingId_example; // String | Required. Operator's booking ID of the temporary reserved booking to be cancelled.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String agBookingRef = agBookingRef_example; // String | Optional. Integrator / booking agent's booking ref for its own use.
        try {
            CancelBooking result = apiInstance.cancelBooking(operatorId, opBookingId, integratorRef, agBookingRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#cancelBooking");
            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 opBookingId = opBookingId_example; // String | Required. Operator's booking ID of the temporary reserved booking to be cancelled.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String agBookingRef = agBookingRef_example; // String | Optional. Integrator / booking agent's booking ref for its own use.
        try {
            CancelBooking result = apiInstance.cancelBooking(operatorId, opBookingId, integratorRef, agBookingRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#cancelBooking");
            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 *opBookingId = opBookingId_example; // Required. Operator's booking ID of the temporary reserved booking to be cancelled.
String *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)
String *agBookingRef = agBookingRef_example; // Optional. Integrator / booking agent's booking ref for its own use. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance cancelBookingWith:operatorId
    opBookingId:opBookingId
    integratorRef:integratorRef
    agBookingRef:agBookingRef
              completionHandler: ^(CancelBooking 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 opBookingId = opBookingId_example; // {{String}} Required. Operator's booking ID of the temporary reserved booking to be cancelled.
var opts = { 
  'integratorRef': integratorRef_example, // {{String}} Optional. Booking agent (Integrator) own reference for its own use.
  'agBookingRef': agBookingRef_example // {{String}} Optional. Integrator / booking agent's booking ref 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.cancelBooking(operatorId, opBookingId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class cancelBookingExample
    {
        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 opBookingId = opBookingId_example;  // String | Required. Operator's booking ID of the temporary reserved booking to be cancelled.
            var integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 
            var agBookingRef = agBookingRef_example;  // String | Optional. Integrator / booking agent's booking ref for its own use. (optional) 

            try
            {
                CancelBooking result = apiInstance.cancelBooking(operatorId, opBookingId, integratorRef, agBookingRef);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.cancelBooking: " + 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.
$opBookingId = opBookingId_example; // String | Required. Operator's booking ID of the temporary reserved booking to be cancelled.
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
$agBookingRef = agBookingRef_example; // String | Optional. Integrator / booking agent's booking ref for its own use.

try {
    $result = $api_instance->cancelBooking($operatorId, $opBookingId, $integratorRef, $agBookingRef);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->cancelBooking: ', $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 $opBookingId = opBookingId_example; # String | Required. Operator's booking ID of the temporary reserved booking to be cancelled.
my $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.
my $agBookingRef = agBookingRef_example; # String | Optional. Integrator / booking agent's booking ref for its own use.

eval { 
    my $result = $api_instance->cancelBooking(operatorId => $operatorId, opBookingId => $opBookingId, integratorRef => $integratorRef, agBookingRef => $agBookingRef);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->cancelBooking: $@\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.
opBookingId = opBookingId_example # String | Required. Operator's booking ID of the temporary reserved booking to be cancelled.
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)
agBookingRef = agBookingRef_example # String | Optional. Integrator / booking agent's booking ref for its own use. (optional)

try: 
    api_response = api_instance.cancel_booking(operatorId, opBookingId, integratorRef=integratorRef, agBookingRef=agBookingRef)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->cancelBooking: %s\n" % e)

Parameters

Query 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.
op_booking_id*
String
Required. Operator's booking ID of the temporary reserved booking to be cancelled.
Required
ag_booking_ref
String
Optional. Integrator / booking agent's booking ref for its own use.

Responses

Status: 200 - Reservation is cancelled successful

Status: 400 - Request is NOT valid


confirmBooking

This API request is to change an unconfirmed booking into a confirmed (active) booking. An unconfirmed booking is a temporary booking that it has reserved places for the guests before making booking payment or before confirming the booking. The unconfirmed booking will last 20 minutes. If this booking is not confirmed within the 20 minutes time frame, it will be cancelled by the system.


/ConfirmBooking

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/ConfirmBooking?operator_id=&integrator_ref=&op_booking_id=&ag_booking_ref="
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 | Operator ID provided by the platform
        String opBookingId = opBookingId_example; // String | Required. Operator's booking ID of the temporary reserved booking.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String agBookingRef = agBookingRef_example; // String | Optional. Integrator / booking agent's booking ref for its own use only.
        try {
            ConfirmBooking result = apiInstance.confirmBooking(operatorId, opBookingId, integratorRef, agBookingRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#confirmBooking");
            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 | Operator ID provided by the platform
        String opBookingId = opBookingId_example; // String | Required. Operator's booking ID of the temporary reserved booking.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String agBookingRef = agBookingRef_example; // String | Optional. Integrator / booking agent's booking ref for its own use only.
        try {
            ConfirmBooking result = apiInstance.confirmBooking(operatorId, opBookingId, integratorRef, agBookingRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#confirmBooking");
            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; // Operator ID provided by the platform
String *opBookingId = opBookingId_example; // Required. Operator's booking ID of the temporary reserved booking.
String *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)
String *agBookingRef = agBookingRef_example; // Optional. Integrator / booking agent's booking ref for its own use only. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance confirmBookingWith:operatorId
    opBookingId:opBookingId
    integratorRef:integratorRef
    agBookingRef:agBookingRef
              completionHandler: ^(ConfirmBooking 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}} Operator ID provided by the platform
var opBookingId = opBookingId_example; // {{String}} Required. Operator's booking ID of the temporary reserved booking.
var opts = { 
  'integratorRef': integratorRef_example, // {{String}} Optional. Booking agent (Integrator) own reference for its own use.
  'agBookingRef': agBookingRef_example // {{String}} Optional. Integrator / booking agent's booking ref for its own use only.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.confirmBooking(operatorId, opBookingId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class confirmBookingExample
    {
        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 | Operator ID provided by the platform
            var opBookingId = opBookingId_example;  // String | Required. Operator's booking ID of the temporary reserved booking.
            var integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 
            var agBookingRef = agBookingRef_example;  // String | Optional. Integrator / booking agent's booking ref for its own use only. (optional) 

            try
            {
                ConfirmBooking result = apiInstance.confirmBooking(operatorId, opBookingId, integratorRef, agBookingRef);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.confirmBooking: " + 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 | Operator ID provided by the platform
$opBookingId = opBookingId_example; // String | Required. Operator's booking ID of the temporary reserved booking.
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
$agBookingRef = agBookingRef_example; // String | Optional. Integrator / booking agent's booking ref for its own use only.

try {
    $result = $api_instance->confirmBooking($operatorId, $opBookingId, $integratorRef, $agBookingRef);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->confirmBooking: ', $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 | Operator ID provided by the platform
my $opBookingId = opBookingId_example; # String | Required. Operator's booking ID of the temporary reserved booking.
my $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.
my $agBookingRef = agBookingRef_example; # String | Optional. Integrator / booking agent's booking ref for its own use only.

eval { 
    my $result = $api_instance->confirmBooking(operatorId => $operatorId, opBookingId => $opBookingId, integratorRef => $integratorRef, agBookingRef => $agBookingRef);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->confirmBooking: $@\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 | Operator ID provided by the platform
opBookingId = opBookingId_example # String | Required. Operator's booking ID of the temporary reserved booking.
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)
agBookingRef = agBookingRef_example # String | Optional. Integrator / booking agent's booking ref for its own use only. (optional)

try: 
    api_response = api_instance.confirm_booking(operatorId, opBookingId, integratorRef=integratorRef, agBookingRef=agBookingRef)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->confirmBooking: %s\n" % e)

Parameters

Query parameters
Name Description
operator_id*
String
Operator ID provided by the platform
Required
integrator_ref
String
Optional. Booking agent (Integrator) own reference for its own use.
op_booking_id*
String
Required. Operator's booking ID of the temporary reserved booking.
Required
ag_booking_ref
String
Optional. Integrator / booking agent's booking ref for its own use only.

Responses

Status: 200 - Booking Successful

Status: 400 - Request is NOT valid


editBooking

This API request is to change an existing active booking or a pending reservation in shopping cart with new trip on same or new date and same or new time and/or new guest details. New trip info must include all required booking info even they are not changed.


/EditBooking

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/EditBooking?operator_id=&integrator_ref=&bookingarr=&pricearr=&contactarr=&guestarr="
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.
        array[bookingarr_2] bookingarr = ; // array[bookingarr_2] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
        array[pricearr_2] pricearr = ; // array[pricearr_2] | Required. Object array contains booking price details. Can be multiple prices.
        array[contactarr_1] contactarr = ; // array[contactarr_1] | Required. Object array contains booking guest contact details. One contact per booking.
        array[guestarr_1] guestarr = ; // array[guestarr_1] | Required. Object array contains individual booking guest details. Can be multiple guests.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        try {
            EditBooking result = apiInstance.editBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#editBooking");
            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.
        array[bookingarr_2] bookingarr = ; // array[bookingarr_2] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
        array[pricearr_2] pricearr = ; // array[pricearr_2] | Required. Object array contains booking price details. Can be multiple prices.
        array[contactarr_1] contactarr = ; // array[contactarr_1] | Required. Object array contains booking guest contact details. One contact per booking.
        array[guestarr_1] guestarr = ; // array[guestarr_1] | Required. Object array contains individual booking guest details. Can be multiple guests.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        try {
            EditBooking result = apiInstance.editBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#editBooking");
            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.
array[bookingarr_2] *bookingarr = ; // Required. Object array contains elements of trip date and time etc. See developer page for more details.
array[pricearr_2] *pricearr = ; // Required. Object array contains booking price details. Can be multiple prices.
array[contactarr_1] *contactarr = ; // Required. Object array contains booking guest contact details. One contact per booking.
array[guestarr_1] *guestarr = ; // Required. Object array contains individual booking guest details. Can be multiple guests.
String *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance editBookingWith:operatorId
    bookingarr:bookingarr
    pricearr:pricearr
    contactarr:contactarr
    guestarr:guestarr
    integratorRef:integratorRef
              completionHandler: ^(EditBooking 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 bookingarr = ; // {{array[bookingarr_2]}} Required. Object array contains elements of trip date and time etc. See developer page for more details.
var pricearr = ; // {{array[pricearr_2]}} Required. Object array contains booking price details. Can be multiple prices.
var contactarr = ; // {{array[contactarr_1]}} Required. Object array contains booking guest contact details. One contact per booking.
var guestarr = ; // {{array[guestarr_1]}} Required. Object array contains individual booking guest details. Can be multiple guests.
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.editBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class editBookingExample
    {
        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 bookingarr = new array[bookingarr_2](); // array[bookingarr_2] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
            var pricearr = new array[pricearr_2](); // array[pricearr_2] | Required. Object array contains booking price details. Can be multiple prices.
            var contactarr = new array[contactarr_1](); // array[contactarr_1] | Required. Object array contains booking guest contact details. One contact per booking.
            var guestarr = new array[guestarr_1](); // array[guestarr_1] | Required. Object array contains individual booking guest details. Can be multiple guests.
            var integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 

            try
            {
                EditBooking result = apiInstance.editBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.editBooking: " + 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.
$bookingarr = ; // array[bookingarr_2] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
$pricearr = ; // array[pricearr_2] | Required. Object array contains booking price details. Can be multiple prices.
$contactarr = ; // array[contactarr_1] | Required. Object array contains booking guest contact details. One contact per booking.
$guestarr = ; // array[guestarr_1] | Required. Object array contains individual booking guest details. Can be multiple guests.
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.

try {
    $result = $api_instance->editBooking($operatorId, $bookingarr, $pricearr, $contactarr, $guestarr, $integratorRef);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->editBooking: ', $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 $bookingarr = []; # array[bookingarr_2] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
my $pricearr = []; # array[pricearr_2] | Required. Object array contains booking price details. Can be multiple prices.
my $contactarr = []; # array[contactarr_1] | Required. Object array contains booking guest contact details. One contact per booking.
my $guestarr = []; # array[guestarr_1] | Required. Object array contains individual booking guest details. Can be multiple guests.
my $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.

eval { 
    my $result = $api_instance->editBooking(operatorId => $operatorId, bookingarr => $bookingarr, pricearr => $pricearr, contactarr => $contactarr, guestarr => $guestarr, integratorRef => $integratorRef);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->editBooking: $@\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.
bookingarr =  # array[bookingarr_2] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
pricearr =  # array[pricearr_2] | Required. Object array contains booking price details. Can be multiple prices.
contactarr =  # array[contactarr_1] | Required. Object array contains booking guest contact details. One contact per booking.
guestarr =  # array[guestarr_1] | Required. Object array contains individual booking guest details. Can be multiple guests.
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)

try: 
    api_response = api_instance.edit_booking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef=integratorRef)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->editBooking: %s\n" % e)

Parameters

Query 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.
bookingarr*
array[bookingarr_2]
Required. Object array contains elements of trip date and time etc. See developer page for more details.
Required
pricearr*
array[pricearr_2]
Required. Object array contains booking price details. Can be multiple prices.
Required
contactarr*
array[contactarr_1]
Required. Object array contains booking guest contact details. One contact per booking.
Required
guestarr*
array[guestarr_1]
Required. Object array contains individual booking guest details. Can be multiple guests.
Required

Responses

Status: 200 - Booking is changed successfully

Status: 400 - Request is NOT valid


holdBooking

This API request is to temporary reserve a booking for a trip on selected date and time. The booking is unconfirmed and will last no more than 20 minutes before it get cancelled by the system.


/HoldBooking

Usage and SDK Samples

curl -X POST\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/HoldBooking?operator_id=&integrator_ref=&bookingarr=&pricearr=&contactarr=&guestarr="
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.
        array[bookingarr_1] bookingarr = ; // array[bookingarr_1] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
        array[pricearr_1] pricearr = ; // array[pricearr_1] | Required. Object array contains booking price details. See developer page for more details.
        array[contactarr] contactarr = ; // array[contactarr] | Required. Object array contains booking guest contact details. See developer page for more details.
        array[guestarr] guestarr = ; // array[guestarr] | Required. Object array contains individual booking guest details. See developer page for more details.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        try {
            HoldBooking result = apiInstance.holdBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#holdBooking");
            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.
        array[bookingarr_1] bookingarr = ; // array[bookingarr_1] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
        array[pricearr_1] pricearr = ; // array[pricearr_1] | Required. Object array contains booking price details. See developer page for more details.
        array[contactarr] contactarr = ; // array[contactarr] | Required. Object array contains booking guest contact details. See developer page for more details.
        array[guestarr] guestarr = ; // array[guestarr] | Required. Object array contains individual booking guest details. See developer page for more details.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        try {
            HoldBooking result = apiInstance.holdBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#holdBooking");
            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.
array[bookingarr_1] *bookingarr = ; // Required. Object array contains elements of trip date and time etc. See developer page for more details.
array[pricearr_1] *pricearr = ; // Required. Object array contains booking price details. See developer page for more details.
array[contactarr] *contactarr = ; // Required. Object array contains booking guest contact details. See developer page for more details.
array[guestarr] *guestarr = ; // Required. Object array contains individual booking guest 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 holdBookingWith:operatorId
    bookingarr:bookingarr
    pricearr:pricearr
    contactarr:contactarr
    guestarr:guestarr
    integratorRef:integratorRef
              completionHandler: ^(HoldBooking 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 bookingarr = ; // {{array[bookingarr_1]}} Required. Object array contains elements of trip date and time etc. See developer page for more details.
var pricearr = ; // {{array[pricearr_1]}} Required. Object array contains booking price details. See developer page for more details.
var contactarr = ; // {{array[contactarr]}} Required. Object array contains booking guest contact details. See developer page for more details.
var guestarr = ; // {{array[guestarr]}} Required. Object array contains individual booking guest 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.holdBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class holdBookingExample
    {
        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 bookingarr = new array[bookingarr_1](); // array[bookingarr_1] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
            var pricearr = new array[pricearr_1](); // array[pricearr_1] | Required. Object array contains booking price details. See developer page for more details.
            var contactarr = new array[contactarr](); // array[contactarr] | Required. Object array contains booking guest contact details. See developer page for more details.
            var guestarr = new array[guestarr](); // array[guestarr] | Required. Object array contains individual booking guest details. See developer page for more details.
            var integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 

            try
            {
                HoldBooking result = apiInstance.holdBooking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.holdBooking: " + 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.
$bookingarr = ; // array[bookingarr_1] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
$pricearr = ; // array[pricearr_1] | Required. Object array contains booking price details. See developer page for more details.
$contactarr = ; // array[contactarr] | Required. Object array contains booking guest contact details. See developer page for more details.
$guestarr = ; // array[guestarr] | Required. Object array contains individual booking guest 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->holdBooking($operatorId, $bookingarr, $pricearr, $contactarr, $guestarr, $integratorRef);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->holdBooking: ', $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 $bookingarr = []; # array[bookingarr_1] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
my $pricearr = []; # array[pricearr_1] | Required. Object array contains booking price details. See developer page for more details.
my $contactarr = []; # array[contactarr] | Required. Object array contains booking guest contact details. See developer page for more details.
my $guestarr = []; # array[guestarr] | Required. Object array contains individual booking guest 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->holdBooking(operatorId => $operatorId, bookingarr => $bookingarr, pricearr => $pricearr, contactarr => $contactarr, guestarr => $guestarr, integratorRef => $integratorRef);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->holdBooking: $@\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.
bookingarr =  # array[bookingarr_1] | Required. Object array contains elements of trip date and time etc. See developer page for more details.
pricearr =  # array[pricearr_1] | Required. Object array contains booking price details. See developer page for more details.
contactarr =  # array[contactarr] | Required. Object array contains booking guest contact details. See developer page for more details.
guestarr =  # array[guestarr] | Required. Object array contains individual booking guest 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.hold_booking(operatorId, bookingarr, pricearr, contactarr, guestarr, integratorRef=integratorRef)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->holdBooking: %s\n" % e)

Parameters

Query 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.
bookingarr*
array[bookingarr_1]
Required. Object array contains elements of trip date and time etc. See developer page for more details.
Required
pricearr*
array[pricearr_1]
Required. Object array contains booking price details. See developer page for more details.
Required
contactarr*
array[contactarr]
Required. Object array contains booking guest contact details. See developer page for more details.
Required
guestarr*
array[guestarr]
Required. Object array contains individual booking guest details. See developer page for more details.
Required

Responses

Status: 200 - Reservation Successful

Status: 400 - Request is NOT valid


prices

This API request is to fetch all prices set for the agent for selected product or all available prices to the agent on selected dates for selected product.If "days" element in the request is set to "0", all prices set for the agent will be in the response regardless "date" setting.If "days" element in the request is set to 1 to 31, available prices set for the agent on each date from the selected date within a number of "days" will be in the response. Therefore prices are date dependent. If your website does not support dynamic pricing with price schedules, talk to the operator and set prices without price schedules.Price availability on scheduled trip date will be verified at the server end when booking is requested.


/Prices

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/Prices?operator_id=&integrator_ref=&item_id=&date=&days=&language_id="
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 | Operator ID provided by the platform
        String itemId = itemId_example; // String | Operator's product code
        String date = date_example; // String | Selected trip date
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String days = days_example; // String | Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31.
        String languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
        try {
            Prices result = apiInstance.prices(operatorId, itemId, date, integratorRef, days, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#prices");
            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 | Operator ID provided by the platform
        String itemId = itemId_example; // String | Operator's product code
        String date = date_example; // String | Selected trip date
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        String days = days_example; // String | Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31.
        String languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
        try {
            Prices result = apiInstance.prices(operatorId, itemId, date, integratorRef, days, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#prices");
            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; // Operator ID provided by the platform
String *itemId = itemId_example; // Operator's product code
String *date = date_example; // Selected trip date
String *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)
String *days = days_example; // Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31. (optional) (default to 0)
String *languageId = languageId_example; // Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional) (default to 1)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance pricesWith:operatorId
    itemId:itemId
    date:date
    integratorRef:integratorRef
    days:days
    languageId:languageId
              completionHandler: ^(Prices 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}} Operator ID provided by the platform
var itemId = itemId_example; // {{String}} Operator's product code
var date = date_example; // {{String}} Selected trip date
var opts = { 
  'integratorRef': integratorRef_example, // {{String}} Optional. Booking agent (Integrator) own reference for its own use.
  'days': days_example, // {{String}} Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31.
  'languageId': languageId_example // {{String}} Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.prices(operatorId, itemId, date, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class pricesExample
    {
        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 | Operator ID provided by the platform
            var itemId = itemId_example;  // String | Operator's product code
            var date = date_example;  // String | Selected trip date
            var integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 
            var days = days_example;  // String | Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31. (optional)  (default to 0)
            var languageId = languageId_example;  // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional)  (default to 1)

            try
            {
                Prices result = apiInstance.prices(operatorId, itemId, date, integratorRef, days, languageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.prices: " + 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 | Operator ID provided by the platform
$itemId = itemId_example; // String | Operator's product code
$date = date_example; // String | Selected trip date
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
$days = days_example; // String | Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31.
$languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

try {
    $result = $api_instance->prices($operatorId, $itemId, $date, $integratorRef, $days, $languageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->prices: ', $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 | Operator ID provided by the platform
my $itemId = itemId_example; # String | Operator's product code
my $date = date_example; # String | Selected trip date
my $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.
my $days = days_example; # String | Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31.
my $languageId = languageId_example; # String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

eval { 
    my $result = $api_instance->prices(operatorId => $operatorId, itemId => $itemId, date => $date, integratorRef => $integratorRef, days => $days, languageId => $languageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->prices: $@\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 | Operator ID provided by the platform
itemId = itemId_example # String | Operator's product code
date = date_example # String | Selected trip date
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)
days = days_example # String | Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31. (optional) (default to 0)
languageId = languageId_example # String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional) (default to 1)

try: 
    api_response = api_instance.prices(operatorId, itemId, date, integratorRef=integratorRef, days=days, languageId=languageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->prices: %s\n" % e)

Parameters

Query parameters
Name Description
operator_id*
String
Operator ID provided by the platform
Required
integrator_ref
String
Optional. Booking agent (Integrator) own reference for its own use.
item_id*
String
Operator's product code
Required
date*
String
Selected trip date
Required
days
String
Optional. Number of days from "date" for search prices available on these dates. Value between 0 to 31. If days = 0, returns all prices for the agent. If days > 31, set to 31.
language_id
String
Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

Responses

Status: 200 - Prices are available

Status: 400 - Request is NOT valid


product

This API request is to fetch details of a selected activity or tour product of a selected operator.


/Product

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/Product?operator_id=&integrator_ref=&item_id=&language_id="
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 | Operator ID provided by the platform
        String itemId = itemId_example; // String | Operator's product code
        String integratorRef = integratorRef_example; // String | Optional. Agent's booking reference.
        String languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
        try {
            Product result = apiInstance.product(operatorId, itemId, integratorRef, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#product");
            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 | Operator ID provided by the platform
        String itemId = itemId_example; // String | Operator's product code
        String integratorRef = integratorRef_example; // String | Optional. Agent's booking reference.
        String languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
        try {
            Product result = apiInstance.product(operatorId, itemId, integratorRef, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#product");
            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; // Operator ID provided by the platform
String *itemId = itemId_example; // Operator's product code
String *integratorRef = integratorRef_example; // Optional. Agent's booking reference. (optional)
String *languageId = languageId_example; // Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional) (default to 1)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance productWith:operatorId
    itemId:itemId
    integratorRef:integratorRef
    languageId:languageId
              completionHandler: ^(Product 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}} Operator ID provided by the platform
var itemId = itemId_example; // {{String}} Operator's product code
var opts = { 
  'integratorRef': integratorRef_example, // {{String}} Optional. Agent's booking reference.
  'languageId': languageId_example // {{String}} Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.product(operatorId, itemId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class productExample
    {
        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 | Operator ID provided by the platform
            var itemId = itemId_example;  // String | Operator's product code
            var integratorRef = integratorRef_example;  // String | Optional. Agent's booking reference. (optional) 
            var languageId = languageId_example;  // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional)  (default to 1)

            try
            {
                Product result = apiInstance.product(operatorId, itemId, integratorRef, languageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.product: " + 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 | Operator ID provided by the platform
$itemId = itemId_example; // String | Operator's product code
$integratorRef = integratorRef_example; // String | Optional. Agent's booking reference.
$languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

try {
    $result = $api_instance->product($operatorId, $itemId, $integratorRef, $languageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->product: ', $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 | Operator ID provided by the platform
my $itemId = itemId_example; # String | Operator's product code
my $integratorRef = integratorRef_example; # String | Optional. Agent's booking reference.
my $languageId = languageId_example; # String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

eval { 
    my $result = $api_instance->product(operatorId => $operatorId, itemId => $itemId, integratorRef => $integratorRef, languageId => $languageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->product: $@\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 | Operator ID provided by the platform
itemId = itemId_example # String | Operator's product code
integratorRef = integratorRef_example # String | Optional. Agent's booking reference. (optional)
languageId = languageId_example # String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional) (default to 1)

try: 
    api_response = api_instance.product(operatorId, itemId, integratorRef=integratorRef, languageId=languageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->product: %s\n" % e)

Parameters

Query parameters
Name Description
operator_id*
String
Operator ID provided by the platform
Required
integrator_ref
String
Optional. Agent's booking reference.
item_id*
String
Operator's product code
Required
language_id
String
Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

Responses

Status: 200 - Product is found

Status: 400 - Request is NOT valid


productList

This API request is to fetch a list of all available activity or tour products of a selected operator and the details of each product


/ProductList

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/ProductList?operator_id=&integrator_ref=&language_id="
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 | Operator ID provided by the platform
        String integratorRef = integratorRef_example; // String | Optional. Agent's booking reference.
        String languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
        try {
            ProductList result = apiInstance.productList(operatorId, integratorRef, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#productList");
            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 | Operator ID provided by the platform
        String integratorRef = integratorRef_example; // String | Optional. Agent's booking reference.
        String languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
        try {
            ProductList result = apiInstance.productList(operatorId, integratorRef, languageId);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#productList");
            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; // Operator ID provided by the platform
String *integratorRef = integratorRef_example; // Optional. Agent's booking reference. (optional)
String *languageId = languageId_example; // Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional) (default to 1)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance productListWith:operatorId
    integratorRef:integratorRef
    languageId:languageId
              completionHandler: ^(ProductList 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}} Operator ID provided by the platform
var opts = { 
  'integratorRef': integratorRef_example, // {{String}} Optional. Agent's booking reference.
  'languageId': languageId_example // {{String}} Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.
};
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.productList(operatorId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class productListExample
    {
        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 | Operator ID provided by the platform
            var integratorRef = integratorRef_example;  // String | Optional. Agent's booking reference. (optional) 
            var languageId = languageId_example;  // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional)  (default to 1)

            try
            {
                ProductList result = apiInstance.productList(operatorId, integratorRef, languageId);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.productList: " + 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 | Operator ID provided by the platform
$integratorRef = integratorRef_example; // String | Optional. Agent's booking reference.
$languageId = languageId_example; // String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

try {
    $result = $api_instance->productList($operatorId, $integratorRef, $languageId);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->productList: ', $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 | Operator ID provided by the platform
my $integratorRef = integratorRef_example; # String | Optional. Agent's booking reference.
my $languageId = languageId_example; # String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

eval { 
    my $result = $api_instance->productList(operatorId => $operatorId, integratorRef => $integratorRef, languageId => $languageId);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->productList: $@\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 | Operator ID provided by the platform
integratorRef = integratorRef_example # String | Optional. Agent's booking reference. (optional)
languageId = languageId_example # String | Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response. (optional) (default to 1)

try: 
    api_response = api_instance.product_list(operatorId, integratorRef=integratorRef, languageId=languageId)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->productList: %s\n" % e)

Parameters

Query parameters
Name Description
operator_id*
String
Operator ID provided by the platform
Required
integrator_ref
String
Optional. Agent's booking reference.
language_id
String
Optional. Default as 1 (English). =1 English; =2 Chinese. Used as selected language for price name and description in the response.

Responses

Status: 200 - Product is found

Status: 400 - Request is NOT valid


timetable

This API request is to fetch all trip departure dates (date), departure time (time) and remaining place number (place). Search are based on a selected date for a number of days up to 31 days of a selected product of a selected operator. Response is in json format.The selected date must be on or later than operator's current local date.If the number of days is smaller than 1, it will be treated as 1. If it is bigger than 31 days, it returns error with a response code.Only date and time with available place will be included in the response. Some products may have no departure time but departure date only. For those products, "time" value in timetable parameter in the response will be empty.


/Timetable

Usage and SDK Samples

curl -X GET\
 -H "Authorization: Basic [[basicHash]]"\
-H "Accept: application/json"\
"https://api.esytravel.net/api/agentapi/Timetable?booking_type=&date=&days=&integrator_ref=&operator_id=&item_id="
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 bookingType = bookingType_example; // String | 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
        String date = date_example; // String | The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
        String days = days_example; // String | Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
        String operatorId = operatorId_example; // String | Operator ID provided by the platform
        String itemId = itemId_example; // String | Operator's product code.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        try {
            Timetable result = apiInstance.timetable(bookingType, date, days, operatorId, itemId, integratorRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#timetable");
            e.printStackTrace();
        }
    }
}
import io.swagger.client.api.DefaultApi;

public class DefaultApiExample {

    public static void main(String[] args) {
        DefaultApi apiInstance = new DefaultApi();
        String bookingType = bookingType_example; // String | 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
        String date = date_example; // String | The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
        String days = days_example; // String | Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
        String operatorId = operatorId_example; // String | Operator ID provided by the platform
        String itemId = itemId_example; // String | Operator's product code.
        String integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.
        try {
            Timetable result = apiInstance.timetable(bookingType, date, days, operatorId, itemId, integratorRef);
            System.out.println(result);
        } catch (ApiException e) {
            System.err.println("Exception when calling DefaultApi#timetable");
            e.printStackTrace();
        }
    }
}
Configuration *apiConfig = [Configuration sharedConfig];
// Configure HTTP basic authorization (authentication scheme: BasicAuth)
[apiConfig setUsername:@"YOUR_USERNAME"];
[apiConfig setPassword:@"YOUR_PASSWORD"];
String *bookingType = bookingType_example; // 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
String *date = date_example; // The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
String *days = days_example; // Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
String *operatorId = operatorId_example; // Operator ID provided by the platform
String *itemId = itemId_example; // Operator's product code.
String *integratorRef = integratorRef_example; // Optional. Booking agent (Integrator) own reference for its own use. (optional)

DefaultApi *apiInstance = [[DefaultApi alloc] init];

[apiInstance timetableWith:bookingType
    date:date
    days:days
    operatorId:operatorId
    itemId:itemId
    integratorRef:integratorRef
              completionHandler: ^(Timetable 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 bookingType = bookingType_example; // {{String}} 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
var date = date_example; // {{String}} The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
var days = days_example; // {{String}} Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
var operatorId = operatorId_example; // {{String}} Operator ID provided by the platform
var itemId = itemId_example; // {{String}} Operator's product code.
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.timetable(bookingType, date, days, operatorId, itemId, opts, callback);
using System;
using System.Diagnostics;
using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace Example
{
    public class timetableExample
    {
        public void main()
        {
            // Configure HTTP basic authorization: BasicAuth
            Configuration.Default.Username = "YOUR_USERNAME";
            Configuration.Default.Password = "YOUR_PASSWORD";

            var apiInstance = new DefaultApi();
            var bookingType = bookingType_example;  // String | 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
            var date = date_example;  // String | The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
            var days = days_example;  // String | Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
            var operatorId = operatorId_example;  // String | Operator ID provided by the platform
            var itemId = itemId_example;  // String | Operator's product code.
            var integratorRef = integratorRef_example;  // String | Optional. Booking agent (Integrator) own reference for its own use. (optional) 

            try
            {
                Timetable result = apiInstance.timetable(bookingType, date, days, operatorId, itemId, integratorRef);
                Debug.WriteLine(result);
            }
            catch (Exception e)
            {
                Debug.Print("Exception when calling DefaultApi.timetable: " + 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();
$bookingType = bookingType_example; // String | 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
$date = date_example; // String | The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
$days = days_example; // String | Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
$operatorId = operatorId_example; // String | Operator ID provided by the platform
$itemId = itemId_example; // String | Operator's product code.
$integratorRef = integratorRef_example; // String | Optional. Booking agent (Integrator) own reference for its own use.

try {
    $result = $api_instance->timetable($bookingType, $date, $days, $operatorId, $itemId, $integratorRef);
    print_r($result);
} catch (Exception $e) {
    echo 'Exception when calling DefaultApi->timetable: ', $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 $bookingType = bookingType_example; # String | 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
my $date = date_example; # String | The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
my $days = days_example; # String | Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
my $operatorId = operatorId_example; # String | Operator ID provided by the platform
my $itemId = itemId_example; # String | Operator's product code.
my $integratorRef = integratorRef_example; # String | Optional. Booking agent (Integrator) own reference for its own use.

eval { 
    my $result = $api_instance->timetable(bookingType => $bookingType, date => $date, days => $days, operatorId => $operatorId, itemId => $itemId, integratorRef => $integratorRef);
    print Dumper($result);
};
if ($@) {
    warn "Exception when calling DefaultApi->timetable: $@\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()
bookingType = bookingType_example # String | 1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
date = date_example # String | The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
days = days_example # String | Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
operatorId = operatorId_example # String | Operator ID provided by the platform
itemId = itemId_example # String | Operator's product code.
integratorRef = integratorRef_example # String | Optional. Booking agent (Integrator) own reference for its own use. (optional)

try: 
    api_response = api_instance.timetable(bookingType, date, days, operatorId, itemId, integratorRef=integratorRef)
    pprint(api_response)
except ApiException as e:
    print("Exception when calling DefaultApi->timetable: %s\n" % e)

Parameters

Query parameters
Name Description
booking_type*
String
1 is for new booking check (this will check booking closed deadline); = 2 is edit existing booking check (this will check booking change deadline).
Required
date*
String
The first trip date on the timetable in Y-m-d format (eg. 2021-10-20).
Required
days*
String
Number of days to be checked. Day number is between 1 to 31. If it is not set, default to 1.
Required
integrator_ref
String
Optional. Booking agent (Integrator) own reference for its own use.
operator_id*
String
Operator ID provided by the platform
Required
item_id*
String
Operator's product code.
Required

Responses

Status: 200 - Place is available

Status: 400 - Request is NOT valid