Returns a list of TeamRaiser events that match the search criteria provided. Search criteria includes the starting zip/postal code, the distance to search from that starting zip/postal code, and the units of distance to use (miles or kilometers).
Client Servlet | Server Servlet | HTTP Methods Supported | Requires Authentication |
---|---|---|---|
CRTeamraiserAPI | None. | GET, POST | No. |
This client-only method returns a list of active TeamRaiser Events located based off distance from a starting zip or postal code. Use this to provide your users with the ability to locate the closest event to them.
This method shares several features with getTeamraisersByInfo, including the ability to limit the search to Teamraiser Events within a given Security Category or Primary Event Type. To limit the search to a given Security Category, use the list_category_id to provide the Category ID to limit the search to. To limit the search to a given Primary Event Type, use the event_type parameter to specify the name of the Primary Event Type. If you provide the name of a Primary Event Type that does not exist, an error message will be thrown.
You can use these parameters to limit the search in ways that your users may not be familiar with. One example would be that if your organization has several chapters, divisions or affiliates and each wants their own search page to locate only their events. You can include the security category ID for that affiliate as a hidden form field to ensure that the search returns only events within that affiliate's category. If you have separate programs within each affiliate and want each program to have it's own search page, include the primary event type that identifies that program and the security category id for that affiliate.
Additionally, the list that is returned supports several parameters allowing finer control of the results, including filtering on any of the returned elements, pagination, and sorting.
See topic Common Parameters.
Required. The starting zip code to use for a distance search. For US Zip Codes, use the 5-digit zip code. Currently only supports US Zip Codes.
Type xsd:string.
Optional. The Unit of distance measurements to use for a distance search. Can be either 'mi' for miles or 'km' for kilometers. Default value is 'mi'.
Type xsd:string.
Default is mi.
Optional. The name of the Primary Event Type to limit search results to. Omit this parameter to search on all Primary Event Types. Defaults to null.
Type xsd:string.
Optional. If TRUE, returns all events regardless of event status, otherwise returns only published events. Possible status values include: Unpublished = 0, Accepting Registrations Only = 1, AcceptingRegistrations and Gifts = 2, Accepting Gifts Only= 3, Closed = 4, Archived = 8, Deleted = 9.
Type xsd:boolean.
Optional. Whether the list should be sorted in ascending order.
Type xsd:boolean.
Default is true.
Optional. Security Category filter.
Type xsd:integer.
Optional. The database column that will be used to match the filter text (used with "list_filter_text").
Type xsd:string.
Optional. The text that will be used to filter results.
Type xsd:string.
Optional. The requested page number (used with "list_page_size"). The first page (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.
Type xsd:integer.
Optional. The number of results in each page (used with "list_record_offset" or "list_page_offset").
Type xsd:integer.
Default is 25.
Optional. The requested initial record number (used with "list_page_size"). The first record (default) is zero. Only one of "list_record_offset" or "list_page_offset" should be used in a request.
Type xsd:integer.
Optional. The column to sort with (used with "list_ascending").
Type xsd:string.
Optional. The case-sensitive name of the Public Event Type to limit search results to. Omit this parameter to search on events with any Public Event Type. Defaults to null.
Type xsd:string.
Optional. The radius to search within from the starting zip / postal code. Must be a number from 0-200, defaults to 0.
Type xsd:integer.
Default is 0.
See topic HTTP Status Codes.
XML response<?xml version="1.0" encoding="UTF-8"?> <getTeamraisersResponse xsi:schemaLocation="http://convio.com/crm/v1.0 http://service.convio.net/xmlschema/crm.public.v1.xsd" xmlns="http://convio.com/crm/v1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <totalNumberResults>3</totalNumberResults> <teamraiser> <id>12000</id> <name>Sample Event Title 0</name> <description>Sample Event Description 0</description> <event_date>2016-02-01T09:43:39.936-06:00</event_date> <accepting_registrations>true</accepting_registrations> <accepting_donations>true</accepting_donations> <location_name>Sample Location 0</location_name> <street_address>1234 Fake St.</street_address> <city>Austin</city> <state>TX</state> <zip>78758</zip> <county>Travis</county> <country>United States</country> <region>Hill Country</region> <area>North Austin</area> <mailingAddrAttn>J. Doe</mailingAddrAttn> <mail_street1>1234 Fake Ave.</mail_street1> <mail_street2>Suite 1000</mail_street2> <mail_city>Austin</mail_city> <mail_state>TX</mail_state> <mail_zip>78758</mail_zip> <status>1</status> <greeting_url>http://example.com/greetingUrl</greeting_url> <find_url>http://example.com/findTeamOrParticipantUrl</find_url> <donate_event_url>http://example.com/donateUrl</donate_event_url> <reg_indiv_url>http://example.com/registerIndividualUrl</reg_indiv_url> <reg_new_team_url>http://example.com/formANewTeamUrl</reg_new_team_url> <reg_join_team_url>http://example.com/joinTeamUrl</reg_join_team_url> <public_event_type_name>Central Texas</public_event_type_name> <ecommerce_event_url>http://example.com/eCommerceEventUrl</ecommerce_event_url> <customized_url>http://example.com/customizedUrl</customized_url> <distance>10.0</distance> </teamraiser> <teamraiser> <id>12001</id> <name>Sample Event Title 1</name> <description>Sample Event Description 1</description> <event_date>2016-02-01T09:43:39.950-06:00</event_date> <accepting_registrations>true</accepting_registrations> <accepting_donations>true</accepting_donations> <location_name>Sample Location 1</location_name> <street_address>1234 Fake St.</street_address> <city>Austin</city> <state>TX</state> <zip>78758</zip> <county>Travis</county> <country>United States</country> <region>Hill Country</region> <area>North Austin</area> <mailingAddrAttn>J. Doe</mailingAddrAttn> <mail_street1>1234 Fake Ave.</mail_street1> <mail_street2>Suite 1000</mail_street2> <mail_city>Austin</mail_city> <mail_state>TX</mail_state> <mail_zip>78758</mail_zip> <status>1</status> <greeting_url>http://example.com/greetingUrl</greeting_url> <find_url>http://example.com/findTeamOrParticipantUrl</find_url> <donate_event_url>http://example.com/donateUrl</donate_event_url> <reg_indiv_url>http://example.com/registerIndividualUrl</reg_indiv_url> <reg_new_team_url>http://example.com/formANewTeamUrl</reg_new_team_url> <reg_join_team_url>http://example.com/joinTeamUrl</reg_join_team_url> <public_event_type_name>Central Texas</public_event_type_name> <ecommerce_event_url>http://example.com/eCommerceEventUrl</ecommerce_event_url> <customized_url>http://example.com/customizedUrl</customized_url> <distance>11.0</distance> </teamraiser> <teamraiser> <id>12002</id> <name>Sample Event Title 2</name> <description>Sample Event Description 2</description> <event_date>2016-02-01T09:43:39.951-06:00</event_date> <accepting_registrations>true</accepting_registrations> <accepting_donations>true</accepting_donations> <location_name>Sample Location 2</location_name> <street_address>1234 Fake St.</street_address> <city>Austin</city> <state>TX</state> <zip>78758</zip> <county>Travis</county> <country>United States</country> <region>Hill Country</region> <area>North Austin</area> <mailingAddrAttn>J. Doe</mailingAddrAttn> <mail_street1>1234 Fake Ave.</mail_street1> <mail_street2>Suite 1000</mail_street2> <mail_city>Austin</mail_city> <mail_state>TX</mail_state> <mail_zip>78758</mail_zip> <status>1</status> <greeting_url>http://example.com/greetingUrl</greeting_url> <find_url>http://example.com/findTeamOrParticipantUrl</find_url> <donate_event_url>http://example.com/donateUrl</donate_event_url> <reg_indiv_url>http://example.com/registerIndividualUrl</reg_indiv_url> <reg_new_team_url>http://example.com/formANewTeamUrl</reg_new_team_url> <reg_join_team_url>http://example.com/joinTeamUrl</reg_join_team_url> <public_event_type_name>Central Texas</public_event_type_name> <ecommerce_event_url>http://example.com/eCommerceEventUrl</ecommerce_event_url> <customized_url>http://example.com/customizedUrl</customized_url> <distance>12.0</distance> </teamraiser> </getTeamraisersResponse>JSON response
{"getTeamraisersResponse":{"teamraiser":[{"region":"Hill Country","state":"TX","city":"Austin","id":"12000","distance":"10.0","reg_new_team_url":"http://example.com/formANewTeamUrl","mail_state":"TX","area":"North Austin","description":"Sample Event Description 0","name":"Sample Event Title 0","mail_city":"Austin","reg_indiv_url":"http://example.com/registerIndividualUrl","ecommerce_event_url":"http://example.com/eCommerceEventUrl","public_event_type_name":"Central Texas","zip":"78758","reg_join_team_url":"http://example.com/joinTeamUrl","location_name":"Sample Location 0","status":"1","customized_url":"http://example.com/customizedUrl","find_url":"http://example.com/findTeamOrParticipantUrl","country":"United States","accepting_donations":"true","donate_event_url":"http://example.com/donateUrl","greeting_url":"http://example.com/greetingUrl","county":"Travis","event_date":"2016-02-01T09:43:39.961-06:00","mail_zip":"78758","mailingAddrAttn":"J. Doe","street_address":"1234 Fake St.","accepting_registrations":"true","mail_street1":"1234 Fake Ave.","mail_street2":"Suite 1000"},{"region":"Hill Country","state":"TX","city":"Austin","id":"12001","distance":"11.0","reg_new_team_url":"http://example.com/formANewTeamUrl","mail_state":"TX","area":"North Austin","description":"Sample Event Description 1","name":"Sample Event Title 1","mail_city":"Austin","reg_indiv_url":"http://example.com/registerIndividualUrl","ecommerce_event_url":"http://example.com/eCommerceEventUrl","public_event_type_name":"Central Texas","zip":"78758","reg_join_team_url":"http://example.com/joinTeamUrl","location_name":"Sample Location 1","status":"1","customized_url":"http://example.com/customizedUrl","find_url":"http://example.com/findTeamOrParticipantUrl","country":"United States","accepting_donations":"true","donate_event_url":"http://example.com/donateUrl","greeting_url":"http://example.com/greetingUrl","county":"Travis","event_date":"2016-02-01T09:43:39.963-06:00","mail_zip":"78758","mailingAddrAttn":"J. Doe","street_address":"1234 Fake St.","accepting_registrations":"true","mail_street1":"1234 Fake Ave.","mail_street2":"Suite 1000"},{"region":"Hill Country","state":"TX","city":"Austin","id":"12002","distance":"12.0","reg_new_team_url":"http://example.com/formANewTeamUrl","mail_state":"TX","area":"North Austin","description":"Sample Event Description 2","name":"Sample Event Title 2","mail_city":"Austin","reg_indiv_url":"http://example.com/registerIndividualUrl","ecommerce_event_url":"http://example.com/eCommerceEventUrl","public_event_type_name":"Central Texas","zip":"78758","reg_join_team_url":"http://example.com/joinTeamUrl","location_name":"Sample Location 2","status":"1","customized_url":"http://example.com/customizedUrl","find_url":"http://example.com/findTeamOrParticipantUrl","country":"United States","accepting_donations":"true","donate_event_url":"http://example.com/donateUrl","greeting_url":"http://example.com/greetingUrl","county":"Travis","event_date":"2016-02-01T09:43:39.964-06:00","mail_zip":"78758","mailingAddrAttn":"J. Doe","street_address":"1234 Fake St.","accepting_registrations":"true","mail_street1":"1234 Fake Ave.","mail_street2":"Suite 1000"}],"totalNumberResults":"3"}}
To perform a Distance search looking for any events within 25 miles of the Zip Code 78758:
https://demo-secure.convio.net/demo829/site/CRTeamraiserAPI?api_key=MyAPIKey&v=1.0&method=getTeamraisersByDistance&starting_postal=78758&search_distance=25&distance_units=mi
Same as above, but limiting the search to events with a Primary Event Type of "Walks", and only retrieving the first page of results, displaying 10 results per page:
https://demo-secure.convio.net/demo829/site/CRTeamraiserAPI?api_key=MyAPIKey&v=1.0&method=getTeamraisersByDistance&starting_postal=78758&search_distance=25&distance_units=mi&event_type=Walks&list_page_size=10&list_page_offset=0
Same as above, but sorting the results by distance:
https://demo-secure.convio.net/demo829/site/CRTeamraiserAPI?api_key=MyAPIKey&v=1.0&method=getTeamraisersByDistance&starting_postal=78758&search_distance=25&distance_units=mi&event_type=Walks&list_page_size=10&list_page_offset=0&list_ascending=true&list_sort_column=distance
Retrieving Page 2 of the above query:
https://demo-secure.convio.net/demo829/site/CRTeamraiserAPI?api_key=MyAPIKey&v=1.0&method=getTeamraisersByDistance&starting_postal=78758&search_distance=25&distance_units=mi&event_type=Walks&list_page_size=10&list_page_offset=1&list_ascending=true&list_sort_column=distance
A Distance search looking for any events within 200 kilometers of the Zip Code 20037:
https://demo-secure.convio.net/demo829/site/CRTeamraiserAPI?api_key=MyAPIKey&v=1.0&method=getTeamraisersByDistance&starting_postal=20037&search_distance=200&distance_units=km
Same as above, but selecting 20 results per page starting with result #5, sorting by name in descending order, filtered to events with an area of Capitol Hill:
https://demo-secure.convio.net/demo829/site/CRTeamraiserAPI?api_key=MyAPIKey&v=1.0&method=getTeamraisersByDistance&starting_postal=20037&search_distance=200&distance_units=km&list_page_size=20&list_record_offset=5&list_filter_column=area&list_filter_text=Capitol%20Hill&list_sort_column=name&list_ascending=false