Badges API: Sample Use Case and Flow

This article presents a possible use case and a corresponding sample flow that you can support. This can be a helpful jumping off point as you plan your implementation.

Assign badges for the most active members

You can assign badges to members based on how many bookings they have in the past 6 months.

  1. Call List Members to retrieve a full list of a site's members and their contact IDs.
  2. Call Query Extended Bookings filtered by a startDate of 6 months ago and sort by contactDetails.contactId. Count the amount of bookings per contact and save the specific members with the amount of bookings to earn the badge.
  3. Call Create Badge to create a badge for members with the most bookings.
  4. Call Assign Badge To Members to assign the badge to these specific members.
Did this help?