Follow

Events API call

You can use the Events API call to retrieve information about events, and to create, update, or delete an event. You can retrieve information for all events, and just for a specific event. You can also use the Events API to retrieve the number of events.

Wild Apricot's API is intended for use by developers with technical expertise. If you need assistance, we provide support via email or through our Developers forum.

You can use the Events API call to retrieve information about events, and to create, update, or delete an event. You can retrieve information for all events, and just for a specific event. You can also use the Events API to retrieve the number of events.

Retrieving the number of events

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/Events?$count
Example
GET https://api.wildapricot.org/v2/Accounts/58293/Events?$count

The number of events will be returned in a Count field.

Retrieving information for all events

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/Events

Example

GET https://api.wildapricot.org/v2/Accounts/58293/Events

The events list request can contain the following optional query string parameters:

  • includeEventDetails – if it set to true, event details will be retrieved for each event.
  • idsOnly – specify without a value to retrieve only a list of event identifiers

Retrieving information for a single event

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/Events/[eventID]
Example
GET https://api.wildapricot.org/v2/Accounts/58293/Events/11769

Retrieving information for multiple events

You can retrieve information for specific events by specifying a list of events IDs. Only events with the specified IDs will be retrieved.

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/Events?IDs=[eventIDs]
Example
GET https://api.wildapricot.org/v2/Accounts/58293/Events?IDs=1,2,7,9

Retrieving event tags

You can retrieve a list of event tags currently in use.

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/Events/Tags
Example
GET https://api.wildapricot.org/v2/Accounts/58293/Events/Tags

The result will be an array (e.g. [ "tag1", "tag2", "tag3" ] )

Parameters

The following parameters are used within the Events API call:

baseAPIaddress
The base address of the API. For more information, see API access options.

accountID
The account identifier that is returned by the Accounts API call.

eventID
The unique identifier of an event. Event IDs are returned by the Events API call.

Each API call must include an authentication information that verifies your account and prevents others from accessing your data. For more information, see API access options.

Response fields

When retrieving information for one or more event, the Events API call retrieves the following information for each event.

AccessLevel
The access level for this event. Possible values: Public, AdminOnly, Restricted.

CheckedInAttendeesNumber
The number checked-in attendees.

ConfirmedRegistrationsCount
The number of confirmed registrations

EndDate
The date the event ends.

EndTimeSpecified
Indicates whether the end time was specified.

HasEnabledRegistrationTypes
Indicates whether any registration types have been enabled for this event.

ID
The unique identifier of the event.URLThe address of the API call for this event.NameThe name assigned to the event.

InviteeStats
For events where initiations were sent using the {Registration buttons} macro, displays the total number of each response using NotResponded, NotAttended, Attended, and MaybeAttended fields .

Location
The location of the event.

PendingRegistrationsCount
The number of pending registrations.

RegistrationEnabled
Indicates whether registration has been enabled for this event.

RegistrationsLimit
The limit on the number of registrations.

StartDate
The time and date the event is scheduled to begin.

StartTimeSpecified
Indicates whether the start time was specified.

Tags
Any tags – labels used to categorize events – assigned to the event.

When retrieving information for a specific event, the Events API also displays the following information, grouped under a Details field:

AccessControl
Indicates who can view this event either on an event calendar or via a direct link. Depend on the event's access level, the following fields may be returned.

  • AccessLevel
    Possible values: Public, AdminOnly, Restricted
  • AvailableForAnyLevel
    If AccessLevel is set to Restricted, indicates whether access is enabled for all membership levels.
  • AvailableForLevels
    If AvailableForAnyLevel is false, lists the ID and URL of membership levels that have been granted access.
  • AvailableForAnyGroup
    If AccessLevel is set to Restricted, indicates whether access is enabled for all member groups.
  • AvailableForGroups
    If AvailableForAnyGroup is false, lists the ID and URL of member groups that have been granted access.

AttendeesDisplaySettings
Indicates whether and how a list of event registrants appears for the event on the event calendar and in the event details.

  • VisibleTo
    Indicates who can see the list of event registrants. Possible values: Public, Members, Nobody
  • ShowPendingAttendees
    Indicates whether pending registrations are included in the registrants list.

DescriptionHtml
The HTML of the event description.

EventRegistrationFields
For each registration field, the following information is returned.

  • Kind
    Indicates the type of field. Possible values are Common, Custom.
  • IsRequired
    Indicates whether this is a required field that must be completed in order to register for this event.
  • AdminOnly
    Indicates whether the field is accessible to administrators only.
  • IsSystem
    Indicates whether the field is a system field.
  • Description
    The field description (for system fields only).
  • Order
    The position of the field within the field list.
  • FieldName
    The name assigned to the field.
  • Type
    The field type. Possible values and the corresponding field types as they appear in Wild Apricot are:
    Boolean: Rules and terms, various system fields
    Choice: Radio buttons, dropdown, radio buttons with extra charge
    DateTime: Date
    MultipleChoice: Multiple choice, multiple choice with extra charge
    CalculatedExtraCharge: Extra charge calculation
    Number: Various system fields
    String: Text, multiline text
  • AllowedValues
    For multi-option fields – those with a field Type of Choice (radio buttons, dropdown, radio buttons with extra charge) or MultipleChoice (multiple choice, multiple choice with extra charge) – the ID and label of each individual option is returned.
  • ExtraCharge
    For extra charge calculation fields, the following information is displayed:
    MultiplierType: Indicates whether the multiplier is the unit cost (ItemPrice) or percentage (Percentage).
    Multiplier: The decimal value of the multiplier.
    MinAmount: The minimum number of items for ItemPrice multiplier types
    MaxAmount: The maximum number of items for ItemPrice multiplier types
    MinCharge: The minimum resulting charge for Percentage multiplier types
    MaxCharge: The maximum resulting charge for Percentage multiplier types
  • SystemName
    The internal system name used to refer to this field (system fields only).

GuestRegistrationSettings
Grouped under here are the following fields:

  • Enabled
    Indicates whether guest registrations are enabled.
  • CreateContactMode
    Indicates the circumstances under which contact records are created when creating guest registrations. The possible values are: NeverCreateContact, CreateContactForAllGuests, CreateContactForGuestsWithEmail

MultipleRegistrationAllowed
Indicates whether visitors can register multiple times for the same event.

Organizer
The contact ID and URL of the event organizer.

PaymentInstructions
The payment instructions entered for this event.

PaymentMethod
Indicates the payment method for this event.
Possible values: Undefined, OnlineAndOffline, OfflineOnly, OnlineOnly

RegistrationConfirmationExtraInfo
Extra information to be included in the registration confirmation email.

RegistrationMessage
Information to be displayed above the Register button on the event details screen.

RegistrationTypes
The registration types for this event. For each registration type, the following information is returned.

  • Id
    The unique identifier for this registration type.
  • Url
    The URL for this registration type.
  • EventId
    The unique identifier of the event to which this registration type belongs.
  • Name
    The name assigned to the registration type.
  • IsEnabled
    Indicates whether registration has been enabled for this registration type.
  • Description
    The description assigned to the registration type.
  • BasePrice
    The base price for the registration type.
  • GuestPrice
    The registration price for guest registrations.
  • UseTaxScopeSettings
    Indicates whether tax scope settings are being applied to this event.
  • AllowGuestRegistration
    Indicates whether guest registrations have been enabled.
  • Availability
    Indicates whether access to this event has been restricted. The possible values are Everyone, MembersOnly, and CodeRequired.
  • RegistrationCode
    The registration code for this event.
  • AvailableForMembershipLevels
    The membership levels to which registration is limited.
  • AvailableFrom
    The first date on which this membership level is available.
  • AvailableThrough
    The final date on which this membership level is available.
  • MaximumRegistrantsCount
    Maximum number of registrants for this registration type.
  • CurrentRegistrantsCount
    Current number of registrants for this registration type

SendEmailCopy
Indicates whether copies of event emails are sent to the event organizer.

Sessions
For each session in a multi-session event, the following fields are returned:

  • ID
    The event session ID.
  • Title
    The title of the event session.
  • StartDate
    The starting date of the event session.
  • EndDate
    The end date of the event session.

TimeZone
The time zone for the event, including the zone ID, name, and offset. The time zone for the event, including the zone ID, name, and offset. If you want to set it to a timezone different from the one specified within your organization details, you only need to specify the UtcOffset parameter, as shown below:

"Details":
{
"TimeZone":
{
"UtcOffset": -300
}
}

where 300 is the UTC offset in minutes.

TotalPaid
The total sum paid for all registrations for this event.

TotalDue
The total sum due but not yet paid for registrations for this event.

WaitlistBehaviour
Indicates whether the waitlist is enabled and if so, how much information is collected for waitlisters.
Possible values: Disabled, Undefined, RequestNameAndEmail, RequestContactInformation, RequestRegistrationInformation

Sample JSON response

{
"Events": [
{
"StartDate": "2015-09-10T20:00:00-04:00",
"EndDate": "2015-09-10T20:00:00-04:00",
"Location": "Downtown Sheraton",
"RegistrationEnabled": true,
"RegistrationsLimit": null,
"PendingRegistrationsCount": 0,
"ConfirmedRegistrationsCount": 0,
"CheckedInAttendeesNumber": 0,
"Tags": [
"agm"
],
"Id": 11769,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Events/11769",
"Name": "Annual General Meeting"
},
{
"StartDate": "2015-04-05T20:00:00-03:00",
"EndDate": "2015-04-05T20:00:00-03:00",
"Location": "Trump Tower",
"RegistrationEnabled": true,
"RegistrationsLimit": null,
"PendingRegistrationsCount": 0,
"ConfirmedRegistrationsCount": 0,
"CheckedInAttendeesNumber": 0,
"Tags": [
"social"
],
"Id": 11770,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Events/11770",
"Name": "Spring gala"
},
{
"StartDate": "2015-06-23T20:00:00-04:00",
"EndDate": "2015-06-23T20:00:00-04:00",
"Location": "West End Y",
"RegistrationEnabled": true,
"RegistrationsLimit": null,
"PendingRegistrationsCount": 0,
"ConfirmedRegistrationsCount": 0,
"CheckedInAttendeesNumber": 0,
"Tags": [
"training"
],
"Id": 11771,
"Url": "http://api.wildapricot.org/v2/accounts/42353/Events/11771",
"Name": "Volunteer training session"
}
]
}

Sample XML response

<ApiResponse xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns:d1p1="http://schemas.datacontract.org/2004/07/Bonasource.MembershipFS.PublicAPI.Model.V2.Events" i:type="d1p1:EventsListResult" xmlns="http://api.wildapricot.org">
<d1p1:Events>
<d1p1:Event>
<Id>11769</Id>
<Url>http://api.wildapricot.org/v2/accounts/42353/Events/11769</Url>
<Name>Annual General Meeting</Name>
<d1p1:CheckedInAttendeesNumber>5</d1p1:CheckedInAttendeesNumber>
<d1p1:ConfirmedRegistrationsCount>4</d1p1:ConfirmedRegistrationsCount>
<d1p1:Details i:nil="true" />
<d1p1:EndDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2015-09-11T00:00:00Z</d4p1:DateTime>
<d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
</d1p1:EndDate>
<d1p1:Location>Downtown Sheraton</d1p1:Location>
<d1p1:PendingRegistrationsCount>6</d1p1:PendingRegistrationsCount>
<d1p1:RegistrationEnabled>true</d1p1:RegistrationEnabled>
<d1p1:RegistrationsLimit i:nil="true" />
<d1p1:StartDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2015-09-11T00:00:00Z</d4p1:DateTime>
<d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
</d1p1:StartDate>
<d1p1:Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>agm</d4p1:string>
</d1p1:Tags>
</d1p1:Event>
<d1p1:Event>
<Id>11770</Id>
<Url>http://api.wildapricot.org/v2/accounts/42353/Events/11770</Url>
<Name>Spring gala</Name>
<d1p1:CheckedInAttendeesNumber>0</d1p1:CheckedInAttendeesNumber>
<d1p1:ConfirmedRegistrationsCount>1</d1p1:ConfirmedRegistrationsCount>
<d1p1:Details i:nil="true" />
<d1p1:EndDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2015-04-05T23:00:00Z</d4p1:DateTime>
<d4p1:OffsetMinutes>-180</d4p1:OffsetMinutes>
</d1p1:EndDate>
<d1p1:Location>Trump Tower</d1p1:Location>
<d1p1:PendingRegistrationsCount>0</d1p1:PendingRegistrationsCount>
<d1p1:RegistrationEnabled>true</d1p1:RegistrationEnabled>
<d1p1:RegistrationsLimit i:nil="true" />
<d1p1:StartDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2015-04-05T23:00:00Z</d4p1:DateTime>
<d4p1:OffsetMinutes>-180</d4p1:OffsetMinutes>
</d1p1:StartDate>
<d1p1:Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>social</d4p1:string>
</d1p1:Tags>
</d1p1:Event>
<d1p1:Event>
<Id>11771</Id>
<Url>http://api.wildapricot.org/v2/accounts/42353/Events/11771</Url>
<Name>Volunteer training session</Name>
<d1p1:CheckedInAttendeesNumber>0</d1p1:CheckedInAttendeesNumber>
<d1p1:ConfirmedRegistrationsCount>0</d1p1:ConfirmedRegistrationsCount>
<d1p1:Details i:nil="true" />
<d1p1:EndDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2015-06-24T00:00:00Z</d4p1:DateTime>
<d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
</d1p1:EndDate>
<d1p1:Location>West End Y</d1p1:Location>
<d1p1:PendingRegistrationsCount>0</d1p1:PendingRegistrationsCount>
<d1p1:RegistrationEnabled>true</d1p1:RegistrationEnabled>
<d1p1:RegistrationsLimit i:nil="true" />
<d1p1:StartDate xmlns:d4p1="http://schemas.datacontract.org/2004/07/System">
<d4p1:DateTime>2015-06-24T00:00:00Z</d4p1:DateTime>
<d4p1:OffsetMinutes>-240</d4p1:OffsetMinutes>
</d1p1:StartDate>
<d1p1:Tags xmlns:d4p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d4p1:string>training</d4p1:string>
</d1p1:Tags>
</d1p1:Event>
</d1p1:Events>
</ApiResponse>

Filtering the results

You can filter the results of the Events API call so that only those events that match the filter criteria will be included. For example, you might want to retrieve information only about upcoming events, or events between certain dates.

Within your filter criteria, you can use relational operators to include ranges of events, and use logical operators to combine multiple criteria.

$filter syntax

GET https://api.wildapricot.org/[version]/Accounts/[accountID]/Events?$filter=[filterCriteria]

where filterCriteria is the criteria to be used to filter the search results.

Example:
GET https://api.wildapricot.org/v2/Accounts/58293/Events?$filter=StartDate gt 2015-01-15 AND StartDate lt 2015-06-15

In this example, only events between January 15th, 2015 and June 15th, 2015 will be included in the results.

Filter fields

You can filter events using the following fields:

ID
A list of event IDs.
Supported operators: in

Name
The name of the event.
Supported operators: eq, substringof

IsUpcoming
Indicates whether the event has yet to take place.
Supported operators: eq

Tags
The labels used to categorize events.
Supported operators: in

StartDate
The start date of the event (using the yyyy-mm-dd date format)
Supported operators: eq, gt, ge, lt, le

EndDate
The end date of the event (using the yyyy-mm-dd date format)
Supported operators: eq, gt, ge, lt, le

RegistrationEnabled
Indicates whether registration has been enabled for the event.
Supported operators: eq

TextIndex
Returns events that contain the specified string within the event title, description, location, start date or event tag
Supported operators: substringof

Relational operators

You can use the following relational operators within your search criteria.

Operator

Description

Fields

Example

eq

Equal to

Name, IsUpcoming, StartDate, EndDate, RegistrationEnabled

$filter=RegistrationEnabled eq true

gt

Greater than

StartDate, EndDate

$filter=StartDate gt 2015-01-15

ge

Great than or equal to

StartDate, EndDate

$filter=EndtDate ge 2015-01-15

lt

Less than

StartDate, EndDate

$filter=StartDate lt 2015-06-15

le

Less than or equal to

StartDate, EndDate

$filter=End tDate le 2015-01-15

inIn list of valuesTags$filter=Tags in [social, training]

substringof

Field includes specified value using the following format:
substringof('field', 'value')

Name, TextIndex

$filter=substringof('Name', 'Annual')

Field names that include spaces or special characters (such as ? < & ) must be enclosed within single quotation marks.

Logical operators

You can use logical operators – AND and OR – to group multiple search criteria, and control whether either or both criteria must satisfied.

In the following example...

$filter=RegistrationEnabled eq true AND StartDate gt 2015-01-15

...events must have registration enabled and must be taking place after January 15, 2015 to be included in the results.

In this example...

$filter=substringof('Name', 'training') eq true OR $filter=Tags in [training]

...events will included in the search results if they have the word "training" in their name or their tags.

You can use brackets to control precedence – the order in which multiple criteria are evaluated within your search criteria. Normally, criteria joined by an AND operator are evaluated ahead of criteria joined by an OR operator. However, any criteria surrounded by brackets will be given priority and evaluated ahead of any other criteria.

In the following example....

$filter=A and B or C

...events would have to satisfy both the A and B criteria – or satisfy the C criteria alone – to be included in the results. If, however, you place brackets as shown here...

$filter=A and (B or C)

...then events would have to satisfy either the B or C criteria, as well as the A criteria.

Sorting the results

Using the $sort parameter, you can control the order in which the results of the Events API are sorted.

Syntax
GET https://api.wildapricot.org/[version]/Accounts/[accountID]/Events?$sort=[sortCriteria]

where sortCriteria is one of the following:

  • StartDate asc
    Sorted by event start date, in ascending order
  • StartDate desc
    Sorted by event start date, in descending order
  • StartSession asc
    Sorted by first session date, in ascending order
Example:
GET https://api.wildapricot.org/v2/Accounts/58293/Events?$sort=StartDate asc

Paging

Using the $skip and $top parameters, you can retrieve event records in sets or pages. You use the $top parameter to specify the maximum number of records to be returned, and the $skip parameter to specify the number of records to skip. The $skip parameter is incremented each call to return the next set or page of records.

Example

You want to retrieve records for the 50 events for which registration has been enabled, using an application that can only process 20 records at a time. Using the following calls, the application retrieves the first set of 20 records, then a second set of 20, and finally, the remaining 10 records.

https://api.wildapricot.org/v2/Accounts/58293/Events?$filter=RegistrationEnabled eq true&$skip=0&$top=20
https://api.wildapricot.org/v2/Accounts/58293/Events?$filter=RegistrationEnabled eq true&$skip=20&$top=20
https://api.wildapricot.org/v2/Accounts/58293/Events?$filter=RegistrationEnabled eq true&$skip=40&$top=20

In this example, the $top specifies the maximum number of records to retrieve (20), and the $skip parameter is incremented from 0 to 20 to 40 to skip the records retrieved by the previous call(s).

Updating event details

You can update event details for an existing event using an Events API call.

Syntax
PUT [baseAPIaddress]/v2/Accounts/[accountID]/Events/[eventID]
{
"Id": eventID,
"[eventField]": [eventFieldValue],
"[eventField]": [eventFieldValue],
...
}

where eventField is a field returned by the Events API call.

  • The event ID must be specified and must match the event ID in the URL.
  • If you update the RegistrationsLimit value, you have to provide a value with each future update, or else it will be reset to its default value of null.
  • Read-only fields: HasEnabledRegistrationTypes, PendingRegistrationsCount, ConfirmedRegistrationsCount, CheckedInAttendeesNumber, AccessLevel
Example
PUT https://api.wildapricot.org/v2/Accounts/58293/Events/51369
{
"Id":51369,
"StartDate": "2017-11-15T00:00:00-08:00",
"EndDate": "2017-11-17T00:00:00-08:00",
"Sessions": [
{
"StartDate": "2017-11-15T00:00:00-08:00",
"EndDate": "2017-11-17T00:00:00-08:00",
"StartTimeSpecified": false,
"EndDateSpecified": false
}]
}

An HTTP 400 error will be returned if the event ID is invalid or doesn't match the event ID in the URL. For more information, see API status codes.

Creating a new event

You can use an Events API call to create a new event.

Syntax
POST https://api.wildapricot.org/[version]/Accounts/[accountID]/Events/
{
"[eventField]": [eventFieldValue],
"[eventField]": [eventFieldValue],
...
}

where eventField is a field returned by the Events API call.

  • Required fields: StartDate, Name.
  • Read-only fields: HasEnabledRegistrationTypes, PendingRegistrationsCount, ConfirmedRegistrationsCount, CheckedInAttendeesNumber, AccessLevel
Example
POST https://api.wildapricot.org/{version}/Accounts/{accountID}/Events/
{
"StartDate": "2017-07-05T10:00:00+03:00",
"EndDate": "2017-07-11T18:00:00+03:00",
"Location": "Boston Hilton",
"RegistrationEnabled": true,
"RegistrationsLimit": 100,
"StartTimeSpecified": false,
"EndTimeSpecified": false,
"Name": "Annual General Meeting",
"Tags": [
"meeting",
"agm"
],
"Details": {
"DescriptionHtml": "Join us at our annual general meeting",
"PaymentInstructions": "Please pay online",
"AccessControl": {
"AccessLevel": "Public"
},
"GuestRegistrationSettings": {
"CreateContactMode": "CreateContactForAllGuests"
},
"Organizer": null,
"PaymentMethod": "OnlineOnly",
"RegistrationConfirmationExtraInfo": "additional info for confirmation email",
"RegistrationMessage": "additional info for registration wizard",
"SendEmailCopy": true,
"WaitListBehaviour": "RequestNameAndEmail"
},
"Sessions": [
{
"StartDate": "2017-07-06T10:00:00+03:00",
"EndDate": "2017-07-06T18:00:00+03:00",
"StartTimeSpecified": false,
"EndTimeSpecified": false
},
{
"StartDate": "2017-07-07T10:00:00+03:00",
"EndDate": "2017-07-07T18:00:00+03:00",
"StartTimeSpecified": false,
"EndTimeSpecified": false
},
{
"StartDate": "2017-07-08T10:00:00+03:00",
"EndDate": "2017-07-08T18:00:00+03:00",
"StartTimeSpecified": false,
"EndTimeSpecified": false
}
]
}

If successful, the call returns the new event ID. If unsuccessful, it returns HTTP 400.

Deleting an event

You can use an Events API call to delete an event.

Syntax
DELETE [baseAPIaddress]/v2/Accounts/[accountID]/Events/[eventID]
Example
DELETE https://api.wildapricot.org/v2/Accounts/58293/Events/11769

If the call is successful, it returns HTTP 200 Success. If it is unsuccessful, it returns HTTP 400 bad request.

0 Comments

Please sign in to leave a comment.

Search: WildApricot.com 

About results ( seconds) Sort by: 
Sorry, an error occured when performing search.