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

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 and the link you will be using to develop and interface between your system and RON.

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.

Example function calls are provided in a syntax compatible with the php XML-RPC EPI implementation of the XML-RPC protocol. Refer to the documentation with your prefered implementation for details on assembling an XML-RPC request.

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

XML-RPC EPI @ SourceForge
http://xmlrpc-epi.sourceforge.net/

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.

Index


ping

string ping ()

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

Example

 $results = xu_rpc_http_concise(array(
    "method" => "ping",
    "args" => array(),
    "host" => $host,
    "uri" => $uri,
    "port" => $port
));

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.

NOTE! Distributor mappings are only functional in the live environment.

Example

 $results = xu_rpc_http_concise(array(
    "method" => "login",
    "args" => array("albert", "password"),
    "host" => $host,
    "uri" => $uri,
    "port" => $port
));

Results

 string(42) "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 = xu_rpc_http_concise(array(
    "method" => "readCurrentLogin",
    "args" => array(),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
 ));

Results

 array(2) {
    ["arrCurrentUser"] => current user record,
    ["arrCurrentOrganisation"] => current organisation record
 }

Current User Fields

Field Name

Description

intID

Unique integer identifier for the user.

strUserID

User id used to login.

strFirstName

User's first name.

strLastName

User's last name.

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.


readCreditStatus

string readCreditStatus (string hostid)

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

Example

$results = xu_rpc_http_concise(array(
    "method" => "readTourAvailabilityRange",
    "args" => array("KIWIEX"),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

 string(3) "dep"

Credit Statuses

Credit Status

Payment Options

full

full-agent, bal-agent/levy-pob, comm-agent/bal-pob

fulllevy

bal-agent/levy-pob, comm-agent/bal-pob

dep

comm-agent/bal-pob

fullpob

full-pob

stop

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


readPaymentOptions

array readPaymentOptions ()

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

Example

 $results = xu_rpc_http_concise(array(
    "method" => "readPaymentOptions",
    "args" => array(),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
 ));

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.


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 = xu_rpc_http_concise(array(
    "method" => "readCurrentLogin",
    "args" => array(),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

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.

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 associative array of extended information for the host including contact information.

Example

$results = xu_rpc_http_concise(array(
    "method" => "readHostDetails",
    "args" => array("TW"),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

host details record

Host Details Fields

Field Name

Description

strHostID

Unique identifier for the host.

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.

strHostName

Host organisation's name.|

strHostType

Indicates whether the host takes live bookings or requests.

boolEnabled

Active status of the host.


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 = xu_rpc_http_concise(array(
    "method" => "readTours",
    "args" => array("ATA"),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

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 = xu_rpc_http_concise(array(
    "method" => "readTourDetails",
    "args" => array("OZEX", "BRUCE"),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

tour details record

Tour Details Fields

Field Name

Description

strTourCode

Identifier for the tour.

strTourName

Name of the tour.

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.


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 = xu_rpc_http_concise(array(
    "method" => "readTourWebDetails",
    "args" => array("KIWIEX", "FULLMONTY", true),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

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 = xu_rpc_http_concise(array(
    "method" => "readTourTimes",
    "args" => array("RT", "ATR"),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

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

DateTime object containing both 'scalar' and integer 'timestamp' formats for the time.

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.

Example

$results = xu_rpc_http_concise(array(
    "method" => "readTourBases",
    "args" => array("KIWIEX", "FULLMONTY"),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

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. Disabled bases and associated subbases should not be presented to the client.

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. If a basis has not enabled subbases it should not be presented to the client.

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)

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.

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 = xu_rpc_http_concise(array(
    "method" => "readTourPickups",
    "args" => array("RT", "BUNGY", 137, 744),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

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

Tour Pickups Fields

Field Name

Description

intPickupID

Identifier for the pickup.
/!\ Deprecated for reservations, use strPickupKey to identify pickups. Use pickup id for prices.

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.

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.

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 = xu_rpc_http_concise(array(
    "method" => "readTourPrices",
    "args" => array("ATA", "AR3", 423, 1542, "31-AUG-2008", 57),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

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.


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 = xu_rpc_http_concise(array(
    "method" => "readTourAvailability",
    "args" => array("KIWIEX", "DOGLEG", 317, 988, "15-JUN-2007", 82),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

int(14)


readTourAvailabilityRange

array readTourAvailabilityRange (array productList)

Returns an array with availability integer for each product specified in parameter array. The function accepts a list of multiple product across multiple hosts and returns the same list with the availability attached.

Example

$results = xu_rpc_http_concise(array(
    "method" => "readTourAvailabilityRange",
    "args" => array( array(
        array("strHostID" => "KIWIEX",
              "strTourCode" => "DOGLEG",
              "intBasisID" => 317,
              "intSubBasisID" => 988,
              "dteTourDate" => "15-JUN-2007",
              "intTourTimeID" => 82
        ),
        array("strHostID" => "RT",
              "strTourCode" => "ATR",
              "intBasisID" => 12342,
              "intSubBasisID" => 2122,
              "dteTourDate" => "01-AUG-2007",
              "intTourTimeID" => 31
        )
    )),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

    array(
array("strHostID" => "KIWIEX",
"strTourCode" => "DOGLEG",
"intBasisID" => 317,
"intSubBasisID" => 988,
"dteTourDate" => "15-JUN-2007",
"intTourTimeID" => 82,
"intAvailability" => 102
),
array("strHostID" => "RT",
"strTourCode" => "ATR",
"intBasisID" => 12342,
"intSubBasisID" => 2122,
"dteTourDate" => "15-JUN-2007",
"intTourTimeID" => 31,
"intAvailability" => 14
)
)


writeReservation

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

When updating an existing reservation, it is only necessary to add the altered fields to the reservations array. Fields that are to remain unchanged do not need to be provided to the function.

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. Credit Status can be either Full Payment or Deposit only. If you are trying to collect Full amount when you are a Deposit only agent, it will return an error. As a Full Credit agent, you will have a choice of collecting full or deposit only payments.

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" => "agent"
);

$results = xu_rpc_http_concise(array(
    "method" => "writeReservation",
    "args" => array("OZEX", -1, $reservation, $payment),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

int(69777)

Reservations Fields

Field Name

Description

strCfmNo_Ext

Reference to the reservation in a third party system.

strVoucherNo

Agent voucher number

strTourCode

Tour code for the reservation.

intBasisID

Fare basis id for the reservation.

intSubBasisID

Fare subbasis (or type) id for the reservation.

dteTourDate

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

intTourTimeID

Departure time id for the reservation

strPaxFirstName

The first name of the pax.

strPaxLastName

The last name of the pax.

strPaxEmail

The contact email address of the pax.

strPaxMobile

The mobile number or contact number of the pax.

intNoPax_Adults

Number of adults the reservation is for.

intNoPax_Child

Number of children the reservation is for.

intNoPax_Infant

Number of infants the reservation is for.

strGeneralComment

The general comment.

ysnIsConfirmed

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

strPickupRouteCode

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

intPickupRouteTimeID

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

intPickupID

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

strPickupRoomNo

Room number for pickup if applicable.

strPickupKey

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

Payment Options

Option Name

Deprecated Name

Description (credit status)

full-agent

agent

Collect Full Payment (full)

bal-agent/levy-pob

agent/levy

Collect Full Payment less Levy (full and fulllevy)

comm-agent/bal-pob

agent/comm

Collect Deposit Only (full, fulllevy, dep)

full-pob

pob

Collect nothing, full amount is pay on board. (fullpob)


writeCancellation

boolean 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 cofirmation number if successful.

Example

$results = xu_rpc_http_concise(array(
    "method" => "writeCancellation",
    "args" => array("OZEX", 69777, "Pax suffered a spleen injury."),
    "host" => $host,
    "uri" => $uri."&PHPSESSID=1bea4b6a9491805f986ad14389a1a25e",
    "port" => $port
));

Results

int(69777)

ron api (last edited 2008-12-05 05:28:36 by phil)