Table of contents
-
- Search methods
- Check methods
- Booking methods
- Info methods
Data export
- Methods
Table of contents
Data export
This is an old revision of the document!
You can now also use our new JSON API. It is very similar to SOAP request, but you don't need SOAP client anymore, instead you can simply send JSON requests to our API url.
Post URL: http://api.ors.si/crs/json
# JSON search region request example { "requestType":"search", "action":"regions", "search":{ "typ":"hotel", "vnd":"2018-01-10", "bsd":"2018-03-10", "tdc":"1-5", "epc":"2" }, "top":{ "toc":"FTI", "stc":"3" }, "header":{ "lang":"[lang-code]", "usr":"[username]", "pass":"[password]", "agid":"[agency-id]" } }
// search regions request example $data_string = 'json-request-string'; $ch = curl_init('http://api.ors.si/crs/json'); curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST"); curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_HTTPHEADER, array( 'Content-Type: application/json;charset=utf-8', 'Content-Length: ' . strlen($data_string)) ); $result = curl_exec($ch); echo $result;