API v3 reference - partner

Version 3 of the Amilia API is the latest supported version. If you are using an older version, we recommend you switch to this one.

BASE URL
https://www.amilia.com/api/v3/{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
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
showTaxes (boolean)

Default value is False

Optional
CODE SAMPLE JSON
{
  "Description": "Soccer outdoors on Fridays 16h-17h",
  "Prerequisite": "Must have passed soccer I",
  "Note": "Bring snacks, tie your hair, no jewelry",
  "ThirdPartyUrl": "merch/soccer",
  "AdditionalInformation": "Bring more snacks",
  "Price": 0.0,
  "DropInPrice": 0.0,
  "Age": {
    "Max": 17,
    "Min": 7,
    "Months": false
  },
  "MaxAttendance": 24,
  "SpotsRemaining": 2,
  "SpotsReserved": 7,
  "NumberOfOccurrences": 0,
  "StartDate": "2020-08-13T00:00:00-04:00",
  "EndDate": "2020-08-13T00:00:00-04:00",
  "ScheduleSummary": "Fridays 16h-17h, 2 May to 27 August",
  "HasSessionEnabled": false,
  "HasDropInEnabled": false,
  "AgeSummary": "7-17",
  "Keywords": [
    {
      "Id": 88,
      "Name": "Soccer"
    }
  ],
  "Groups": [
    {
      "Id": 3,
      "Name": "Melanie"
    },
    {
      "Id": 4,
      "Name": "Doris"
    }
  ],
  "OrganizationId": 0,
  "PictureUrl": "activity/picture.jpg",
  "RegistrationPeriods": null,
  "Id": 0,
  "Name": "Soccer II",
  "ProgramId": 0,
  "ProgramName": "Summer 2019",
  "CategoryId": 56783,
  "CategoryName": "Soccer",
  "SubCategoryId": 56786,
  "SubCategoryName": "",
  "Url": "soccer/2019/fridays",
  "Status": "Normal"
}

#

Get an activity's occurrences

Returns a list of activity (events), with the option to define a start and end date and to show those that have been edited


PARAMETERS
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
showEdited (boolean)

Option to show items that have been modified.

Default value is False

Optional
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
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
[
  {
    "ActivityId": 0,
    "Start": "2020-08-13T00:00:00-04:00",
    "End": "2020-08-13T00:00:00-04:00",
    "State": "Normal",
    "Id": 0,
    "Location": {
      "Id": 0,
      "Name": "Natatorium de Verdun"
    },
    "Staff": []
  },
  {
    "ActivityId": 0,
    "Start": "2020-08-13T00:00:00-04:00",
    "End": "2020-08-13T00:00:00-04:00",
    "State": "Normal",
    "Id": 0,
    "Location": {
      "Id": 0,
      "Name": "Natatorium de Verdun"
    },
    "Staff": []
  }
]

Authentication

#

Authenticate the user in the API

Returns a token to be used for all other calls. Note that the call (written with the full path below) does not contain the {language} parameter


There are no parameters for this call.

CODE SAMPLE JSON
{
   "Token": "0000aaaa11bbbb4444hh8888rrrr.33dd4455ff.gggg6666" 
}

Keywords

Keywords summarize specific types of and are related to

#

Get keywords

Returns a list of supported keywords, with the option to specify a partner name


PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
partner (string)

Partner name. Default value is null

Optional
CODE SAMPLE JSON
[
  {
    "Id": 0,
    "Name": "Skiing",
    "ParentVerticalId": 842
  },
  {
    "Id": 0,
    "Name": "Skiing",
    "ParentVerticalId": 842
  }
]

#

Get a keyword

Returns an individual keyword by id, with the option to specify a partner name


PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
id (integer)

Keyword id

Required
partner (string)

Partner name. Default value is null

Optional
CODE SAMPLE JSON
{
  "Id": 0,
  "Name": "Skiing",
  "ParentVerticalId": 842
}

Locations

Physical places where activities happen

#

Get locations

You must specify area type and coordinates. You also have the option to specify a radius and an activity keyword id. You can also show children locations that have the given keyword


PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
type (string)

Shape of search area: circle (search by Radius), rectangle (search by BoundingBox) or polygon (search by Polygon).

Required
coordinates (list of doubles)

Pairs of points on a 2D map. Each pair has the format 45.00,73.00. Extra pairs are appended with a comma like so: 45.00,73.00,10.00,10.00. In the search by BoundingBox, the rectangle is defined by its top-left and bottom-right coordinates (so four numbers).In the search by Polygon, the polygon is defined by all its coordinates (an even number of numbers, and more than four numbers). The polygon points must be ordered either clockwise or counterclockwise to prevent the enclosed area from folding over itself and give unexpected results.

Required
radius (integer)

In the search by Radius, the circle is defined by its radius in km. Default value is null

Optional
keywordId (integer)

Activity keyword id. Default value is null

Optional
showChildrenKeywords (boolean)

Option to also show children locations containing the given keywords

Default value is False

Optional
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
[
  {
    "FullName": "Natatorium de Verdun",
    "Description": "Piscines profonde et moyenne, pataugeoire",
    "Telephone": "514 555 1111",
    "TelephoneExtension": "324",
    "ParentId": 5432,
    "TopParentId": 33,
    "AncestorIds": [
      5432,
      6852,
      33
    ],
    "Keywords": [
      {
        "Id": 34,
        "Name": "Swimming"
      },
      {
        "Id": 41,
        "Name": "Rescue"
      }
    ],
    "Address": {
      "Latitude": 45.72,
      "Longitude": -73.5,
      "Address1": "9000 boul. Lasalle",
      "Address2": "",
      "City": "Montreal",
      "Country": "Canada",
      "StateProvince": "QC",
      "ZipPostalCode": "H4E 1P4"
    },
    "Id": 0,
    "Name": "Natatorium"
  },
  {
    "FullName": "Natatorium de Verdun",
    "Description": "Piscines profonde et moyenne, pataugeoire",
    "Telephone": "514 555 1111",
    "TelephoneExtension": "324",
    "ParentId": 5432,
    "TopParentId": 33,
    "AncestorIds": [
      5432,
      6852,
      33
    ],
    "Keywords": [
      {
        "Id": 34,
        "Name": "Swimming"
      },
      {
        "Id": 41,
        "Name": "Rescue"
      }
    ],
    "Address": {
      "Latitude": 45.72,
      "Longitude": -73.5,
      "Address1": "9000 boul. Lasalle",
      "Address2": "",
      "City": "Montreal",
      "Country": "Canada",
      "StateProvince": "QC",
      "ZipPostalCode": "H4E 1P4"
    },
    "Id": 0,
    "Name": "Natatorium"
  }
]

#

Get activities by location

You can get the location id from /locations. Returns a list of taking place at the given location, with the option to show hidden and cancelled activities as well as activities in children locations, and to specify an activity keyword id and children locations containing the given keyword. It's possible to sort this list on the Id, Name or Date field.


PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
id (integer)

Location id

Required
showHidden (boolean)

Option to return hidden items.

Default value is False

Optional
showCancelled (boolean)

Option to also return cancelled items.

Default value is False

Optional
showChildrenActivities (boolean)

Option to also show activities in children locations.

Default value is False

Optional
keywordId (integer)

Activity keyword id. Default value is null

Optional
showChildrenKeywords (boolean)

Option to also show children locations containing the given keywords

Default value is False

Optional
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
sortBy (string)

Value to sort by. Can be id, name or date.

Default value is id

Optional
CODE SAMPLE JSON
[
  {
    "Description": "Soccer outdoors on Fridays 16h-17h",
    "Prerequisite": "Must have passed soccer I",
    "Note": "Bring snacks, tie your hair, no jewelry",
    "ThirdPartyUrl": "merch/soccer",
    "AdditionalInformation": "Bring more snacks",
    "Price": 0.0,
    "DropInPrice": 0.0,
    "Age": {
      "Max": 17,
      "Min": 7,
      "Months": false
    },
    "MaxAttendance": 24,
    "SpotsRemaining": 2,
    "SpotsReserved": 7,
    "NumberOfOccurrences": 0,
    "StartDate": "2020-08-13T00:00:00-04:00",
    "EndDate": "2020-08-13T00:00:00-04:00",
    "ScheduleSummary": "Fridays 16h-17h, 2 May to 27 August",
    "HasSessionEnabled": false,
    "HasDropInEnabled": false,
    "AgeSummary": "7-17",
    "Keywords": [
      {
        "Id": 88,
        "Name": "Soccer"
      }
    ],
    "Groups": [
      {
        "Id": 3,
        "Name": "Melanie"
      },
      {
        "Id": 4,
        "Name": "Doris"
      }
    ],
    "OrganizationId": 0,
    "PictureUrl": "activity/picture.jpg",
    "RegistrationPeriods": null,
    "Id": 0,
    "Name": "Soccer II",
    "ProgramId": 0,
    "ProgramName": "Summer 2019",
    "CategoryId": 56783,
    "CategoryName": "Soccer",
    "SubCategoryId": 56786,
    "SubCategoryName": "",
    "Url": "soccer/2019/fridays",
    "Status": "Normal"
  },
  {
    "Description": "Soccer outdoors on Fridays 16h-17h",
    "Prerequisite": "Must have passed soccer I",
    "Note": "Bring snacks, tie your hair, no jewelry",
    "ThirdPartyUrl": "merch/soccer",
    "AdditionalInformation": "Bring more snacks",
    "Price": 0.0,
    "DropInPrice": 0.0,
    "Age": {
      "Max": 17,
      "Min": 7,
      "Months": false
    },
    "MaxAttendance": 24,
    "SpotsRemaining": 2,
    "SpotsReserved": 7,
    "NumberOfOccurrences": 0,
    "StartDate": "2020-08-13T00:00:00-04:00",
    "EndDate": "2020-08-13T00:00:00-04:00",
    "ScheduleSummary": "Fridays 16h-17h, 2 May to 27 August",
    "HasSessionEnabled": false,
    "HasDropInEnabled": false,
    "AgeSummary": "7-17",
    "Keywords": [
      {
        "Id": 88,
        "Name": "Soccer"
      }
    ],
    "Groups": [
      {
        "Id": 3,
        "Name": "Melanie"
      },
      {
        "Id": 4,
        "Name": "Doris"
      }
    ],
    "OrganizationId": 0,
    "PictureUrl": "activity/picture.jpg",
    "RegistrationPeriods": null,
    "Id": 0,
    "Name": "Soccer II",
    "ProgramId": 0,
    "ProgramName": "Summer 2019",
    "CategoryId": 56783,
    "CategoryName": "Soccer",
    "SubCategoryId": 56786,
    "SubCategoryName": "",
    "Url": "soccer/2019/fridays",
    "Status": "Normal"
  }
]

#

Get a location

You can get the location id from /locations.


PARAMETERS
language (string)

Language in which the localizable values should be returned. Part of base url. Value is either 'fr' or 'en'

Required
id (integer)

Location id

Required
CODE SAMPLE JSON
{
  "FullName": "Natatorium de Verdun",
  "Description": "Piscines profonde et moyenne, pataugeoire",
  "Telephone": "514 555 1111",
  "TelephoneExtension": "324",
  "ParentId": 5432,
  "TopParentId": 33,
  "AncestorIds": [
    5432,
    6852,
    33
  ],
  "Keywords": [
    {
      "Id": 34,
      "Name": "Swimming"
    },
    {
      "Id": 41,
      "Name": "Rescue"
    }
  ],
  "Address": {
    "Latitude": 45.72,
    "Longitude": -73.5,
    "Address1": "9000 boul. Lasalle",
    "Address2": "",
    "City": "Montreal",
    "Country": "Canada",
    "StateProvince": "QC",
    "ZipPostalCode": "H4E 1P4"
  },
  "Id": 0,
  "Name": "Natatorium"
}