API calls used by Jomres Desktop Companion
From Jomres v4 manual
This page is a note on the API calls used by the Jomres Desktop companion. Not all available API calls are listed, just those calls used by the companion.
Calls are sent to the remote Jomres server via the following url : http://www.example.com/index2.php?option=com_jomres&task=API&tmpl=component&no_html=1&popup=1&format=raw
=> denotes potentially many children -> denotes typically one child
Replies are sent in xml format.
Failures are not documented here, but child "init_success" denotes that the call passed initial authentication successfully, even if following results may also contain an error. Action errors should be similar to "error" => error_class (integer) & error_string (string)
- Get all manager's property keys
- POST query : get.manager.property.get.all.property.keys
- POST apiKey : "The Manager's API Key"
On success, returns xml "response" => "property" => property_name, api_key
- Get all bookings for a property
- POST query : get.property.bookings.all.booking.data
- POST apiKey : "The Property's API key"
On success, returns xml "response" -> data (CDATA bounded)
- The "data" response is a serialized php array containing the following
- contract_uid The unique id of the property within the Jomres system
- arrival The arrival date
- departure The departure date. Note, this is not the last night of the guest's stay
- guest_uid The unique id of the guest. May not be set.
- rate_rules If the property collects guest numbers in the booking, then this is a collection of that: eg guesttype_2_2_100 Guest type id = 2 Quantity x 2, charging 100 per night
- rooms_tariffs The room and tariff combination of the booking eg 2^198 where 2 is the room uid, and 198 is the tariff uid. May be multiples of, comma seperated
- deposit_paid Was the deposit paid? 1 = true
- contract_total The total value of the booking
- deposit_ref Any deposit reference stored
- special_reqs Special requrirements that the guest added to the booking
- deposit_required The value of the deposit
- date_range_string All of the nights of the booking
- booked_in Guest is currently booked in?
- booked_out Guest is currently booked out? (IE the bookng has been completed)
- true_arrival May be a different date to the "arrival" date
- single_person_suppliment Value of the single person suppliment charge
- smoking Not used
- extras Optioal extras recorded at booking time, eg 3,5,4,1
- extrasquantities Serialized information about the option extras quantities eg a:4:{i:3;i:1;i:5;i:1;i:4;i:1;i:1;i:3;}
- extrasvalue The total cost of the extras
- tax The amount of tax that was added to the room booking
- tag The booking number
- timestamp When the booking was taken, eg 2009-09-10 07:14:31
- room_total The total of the cost of the rooms
- currency_code The currency code, eg GBP
- cancelled Has the booking been cancelled? 1 = true
- cancelled_timestamp When it was cancelled
- cancelled_reason Any reason entered
- username If a property manager made the booking, then their username
- bookedout 1 = true
- bookedout_timestamp When the booking was marked as booked out
- Get a property's description
- POST query : get.property.property.description
- POST apiKey : "The Property's API key"
On success, returns xml "response" -> data (CDATA bounded)
- Get daily availability for a given room number for a given period
- POST query : get.property.room.bynumber.availability.byperiod.detailed
- POST apiKey : "The Property's API key"
- POST room_number : "room_number" eg. "2"
- POST first_night : "date" eg "2010/03/15"
- POST last_night : "date" eg "2010/03/16"
On success, returns xml "response" => available => DATE^AVAILABLE (eg "2010/03/15^1" where 1 = true, 0 = false)
- Get daily availability for multiple room numbers for a given period
- POST query : get.property.room.bynumber.availability.byperiod.multiplerooms.detailed
- POST apiKey : "The Property's API key"
- POST room_numbers : "room_numbers" eg. "02,12,43"
- POST first_night : "date" eg "2010/03/15"
- POST last_night : "date" eg "2010/03/16"
On success, returns xml "response" => available => ROOM_NUMBER^DATE^AVAILABLE (eg "02^2010/03/15^1" where 1 = true, 0 = false)
- Get all room numbers for a property
- POST query : get.property.room.room.numbers.by_property
- POST apiKey : "The Property's API key"
On success, returns xml "response" => "room_number"
- Get the server's languages
- POST query : get.property.settings.server.languages
- POST apiKey : "The Property's API key"
On success, returns xml "response" => data (A serialized array, Languages in the format xx-XX)
- Set the property's description
- POST query : set.property.property.description
- POST apiKey : "The Property's API key"
- POST description : "The Property's description"
On success, returns xml "response" -> "action_success" (eg 1 or 0, 1 for true)
- Create a remote black booking for a given period, passing the room number
- POST query : set.property.room.bynumber.occupy.byperiod
- POST apiKey : "The Property's API key"
- POST room_number : "room_number" eg. "2"
- POST first_night : "date" eg "2010/03/15"
- POST last_night : "date" eg "2010/03/16"
On success, returns xml "response" -> "action_success","booking_number"

