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.

BASE URL
https://app.amilia.com
/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.

#

Get an activity by 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
CODE SAMPLE JSON
{
  "Id": 11,
  "Name": "Crawl 2",
  "Description": "Crawl intermediaire",
  "ResponsibleName": "Julie Joncas",
  "Prerequisite": "Natation 1",
  "Note": "Vous devez apporter votre planche",
  "ThirdPartyUrl": "third/party",
  "ExtraInformation": "Sujet a contraintes meteo",
  "Url": "activity/url",
  "IsTeam": false,
  "IsTeamRegistration": false,
  "Fee": 0.0,
  "Start": "2022-09-01T00:00:00-04:00",
  "End": "2022-09-01T00:00:00-04:00",
  "LegacyLocation": "rue Decelles",
  "HashId": null,
  "Price": 0.0,
  "DropInPrice": 0.0,
  "Schedule": [
    {
      "StartTime": "00:00:00",
      "EndTime": "00:00:00",
      "StartDate": "2022-09-01T00:00:00-04:00",
      "EndDate": "2022-09-01T00:00:00-04:00",
      "RecurenceEndDate": "2022-09-01T00:00:00-04:00",
      "Occurences": 10,
      "Staff": [],
      "Facilities": [
        {
          "Id": 1,
          "Name": "Natatorium de Verdun",
          "Address": {
            "Telephone": "514 926 8888",
            "AddressLine1": "7000 boul Lasalle",
            "AddressLine2": "Building 2",
            "City": "Verdun",
            "ZipPostalCode": "H4G 1A1",
            "StateProvince": "QC",
            "Country": "Canada",
            "Latitude": 41.3176,
            "Longitude": 135.5858
          }
        }
      ],
      "ExceptOccurences": [
        {
          "StartDate": "2022-09-01T00:00:00-04:00",
          "EndDate": "2022-09-01T00:00:00-04:00"
        }
      ],
      "Days": [
        "Tuesday",
        "Friday"
      ],
      "DayMask": 0
    }
  ],
  "Age": {
    "Max": 99,
    "Min": 0,
    "Months": false
  },
  "TaxCredit": {
    "Artistic": 0.0,
    "Physical": 0.0
  },
  "MaxAttendance": 20,
  "SpotsRemaining": 12,
  "SpotsReserved": 5,
  "RegistrationRevenue": 88.0,
  "SessionRevenue": 7.9228162514264338E+28,
  "DropinRevenue": -7.9228162514264338E+28,
  "MerchandiseRevenue": 0.0,
  "ShortScheduleString": "Sundays 16h-17h",
  "HasSessionEnabled": false,
  "HasDropInEnabled": false,
  "AgeSummary": "0-99",
  "OrganizationId": 0,
  "SubCategoryName": "Intermediaire",
  "ProgramId": 0,
  "CategoryId": 0,
  "SubCategoryId": 0,
  "SubCategoryPosition": 0,
  "Status": "Normal",
  "CategoryName": "Swimming",
  "ProgramName": "Ete 2019 - adultes",
  "PictureUrl": "img/natation.jpg",
  "TagIds": []
}

#

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
CODE SAMPLE JSON
{
  "Items": [
    {
      "Information": {
        "UpdatedOn": "0001-01-01T00:00:00",
        "Alias": "Lili",
        "FriendRequest": "Karina Beaulieu"
      },
      "Id": 0,
      "AmiliaId": "P088011",
      "AccountId": 0,
      "FirstName": "Lydia",
      "LastName": "Lucas",
      "Gender": "NotSpecified",
      "DateOfBirth": "2022-09-01",
      "IsChild": true,
      "Email": "familleL_lucas@gmail.com",
      "Address": {
        "Telephone": "450 555 5555",
        "AddressLine1": "111 1re avenue",
        "AddressLine2": "app. 1",
        "City": "Brossard",
        "ZipPostalCode": "H0H 0H0",
        "StateProvince": "QC",
        "Country": "Canada",
        "Latitude": 45.7312,
        "Longitude": -73.1111
      },
      "PictureId": 444,
      "PictureUrl": "pictures/lydialucas.jpg",
      "Contacts": [
        {
          "Id": 111,
          "FirstName": "Madeleine",
          "LastName": "Lauzon",
          "PhoneNumber": "450 555 5555",
          "Role": "Mother",
          "Relationship": "mother"
        }
      ],
      "Skills": [
        {
          "Id": 0,
          "Name": "Rescue",
          "AwardedDate": "0001-01-01"
        }
      ]
    },
    {
      "Information": {
        "UpdatedOn": "0001-01-01T00:00:00",
        "Alias": "Lili",
        "FriendRequest": "Karina Beaulieu"
      },
      "Id": 0,
      "AmiliaId": "P088011",
      "AccountId": 0,
      "FirstName": "Lydia",
      "LastName": "Lucas",
      "Gender": "NotSpecified",
      "DateOfBirth": "2022-09-01",
      "IsChild": true,
      "Email": "familleL_lucas@gmail.com",
      "Address": {
        "Telephone": "450 555 5555",
        "AddressLine1": "111 1re avenue",
        "AddressLine2": "app. 1",
        "City": "Brossard",
        "ZipPostalCode": "H0H 0H0",
        "StateProvince": "QC",
        "Country": "Canada",
        "Latitude": 45.7312,
        "Longitude": -73.1111
      },
      "PictureId": 444,
      "PictureUrl": "pictures/lydialucas.jpg",
      "Contacts": [
        {
          "Id": 111,
          "FirstName": "Madeleine",
          "LastName": "Lauzon",
          "PhoneNumber": "450 555 5555",
          "Role": "Mother",
          "Relationship": "mother"
        }
      ],
      "Skills": [
        {
          "Id": 0,
          "Name": "Rescue",
          "AwardedDate": "0001-01-01"
        }
      ]
    }
  ],
  "Page": {
    "NextId": 1,
    "Next": "string 1"
  }
}

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
CODE SAMPLE JSON
[
  {
    "Id": 0,
    "AmiliaId": "P095637",
    "SegmentId": 0,
    "FirstName": "Marty",
    "LastName": "McFly",
    "PictureId": 8888,
    "PictureUrl": "marty1985@docbrown.com",
    "Gender": 0,
    "DateOfBirth": "2022-09-01T12:47:27.9198959-04:00",
    "Age": 0,
    "MedicalInformation": {
      "Allergies": {},
      "Sicknesses": {},
      "Reactions": "",
      "MedicationDosage": "",
      "MedicationFrequency": "",
      "MedicationOther": "",
      "OtherAllergy": "",
      "OtherSickness": "",
      "IsPerfectHealth": true,
      "HasSickness": false,
      "HasAllergy": false
    },
    "RegistrationInformation": {
      "UpdatedOn": "0001-01-01T00:00:00",
      "Alias": "MM",
      "FriendRequest": "Doc Brown"
    },
    "Contacts": [
      {
        "FirstName": "Dad",
        "LastName": "McFly",
        "PhoneNumber": "555 555 5555",
        "Role": "father",
        "Relationship": "father"
      },
      {
        "FirstName": "Mom",
        "LastName": "McFly",
        "PhoneNumber": "555 555 5555",
        "Role": "mother",
        "Relationship": "mother"
      }
    ],
    "UpdatedOn": "0001-01-01T00:00:00",
    "Status": "Present",
    "Values": [
      ""
    ],
    "AccountId": 0,
    "ExpectedBalance": 0.0
  },
  {
    "Id": 0,
    "AmiliaId": "P095637",
    "SegmentId": 0,
    "FirstName": "Marty",
    "LastName": "McFly",
    "PictureId": 8888,
    "PictureUrl": "marty1985@docbrown.com",
    "Gender": 0,
    "DateOfBirth": "2022-09-01T12:47:27.9198959-04:00",
    "Age": 0,
    "MedicalInformation": {
      "Allergies": {},
      "Sicknesses": {},
      "Reactions": "",
      "MedicationDosage": "",
      "MedicationFrequency": "",
      "MedicationOther": "",
      "OtherAllergy": "",
      "OtherSickness": "",
      "IsPerfectHealth": true,
      "HasSickness": false,
      "HasAllergy": false
    },
    "RegistrationInformation": {
      "UpdatedOn": "0001-01-01T00:00:00",
      "Alias": "MM",
      "FriendRequest": "Doc Brown"
    },
    "Contacts": [
      {
        "FirstName": "Dad",
        "LastName": "McFly",
        "PhoneNumber": "555 555 5555",
        "Role": "father",
        "Relationship": "father"
      },
      {
        "FirstName": "Mom",
        "LastName": "McFly",
        "PhoneNumber": "555 555 5555",
        "Role": "mother",
        "Relationship": "mother"
      }
    ],
    "UpdatedOn": "0001-01-01T00:00:00",
    "Status": "Present",
    "Values": [
      ""
    ],
    "AccountId": 0,
    "ExpectedBalance": 0.0
  }
]

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
CODE SAMPLE JSON
{
   "Token": "0000aaaa11bbbb4444hh8888rrrr.33dd4455ff.gggg6666"
}

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
CODE SAMPLE JSON
[
  {
    "id": 12,
    "start": "0001-01-01T00:00:00",
    "end": "2022-09-01T00:00:00-04:00",
    "allDay": false,
    "title": "1st week of March",
    "url": "march/week/1st",
    "state": "Normal",
    "Type": "Segment type",
    "Fee": 0.0,
    "AttendanceString": "Attendance string",
    "HasPlaceLeft": false,
    "CanRegister": false,
    "CanUnregister": false,
    "HasPassed": false,
    "HasDropIns": false,
    "PictureUrl": "img/picture.jpg",
    "ExtraInformation": "Bring snacks",
    "IsHidden": false,
    "Day": "Sunday",
    "IsHome": false,
    "IsTeamRegistration": false,
    "IsTeam": false,
    "MaxAttendance": 0,
    "Description": "description string",
    "CalendarSeriesId": 0,
    "Price": 16.0,
    "ActivityId": 0,
    "ActivityName": "Natation - evaluation initiale",
    "SubCategoryId": 0,
    "SubCategoryName": "",
    "CategoryId": 0,
    "CategoryName": "",
    "ProgramId": 0,
    "ProgramName": "Natation",
    "Location": "Bassin 25m",
    "HashId": null,
    "ExtraPoints": null,
    "Facilities": [
      {
        "Id": 1,
        "Name": "Natatorium de Verdun",
        "Address": {
          "Telephone": "514 926 8888",
          "AddressLine1": "7000 boul Lasalle",
          "AddressLine2": "Building 2",
          "City": "Verdun",
          "ZipPostalCode": "H4G 1A1",
          "StateProvince": "QC",
          "Country": "Canada",
          "Latitude": 41.3176,
          "Longitude": 135.5858
        }
      }
    ],
    "Staff": [
      {
        "Id": 0,
        "AmiliaId": "P0478951",
        "Name": "Melvin Melville"
      }
    ],
    "resourceId": 1,
    "Tags": [
      {
        "Id": 1,
        "Activity_Id": 0,
        "Name": "Morning",
        "Color": "orange",
        "Icon": "fa-rocket",
        "IsVisibleToClients": false
      },
      {
        "Id": 2,
        "Activity_Id": 0,
        "Name": "Ginette",
        "Color": "pink",
        "Icon": "fa-umbrella",
        "IsVisibleToClients": false
      }
    ],
    "AttendanceSummary": {
      "PersonCount": 8,
      "StatusCounts": {},
      "ValueCounts": {}
    }
  },
  {
    "id": 12,
    "start": "0001-01-01T00:00:00",
    "end": "2022-09-01T00:00:00-04:00",
    "allDay": false,
    "title": "1st week of March",
    "url": "march/week/1st",
    "state": "Normal",
    "Type": "Segment type",
    "Fee": 0.0,
    "AttendanceString": "Attendance string",
    "HasPlaceLeft": false,
    "CanRegister": false,
    "CanUnregister": false,
    "HasPassed": false,
    "HasDropIns": false,
    "PictureUrl": "img/picture.jpg",
    "ExtraInformation": "Bring snacks",
    "IsHidden": false,
    "Day": "Sunday",
    "IsHome": false,
    "IsTeamRegistration": false,
    "IsTeam": false,
    "MaxAttendance": 0,
    "Description": "description string",
    "CalendarSeriesId": 0,
    "Price": 16.0,
    "ActivityId": 0,
    "ActivityName": "Natation - evaluation initiale",
    "SubCategoryId": 0,
    "SubCategoryName": "",
    "CategoryId": 0,
    "CategoryName": "",
    "ProgramId": 0,
    "ProgramName": "Natation",
    "Location": "Bassin 25m",
    "HashId": null,
    "ExtraPoints": null,
    "Facilities": [
      {
        "Id": 1,
        "Name": "Natatorium de Verdun",
        "Address": {
          "Telephone": "514 926 8888",
          "AddressLine1": "7000 boul Lasalle",
          "AddressLine2": "Building 2",
          "City": "Verdun",
          "ZipPostalCode": "H4G 1A1",
          "StateProvince": "QC",
          "Country": "Canada",
          "Latitude": 41.3176,
          "Longitude": 135.5858
        }
      }
    ],
    "Staff": [
      {
        "Id": 0,
        "AmiliaId": "P0478951",
        "Name": "Melvin Melville"
      }
    ],
    "resourceId": 1,
    "Tags": [
      {
        "Id": 1,
        "Activity_Id": 0,
        "Name": "Morning",
        "Color": "orange",
        "Icon": "fa-rocket",
        "IsVisibleToClients": false
      },
      {
        "Id": 2,
        "Activity_Id": 0,
        "Name": "Ginette",
        "Color": "pink",
        "Icon": "fa-umbrella",
        "IsVisibleToClients": false
      }
    ],
    "AttendanceSummary": {
      "PersonCount": 8,
      "StatusCounts": {},
      "ValueCounts": {}
    }
  }
]

Facilities

Physical places where activities happen

#

Get facilities (locations)

Returns a list of facilities (locations) 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
CODE SAMPLE JSON
[
  {
    "ParentId": 8,
    "TopParentId": 2,
    "AncestorIds": [
      3,
      4
    ],
    "FullName": "Natatorium de Verdun",
    "Description": "Large swimming pool, deep swimming pool, pataugeoire",
    "State": "Normal",
    "Id": 0,
    "Name": "Natatorium",
    "Address": {
      "Telephone": "514 926 8888",
      "AddressLine1": "7000 boul Lasalle",
      "AddressLine2": "Building 2",
      "City": "Verdun",
      "ZipPostalCode": "H4G 1A1",
      "StateProvince": "QC",
      "Country": "Canada",
      "Latitude": 41.3176,
      "Longitude": 135.5858
    }
  },
  {
    "ParentId": 8,
    "TopParentId": 2,
    "AncestorIds": [
      3,
      4
    ],
    "FullName": "Natatorium de Verdun",
    "Description": "Large swimming pool, deep swimming pool, pataugeoire",
    "State": "Normal",
    "Id": 0,
    "Name": "Natatorium",
    "Address": {
      "Telephone": "514 926 8888",
      "AddressLine1": "7000 boul Lasalle",
      "AddressLine2": "Building 2",
      "City": "Verdun",
      "ZipPostalCode": "H4G 1A1",
      "StateProvince": "QC",
      "Country": "Canada",
      "Latitude": 41.3176,
      "Longitude": 135.5858
    }
  }
]

#

Get facility (location) by id

You can get the facility id from /Facilities.


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
CODE SAMPLE JSON
{
  "ParentId": 8,
  "TopParentId": 2,
  "AncestorIds": [
    3,
    4
  ],
  "FullName": "Natatorium de Verdun",
  "Description": "Large swimming pool, deep swimming pool, pataugeoire",
  "State": "Normal",
  "Id": 0,
  "Name": "Natatorium",
  "Address": {
    "Telephone": "514 926 8888",
    "AddressLine1": "7000 boul Lasalle",
    "AddressLine2": "Building 2",
    "City": "Verdun",
    "ZipPostalCode": "H4G 1A1",
    "StateProvince": "QC",
    "Country": "Canada",
    "Latitude": 41.3176,
    "Longitude": 135.5858
  }
}

Programs

A program is a set of activities organized in a hierarchy

#

Get programs

Returns a list of programs 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
CODE SAMPLE JSON
{
  "Items": [
    {
      "Id": 22,
      "Name": "Spring 2019",
      "Start": "0001-01-01",
      "End": "0001-01-01",
      "Url": "spring/2019.com",
      "PictureUrl": "img/spring2019.jpg",
      "Online": false,
      "IsArchived": false,
      "IsVisibleOnAmiliaPages": false,
      "IsTeamSeason": false
    },
    {
      "Id": 22,
      "Name": "Spring 2019",
      "Start": "0001-01-01",
      "End": "0001-01-01",
      "Url": "spring/2019.com",
      "PictureUrl": "img/spring2019.jpg",
      "Online": false,
      "IsArchived": false,
      "IsVisibleOnAmiliaPages": false,
      "IsTeamSeason": false
    }
  ],
  "Page": {
    "NextId": 1,
    "Next": "string 1"
  }
}

#

Get program by id

You can get the program id from /Programs.


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
CODE SAMPLE JSON
{
  "Id": 22,
  "Name": "Spring 2019",
  "Start": "0001-01-01",
  "End": "0001-01-01",
  "Url": "spring/2019.com",
  "PictureUrl": "img/spring2019.jpg",
  "Online": false,
  "IsArchived": false,
  "IsVisibleOnAmiliaPages": false,
  "IsTeamSeason": false
}

#

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
CODE SAMPLE JSON
{
  "Items": [
    {
      "Id": 11,
      "Name": "Crawl 2",
      "Description": "Crawl intermediaire",
      "ResponsibleName": "Julie Joncas",
      "Prerequisite": "Natation 1",
      "Note": "Vous devez apporter votre planche",
      "ThirdPartyUrl": "third/party",
      "ExtraInformation": "Sujet a contraintes meteo",
      "Url": "activity/url",
      "IsTeam": false,
      "IsTeamRegistration": false,
      "Fee": 0.0,
      "Start": "2022-09-01T00:00:00-04:00",
      "End": "2022-09-01T00:00:00-04:00",
      "LegacyLocation": "rue Decelles",
      "HashId": null,
      "Price": 0.0,
      "DropInPrice": 0.0,
      "Schedule": [
        {
          "StartTime": "00:00:00",
          "EndTime": "00:00:00",
          "StartDate": "2022-09-01T00:00:00-04:00",
          "EndDate": "2022-09-01T00:00:00-04:00",
          "RecurenceEndDate": "2022-09-01T00:00:00-04:00",
          "Occurences": 10,
          "Staff": [],
          "Facilities": [
            {
              "Id": 1,
              "Name": "Natatorium de Verdun",
              "Address": {
                "Telephone": "514 926 8888",
                "AddressLine1": "7000 boul Lasalle",
                "AddressLine2": "Building 2",
                "City": "Verdun",
                "ZipPostalCode": "H4G 1A1",
                "StateProvince": "QC",
                "Country": "Canada",
                "Latitude": 41.3176,
                "Longitude": 135.5858
              }
            }
          ],
          "ExceptOccurences": [
            {
              "StartDate": "2022-09-01T00:00:00-04:00",
              "EndDate": "2022-09-01T00:00:00-04:00"
            }
          ],
          "Days": [
            "Tuesday",
            "Friday"
          ],
          "DayMask": 0
        }
      ],
      "Age": {
        "Max": 99,
        "Min": 0,
        "Months": false
      },
      "TaxCredit": {
        "Artistic": 0.0,
        "Physical": 0.0
      },
      "MaxAttendance": 20,
      "SpotsRemaining": 12,
      "SpotsReserved": 5,
      "RegistrationRevenue": 88.0,
      "SessionRevenue": 7.9228162514264338E+28,
      "DropinRevenue": -7.9228162514264338E+28,
      "MerchandiseRevenue": 0.0,
      "ShortScheduleString": "Sundays 16h-17h",
      "HasSessionEnabled": false,
      "HasDropInEnabled": false,
      "AgeSummary": "0-99",
      "OrganizationId": 0,
      "SubCategoryName": "Intermediaire",
      "ProgramId": 0,
      "CategoryId": 0,
      "SubCategoryId": 0,
      "SubCategoryPosition": 0,
      "Status": "Normal",
      "CategoryName": "Swimming",
      "ProgramName": "Ete 2019 - adultes",
      "PictureUrl": "img/natation.jpg",
      "TagIds": []
    },
    {
      "Id": 11,
      "Name": "Crawl 2",
      "Description": "Crawl intermediaire",
      "ResponsibleName": "Julie Joncas",
      "Prerequisite": "Natation 1",
      "Note": "Vous devez apporter votre planche",
      "ThirdPartyUrl": "third/party",
      "ExtraInformation": "Sujet a contraintes meteo",
      "Url": "activity/url",
      "IsTeam": false,
      "IsTeamRegistration": false,
      "Fee": 0.0,
      "Start": "2022-09-01T00:00:00-04:00",
      "End": "2022-09-01T00:00:00-04:00",
      "LegacyLocation": "rue Decelles",
      "HashId": null,
      "Price": 0.0,
      "DropInPrice": 0.0,
      "Schedule": [
        {
          "StartTime": "00:00:00",
          "EndTime": "00:00:00",
          "StartDate": "2022-09-01T00:00:00-04:00",
          "EndDate": "2022-09-01T00:00:00-04:00",
          "RecurenceEndDate": "2022-09-01T00:00:00-04:00",
          "Occurences": 10,
          "Staff": [],
          "Facilities": [
            {
              "Id": 1,
              "Name": "Natatorium de Verdun",
              "Address": {
                "Telephone": "514 926 8888",
                "AddressLine1": "7000 boul Lasalle",
                "AddressLine2": "Building 2",
                "City": "Verdun",
                "ZipPostalCode": "H4G 1A1",
                "StateProvince": "QC",
                "Country": "Canada",
                "Latitude": 41.3176,
                "Longitude": 135.5858
              }
            }
          ],
          "ExceptOccurences": [
            {
              "StartDate": "2022-09-01T00:00:00-04:00",
              "EndDate": "2022-09-01T00:00:00-04:00"
            }
          ],
          "Days": [
            "Tuesday",
            "Friday"
          ],
          "DayMask": 0
        }
      ],
      "Age": {
        "Max": 99,
        "Min": 0,
        "Months": false
      },
      "TaxCredit": {
        "Artistic": 0.0,
        "Physical": 0.0
      },
      "MaxAttendance": 20,
      "SpotsRemaining": 12,
      "SpotsReserved": 5,
      "RegistrationRevenue": 88.0,
      "SessionRevenue": 7.9228162514264338E+28,
      "DropinRevenue": -7.9228162514264338E+28,
      "MerchandiseRevenue": 0.0,
      "ShortScheduleString": "Sundays 16h-17h",
      "HasSessionEnabled": false,
      "HasDropInEnabled": false,
      "AgeSummary": "0-99",
      "OrganizationId": 0,
      "SubCategoryName": "Intermediaire",
      "ProgramId": 0,
      "CategoryId": 0,
      "SubCategoryId": 0,
      "SubCategoryPosition": 0,
      "Status": "Normal",
      "CategoryName": "Swimming",
      "ProgramName": "Ete 2019 - adultes",
      "PictureUrl": "img/natation.jpg",
      "TagIds": []
    }
  ],
  "Page": {
    "NextId": 1,
    "Next": "string 1"
  }
}

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
CODE SAMPLE JSON
{
  "StaffId": 1,
  "GenuinePersonId": 2,
  "PersonId": 3,
  "OrgId": 4
}

StaffAvailability

#

Get staff availabilities


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
CODE SAMPLE JSON
[
  {
    "Id": 0,
    "AvailableDays": [
      {
        "DayOfWeek": 5,
        "Times": [
          {
            "Id": 3,
            "CreationIndex": 784352,
            "StartTime": "10:00:00",
            "EndTime": "17:00:00"
          }
        ]
      },
      {
        "DayOfWeek": 4,
        "Times": [
          {
            "Id": 3,
            "CreationIndex": 784352,
            "StartTime": "10:00:00",
            "EndTime": "17:00:00"
          }
        ]
      }
    ],
    "Name": "Hortense Simon",
    "StartDate": "2022-09-01T00:00:00-04:00",
    "EndDate": "2022-09-01T00:00:00-04:00"
  },
  {
    "Id": 0,
    "AvailableDays": [
      {
        "DayOfWeek": 5,
        "Times": [
          {
            "Id": 3,
            "CreationIndex": 784352,
            "StartTime": "10:00:00",
            "EndTime": "17:00:00"
          }
        ]
      },
      {
        "DayOfWeek": 4,
        "Times": [
          {
            "Id": 3,
            "CreationIndex": 784352,
            "StartTime": "10:00:00",
            "EndTime": "17:00:00"
          }
        ]
      }
    ],
    "Name": "Hortense Simon",
    "StartDate": "2022-09-01T00:00:00-04:00",
    "EndDate": "2022-09-01T00:00:00-04:00"
  }
]

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
CODE SAMPLE JSON
{
  "Title": "Lifeguard",
  "StaffId": 0,
  "OccurrenceId": 0,
  "OrgRewriteUrl": "natatorium-verdun",
  "StartDate": "0001-01-01T00:00:00",
  "EndDate": "0001-01-01T00:00:00",
  "StartTime": "00:00:00",
  "EndTime": "00:00:00",
  "BufferBefore": null,
  "BufferAfter": null,
  "TimeZone": "Eastern Standard Time",
  "Location": "Natatorium de Verdun",
  "AttendanceRole": "None",
  "Type": "Regular"
}

Staff

#

Get all staff in an organization

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
CODE SAMPLE JSON
[
  {
    "Tags": [
      {
        "Id": 1,
        "Name": "Evening"
      }
    ],
    "Id": 676767,
    "FirstName": "Rosalie",
    "LastName": "Tétreault",
    "FullName": "Rosalie Tétreault",
    "Gender": "Female",
    "DateOfBirth": "2022-09-01",
    "Email": "ro@mymail.ca",
    "Address": {
      "Latitude": 45.72,
      "Longitude": -73.5,
      "Address1": "888 rue des Ormes",
      "Address2": "Appartement A",
      "City": "Longueuil",
      "Country": "Canada",
      "StateProvince": "QC",
      "ZipPostalCode": "J4J 4J4"
    },
    "Telephone": "450 555 5555",
    "TelephoneMobile": "438 555 5555",
    "TelephoneWork": "514 555 5555",
    "TelephoneWorkExtension": "333"
  },
  {
    "Tags": [
      {
        "Id": 1,
        "Name": "Evening"
      }
    ],
    "Id": 676767,
    "FirstName": "Rosalie",
    "LastName": "Tétreault",
    "FullName": "Rosalie Tétreault",
    "Gender": "Female",
    "DateOfBirth": "2022-09-01",
    "Email": "ro@mymail.ca",
    "Address": {
      "Latitude": 45.72,
      "Longitude": -73.5,
      "Address1": "888 rue des Ormes",
      "Address2": "Appartement A",
      "City": "Longueuil",
      "Country": "Canada",
      "StateProvince": "QC",
      "ZipPostalCode": "J4J 4J4"
    },
    "Telephone": "450 555 5555",
    "TelephoneMobile": "438 555 5555",
    "TelephoneWork": "514 555 5555",
    "TelephoneWorkExtension": "333"
  }
]

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.

#

Get tags

Returns a list of tags 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
CODE SAMPLE JSON
[
  {
    "Id": 0,
    "Name": "Morning",
    "Color": "yellow",
    "Icon": "fa-ticket"
  },
  {
    "Id": 0,
    "Name": "Morning",
    "Color": "yellow",
    "Icon": "fa-ticket"
  }
]

#

Get a tag by id

You can get the tag id from /Tags.


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
CODE SAMPLE JSON
{
  "Id": 0,
  "Name": "Morning",
  "Color": "yellow",
  "Icon": "fa-ticket"
}