API v2 reference
The Amilia API allows an organization or partner to fetch data for reporting and integration. It also allows pushing information to Amilia. The API follows RESTful principles and returns JSON.
/PublicApi/{rewriteUrl}/{language}/
Activities
In Amilia, an activity is a class or specific offering. Other systems may call this a program, whereas in Amilia a program is a container of similar activities.
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Activity id |
Required |
#
Get persons by activity id
You can get the activity id from /Events.
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Activity id |
Required |
limit (integer) |
Pagination limit in number of results per page. Min value is 5, max value is 250. Default is 250 |
Optional |
idStart (integer) |
Starting item id to return in pagination. Default is 0 |
Optional |
Attendance
List of persons who registered for an event ( )
#
Get a list of attendance for persons registered for an event (occurrence)
The id in Attendance/{id} refers to an event (occurrence) and you can get it from /Events. Returns a list of people along with their attendance status and list of user-defined values. Attendance status has possible values None and Present.
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Occurrence id |
Required |
Authentication
#
Authenticate the user in the API
Note that the call (written with the full path below) does not contain the {rewriteUrl} parameter.
PARAMETERS | ||
---|---|---|
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
Events
An event (occurrence) is an activity unit in a unique time slot
#
Get activity events (occurrences)
The result can include different states of occurrences, namely:
Normal: is scheduled
Skipped: the specific occurrence was skipped due to a conflict with a holiday or manually by an administrator
Cancelled: the activity was cancelled, therefore this occurrence too
Archived: the activity was cancelled, but there was registration linked to this occurrence.
The URL is a link to the activity's page in the store.
This can be useful if you want to display the occurrences in a calendar and refer to the registration page of the activity.
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
start (date) |
Inclusive start limit of a date range filter. Format is YYYY-MM-DD. When both start and end are omitted, returns events for today |
Optional |
end (date) |
Inclusive end limit of a date range filter. Format is YYYY-MM-DD. If end is omitted, retrieves only for one day specified by start |
Optional |
programId (integer) |
Id of the program in which the event is. Default value is null |
Optional |
showHidden (boolean) |
Option to return hidden items. Default value is False |
Optional |
onlyTeam (boolean) |
Option to return only team activities. Default value is False |
Optional |
showImages (boolean) |
Default value is True |
Optional |
Facilities
Physical places where activities happen
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Facility id |
Required |
Programs
A program is a set of activities organized in a hierarchy
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Program id |
Required |
#
Get activities by program id
Returns a list of ordered by id, with the option to show hidden activities
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Program id |
Required |
limit (integer) |
Pagination limit in number of results per page. Min value is 5, max value is 250. Default is 250 |
Optional |
idStart (integer) |
Starting item id to return in pagination. Default is 0 |
Optional |
showHidden (boolean) |
Option to return hidden items. Default value is False |
Optional |
Staff
#
Get staff members for the user account
Returns a list of staff members ordered by id
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (string) |
Staff id |
Required |
StaffAvailability
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (string) |
Staff availability id |
Required |
StaffSchedule
#
Get staff schedule for the current user account
Returns a list of events corresponding to the schedule of the staff associated with the current user account
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (string) |
Staff schedule id |
Required |
Staff
#
Get all staff in an organization
A staff is a person that can be assigned to events such as: activities, private lessons, bookings or contracts. The endpoint returns a list of staff members ordered by id.
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (string) |
Id of the item before the /{id} in the url |
Required |
page (integer) |
Result page number that appears first. Default value is 1 |
Optional |
perPage (integer) |
Number of results per page. Default value is 200 |
Optional |
Tags
The tags API allows you to retrieve the list of tags you have defined in Amilia. You can then fetch activities provided a tag. Tags can be defined in your Amilia Account under Tags and then attached to your activities.
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
PARAMETERS | ||
---|---|---|
rewriteUrl (string) |
Unique, url-friendly organization token. Part of base url |
Required |
language (string) |
Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en' |
Required |
id (integer) |
Tag id |
Required |