Table of contents
-
- Search methods
- Check methods
- Booking methods
- Info methods
Data export
- Methods
Table of contents
Data export
First you need to obtain ORS Licence. Please contact us at support@ors.si
You can also use this DEMO Licence to get you started.
Use this service URL for sending reqeusts: http://www.ors.si/orsxml-soap-api/orsxml_soap.php
You can check API ducumentation for detailed view of all the classes and methods. Some usage are also described in this manual.
Follow this instructions to create a simple soap reqeust using ORS SOAP API. Instructions are for PHP language
Fisrt you need to create SOAP client object. This is a PHP example of SOAP client object
// init soapClient object $soapClient = new SoapClient(null, array( 'location' => 'http://www.ors.si/orsxml-soap-api/orsxml_soap.php', 'uri' => 'http://www.ors.si/orsxml-soap-api', 'trace' => 1) );
Setup your SOAP header information using your ORS licence (you can use DEMO licence if you don't already have a valid ORS licence). Check SOAP Header Information for more information on header parameters.
// ORSXML header information $header = array( 'lang' => 'en', // a return language 'usr' => 'xmldemo', // ORSXML user 'pass' => 'orsdemo', // ORSXML password 'agid' => '5780', // agency ID (or account id) 'sid' => session_id() // this is required so that filtering and sorting work correctly! );
This is an example how to create Regions call to retrieve a list of available regions for selected search parameters.
$searchParams = array( 'vnd' => '30.10.2014', // start date 'bsd' => '15.11.2014', // end date 'tdc' => '1-4', // duration [min-max] days 'epc' => '2', // number of adults ); $regions = $soapClient->orsxml_hotel_api_call( 'regions', $searchParams, $header );
That's it! You have now created your first SOAP call. Check all available SOAP Calls that you can execute and SOAP Structure to understand in more detail how all works.