Follow

EventRegistrationTypes API call

You can use the EventRegistrationTypes API call to retrieve the details for an existing event registration type, or for all existing event registration type within an event. You can also create, update, and delete event registration types.

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.

Retrieving details for an event registration type

Using the EventRegistrationTypes API call, you can retrieve details for an existing registration type.

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/EventRegistrationTypes/[typeID]
Example:
GET https://api.wildapricot.org/v2/Accounts/58293/EventRegistrationTypes/136850

Retrieving registration type details for an event

Using the EventRegistrationTypes API call, you can retrieve details for all registration types for a particular event.

Syntax
GET [baseAPIaddress]/v2/Accounts/[accountID]/EventRegistrationTypes?eventId=[eventID]
Example:
GET https://api.wildapricot.org/v2/Accounts/58293/EventRegistrationTypes?eventId=136850

Parameters

The following parameters are used within the EventRegistrationTypes 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.

typeID
The unique identifier for an event registration type. Registration types IDs are returned by the EventRegistrationTypes 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

If the call is unsuccessful, it returns HTTP 400. If successful, it retrieves the following information.

Availability
Indicates whether this registration type is available to everyone, just certain membership levels, or to anyone with the registration code. Possible values are: Everyone, MembersOnly, CodeRequired

AvailableForMembershipLevels
(If Availability = MembersOnly) Indicates which membership levels can use this registration type.

AvailableFrom
The date the registration type is available through. Possible values include null.

AvailableThrough
The date the registration type is available until. Possible values include null.

BasePrice
Base price for the registration type.

CancellationBehaviour
Indicates whether registrants are allowed to cancel their own registrations for this registration type. Possible values:

  • DoNotAllow
  • AllowUpToPeriodBeforeEvent
  • Allow

CancellationDaysBeforeEvent
Indicates the number of days before the event that registrants are allowed to cancel their own registrations. To set this to null, send a value of zero.

CurrentRegistrantsCount
Current number of registrants for this registration type.

Description
Description of the registration type.

EventID
Unique identifier of the event.

GuestRegistrationPolicy
Indicates whether registrants can register guests at the same time that they submit their own registration. Possible values are:

  • Disabled – guest registration is not allowed.
  • NumberOfGuests – specify just the number of guests.
  • CollectContactDetails – contact information collected for each guest.
  • CollectFullInfo – full registration information collected for each guest.

GuestPrice
Price for guest registrations.

ID
The unique identifier of the registration type.

IsEnabled
Indicates whether the registration type is enabled.

MaximumRegistrantsCount
The maximum number of registrants for this registration type.

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

Name
The name used to identify the registration type.

RegistrationCode
(If Availability = CodeRequired) The registration code.

UnavailabilityPolicy
Indicates what appears if this registration type is not available for a particular visitor. Possible values are:

  • ShowDisabled
  • Hide

URL
The address of the URL call for the registration type.

UseTaxScopeSettings
Indicates whether tax scope settings are followed for this registration type.

WaitlistBehaviour
Indicates whether prospective registrants can join a waitlist after the registration limit is reached for this type, and how much information is collected from people wanting to join the waitlist. Possible values are:

  • Disabled
  • RequestNameAndEmail
  • RequestContactInformation
  • RequestRegistrationInformation

Sample JSON response

 {
"EventId": 51377,
"IsEnabled": true,
"Description": "",
"BasePrice": 30,
"GuestPrice": 30,
"UseTaxScopeSettings": false,
"Availability": "Everyone",
"AvailableForMembershipLevels": null,
"GuestRegistrationPolicy": "Disabled",
"CurrentRegistrantsCount": 0,
"MultipleRegistrationAllowed": true,
"WaitlistBehaviour": "Undefined",
"UnavailabilityPolicy": "ShowDisabled",
"Id": 136850,
"Url": "http://api.env8.bonasource.com/v2/accounts/13703/EventRegistrationTypes/136850",
"Name": "Non-members"
}

Sample XML response

<EventRegistrationType xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://api.wildapricot.org">
<Id>136850</Id>
<Url>http://api.env8.bonasource.com/v2/accounts/13703/EventRegistrationTypes/136850</Url>
<Name>Members</Name>
<Availability>Everyone</Availability>
<AvailableForMembershipLevels i:nil="true" />
<AvailableFrom xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" />
<AvailableThrough xmlns:d2p1="http://schemas.datacontract.org/2004/07/System" i:nil="true" />
<BasePrice>30.0000</BasePrice>
<CurrentRegistrantsCount>1</CurrentRegistrantsCount>
<Description>
</Description>
<EventId>51377</EventId>
<GuestPrice>30.0000</GuestPrice>
<GuestRegistrationPolicy>Disabled</GuestRegistrationPolicy>
<IsEnabled>true</IsEnabled>
<MaximumRegistrantsCount i:nil="true" />
<MultipleRegistrationAllowed>true</MultipleRegistrationAllowed>
<RegistrationCode i:nil="true" />
<UnavailabilityPolicy>ShowDisabled</UnavailabilityPolicy>
<UseTaxScopeSettings>false</UseTaxScopeSettings>
<WaitlistBehaviour>Undefined</WaitlistBehaviour>
</EventRegistrationType>

Creating a new registration type

You can use an EventRegistrationTypes API call to create a new event registration type.

Syntax
POST [baseAPIaddress]/v2/Accounts/[accountID]/EventRegistrationTypes
{
"[registrationTypeField]": [registrationTypeFieldValue],
"[registrationTypeField]": [registrationTypeFieldValue],
...
}

where registrationTypeField is a field returned by the EventRegistrationTypes API call.

The registration type Name and the event ID are required.
Example
POST https://api.wildapricot.org/v2/Accounts/58293/EventRegistrationTypes
{
"Name": "Free",
"EventId": 51258,
"IsEnabled": true,
"Description": "free for all",
"BasePrice": 0.0,
"GuestPrice": 0.0,
"UseTaxScopeSettings": true,
"Availability": "Everyone",
"AvailableFrom": "2016-06-15T00:00:00+03:00",
"AvailableThrough": "2016-06-25T00:00:00+03:00",
"GuestRegistrationPolicy": "Disabled",
"MaximumRegistrantsCount": 10,
"MultipleRegistrationAllowed": false,
"WaitlistBehaviour": "Disabled",
"UnavailabilityPolicy": "Hide"
}

If successful, the call will return the new event registration type ID.

If any of the required fields are missing, or if any of the fields include invalid data, a 400 Bad Request error will be returned. For more information, see API status codes.

Updating a registration type

You can update an existing registration type using an EventRegistrationTypes API call.

Syntax
PUT [baseAPIaddress]/v2/Accounts/[accountID]/EventRegistrationTypes/[typeID]
{
"Id": typeID,
"[registrationTypeField]": [registrationTypeFieldValue],
"[registrationTypeField]": [registrationTypeFieldValue],
...
}

where registrationTypeField is a field returned by the EventRegistrationTypes API call.

  • The registration type ID must be specified both as a field and within the requesting URL. All other registration type fields are optional.
  • You cannot update the eventID
  • If you update UseTaxScopeSettings, AvailableFrom, or AvailableThrough, you have to provide values with each future update, or else they will be reset to their default values of false and null, respectively.
Example
PUT https://api.wildapricot.org/v2/Accounts/58293/EventRegistrations/112745
{
"Id":29522,
"Description": "free for all",
"BasePrice": 0.0,
"GuestPrice": 0.0,
"UseTaxScopeSettings": true,
"Availability": "Everyone",
"AvailableFrom": "2016-06-15T00:00:00+03:00",
"AvailableThrough": "2016-06-25T00:00:00+03:00",
}

If successful, the call returns an HTTP status code 200 without any data in the response body.

Deleting a registration type

You can use an EventRegistrationTypes API call to delete an existing registration type.

Syntax
DELETE [baseAPIaddress]/v2/Accounts/[accountID]/EventRegistrationTypes/[typeID]

where typeID is the ID of the event registration type you want to delete.

Example
DELETE https://api.wildapricot.org/v2/Accounts/58293/EventRegistrationTypes/29522

If successful, the call returns HTTP 200 Success. If unsuccessful, 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.