API: filter getParticipants by participant type?

Our goal is to extract the number of participants by participation type.

The only solution I can find is to make an API call for each registration (getRegistration), so I'm hoping I could instead use getParticipants and filter it by participation type, since this call returns a “total number of records” value. But I am unable to get the filter to work.

I've found that “&list_filter_column=type” is an accepted value (as in the API doesn't reject it), so I'm hoping that's the participation type column, but I cannot figure out what "&list_filter_text=" should be.

I've tried the following values for the filter text:

  • a participation type ID (eg. 12345) , which errors out the API response (as any number value does)
  • a participation type Name (eg. Volunteer), which returns zero results (despite there being participants registered in that type)

This is the basic structure of the call I'm using:

luminateExtend.api({
api: 'teamraiser',
data:
'method=getParticipants' +
'&fr_id=1234' +
'&response_format=json' +
'&first_name=%25%25%25' +
'&last_name=' +
'&list_filter_column=type' +
'&list_filter_text=Volunteer',
callback: {
success: (response) => {
console.log('getParticipants success', response)
},
error: (err) => {
console.log('getParticipants error: ' + err);
reject(err);
},
},
});

Any help would be greatly appreciated!

Tagged:

Comments

  • I found that the getParticipationTypes method includes a count of current registrations by type if and only if the participation type has a limit set, in which case the returned participationType js object has a property called participationTypeRegistrationLimit, which includes within it the current count.

    Unfortunately now there's a bug where getParticipationTypes seems to return a blank object if there are too many participation types…

Categories