The jAC API
The jacAPI can be used to integrate availability information, property information, and availability searches into an existing website. There are some pre-built applications for Wordpress and Open-Realty as well as the group property sites. All of these can be downloaded and run from your server.
The API for your own sites
Most owners will have no need for the API because the basic links provided give everything they need. Use those links in your own HTML to show your calendar or embed it in an Iframe. However, some may want to do more. The API is a way for you to access YOUR DATA in the jACServer database and do whatever you want with it.
There are 2 basic access methods. One is through a simple javascript that will insert a javascript array of bookings into your page. The second way is to access the XML file link. In both cases, jAC is just providing your booking data. It is up to your own page to do something with that data!
The javascript Interface
<script type="text/javascript" src="jacjs_yahoo.php?jsvarname=myjacdates&source=jac&sourceid=demo100"></script>
Simply insert that line in your HTML page and the script will insert your bookings in the page something like this:
var myjacdates = null;
myjacdates = '2008/02/03,2008/02/04,2008/02/05,2008/03/10,2008/03/11';
Then use the javascript variable "myjacdates" in your javascript.
Here is a full script utilizing the Yahoo User Interface Calendar. Display the link and do a view source, then copy and paste the entire file to your own page to test it. Of course you should change
"sourceid=demo100" to your property code!
Yahoo Calendar SampleThe XML Interface
The XML file jAC produces is simply a datafile. Programmers have many ways to work with XML. jAC provides a downloadable interface for you to work with the XML. The default minisites in the links above are basically independent applications written using the jacAPI and the XML datafiles.
Here is a full script utilizing the Yahoo User Interface Calendar and the XML interface. It is exactly the same as the above, but is server side using the PHP jacAPI to access the XML file directly. Viewing the source won't help you much here, since it is done with php on the server. The PHP jacAPI does essentially the same thing as the javascript version above, but it also CACHES the data on your own server.
Yahoo Calendar Sample You can download the jacAPI and the minisite code and run those applications from your own site. Learn more about using the API at the
jAC WIKISamples using the API
These are real sites, but they are for demonstration purposes. See the jacwiki for information on downloading these sites.
- Data Retrieval Examples The basics of using the features of the API. Easy to use samples with no decoration.
- Bare Bones Group Site The basics of using the features of the API. Easy to use samples with no decoration.
- Bare Bones Group Site This sample creates a small group site for any properties of the jAC Members. If you have multiple properties, this is a great sample of searching availability. If you are logged in you will have a link to a customized site for just your properties.
- RSS and XML and Calendars from any sourceThese samples can be used on any rentors org or jac or other calendar, without registering in jac!