Happenstand API Alpha

V1 Reference Guide

About

This is a very preliminary draft of an API (application programming interface) that would allow external parties to retrieve lists of event, venue and person data from Happenstand, a website featuring Bay Area arts events. It is NOT finalized therefore request URIs, parameters, and response schemas are all subject to change at any time without notice. There may also be bugs that return incorrect data or data in incorrect formats or be inconsistent with the documentation provided below. While functional, this is currently intended to serve as a point of discussion for potential further development. Thanks, Lucas.

Request an API key

To receive an API key, send an email to this address with a brief explanation of what you'd like to use the API for: api....@happenstand.com

Contents

Errors

Below is a list of common error codes and messages

Error code Error message
100 API key is not valid
101 API key is not active
200 Missing required parameter (parameter)
201 Item not valid or unavailable
202 Could not determine query location
404 Resource not found
500 Application error

Response

Show sample XML response | Show sample JSON response

Events

Recently added and updated events

Get a list of events that have been recently added or updated for a location or all locations

Request URI

http://api.happenstand.com/v1/events/recent

Parameters Description Required Default
api_key API key Y N/A
loc A locale ID to get events for. If left empty, will return events for all locales. N (empty)
offset Position in results to begin response set N 0
length The number of events to return from the offset position N 20
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Events starting by date

Show a list of events starting from a date with optional number of days and maximum length.

Request URI

http://api.happenstand.com/v1/events/start

Parameters Description Required Default
api_key API key Y N/A
loc A locale ID to get events for. If left empty, will return events for all locales. N (empty)
date Start of date range to get events for YYYY-MM-DD. N (today's date)
days The number of days to return opening events for. N 1
length The maximum number of events return. N (empty)
ap_pick Filter Art Practical picks - empty returns all events, "true" returns only AP picks, "false" returns only events that are not AP picks N (empty)
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Events ending by date

Show a list of events ending on a date with optional maximum length.

Request URI

http://api.happenstand.com/v1/events/end

Parameters Description Required Default
api_key API key Y N/A
loc A locale ID to get events for. If left empty, will return events for all locales. N (empty)
date End of date range to get events for YYYY-MM-DD. N (today's date)
days The number of days to return closing events for. N 1
length The maximum number of events return. N (empty)
ap_pick Filter Art Practical picks - empty returns all events, "true" returns only AP picks, "false" returns only events that are not AP picks N (empty)
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Events by proximity

Show a list of events by proximity to a given location. Results are sorted by distance. Distances are in miles.

Request URI

http://api.happenstand.com/v1/events/proximity

Parameters Description Required Default
api_key API key Y N/A
query Location to measure distance from. Could be a latitude/longitude coordinate formatted as "-37.123456,121.132442" or a textual location search such as "1234 jones st, ca" or "94710". Queries should be URL encoded. Y N/A
distance Distance to limit search by (in miles) N 1
length The maximum number of events to return N 20
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Event detail

Show the details for a given event

Request URI

http://api.happenstand.com/v1/events/detail

Parameters Description Required Default
api_key API key Y N/A
id Unique ID of item to retrieve data for Y N/A
format Format of response data (xml, json) N xml

Example request

Response

Show sample XML response | Show sample JSON response


Current Art Practical picks

Get a list of events that are Art Practical picks that are still running or opening in the future.

Request URI

http://api.happenstand.com/v1/events/picks

Parameters Description Required Default
api_key API key Y N/A
offset Position in results to begin response set N 0
length The number of events to return from the offset position N 20
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response

Images

Image nodes return the image directory, the image id and the image extension. There are 5 standard resize dimensions.

Suffix Image size
_t Thumbnail - 75 x 75 pixels
_s Small - 100 pixels on longest side
_m Medium - 240 pixels on longest size
_l Large - 500 pixels on longest size
(empty) Original file

Using the image info and the size suffix you can construct image URLs as such:

[dir] + [id] + [suffix] + . + [ext]

eg.
http://www.happenstand.com/images/upload/0/2560/1254765450_m.jpg

Locales

For now there is only one locale used on the site, Bay Area and its ID is 1. In the future if there are more locations, there would be a service to return a list of locales with IDs.

Places

Places by name

Get a list of places with current events summary

Request URI

http://api.happenstand.com/v1/places/list

Parameters Description Required Default
api_key API key Y N/A
start A letter of the alphabet to filter results by, or '0' for items starting with numbers. If left empty, returns all items. N (empty)
loc A locale ID to get events for. If empty, returns events for all locales. N (empty)
offset Position in results to begin response set N 0
length Number of items to return from offset position. If empty, returns all items for current 'start' filter. N (empty)
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Places by proximity

Show a list of places by proximity to a given location. Results are sorted by distance. Distances are in miles.

Request URI

http://api.happenstand.com/v1/places/proximity

Parameters Description Required Default
api_key API key Y N/A
query Location to measure distance from. Could be a latitude/longitude coordinate formatted as "-37.123456,121.132442" or a textual location search such as "1234 jones st, ca" or "94710". Queries should be URL encoded. Y N/A
distance Distance to limit search by (in miles) N 1
offset Position in results to begin response set N 0
length Number of items to return from offset position N 20
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Place detail

Show the details for a given place

Request URI

http://api.happenstand.com/v1/places/detail

Parameters Description Required Default
api_key API key Y N/A
id Unique ID of item to retrieve data for Y N/A
format Format of response data (xml, json) N xml

Example request

Response

Show sample XML response | Show sample JSON response

People

People by name

Show a list of people by name

Request URI

http://api.happenstand.com/v1/people/list

Parameters Description Required Default
api_key API key Y N/A
start A letter of the alphabet to filter results by, or '0' for items starting with numbers. If left empty, returns all items. N (empty)
offset Position in results to begin response set N 0
length Number of items to return from offset position. If empty, returns all items for current 'start' filter. N (empty)
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response


Person detail

Show the details for a given person with past and future event summaries

Request URI

http://api.happenstand.com/v1/people/detail

Parameters Description Required Default
api_key API key Y N/A
id Unique ID of item to retrieve data for Y N/A
format Format of response data (xml, json) N xml

Example request

Response

Show sample XML response | Show sample JSON response

Search

Keyword search

Show event, place and people matches for a search word or term. Results are ordered by a score measuring precision of match to query (0-1).

Request URI

http://api.happenstand.com/v1/search

Parameters Description Required Default
api_key API key Y N/A
query The keyword(s) to find matches for. Queries should be URL encoded. Y N/A
format Format of response data (xml, json) N xml

Example requests

Response

Show sample XML response | Show sample JSON response