Classes and calendars
See API introduction for authentication, request conventions, pagination, rate limits, and errors.
The class list and class tags use optional pagination. Calendar events use a date range instead of pagination.
Classes and events in Activity Messenger are used to manage a roster of participants for camps, classes or activities. A class object looks like this:
{
"id": 1234,
"tags": [],
"name": "Tumbling Class",
"description": "Gymnastics tumbling...",
"maximum_attendance": 20,
"attendance_form_filter": {
"id": null,
"check_today": false,
"check_only_nos": false,
"limit_selection_to_form_ids": null
},
"price": "100.00",
"user_ids": [],
"forms": [
{
"id": 52262,
"name": "Tumbling session",
"purchase_rule": null,
"maximum_attendance": 20,
"price": null,
"tags": [],
"url": "https://activitymessenger.com/p/ABCD123"
},
{
"id": 64415,
"name": "Tumbling Drop-in",
"purchase_rule": "multiple",
"maximum_attendance": 5,
"price": "10.00",
"tags": [],
"url": "https://activitymessenger.com/p/EFGH456"
}
],
"events": [
{
"start": "2026-06-29T13:00:00.000Z",
"end": "2026-06-29T21:00:00.000Z"
}
],
"location": {
"name": "Centre Bell",
"alias": "Ice",
"address": "1909 Av. des Canadiens-de-Montréal, Montréal, QC H3B 2S2"
}
}
The forms array contains registration forms available for participants to register to a class/event. Multiple registration forms are possible. Each form defines the registration rules to the class. In such a way, you can define separate registration forms for session vs drop-in rules. Or you can price them differently.
null: the participant will register to all dates of the classsingle: the participant can only register to one date. Use this to limit to a single drop-in.multiple: the participant can register to multiple dates. Use this to allow multiple drop-ins.
You may optionally pass location. This will create a new location (under E-Commerce, Ressources) or update an existing one by the same name. It will be assigned to the class.
GET /api/v1/organization/{organization}/classes?tags[]={tag}&tags[]={tag}
Retrieve all classes sold by the organization. You may filter by passing a list of tags[] in the query string. Any class matching the passed tags will be returned.
GET /api/v1/organization/{organization}/classes/{class}
Retrieve a class provided its ID.
POST /api/v1/organization/{organization}/classes
Create a new class. Pass this payload. The name attribute is required. The description attribute is nullable. The tags attribute must be an array of 0 or more tags. Tags are case sensitive. Tags that do not exist will be created. The user_ids lists the users (staff) than can access the attendance list of this class. Staff can be managed from the admin portal. The attendance_form_filter object allows you to configure checking that a form was filled. Where id is a form ID as returned by the GET Forms API endpoint. The coach will be able to change the form to check against in the UI. You can set limit_selection_to_form_ids to limit to a specific set of forms. If omitted (null or []), all forms will be selectable.
{
"name": "Tumbling 101",
"description": "Learn to tumble.",
"tags": [
"Summer",
"Gymnastics"
],
"user_ids": [
10210,
34587],
"attendance_form_filter": {
"id": 1234,
"check_today": false,
"check_only_nos": false,
"limit_selection_to_form_ids": [1234, 5678]}
}
PUT /api/v1/organization/{organization}/classes/{class}
Updates a class given the {class} ID. The payload is the same as for create.
DELETE /api/v1/organization/{organization}/classes/{class}
Archives a class give {class} ID. It will no longer be visible in the admin and staff portal. An admin can restore it from the admin portal.
GET /api/v1/organization/{organization}/class_tags
Retrieve all tags defined and used on classes.
Building a class calendar
GET /api/v1/organization/{organization}/class_events?start={YYYY-MM-DD}&end={YYYY-MM-DD}&tags[]={tag}&tags[]={tag}&category_id={category}
Retrieve all class events in a specific date range. Query string parameters start and end are mandatory. Dates are inclusive. You may filter by passing a list of tags[] in the query string. Any class matching the passed tags will be returned. You may also filter by passing a category_id. Both filters are optional. This endpoint is NOT paginated.
Using the GET class_events endpoint you can fetch all class events within a certain date range. The endpoint returns a list of events following the FullCalendar Event object format.
Each event is an occurrence of a class. This is a sample class event:
{
"id": 1234,
"start": "2021-08-31T19:00:00.000000Z",
"end": "2021-08-31T20:00:00.000000Z",
"title": "Tumbling",
"borderColor": null,
"extendedProps": {
"type": "am_event",
"am_class_id": 4567,
"description": "Open enrollment",
"maximum_attendance": 20,
"number_of_spots": 18,
"number_of_events": 10,
"reserved": 2,
"price": "120.00",
"tax_info": {
"display": 120,
"after_tax": 131.97,
"before_tax": 120,
"inclusive_tax": 0,
"exclusive_tax": 11.97,
"tax": 11.97,
"taxes": [
11.97
],
"names": [
"TVQ 9.975%"
],
"inclusive_names": [],
"exclusive_names": [
"TVQ 9.975%"
]
},
"tags": [
"Summer",
"Gymnastics"
],
"forms": [
{
"id": 7890,
"name": "Class payment form",
"purchase_rule": "single",
"maximum_attendance": 10,
"number_of_spots": "8",
"price": null,
"tags": [],
"url": "https://activitymessenger.com/p/BCND123",
"iframe_url": "https://activitymessenger.com/p/i/BCND123"
}
]
}
}
The class has a default price and number of spots. However those can be overridden by the Payment form(s) used to sell the classes. The forms array contains those forms. You should have one button per form. Use the price and number of spots parameters in the form to display on your website. If they are null, fallback to the class ones.
You can sell a class by session or by drop-in. This is configured via the Class/Event question on the payment form itself. Possible values are: null to sell by session, single to sell a single drop-in at a time, and multiple to allow the customer to register to multiple drop-ins. The price parameter defines the selling price for the specified purchase_rule. For example to sell a session for 100$ set price to 100 and set purchase_rule to null. To sell a drop-in for 20$, set purchase_rule to single or multiple, and price to 20.
Classes can be grouped by category. Use the endpoint GET class_categories to retrieve a list. Classes can also be classified using tags. Use the endpoint GET class_tags to retrieve a list of tags. Endpoints to fetch classes and their events can be filtered using a list of tags, or by category.
Note: The tags[] query string to filter uses an OR operator. If you require an AND operator, you will need to process the result yourself.