API Methods

HoldMyTicket REST API Services

Welcome to the very basic API Documentation for Hold My Ticket. We are working on improving our documentation, but please bare with us in the mean time. With our API you can custom build an interface using REST services. You can see the API Methods we currently offer under the API Methods tab above.

Example Request using the getInfo function.

curl -0 http://holdmyticket.com/api/events/getInfo/api_key/YOUR_API_KEY_GOES_HERE/event/341

Example Response


				<?xml version='1.0' encoding='utf-8'?>
				<event>
					<id>341</id>
					<title>Super Salom Skiing Event</title>
					<name_sec></name_sec>
					<name_third></name_third>
					<dates starts='2009-11-16 15:00:00' ends='2009-11-16 20:00:00' doors='2009-11-16 15:00:00' cancel='0000-00-00 00:00:00'/>
					<description></description>
						<venue id='15'>
						<name>Lions Den</name>
						<address1>123 Lion Ave</address1>
						<address2></address2>
						<city>Albuquerque</city>
						<state>NM</state>
						<zip>87777</zip>
						<phone>505-555-1234</phone>
					</venue>
					<ages_description>All Ages</ages_description>
					<alt_ticket_sales></alt_ticket_sales>
					<alt_ticket_price>0.00</alt_ticket_price>
					<alt_ticket_price_max>0.00</alt_ticket_price_max>
				</event>
				

hmt.events.getInfo

http://holdmyticket.com/api/events/getInfo/api_key/{api-key}/event/{event-id}

Returns a information for a given event

Authentication

This method does not require authentication.

Arguments

api_key (Required)

Your API key.

event

The ID of the event you wish to get information.

Example Response


		
		<event>
			<id>5803</id>
			<title>GLOBAL DANCEFEST • JourneysAFRICA</title>
			<name_sec>Celebrating 10 Years of International Contemporary Dance</name_sec>
			<name_third></name_third>
			<dates starts='2009-10-23 20:00:00' ends='2009-10-31 22:00:00' doors='2009-10-23 19:00:00' cancel='0000-00-00 00:00:00'/>
			<description></description>
			<flyer>http://holdmyticket.com/flyers2/42726f6d1531694db9d214dd704a1df3.jpg</flyer>	
			<flyer_mid>http://holdmyticket.comimage not found</flyer_mid>
			<flyer_thumb>http://holdmyticket.comimage not found</flyer_thumb>
			<flyer_square>http://holdmyticket.comimage not found</flyer_square>
			<venue id='109'>
				<name> N4th Theater</name>
				<address1>4904 Fourth Street NW</address1>
				<address2></address2>
				<city>Albuquerque</city>
				<state>NM</state>
				<zip>87107</zip>
				<phone>505-345-2872</phone>
			</venue>
			<ages_description>All Ages</ages_description>
			<alt_ticket_sales></alt_ticket_sales>
			<alt_ticket_price>0.00</alt_ticket_price>
			<alt_ticket_price_max>0.00</alt_ticket_price_max>
			<sub_events>
				<sub_event>
					<id>5804</id>
					<title>(IN)DEPENDENCE Panaibra Gabriel, choreographer, MOZAMBIQUE</title>
					<name_sec></name_sec>
					<name_third></name_third>
					<dates starts='2009-10-23 20:00:00' ends='2009-10-23 22:00:00' doors='2009-10-23 19:00:00' cancel='0000-00-00 00:00:00'/>
					<description></description>
					<flyer>http://holdmyticket.com/flyers2/c8a563b5dabc3e4df2bb72d4ccfd7f66.jpg</flyer>	
					<flyer_mid>http://holdmyticket.comimage not found</flyer_mid>
					<flyer_thumb>http://holdmyticket.comimage not found</flyer_thumb>
					<flyer_square>http://holdmyticket.comimage not found</flyer_square>
					<venue id='109'>
						<name> N4th Theater</name>
						<address1>4904 Fourth Street NW</address1>
						<address2></address2>
						<city>Albuquerque</city>
						<state>NM</state>
						<zip>87107</zip>
					</venue>
					<ages_description>All Ages</ages_description>
					<buy_link>http://holdmyticket.com/mini/mini.php?id=5804</buy_link>
				</sub_event>
			</sub_events>
		</event>
			

hmt.events.getList

http://holdmyticket.com/api/events/getList/api_key/{api-key}/venues/{venues}

Returns a list of events

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

venues

Filter events by venue. Example (1454|2144) (Delimit venue IDs with a "|")

If venues is not specified, all venues will be selected

start_filter

Defaults to today. Format: "2009-10-15 05:00:00"

end_filter

Defaults to 1 year from today. Format: "2010-10-15 05:00:00"

Example Response


		
		<events>
			<event>
				<id>5803</id>
				<title>GLOBAL DANCEFEST • JourneysAFRICA</title>
				<name_sec>Celebrating 10 Years of International Contemporary Dance</name_sec>
				<name_third></name_third>
				<dates starts='2009-10-23 20:00:00' ends='2009-10-31 22:00:00' doors='2009-10-23 19:00:00' cancel='0000-00-00 00:00:00'/>
				<description></description>
				<flyer>http://holdmyticket.com/flyers2/42726f6d1531694db9d214dd704a1df3.jpg</flyer>	
				<flyer_mid>http://holdmyticket.comimage not found</flyer_mid>
				<flyer_thumb>http://holdmyticket.comimage not found</flyer_thumb>
				<flyer_square>http://holdmyticket.comimage not found</flyer_square>
				<venue id='109'>
					<name> N4th Theater</name>
					<address1>4904 Fourth Street NW</address1>
					<address2></address2>
					<city>Albuquerque</city>
					<state>NM</state>
					<zip>87107</zip>
					<phone>505-345-2872</phone>
				</venue>
				<ages_description>All Ages</ages_description>
				<alt_ticket_sales></alt_ticket_sales>
				<alt_ticket_price>0.00</alt_ticket_price>
				<alt_ticket_price_max>0.00</alt_ticket_price_max>
				<sub_events>
					<sub_event>
						<id>5804</id>
						<title>(IN)DEPENDENCE Panaibra Gabriel, choreographer, MOZAMBIQUE</title>
						<name_sec></name_sec>
						<name_third></name_third>
						<dates starts='2009-10-23 20:00:00' ends='2009-10-23 22:00:00' doors='2009-10-23 19:00:00' cancel='0000-00-00 00:00:00'/>
						<description></description>
						<flyer>http://holdmyticket.com/flyers2/c8a563b5dabc3e4df2bb72d4ccfd7f66.jpg</flyer>	
						<flyer_mid>http://holdmyticket.comimage not found</flyer_mid>
						<flyer_thumb>http://holdmyticket.comimage not found</flyer_thumb>
						<flyer_square>http://holdmyticket.comimage not found</flyer_square>
						<venue id='109'>
							<name> N4th Theater</name>
							<address1>4904 Fourth Street NW</address1>
							<address2></address2>
							<city>Albuquerque</city>
							<state>NM</state>
							<zip>87107</zip>
						</venue>
						<ages_description>All Ages</ages_description>
						<buy_link>http://holdmyticket.com/mini/mini.php?id=5804</buy_link>
					</sub_event>
				</sub_events>
			</event>
			<event>
				...
			</event>
		</events>
			

hmt.events.getHTML

http://holdmyticket.com/api/events/getHTML/api_key/{api-key}/event/{event-id}

Returns a list of events

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

event

The ID of the event you wish to get HTML content.

Example Response


		
		CUSTOM EVENT HTML WILL OUTPUTTED AS SPECIFIED IN EVENT HTML FIELD
			

hmt.venues.getInfo

http://holdmyticket.com/api/venues/getInfo/api_key/{api-key}/venue/{venue-id}

Returns information for a venue

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

venue

The ID of the venue you wish to get information.

Example Response


		
		<venue id='109'>
			<name>N4th Theater</name>
			<address1>4904 Fourth Street NW</address1>
			<address2></address2>
			<city>Albuquerque</city>
			<state>NM</state>
			<zip>87107</zip>
			<phone>505-345-2872</phone>
		</venue>
			

hmt.venues.getList

http://holdmyticket.com/api/venues/getList/api_key/{api-key}

Returns all venues and information for each venue

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

Example Response


		
		<venues>
			<venue id='109'>
				<name>N4th Theater</name>
				<address1>4904 Fourth Street NW</address1>
				<address2></address2>
				<city>Albuquerque</city>
				<state>NM</state>
				<zip>87107</zip>
				<phone>505-345-2872</phone>
			</venue>
			<venue>
				...
			</venue>
		</venues>
			

hmt.tickets.getAvailable

http://holdmyticket.com/api/tickets/getAvailable/api_key/{api-key}/event/{event-id}

Returns available ticket information for an event

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

event

The ID of the event you wish to get ticket information.

Example Response


		
		<tickets>
			<ticket>
				<id>878999</id>
				<description>General Admission</description>
				<price>15.50</price>
				<day_of_show_price>18.00</day_of_show_price>
			</ticket>
			<ticket>
				...
			</ticket>
		</tickets>
			

hmt.media.getEvent

http://holdmyticket.com/api/media/getEvent/api_key/{api-key}/event/{event-id}

Returns available media for a certain event. Media consists of videos / images / flyers that are tied to the event.

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

event

The ID of the event you wish to get media information.

Example Response


		
		<media>
			<flyer>
				<url>{flyer_url}</url>
			</flyer>
			<video>
				<video_site>YouTube</video_site>
				<title>Title of the video</title>
				<embed_code>{embed code from youtube}</embed_code>
			</video>
			<video>
				<video_site>Vimeo</video_site>
				<title>Title of the video</title>
				<embed_code>{embed code from vimeo}</embed_code>
			</video>
			<image>
				<title>Title of the image</title>
				<url>{image_url}</url>
			</image>
		</media>
			

hmt.showtimes.getInfo

http://holdmyticket.com/api/showtimes/getInfo/api_key/{api-key}/showtime_id/{showtime-id}

Returns information for a showtime and any attached attractions

Authentication

This method requires authentication.

Arguments

api_key (Required)

Your API key.

showtime_id

The ID of the showtime you wish to get information.

Example Response


		
		<showtime>
			<id>1</id>
			<event_id>7531</event_id>
			<showtime>2009&#45;12&#45;22 19:00:00</showtime>
			<attraction>
				<id>23466</id>
				<name>Metallica</name>
				<description>The legend band of rock.</description>
			</attraction>
		</showtime>
			

Javascript Embed User Guide

Adding an event calendar to any web page can be as simple as pasting a simple script embed code into your HTML code. You can filter events by using any of the available elements below.

Example Javascript Embed

		<script type="text/javascript" src="http://holdmyticket.com/feeds/feed2.php?apikey=API_KEY&tplFile=TEMPLATE"></script>
	

Embeddable Elements

Add any of these to the end of the src string, preceded by &. For example: ...&tplFile=TEMPLATE&featuredOnly=true">...

* Required

  • apikey=YOUR_API_KEY*
    Your API key can be found by going to 'Settings' in your HMT account
  • tplFile=TEMPLATE*
    We provide customized and generic template files. Try using 'list' for a list view template.
  • venues=123|320
    If you want to filter your events by venue insert the venue ID(s) here. Separate multiple venue IDs with '|'.
  • getAllEvents=true
    This element will load upcoming as well as past events. Ideal for month view calendars.
  • getVenue=true
    Use this to load in the name of the venue for each event.
  • featuredOnly=true
    This will load only events marked as 'Featured' in the event form.
  • onSaleOnly=true
    Use this to load only events that are on sale.
  • limit=3
    Use this to set a limit to the quantity of events loaded. Great for fixed height layouts with links to the full calendar.
  • getTaggedEvents=tag1|tag2
    This element allows you to load events by tag. For example you could load shows only tagged as 'rock'. Multiple tags are separated with '|'.
  • getPastEvents=true
    This will load only events that have happened in the past. Good for 'Past Shows' pages or archives.
  • getAges=true
    Use this element to load age restrictions for your events.
  • endTime=1week
    Use this to load events for the upcoming week only.
  • hideCancelled=true
    This element gives you the ability to hide events that have been cancelled.
  • loadAliases=true
    If you're working with a venue or promoter that also has an HMT account, you can link account event listings through aliases. We'll help you set this one up.
  • noLoadJS=true
    By default this embed loads the javascript libraries Prototype and Scriptaculous. This element will bypass loading third party javascript libraries.
  • jsType=LIBRARY
    If you prefer to work with other javascript libraries you can specify that here. Options are: mootools, jquery
  • noLoadJquery=true
    Use this if your site uses jQuery but you don't need the library loaded from our end as well.
  • noLoadMoo=true
    Use this if your site uses MooTools but you don't need the library loaded from our end as well.
  • noLoadProto=true
    Use this if your site uses MooTools but you don't need the library loaded from our end as well.

Month View Logic

If you're using a month view calendar you'll need to add some more code into the script embed.


For sites that support PHP

Use with tplFile=generic_month2

Add this code to the end of the src string. For example: ...&tplFile=generic_month2<?php if($_GET["currM"])...

		<?php if($_GET["currM"]){ print "&currM=".$_GET["currM"]; } if($_GET["currY"]){ print "&currY=".$_GET["currY"]; } ?>
	

CSS Class Names

Here is a list of class names commonly fed through our template files. Customized template files may vary.

List View Class Names

Use with tplFile=list

		
			.hmt_cl {} /* Wraps the entire event calendar */ 
			.hmt_cl .monthName{}
			.hmt_cl .event_wrap{} /* Wraps each event */ 
			.hmt_cl .event_wrap.row1{} 
			.hmt_cl .event_wrap.row2{}
			.hmt_cl .event_wrap .date{} /* Wraps all date fields */ 
			.hmt_cl .event_wrap .date .date1{}
			.hmt_cl .event_wrap .date .date2{}
			.hmt_cl .event_wrap .date .date3{}
			.hmt_cl .event_wrap .date .date4{}
			.hmt_cl .event_wrap .date .date5{}
			.hmt_cl .event_wrap .flyer_wrapper{}
			.hmt_cl .event_wrap .name{} /* Wraps all name fields */ 
			.hmt_cl .event_wrap .event_presents {}
			.hmt_cl .event_wrap .event_name{}
			.hmt_cl .event_wrap .event_name_sec{}
			.hmt_cl .event_wrap .event_name_third{}
			.hmt_cl .event_wrap .bottom{} /* Wraps facebook like, buttons and price */ 
			.hmt_cl .event_wrap .fblike{}
			.hmt_cl .event_wrap .buttons{}
			.hmt_cl .event_wrap .price{}			
		
	

Month View Class Names

Use with tplFile=generic_month2 or tplFile=generic_month

		
			#miniCal {} /* Wraps entire calendar */ 
			#miniCal td{}
			#miniCal .calTitle{} /* January, February, etc. */ 
			#miniCal .monthlink{} /* Month switcher button */ 
			#miniCal .daysWeek{} /* Sun, Mon, etc. */ 
			#miniCal .days{}
			#miniCal .dayson{} /* Today */ 
			#miniCal .eventTitle{} /* Wraps event info */ 
			#miniCal .event_name_sec{}
			#miniCal .flyer{}
			#miniCal .price{}
			#miniCal .more-info,#miniCal .buy-tickets{} /* Buttons */ 
		
	

DOWNLOAD COMPLETE EXAMPLE CSS FILE HERE