RON XML API Reference

Introduction  

The Respax Operator Network (RON) XML API is the window into a real-time tour operator portal network connecting in real-time to major Australian and New Zealand tour operators. The Respax Operator Network enables development of interfaces to directly interact with each operator retrieving tour details with imagery, check availability, check prices and commit bookings directly into the remote operators system.  For a more detailed overview of RON, please checkout the RON Introduction page to get started with your interface.  You will need to register as a user on http://ron.respax.com.au. As part of the registration process, you will be sent an email with your user details.  

While developing and testing your interface, please use the training server:  

Training Database
https://ron.respax.com.au:30443/section/xmlrpc/server-ron.php?config=train  

Once your interface is complete and you are certified live, change to the live server:  

Live Database
https://ron.respax.com.au:30443/section/xmlrpc/server-ron.php?config=live

Contents

API Overview

This XML-RPC (Extensible Markup Language - Remote Procedure Calling) API (Application Programming Interface) provides a simplified method to access a central database which in turn connects to multiple tour operator ResPax databases. The functions listed here allow a client application to view tour content as well as assemble the necessary information to commit a reservation into a host operator's database.  

XML-RPC Home
http://www.xmlrpc.com/

Database records are returned as associative arrays where the field name maps on to the field value. Anywhere that an example result refers to a record (eg web details record) refer to the fields table for a list of all field names and a description of their values. When writing new reservations or updating existing reservations, assemble a record as an associative array using the reservations fields table as a guide.  

With the exception of ping, searchHost and searchKeyWord, the client must have successfully logged in using the login function before calling other functions. In addition, the session id returned by login must be appended to the server address as an additional request variable for these functions. Examples are provided below.  

Nulls and Empty Strings  

Currently XML-RPC cannot represent null values. As a result, null values in the RON or operator databases are converted to empty strings. For the purposes of this API, any string field that contains an empty string should be considered an empty string. Any non string field that contains an empty string should be considered a null value.  

Date Formats

Dates in the API can be passed as a string representation in the format dd-MMM-yyyy. For Example:  

26-JAN-1788 (26th of January, 1788)  
21-DEC-2012 (21st of December, 2012)

The API has support for the ISO 8601 standard. For example:  

1788-01-26 (26th of January, 1788)  
2012-12-21 (21st of December, 2012) 

week number and ordinal date formats are not supported

http://www.w3.org/TR/NOTE-datetime 

http://en.wikipedia.org/wiki/ISO_8601  

Passing dates in any other format may produce unexpected results. 

YSN Fields  

Fields prefixed with ysn are legacy boolean variants. For such fields a value of 0 (zero) equates to False and a value of -1 (negative one) equates to True.   

Training Mode Mappings  

To speed up development and testing, a set of generic mappings for each host are automatically in place when accessing the API in training mode. If you are seeing variations in results between live and training, keep in mind that you are using the generic test mappings in training mode and not mappings specific to your account.  


Function Reference

ping

string ping ()  

This simple test function returns the string "pong" if your xmlrpc call has been successful.  

Example  

results = api.ping()  

Results  

string(4) "pong"  

 


login 

string login (string userid, string password, string distributor)  

Validates the userid and password against the RON database. If the user is valid, associated globals in the server session are set and a string containing the session id variable name and value is returned. This string needs to be appended as an additional request variable to the server address for most subsequent function calls.  

Optionally you can pass a distributor id with the login details. This will look up the equivalent agent in each operator's database and set that as the current agent instead of the agent associated with the login details.  

 Distributor mappings are only functional in the live environment. 

Example  

results = api.login('albert', 'secret') 

Results  

string(42) "PHPSESSID=1bea4b6a9491805f986ad14389a1a25e"  

Usage  

# Use the unmodified server address for authentication.   
server_address = 'https://ron.respax.com.au:30443/section/xmlrpc/server-ron.php?config=train'   
api.address = server_address   
results = api.login('albert', 'secret')     

# If authentication was successful, append the session id to the server address.   
if faultCode not in results:   
		api.address = server_address + '&' + results 

 Assuming authentication was successful, api.address should hold the following.  

string(117) "https://ron.respax.com.au:30443/section/xmlrpc/server-ron.php?config=train&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e"  

 


readCurrentLogin

array readCurrentLogin ()  

Returns an array of two elements. The first element containing the details of the currently logged in user and the second element the details of the current user's organisation.  

Example  

results = api.readCurrentLogin()  

Results  

array(2) {   
	["arrCurrentUser"] => current user record,   
	["arrCurrentOrganisation"] => current organisation record  
	["arrHost"] => deprecated - information available from readHostDetails   
}  
Current User Fields 
Field Name

Description

intID

Unique integer identifier for the user.

strUserID

User id used to login.

strFirstName

User's first name. (Maximum 50 Characters)

strLastName

User's last name.(Maximum 50 Characters)

strEmail

User's email address.

strPhone

User's contact phone number.

Current Organisation Fields 
Field Name

Description

intID

Unique integer identifier for the organistion.

strOrgID

String identifier for the organisation.

strName

Name of the organisation.

Host Fields

Deprecated, use readHostDetails for additional host information.  

 


writeCurrentLogin

boolean writeCurrentLogin (array user, array organisation)  

Allows the currently authenticated user to update his user and organisation details. Returns the boolean value True if successful. It is not necessary to include all fields listed below in the parameter arrays. Only the fields requiring an update must be provided. Note that if you change the password, the new password will be required for subsequent calls to the login function.  

Example  

user = array('strEmail' => 'example@example.com')   
organisation = array('strReservationsEmail' => 'example@example.com')   
results = api.writeCurrentLogin(user, organisation)  

Results  

boolean True  
User Update Fields 
Field Name

Description

strFirstName

First or given name of the user.

strLastName

Last or family name of the user.

strEmail

Primary contact email address.

strPhone

Primary contact phone number.

strPassword

The password required to authenticate the user.

Organisation Update Fields 
Field Name

Description

strReservations

Contact name for any reservations related communications.

strReservationsEmail

Email address for reservations.

strReservationsPhone

Phone number for reservations.

strTechnical

Contact name for any technical support related communications.

strTechnicalEmail

Email address for technical support.

strTechnicalPhone

Phone number for technical support.

strAccounts

Contact name for any accounts related communications.

strAccountsEmail

Email address for accounts.

strAccountsPhone

Phone number for accounts.

 


readCreditStatus

string readCreditStatus (string hostid)  

Returns the credit status of the current user at the host specified.  

Example  

results = api.readCreditStatus('TEE') 

Results  

string(3) "dep"  
Credit Statuses 
Credit Status

Payment Options

full

See  readPaymentOptions for information on determining a valid payment option.

fulllevy

See  readPaymentOptions for information on determining a valid payment option.

dep

See readPaymentOptions  for information on determining a valid payment option.

fullpob

See readPaymentOptions  for information on determining a valid payment option.

stop

Stopped agents cannot process payments and must be blocked from making new bookings.

 


readPaymentOptions 

array readPaymentOptions (string hostid)  

Returns an array of zero or more associative arrays each representing a payment option that is valid for the currently logged in user at the host specified.  

Example  

results = api.readPaymentOptions('ATA');  

Results  

array(n) {   
	[0] => payment option record,   
	...   
	[n-1] => payment option record   }  
Payment Option Fields
Field Name

Description

strCode

Unique identifier for the payment option.

strDescription

Description of the normal method of payment collection when using this payment option.

ysnDefault

Indicates the default payment option that is preferred by the operator.

strCode_Deprecated

Payment option codes have been migrated to a standard format. All operators should now accept the standard format. (strCode)

Example Payment Options 
Payment Option

Description

full-agent

Full amount is collected by the agent at time of booking.

bal-agent/levy-pob

Full amount less the levy is collected by the agent at time of booking. Levy is collected by the tour operator on day of travel.

comm-agent/bal-pob

Deposit is collected by the agent at time of booking. Balance is collected by the tour operator on day of travel.

full-ccard

Full amount is collected on credit card at time of booking.

bal-ccard/levy-pob

Full amount less the levy is collected on credit card at time of booking. Levy is collected by the operator on day of travel.

full-pob

Full amount is collected by the tour operator on day of travel.

comm-ccard/bal-pob

Deposit is collected on credit card at time of booking. Balance is collected by the tour operator on day of travel.

comm-agent/bal-ccard

Deposit is collected by the agent at time of booking. Balance is collected on credit card at time of booking.

When checking or writing a reservation you must provide a payment option that is returned by this function. Any attempt to use a payment option that is not returned by this function will result in the booking being rejected. If the payment option you want to use is not returned by this function, contact the operator to review your credit status.   

 


readCreditCardTypes  

array readCreditCardTypes (string hostid)  

Returns an array of zero or more associative arrays each representing a credit card type supported by the host for processing 'ccard' payments.  

Example  

results = api.readCreditCardTypes('TW');  

Results  

array(n) {   
	[0] => credit card type record,   
	...   
	[n-1] => credit card type record   
}  
Credit Card Type Fields 
Field Name

Description

Type

strCCTypeID

Unique identifier for the credit card type.

string(10)

strCCDesc

Description of the credit card type.

string(50)

dblWebCardFee

The processing fee charged by the host. This is a percentage applied to the amount being charged.

float

 


readHosts

array readHosts ()  

Returns an array of associative arrays each containing the host id, name and a boolean value indicating the current state of the host.  

Example  

results = api.readHosts()  

Results  

array(n) {   
	[0] => host record   
	...   
	[n-1] => host record  
}  
Host List Fields 
Field Name

Description

strHostID

Unique identifier for the host.

strHostName

Host organisation's name.

boolServerUp

Flag to indicate if the host server is currently reachable.

boolOnline

Flag to indicate if the host configuration process is complete.

boolSecure

Flag to indicate if the RON connection to the operator is secure. Attempting to send credit card payments to an insecure host will generate an error.

About Host Status  

There are two flags that must be enabled for tour content to be available. The flag boolServerUp indicates if the physical machine responded to the most recent attempt to contact it. The flag boolOnline is set by a RON administrator once the host has completed all the steps necessary to publish their tour content successfully. Function calls to any host with boolOnline disabled should be avoided as the results may not be valid.  


readHostDetails  

array readHostDetails (string hostid)  

Returns an array containing a single associative array of extended information for the host including contact information.  

Example  

results = api.readHostDetails('BCGI')  

Results  

array(1) {   
	[0] => host details record  
}  
Host Details Fields 
Field Name

Description

strHostID

Unique identifier for the host.

strHostName

Host organisation's name.

boolServerUp

Flag to indicate if the host server is currently reachable.

boolOnline

Flag to indicate if the host configuration process is complete.

strConfigMode

Indicates if the host data was drawn from the live or train registrations.

strLocation

Approximate geographical location of the host.

strReservations

Name of reservations staff contact.

strReservationsEmail

Reservations email address.

strReservationsPhone

Reservations phone number.

strTechnical

Name of technical support contact.

strTechnicalEmail

Technical support email address.

strTechnicalPhone

Technical support phone number.

strAccounts

Name of accounts department contact.

strAccountsEmail

Accounts department email address.

strAccountsPhone

Accounts department phone number.

strHostType

Indicates whether the host takes live bookings or requests.

boolPOBCreditCard

 deprecated

boolMandatoryOrigin

Host requires the pax origin field in reservations.

boolMandatorySource

Host requires the pax source field in reservations.

intCancellationOffset

Number of days prior to tour date that reservations for this host can be cancelled via this API. Note that other system rules may still prevent cancellations.

intMinimumTourDateOffset

Number of days prior to tour date that reservations for this host can be booked via this API. Note that resource expiries may still prevent new reservations.

strInterfaceVersion

Version of the API in use by the host.

 


readPaxTypes

array readPaxTypes (string hostid)  

Returns an indexed array of associative arrays containing the pax type information for the host.   

Example  

results = api.readPaxTypes('FF')  

Results  

array(   
	[0] => pax type record,  
 	... 
	[n-1] => pax type record   
)  
Pax Type Fields 
Field Name

Description

intPaxType

Unique identifier for the pax type.

strPaxDesc

The standard pax type label.

strShortPaxDesc

A short pax type label that can be used when there is limited space in the interface.

intWebPaxAssoc

The pax type price that is associated with this pax type.

Pax Types and Reservation Fields  

An operator can customise the pax type labels to suit her products. This can include moving the label of one pax type to another field. For example, the operator could change the infant pax type to a new type called "Family Child" and then change the user defined pax type to infant. The pax types would still need to be booked in the original reservation field names. In the previous example, family children would be booked in the intNoPax_Infant field and infants would be booked in the intNoPax_UDef1 field.  

 

Pax Type

Field

Default Desc. (Short)

Default Assoc.

Example Desc. (Short)

Example Assoc.

1

intNoPax_Adults

Adult (Ad)

1

Adult (Ad)

1

2

intNoPax_Infant

Infant (In)

1

Family Child (FCh)

2

3

intNoPax_Child

Child (Ch)

3

Child (Ch)

3

4

intNoPax_FOC

FOC (FOC)

4

Concession (Cn)

4

5

intNoPax_UDef1

User Defined (Udef)

5

Infant (In)

1

Pax Type Associations  

On any given trip, if a pax type's associated pax type (intWebPaxAssoc) has no price then that pax type cannot be booked. For example, the default association of pax type 1 is to itself, therefore to book an adult, there must be an adult price. That is the same for all pax types except pax type 2. Pax type 2 by default is associated to pax type 1 therefore to book an infant there must be an adult price and at least one adult travelling. The default pax type associations cover the need of many operators to allow infants to travel free with their parent or guardian.  


readOrigins

array readOrigins (string hostid)  

Returns an indexed array of associative arrays containing the pax origin information for the host. This may be required by writeReservation for some hosts. See readHostDetails to determine if origin is mandatory for a given host.  

Example  

results = api.readOrigins('BCGI')  

Results  

array(   
[0] => origin record,   
...   
[n-1] => origin record   )  
Origin Fields 
Field Name

Description

intCountryID

Unique identifier for the origin. This may be required by writeReservation for some hosts.

strCountryDesc

The description of the origin.

Support  

This method may return a fault if the host does not yet support origins.  

-32601: server error. method not found  

  


readSources

array readSources (string hostid)  

Returns an indexed array of associative arrays containing the pax source information for the host. This may be required by write Reservation for some hosts. See readHostDetails to determine if source is mandatory for a given host.  

Example  

results = api.readSources('BCGI')  

Results  

array(   
	[0] => source record,   
	...   
	[n-1] => source record   
	)  
Source Fields 
Field Name

Description

intSourceID

Unique identifier for the source. This may be required by writeReservation for some hosts.

strSourceDesc

The description of the source.

Support  

This method may return a fault if the host does not yet support sources.  

-32601: server error. method not found  

 


readTours

array readTours (string hostid)  

Returns an array of associative arrays each containing the tour code and tour name for all the publicly visible tours from the specified host.  

Example  

results = api.readTours('OZEX')  

Results  

array(n) {   
	[0] => tour list record   
	...   
	[n-1] => tour list record  
	}  
Tour List Fields 
Field Name

Description

strTourCode

Identifier for the tour record.

strTourName

Name of the tour.

boolAvailable

Indicator of tour availability. This does not mean there are seats, just that the tour is enabled and bookable.

 


readTourDetails

array readTourDetails (string hostid, string tourcode)  

Returns an associative array of extended tour information from the host for the specified tour code.  

Example  

results = api.readTourDetails('OZEX', 'BRUCE')  

Results  

tour details record  
Tour Details Fields 
Field Name

Description

strTourCode

Identifier for the tour.

strTourName

Name of the tour.

strTourComment

Special instructions and additional information from the operator.

bitTourFlavours(currently not supported)

Bitwise value that alters behavior of the booking process

ysnForcePaxID(currently not supported)

Indicates if a user record must be created for the pax when committing the reservation.

ysn1PerRes(currently not supported)

Indicates if only one pax can be assigned to a reservation.

arrTravelTerms *

An array of zero or more terms and conditions for travel from each of the parties involved in the reservation. (tour owner, tour operator, booking agent)

*

The travel terms field is not yet supported by all operators.  

 

 

Travel Terms Fields 
Field Name

Description

strOrgID

Identifier for the organisation.

strOrgName

Name of the organisation enforcing the travel terms.

strTravelTerms

The terms and conditions for travel.


readTourWebDetails

array readTourWebDetails (string hostid, string tourcode, boolean images)  

Returns an associative array of promotional and descriptive information for the tour. Due to the size of base 64 encoded images, you can optionally request that image information not be returned by sending false as the third parameter.  

Example  

results = api.readTourWebDetails('KIWIEX', 'FULLMONTY', True)  

Results  

tour web details record  
Tour Web Details Fields 
Field Name

Description

strTourCode

Identifier for the tour.

strTitle

A short concise title describing the tour.

strCatchPhrase

A general description or blurb promoting key features of the tour.

strIncludes

A list of specifics that are included with the tour.

strAdditional

Any additional information the passenger needs to know about the tour.

strLevyDesc

Details of any levies that apply to the tour.

strComment

A message that should be displayed when booking indicating the information needed in the comment field.

strAvailability

A message that should be displayed when booking indicating valid travel dates for the tour.

strDuration

The estimated tour duration. This can be variable based on the options selected when booking.

dteLastUpdated

The last time the web details were updated. This can be used to determine if the web details have changed without retrieving all the information.

intSmallImageID

Identifier for the image.(currently not supported)

intLargeImageID

Identifier for the image.(currently not supported)

intIncludeImageID

Identifier for the image.(currently not supported)

b64SmallImage

A base64 encoded image. Operators have been advised to make this image 160x160 in size.

b64LargeImage

A base64 encoded image. Operators have been advised to make this image 180x240 in size.

b64IncludeImage

A base64 encoded image. Operators have been advised to make this image 80x80 in size.

 


readTourTimes

array readTourTimes (string hostid, string tourcode)  

Returns an array of associative arrays from the host each containing the details of a departure time for the specified tour.  

Example  

results = api.readTourTimes('GA', 'GIECO')  

Results  

array(n) {   
	[0] => tour time record   
	...   
	[n-1] => tour time record  
}  
Tour Times Fields 
Field Name

Description

intTourTimeID

Identifier for the tour time record.

strTourCode

Identifier for the tour.

dteTourTime

Associative array containing integer timestamp, scalar and ISO8601 formats for the time. The ISO8601 format is recommended for use in interfaces as the timestamp and scalar representations are now deprecated.

ysnIsReturnTrip(currently not supported)

Indicates if the departure time has a return trip.

ysnIsDefault

Indicates if the departure time is the default that should be offered up first to the client.

ysnActive

Indicates if the departure time is currently active. Inactive departure times should not be presented to the client.

 


readTourBases

array readTourBases (string hostid, string tourcode)  

Returns an array of associative arrays from the host each containing the details of a fare basis and type for the specified tour. Only records where both ysnWebEnabledBasis and ysnWebEnabledSubBasis are true should be presented to the client. Bookings with disabled bases or subbases will be rejected by the host.  

 

Any subsequent function that requires both a basis and subbasis id requires a pair of ids from a single record in the results. You cannot mix and match basis and subbasis ids from different records.  

Example  

results = api.readTourBases('RT', 'ATR')  

Results  

array(n) {   
	[0] => tour basis record   
	...   
	[n-1] => tour basis record  
}  
Tour Bases Fields 
Field Name

Description

strTourCode

Identifier for the tour.

intBasisID

Identifier for the basis.

strBasisDesc

Short description of the basis.

strBasisDesc2

Long description of the basis.

ysnWebEnabledBasis

Indicates if the basis is enabled. Records with a disabled basis should not be presented to the client even if the subbasis is enabled.

intSubBasisID

Identifier for the subbasis.

strSubBasisDesc

Description of the subbasis.

ysnWebEnabledSubBasis

Indicates if the subbasis is enabled. Disabled subbases should not be presented to the client even if the basis is enabled.

intFixedNoPax

If this is not zero, the number of pax booked on the basis must be a multiple of this value. Generally only used for accommodations.

intDurationDays

Duration in days of Basis.

 


readTourPickups

array readTourPickups (string hostid, string tourcode, integer tourtimeid, integer basisid, string tourdate)  

Returns an array of associative arrays from the host each containing the details of a pickup location and time for the specified tour, time and basis combination. Tour date is optional and if provided, the pickup list will be filtered by the operational bus routes for the day. Note that operational bus routes is a feature not yet supported by all hosts. If a host does not support operational bus routes the pickup list will not change when a tour date is provided.  

To uniquely and correctly identify a pickup, you must specify the pickup route code, pickup time id and pickup id. The recommended method of doing this is to use the strPickupKey field when selecting a pickup and when writing a reservation.  

Example  

results = api.readTourPickups('RT', 'BUNGY', 137, 744, '31-Dec-2020')  

Results  

array(n) {   
	[0] => tour pickup record   
	...   
	[n-1] => tour pickup record  
	}  

Tour Pickups Fields 

Field Name

Description

intPickupID

Identifier for the pickup. This field should be used with the readTourPrices function.

intTourTimeID

Identifier for the pickup time.
 Deprecated, use strPickupKey to identify pickups.

PickupTime

Array containing timestamp, scalar and ISO8601 representations of the pickup time. It is strongly recommended that strPickupValue be used for describing the pickup but if the time is required independently then the scalar or ISO8601 values should be used.
 Deprecated, use strPickupValue to describe pickups.

strPickupName

The name of the pickup location.
 Deprecated, use strPickupValue to describe pickups.

strPickupDesc

The name of the pickup location including the tour code of the bus route.
 Deprecated, use strPickupValue to describe pickups.

ysnDefShow

Pickup is on the default route. (currently not supported)

strTourCode

The tour code of the bus route.
 Deprecated, use strPickupKey to identify pickups.

strPickupKey

A concatenation of the fields that uniquely identify a pickup. This field should be used with the writeReservation function.

strPickupValue

A concatenation of the pickup location and time.


readTourPrices 

array readTourPrices (string hostid, string tourcode, integer basisid, integer subbasisid, string tourdate, integer tourtimeid, integer pickupid, integer dropoffid)  

Returns an associative array from the host containing price, levy and commission information for adult, child, infant, foc and udef pax types. If the tour sell value for a pax type is calculated as zero or the pax type assoc flag is false, that pax type should be disabled on the client. Pickup and dropoff ids are optional but should be provided if a pickup is selected in the booking.  

Example  

results = api.readTourPrices('ATA', 'AR3', 423, 1542, '31-OCT-2009', 57)  

Results  

array(29) {   
	["curAdultTourSell"] => float(227)   
	["curAdultTourLevy"] => float(10)   
	["curChildTourSell"] => float(187)   
	["curChildTourLevy"] => float(10)  
	["curInfantTourSell"] => float(187)   
	["curInfantTourLevy"] => float(10)   
	["curFOCTourSell"] => float(0)   
	["curFOCTourLevy"] => float(0)   
	["curUDef1TourSell"] => float(0)   
	["curUDef1TourLevy"] => float(0)   
	["dblAdultCommission"] => float(18.75)   
	["dblChildCommission"] => float(12.75)   
	["dblInfantCommission"] => float(12.75)   
	["dblFOCCommission"]=> float(0)   
	["dblUDef1Commission"]=> float(0)   
	["curDeposit"] => float(0)   
	["curBookingFee"] => float(0)   
	["curCardFee"] => float(0)   
	["curPayOnBoard"] => float(0)  
	["curTourLevy"] => float(0)   
	["curTotal"] => float(0)  
	["strCurrencyType"] => string(3) "AUD"   
	["strCurrencySymbol"] => string(1) "$"   
	["strPaymentOption"] => string(6) "credit"   
	["boolAdultAssoc"] => bool(true)   
	["boolChildAssoc"] => bool(true)   
	["boolInfantAssoc"] => bool(true)   
	["boolFOCAssoc"] => bool(false)   
	["boolUDef1Assoc"] => bool(false)  
}  

Tour Prices Fields 

Field Name

Description

curAdultTourSell

Price per adult.

curAdultTourLevy

Levy per adult.

curChildTourSell

Price per child.

curChildTourLevy

Levy per child.

curInfantTourSell

Price per infant.

curInfantTourLevy

Levy per infant.

curFOCTourSell

Price per FOC.

curFOCTourLevy

Levy per FOC.

curUDef1TourSell

Price per UDef.

curUDef1TourLevy

Levy per UDef.

dblAdultCommission

Percentage commission on adults booked.

dblChildCommission

Percentage commission on children booked.

dblInfantCommission

Percentage commission on infants booked.

dblFOCCommission

Percentage commission on FOCs booked.

dblUDef1Commission

Percentage commission on UDefs booked.

curDeposit

 Deprecated

curBookingFee

 Deprecated

curCardFee

 Deprecated

curPayOnBoard

 Deprecated

curTourLevy

 Deprecated

curTotal

 Deprecated

strCurrencyType

ISO 4217 currency code for all amounts.

strCurrencySymbol

Currency symbol for all amounts.

strPaymentOption

The operator's preferred payment option for the current agent.

boolAdultAssoc

Does the Adult associated pax have a price? Adult pax type is not bookable if false.

boolChildAssoc

Does the Child associated pax have a price? Child pax type is not bookable if false.

boolInfantAssoc

Does the Infant associated pax have a price? Infant pax type is not bookable if false.

boolFOCAssoc

Does the FOC associated pax have a price? FOC pax type is not bookable if false.

boolUDef1Assoc

Does the UDef associated pax have a price? UDef pax type is not bookable if false.

 


readTourPricesRange

 array readTourPricesRange (array productList)  

This function allows the multiple price queries to be processed in one call. The product list arrays are returned with the price information appended. If any call produces a fault, the function continues running and returns the individual fault as part of the results. Note that price ranges cannot include bus route pricing. Each item in the product list must contain a host, tour code, basis id, subbasis id and time id.  

Example  

query1 = array(   
	'strHostID' => 'AS',   
	'strTourCode' => 'WDWWMBWC',   
	'intBasisID' => 317,   
	'intSubBasisID' => 988,   
	'dteTourDate' => '21-Dec-2012',   
	'intTourTimeID' => 82   
)     
query2 = array(   
	'strHostID' => 'EC',   
	'strTourCode' => 'BYDTWD',   
	'intBasisID' => 22342,   
	'intSubBasisID' => 4122,   
	'dteTourDate' => '21-Dec-2012',   
	'intTourTimeID' => 711   
)  
   
results = api.readTourPricesRange(array(query1, query2))  
  

 

Results  

array(   
	array(   
	"strHostID" => "AS",
	"strTourCode" => "WDWWMBWC",   
	"intBasisID" => 317,   
	"intSubBasisID" => 988,   
	"dteTourDate" => "21-Dec-2012",   
	"intTourTimeID" => 82,   
	"curAdultTourSell" => 575.00,   
	"curAdultTourLevy" => 25.00,   
	"curInfantTourSell" => 0.00,   
	"curInfantTourLevy" => 0.00,   
	"curChildTourSell" => 460.00,   
	"curChildTourLevy" => 25.00,   
	"curFOCTourSell" => 0.00,   
	"curFOCTourLevy" => 0.00,   
	"curUDef1TourSell" => 0.00,   
	"curUDef1TourLevy" => 0.00,   
	"strCurrencyType" => "AUD",   
	"strCurrencySymbol" => "$",   
	"strPaymentOption" => "comm-agent/bal-pob",   
	"dblAdultCommission" => 19.6667,   
	"dblInfantCommission" => 0.00,   
	"dblChildCommission" => 0.00,   
	"dblFOCCommission" => 0.00,   
	"dblUDef1Commission" => 0.00,   
	"boolAdultAssoc" => true,   
	"boolInfantAssoc" => false,   
	"boolChildAssoc" => true,   
	"boolFOCAssoc" => false,   
	"boolUDef1Assoc" => false   
),
array( 
	"strHostID" => "EC",   
	"strTourCode" => "BYDTWD",   
	"intBasisID" => 22342,   
	"intSubBasisID" => 4122,   
	"dteTourDate" => "21-Dec-2012",   
	"intTourTimeID" => 711,   
	"curAdultTourSell" => 0.00,   
	"curAdultTourLevy" => 0.00,   
	"curInfantTourSell" => 0.00,   
	"curInfantTourLevy" => 0.00,  
	"curChildTourSell" => 0.00,   
	"curChildTourLevy" => 0.00,   
	"curFOCTourSell" => 0.00,   
	"curFOCTourLevy" => 0.00,   
	"curUDef1TourSell" => 0.00,   
	"curUDef1TourLevy" => 0.00,   
	"strCurrencyType" => "AUD",   
	"strCurrencySymbol" => "$",   
	"strPaymentOption" => "comm-agent/bal-pob",   
	"dblAdultCommission" => 0.00,   
	"dblInfantCommission" => 0.00,   
	"dblChildCommission" => 0.00,   
	"dblFOCCommission" => 0.00,   
	"dblUDef1Commission" => 0.00,   
	"boolAdultAssoc" => false,   
	"boolInfantAssoc" => false,   
	"boolChildAssoc" => false,   
	"boolFOCAssoc" => false,   
	"boolUDef1Assoc" => false,   
	"faultCode" => 201,   
	"faultString" => "ERROR (server-ron) : ERROR (respax-external) : Specified basis does not exist."   
    )  
 )  

 

  


readTourAvailability

 integer readTourAvailability (string hostid, string tourcode, integer basisid, integer subbasisid, string tourdate, integer tourtimeid)  

Returns an integer representing the number of places remaining on the specified trip.  

Example  

results = api.readTourAvailability('KIWIEX', 'DOGLEG', 317, 988, '15-JUN-2010', 82) 

 Results  

int(14)  

 


readTourAvailabilityRange

array readTourAvailabilityRange (array productList)  

This function allows the multiple availability queries to be processed in one call. The product list arrays are returned with the availability information appended. If any call produces a fault, the function continues running and returns the individual fault as part of the results. Note that availability ranges cannot include bus route availability. Each item in the product list must contain a host, tour code, basis id, subbasis id and time id.  

Two additional fields are returned on top of the individual availability call: boolTrip and boolThreshold.  

boolTrip  

Indicates if the tour is actually running on the day in question. If the availability is zero and trip is true, the tour is running but full. If the availability is zero and trip is false, the tour is not running on that day.  

boolThreshold  

Indicates if the availability value has been capped by an operator threshold. If the availability is 10 and threshold is true, then there are greater than 10 seats but the operator only allows up to 10 to be visible. If the availability is 10 and threshold is false, then there really are only 10 seats remaining.  

Example  

query1 = array(   
	'strHostID' => 'AS',   
	'strTourCode' => 'WDWWMBWC',   
	'intBasisID' => 317,   
	'intSubBasisID' => 988,   
	'dteTourDate' => '01-Jan-2013',   
	'intTourTimeID' => 82   
)  
   
query2 = array(   
	'strHostID' => 'EC',   
	'strTourCode' => 'BYDTWD',   
	'intBasisID' => 22342,   
	'intSubBasisID' => 2122,   
	'dteTourDate' => '01-Jan-2013',   
	'intTourTimeID' => 82   
)  
   
results = api.readTourAvailabilityRange(array(query1, query2))  

 

 Results  

array(   
	array(   
		"strHostID" => "AS",   
		"strTourCode" => "WDWWMBWC",   	
		"intBasisID" => 317,   
		"intSubBasisID" => 988,   
		"dteTourDate" => "01-Jan-2013",   
		"intTourTimeID" => 82,   
		"intAvailability" => 10,   
		"boolTrip" => true,   
		"boolThreshold" => true   
	),   
	array(   
		"strHostID" => "EC",   
		"strTourCode" => "BYDTWD",   
		"intBasisID" => 22342,   
		"intSubBasisID" => 2122,   
		"dteTourDate" => "01-Jan-2013",   
		"intTourTimeID" => 31,   
		"intAvailability" => -1,   
		"boolTrip" => false,   
		"boolThreshold" => false,   
		"faultCode" => 201,   
		"faultString" => "ERROR (server-ron) : ERROR (respax-external) : Specified basis does not exist."   
	)   
)  

 


checkReservation 

array checkReservation (string hostid, array reservation, array payment)  

Runs a series of precommit checks on a reservation without attempting to commit. See writeReservation for the structure of the reservation and payment array parameters. Returns an array of errors in the reservation. An empty array means no errors were found in the precommit check.  

Example  

reservation = array(   
	'strTourCode' => 'COBBER',   
	'intBasisID' => 338,   
	'dteTourDate' => "31-OCT-2007",   
	'intTourTimeID' => 144,   
	'strPaxFirstName' => 'Wernher',   
	'strPaxLastName' => 'von Braun',   
	'strPaxEmail' => 'wernher@example.com',   
	'intNoPax_Adults' => 1,   
)     
 
payment = array(   
'strPaymentOption' => 'full-agent'   
) 
    
results = api.checkReservation('OZEX', reservation, payment)  

Results  

array(2) {   
	[0]=> string(53) "No room type or subbasis id provided for reservation."   
	[1]=> string(329) "The requested payment option was rejected by the operator. You requested (full-agent) which means: Full amount is collected by the agent at time of booking. Your credit status with the operator does not allow this payment option to be processed. Please contact the operator for more information or to review your credit status."   
}  

 


checkReservationAndPrices

array checkReservationAndPrices (string hostid, array reservation, array payment)  

This function accepts the exact same parameters as checkReservation

Performs a checkReservation and a readTourPrices using the reservation as criteria.  Note that the readTourPrices performed with this function will always bypass the cache and go directly to the host. These prices can be used to ensure that the cached prices are the same as the most recent prices from the host without committing the booking. These prices also include any bus fares if a pickup is present in the booking.  

Returns an array of two elements, one being the results of the  checkReservation and the other being the results of the readTourPrices Either or both of these can also be faults if the checkReservation or readTourPrices function returned faults.  

Example  

reservation = array(
    'strTourCode' => 'COBBER',
    'intBasisID' => 338,
    'intSubBasisID' => 677,
    'dteTourDate' => "31-OCT-2007",
    'intTourTimeID' => 144,
    'strPaxFirstName' => 'Wernher',
    'strPaxLastName' => 'von Braun',
    'strPaxEmail' => 'wernher@example.com',
    'intNoPax_Adults' => 1,
 )
 
 payment = array(
    'strPaymentOption' => 'full-agent'
 )
 results = api.checkReservationAndPrices('OZEX', reservation, payment)

Results  

array(2) {   
	["arrCheckReservation"] => checkReservation result or fault   
	["arrReadTourPrices"] => readTourPrices result or fault  
 }  

 


writeReservation 

 integer writeReservation (string hostid, int confirmation, array reservation, array payment, array creditcard)  

  • Sends the details of the reservations array to the host and returns a confirmation number if the reservation is successfully committed. Provide a confirmation number of -1 to create a new reservation. Updating an existing reservation is not supported at this time.  

The previous system of writing pickups by manually providing strPickupRouteCode, intPickupRouteTimeID and intPickupID has been replaced with a single field strPickupKey. To specify that the reservation has no pickup you can do one of 4 things:  

  1. Do not provide the strPickupKey field. 

  2. Set strPickupKey field to null. 

  3. Set strPickupKey field to an empty string. 

  4. Set strPickupKey field to the string value 0:0:0.  

All these options assume you are no longer passing the individual pickup related fields.  

Payment defines how much money you are collecting in the booking. Payment options available to you when booking is determined by your Credit status with each operator. See readPaymentOptions for information on determining a valid payment option.  

Any payment option that has a 'ccard' component must also pass the credit card details. This card will be charged by the host system. For all other payment options, the credit card data can be ignored.  

Example  

reservation = array(
    'strTourCode' => 'COBBER',
    'intBasisID' => 338,
    'intSubBasisID' => 1477,
    'dteTourDate' => "31-OCT-2007",
    'intTourTimeID' => 144,
    'strPaxFirstName' => 'Wernher',
    'strPaxLastName' => 'von Braun',
    'strPaxEmail' => 'wernher@example.com',
    'intNoPax_Adults' => 2,
    'strGeneralComment' => 'Alergic to ginger toupees.'
 )
 
 payment = array(
    'strPaymentOption' => 'full-ccard'
 )
 creditcard = array(
    'strCardName' => 'Wernher von Braun',
    'strCardPAN' => '4444333322221111',
    'strCardVN' => '000',
    'strCardTypeID' => 'visa',
    'intCardExpiryMonth' => 12,
    'intCardExpiryYear' => 2019,
 )
 results = api.writeReservation('OZEX', -1, reservation, payment, creditcard) 

Results  

int(69777)  

Reservations Fields 

Field NameRequired

Description

strCfmNo_Extoptional

Reference to the reservation in a third party system.

strVoucherNooptional

Agent voucher number

strAgentRefMandatory

The agent reference. This is normally not a free typed field in the interface but is instead stamped with the first and last name of the currently logged in user that is making the booking.

strTourCodeMandatory

Tour code for the reservation.

intBasisIDMandatory

Fare basis id for the reservation.

intSubBasisIDMandatory

Fare subbasis (or type) id for the reservation.

dteTourDateMandatory

String representation of the tour date for the reservation. (eg 04-APR-2013)

intTourTimeIDMandatory

Departure time id for the reservation

strPaxFirstNameMandatory

The first name of the pax.

strPaxLastNameMandatory

The last name of the pax.

strPaxEmailoptional

The contact email address of the pax.

strPaxMobileoptional

The mobile number or contact number of the pax.

intPaxCountryID

optional

The passenger origin. Accepts intCountryID from readOrigins.

intPaxSourceIDoptional

The passenger source. Accepts intSourceID from readSources.

intNoPax_AdultsAt least 1 of
5 Pax types
must be selected

Number of adult pax to be booked. (Pax type 1 when using custom pax labels from the operator.)

intNoPax_InfantAt least 1 of
5 Pax types
must be selected

Number of infant pax to be booked. (Pax type 2 when using custom pax labels from the operator.)

intNoPax_ChildAt least 1 of
5 Pax types
must be selected

Number of child pax to be booked. (Pax type 3 when using custom pax labels from the operator.)

intNoPax_FOCAt least 1 of
5 Pax types
must be selected

Number of free of charge pax to be booked. (Pax type 4 when using custom pax labels from the operator.)

intNoPax_UDef1At least 1 of
5 Pax types
must be selected

Number of user defined pax to be booked. (Pax type 5 when using custom pax labels from the operator.)

strGeneralCommentoptional

The general comment.

ysnIsConfirmedoptional

Optional - By default it is set to -1 for confirmed bookings. Set it to zero for unconfirmed or open-dated bookings.

strPickupRouteCodeDeprecated

The tour code of the bus route the pickup is on.
 Deprecated, use strPickupKey to identify pickups.

intPickupRouteTimeIDDeprecated

The tour time of the bus route the pickup is on.
 Deprecated, use strPickupKey to identify pickups.

intPickupID

Deprecated

Pickup id for the reservation.
 Deprecated for reservations, use strPickupKey to identify pickups.

strPickupRoomNooptional

Room number for pickup if applicable.

strPickupKeyOptional for most
Operators unless
the Operators has
Mandatory Pickup
selected on a tour 

A concatenation of route code, route time id and pickup id.

 


Payment Options  

See readPaymentOptions for information on determining a valid payment option.  

Credit Card Fields 

Field Name

Description

Type

strCardName

The name as it appears on the credit card.

string(50)

strCardPAN

The card number without spaces or any other formatting.

string(50)

strCardVN

The card verification number from the back of the credit card.

string(10)

strCardTypeID

Identifier for the credit card type. Note that not all hosts support all card types.

string(10)

intCardExpiryMonth

Integer representation of the credit card expiry month. (1-2 digits)

integer

intCardExpiryYear

Integer representation of the credit card expiry year. (4 digits)

integer

See  readCreditCardTypes for each hosts' supported credit card types. Note that 'strCardTypeID' in this creditcard array is 'strCCTypeID' from readCreditCardTypes  

 


writeCancellation

integer writeCancellation (string hostid, integer confirmation, string reason)  

Cancels a reservation at the host with the specified confirmation number and updates the reservation with the cancellation reason. It returns the confirmation number if successful. A reservation must meet the following criteria to be able to be cancelled.  

  • The reservation must not be cancelled. 

  • No part of the reservation can be archived. 

  • The reservation must not fall within the cutoff time for editing. 

  • The reservation currency must match the authenticated agent's default currency. 

  • None of the reservation payments can be archived. 

  • All payments must be agent or pay on board payments.  

Example  

results = api.writeCancellation('OZEX', 69777, 'Pax suffered a spleen injury.')  

 Results  

int(69777)