Skip to main content

Events API

Returns a list of events for the specified time period, where each event cost is less than or equal to the price argument.

Location

https://calendar.byu.edu/api/Events

Example: https://calendar.byu.edu/api/Events?categories=10+6&event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=5

Parameters

ParameterDescription
categoriesA list of the category ID's, separated by a "+" (e.g., 9+6+151). You can also specify "all" to include all categories. Including all main categories means to inclue all events (as one main level category is required for all events).
event[min][date](Optional) The starting date of the time period (in the format yyyy-mm-dd).
event[max][date](Optional) The ending date of the time period (in the format yyyy-mm-dd).
price(Optional) The max price. Provide an integer or decimal. Free events and events without tickets will always be included.

NOTE: If either a min or a max date is provided, but not the other, all events get returned regardless of min/max date argument.

Example: https://calendar.byu.edu/api/Events?categories=10+6&event[min][date]=2017-01-20&price=5

Return Values

NameDescription
EventIdThe unique ID for the event.
TitleTitle of the event.
DescriptionDescription of the event if there is one. Limited to 250 characters.
ShortDescriptionShorter description of the event. Limited to 75 characters.
IsFeaturedTrue if it's featured on the homepage. False if it isn't.
LowPriceThe low price of the event.
HighPriceThe high price of the event.
PriceDescriptionAdditional description for the price.
LocationNameName of the event's location.
LatitudeCorresponds with google maps api latitude. This is no longer supported. This returns as empty.
LongitudeCorresponds with google maps api longitude. This is no longer supported. This returns as empty.
ImgUrlUrl associated with a thumbnail picture corresponding to the event.
StartDateTimeMM-dd-yyyy HH:mm:ss
EndDateTimeMM-dd-yyyy HH:mm:ss
AllDayTrue if the event occurs all day. False if the event doesn't.
MoreInformationUrlUrl for a link to additional information page.
IsPublishedNotMainCalendarTrue if it is on the BYU calendar. False if it isn't. (Sometimes a department may wish to add their events through the BYU Calendar but not display them on calendar.byu.edu. Then they can use this API to display them on their own website(s).
OccurrenceIdUnique id associated with each occurance. This will now always be the same as the event id.
CategoryIdThe ID for the categories. This corresponds with category names that can be found in the Category ID's section of this document.
CategoryNameThe corresponding category name.
FullUrlDisplays the full url to the event on calendar.byu.edu.
IsFreeTrue/False if marked free. Note: Some events don't have tickets at all.
TagsIdsDisplays comma separated list of tag ids.
TagsNamesDisplays comma separated list of tag names.
DeptsIdsDisplays comma separated list of internal category ids. This will include parent ids as this field includes hierarchical category information.
DeptNamesDisplays comma separated list of internal category names. This will include parent names as this field includes hierarchical category information.
TicketsExistTicket display logic will check if tickets exist before it checks if it's free or priced.
TicketsUrlChecks for a URL associated with the tickets, if they exist.

XML Example

https://calendar.byu.edu/api/Events.xml?categories=10+6&event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=5

XML_1.png

JSON Example

https://calendar.byu.edu/api/Events.json?categories=10+6&event[min][date]=2017-04-01&event[max][date]=2017-04-30&price=5

JSON_5.png

Changes

Parameters

Old ValueNew ValueNote
startdate=mm-dd-yyyyevent[min][date]=yyyy-mm-ddThe paramater format and value format have both changed slightly. Note that now it takes dates in the format of yyyy-mm-dd.
enddate=mm-dd-yyyyevent[max][date]=yyyy-mm-ddThe paramater format and value format have both changed slightly. Note that now it takes dates in the format of yyyy-mm-dd.

Return Values

Old ValueNew ValueNote
<ArrayOfPublicEventViewModel><result>This is the wrapper around the entire list. Only the name of the tag has changed.
<PublicEventViewModel><item>This is the wrapper around a single event. Only the name of the tag has changed.
<CategoryId >25</CategoryId><CategoryId>6</CategoryId>Category ID now only referes to one of the 7 main categories (as listed on the calendar site)
<CategoryName>Basketball (W)</CategoryName><CategoryName>Conferences</CategoryName>Category Name now only referes to one of the 7 main categories (as listed on the calendar site)
<ImgUrl>/Content/uploads/images/w-basketball.jpg</ImgUrl>https://calendar.byu.edu/sites/default/files/Athletics_600x600.jpgThe full URL is now used for images.
<Latitude>40.25409</Latitude><Latitude></Latitude>Latitued is now empty, though a value may be added.
<LocationName>Marriott Center, East University Parkway, Provo, UT</LocationName>An event is no longer required to have a location name and can be empty.
<Longitude>-111.64934299999999</Longitude><Longitude></Longitude>Longitude is now empty, though a value may be added.
<OccurrenceId>17851</OccurrenceId><OccurrenceId>17851</OccurrenceId>Previously, Occurrence ID could have been different than Event ID. Now, Occurrence ID will always be the same as Event ID. Each individual instance of an event will now be it's own event.

New Values

  • FullUrl
  • IsFree
  • TagsIds
  • TagsNames
  • DeptIds
  • DeptNames
  • TicketsExist
  • TicketsUrl

Removed Values

  • ShortUrl
  • TimeZone