Regulations and cycles (Lära)

TABLE OF CONTENTS
Cycle/getlist
Cycle/getperiodlist
Cycle/getuserprogress
Cycle/getmemberstatuses
Cycle/updatememberstatuses
Cycle/updatememberstatus
Cycle/changecurrentmemberstatus
Cycle/getperiodstatuseslist
Cycle/getupdateduserprogress
Cycle error code descriptions

CYCLES

The "cycles" in the API correspond to "regulations" in Lära LMS, which are a set of regulatory cycles containing requirements to be met by the users who are subject to them, and which are named in the API "period".

Cycle/getlist

Returns all the regulations for an organization.
API call address : https://.../lmsapi/cycle/getlist

Request

Example of request call content for the list of regulations for an organization*:

{}

* No field is required.

Response

Example of response call content for the list of regulations for an organization: 

[
    {
        "id": "kXDPpcwin05pz%2abcd3uMhUcA%3d%3d",
        "adminName": "Règlement",
        "useMembershipStatuses": false,
        "isActive": true,
        "isDeleted": false
    },
    {
        "id": "BD3xLibLkQkY0lZrxBxqw1%3d%3d",
        "adminName": "Mon Assistance",
        "useMembershipStatuses": true,
        "isActive": false,
        "isDeleted": false
    },
]

Field descriptions

Name

Required

Comments/description

id

 

Unique identifier of the regulation. (String type) 

adminName

 

Administrative name of the regulation as seen by administrators in the system. 

useMembershipStatuses

Boolean indicating whether or not the membership date ranges of the users subject to the requirements of the regulatory cycle will be taken into account. If this option is disabled, the calculation of the requirements will not take the members' membership date ranges into account.

duplicateRecognition
Limitation on the recognition of courses within the regulation
  • 0 = No limitation
  • 1 = Recognize the same course only once per cycle
  • 2 = Recognize the same course only once within the entire regulation

(Type Number)

equivalenceRecognition
Limitation on the recognition of equivalences within the regulation
  • 1 = Recognize equivalences within the same cycle
  • 2 = Recognize equivalences within the entire regulation

(Type Number)

isActive

 

Boolean indicating whether or not the regulation is enabled.

isDeleted

 

Boolean indicating whether or not the regulation is deleted.

Cycle/getperiodlist

Returns all the regulatory cycles of the selected regulation.
API call address : https://.../lmsapi/cycle/getperiodlist

Request

Example of request call content for the list of cycles of a regulation for an organization:

{
  "id": "vBW5xMw1VQ2A8DFaNy22zA",
  "filterDate": "2020-01-01T00:00:00Z"
}

Field descriptions

Name
Required
Comment/description
id
X
Unique identifier of the regulation. (String type)
filterDate

Minimum start date of the regulatory cycle 

(String type): YYYY-MM-DDTHH:MM:SSZ

Response

Example of response call content for the list of cycles of a regulation for an organization: 

[
    {
        "id": "m1V3F8viyukyu8bSXg45m3pOA%3d%3d",
        "adminName": "Règlement - 2022-2023",
        "startDate": "2022-05-31T00:00:00",
        "isAccessibleBeforeStart": true,
        "duration": 2,
        "durationUnit": 4,
        "isRequirementsShown": false,
        "hideTypesWithNoCredit": false,
        "hideCategoriesWithNoCredit": false,
        "ruleId": "aRYKMpUwyGhukzQNTHp21A%3d%3d",
        "isUserStatement": true,
        "isActive": true,
        "isDeleted": false,
        "requirements": [
            {
                "id": "nNjP3%2bb2EMyuo318lYvydmA%3d%3d",
                "cyclePeriodId": "m1V3F8viyukyu8bSXg45m3pOA%3d%3d",
                "type": 1,
                "targetValue": 40.0,
                "parentId": "",
                "ruleId": "",
                "providerId": ""
            }
        ]
    },
    {
        "id": "h98PuYEznoKoyuulo2n73Eg%3d%3d",
        "adminName": "Règlement - 2024-2025",
        "startDate": "2024-04-01T00:00:00",
        "isAccessibleBeforeStart": true,
        "duration": 2,
        "durationUnit": 4,
        "isRequirementsShown": false,
        "hideTypesWithNoCredit": false,
        "hideCategoriesWithNoCredit": false,
        "ruleId": "aRYKMpUwBJbyNTHuky21A%3d%3d",
        "isUserStatement": true,
        "isActive": false,
        "isDeleted": false,
        "requirements": [
            {
                "id": "j9XoGU3mn7f5K7vuvyuiyu%3d%3d",
                "cyclePeriodId": "h98PuYyuiyuiyur2n73Eg%3d%3d",
                "type": 1,
                "targetValue": 30.0,
                "parentId": "",
                "ruleId": "",
                "providerId": ""
            }
        ]
    },
[

Field descriptions

Name

Required

Comments/description

adminName

 

Administrative name of the cycle as seen by administrators in the system. 

startDate

 

Start date of the cycle.

isAccessibleBeforeStart

Boolean indicating whether or not access to the cycle is allowed before its start date.

duration

 

Duration of the cycle in hours, days, weeks, months or years, depending on the "durationUnit" selected.

durationUnit

 

Unit of measure of the duration.

  • 0 = hours
  • 1 = days
  • 2 = weeks
  • 3 = months
  • 4 = years

isRequirementsShown

 

Boolean indicating whether or not the requirements are displayed to users.

hideTypesWithNoCredit
Boolean indicating whether a type without a completed credit and/or hour is displayed in the credit/hour distribution of the user record
hideCategoriesWithNoCredit
Boolean indicating whether a category without a completed credit and/or hour is displayed in the credit/hour distribution of the user record

ruleId

 

Rules for assigning users to the cycle. (String type)

isUserStatement

 

Boolean indicating whether or not a solemn declaration is required.

isActive

 

Boolean indicating whether or not the cycle is enabled.

isDeleted

 

Boolean indicating whether or not the cycle is deleted.

requirements

 

List of the requirements to complete the regulatory cycle:

  • id: unique identifier of the requirement. (String type)
  • cyclePeriodId: unique identifier of the cycle. (String type)
  • type: the type of requirement. (Number type)
    • 1 = credits 
    • 2 = course types
    • 3 = number of categories
  • targetValue: the value to reach. (Number type)
  • parentId: the unique identifier of the parent requirement. These are the requirements in hours for the regulatory cycle on which other requirements depend (String type)
  • ruleId: the unique identifier of the attached rule (String type)
  • providerId: the unique identifier of the attached provider (String type)

Cycle/getuserprogress

Returns the progress of a user in relation to their requirements in a regulatory cycle.
API call address : https://.../lmsapi/cycle/getuserprogress

Request

Example of request call content for the progress of a user in relation to their requirements in a regulatory cycle.

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "userId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d"
}

Field descriptions

Name
Required
Comment/description
id
X
Unique identifier of the regulatory cycle. (String type)
userId
X

Unique identifier of the user. (String type)

Response

Example of response call content for the progress of a user in relation to their requirements in a regulatory cycle:

{
  "id": "DTUvbcrKNN3szXg6aQY%2fSg%3d%3d",
  "userId": "nWJ7HZLyI8l2otoNsxuXgA%3d%3d",
  "userStatusId": "uprlbtvuqNuwmncYPu1ljg%3d%3d",
  "requiredCredits": 40.0,
  "completedCredits": 22.0,
  "exemptedCredits": 8.0,
  "providerCredits": 30.0,
  "customFieldAPIName": "custom_field"
}

Field descriptions

Name

Required

Comments/description

id

 

Unique identifier of the regulatory cycle. (String type)

userId

 

Unique identifier of the user. (String type)

Used if known; otherwise use customFieldValue and customFieldAPIName.

userStatusId
Unique identifier of the member's current status for the regulatory cycle. (String type) 
requiredCredits
Requirements of the user subject to the requirements of the regulatory cycle, in number of hours.
completedCredits
Requirements met by the user subject to the requirements of the regulatory cycle, in number of hours.
exemptedCredits
Requirements removed from the record of the user subject to the requirements of the regulatory cycle, in number of hours.
providerCredits
Requirements for a service provider met by the user subject to the requirements of a regulatory cycle, in number of hours,
CustomFieldAPIName
Custom field linked to the user.

API name of the custom field to target. 

Used with customFieldValue if the user identifier is not known.

Cycle/getmemberstatuses

Returns the list of membership statuses of a user subject to the requirements of a regulatory cycle.
API call address : https://.../lmsapi/cycle/getmemberstatuses

Request

Example of request call content for the list of membership statuses of a user subject to the requirements of a regulatory cycle:

{
  "userId": "DTUvbcrKNN3szXg6aLW%2fSg%3d%3d",
  "customFieldAPIName": "num_membre",
  "customFieldValue": "17MQ198"
}

Field descriptions

Name
Required
Comment/description
userId
X

Unique identifier of the user. (String type) 

Used if known; otherwise use customFieldValue and customFieldAPIName.

customFieldAPIName

API name of the custom field to target. 

Used with customFieldValue if the user identifier is not known.

customFieldValue

Value of the custom field to target.

Used with customFieldAPIName if the user identifier is not known.

Response

Example of response call content for the list of membership statuses of a user subject to the requirements of a regulatory cycle:

{
    "statuses": [
        {
            "entryId": "txEsgZNLJHsO2FY%2bO1vk4w%3d%3d",
            "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
            "status": "Membre",
            "isActiveMember": true,
            "startDate": "2020-01-01T00:00:00",
            "endDate": "2020-12-31T00:00:00"
        },
        {
            "entryId": "hcJB3jKrzKuSWUYE2%2forFQ%3d%3d",
            "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
            "status": "Radié",
            "isActiveMember": false,
            "startDate": "2021-01-01T00:00:00",
            "endDate": "0001-01-01T00:00:00"
        }
    ]
}

Field descriptions

Name

Required

Comments/description

statuses

 

The list of the user's statuses: 

  • entryId: unique identifier of the status entry. (String type)
  • userId: unique identifier of the user. (String type)
  • status: name of the user's status. Used for identification in the API. (String type)
  • isActiveMember: boolean indicating whether the member is considered active or not within the defined date range. The system bases the assignment of the user to the requirements of the regulatory cycle on this field.
  • startDate: start date of the status date range.
  • endDate: end date of the status date range.

Cycle/updatememberstatuses

Updates all the statuses of a member.
API call address : https://.../lmsapi/cycle/updatememberstatuses

IMPORTANT: This call will delete all the existing statuses for the user and replace them with the new statuses submitted. There must be only one entry without an end date.

Request

Example of request call content to update the statuses of a user subject to the requirements of a regulatory cycle:

{
  "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
  "customFieldAPIName": "Num_membre",
  "customFieldValue": "17MQ198"
  "statuses": [
        {
            "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
            "status": "Membre",
            "isActiveMember": true,
            "startDate": "2020-01-01T00:00:00",
            "endDate": "2020-12-31T23:59:59",
         },
         {
            "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
            "status": "Radié",
            "isActiveMember": false,
            "startDate": "2021-01-01T00:00:00",
        }
    ]
}

Field descriptions

Name
Required
Comment/description
userId
X

Unique identifier of the user. (String type) 

Used if known; otherwise use customFieldValue and customFieldAPIName.

customFieldAPIName

API name of the custom field to target. 

Used with customFieldValue if the user identifier is not known.

customFieldValue

Value of the custom field to target.

Used with customFieldAPIName if the user identifier is not known.

statuses

The list of the user's statuses: 

  • userId: unique identifier of the user. (String type)
  • status: name of the user's status. Used for identification in the API. (String type)
  • isActiveMember: boolean indicating whether the member is considered active or not within the defined date range. The system bases the assignment of the user to the requirements of the regulatory cycle on this field. 
  • startDate: start date of the status date range.
  • endDate: end date of the status date range. Leave empty if the range is ongoing.

Response

Example of response call content to update the statuses of a user subject to the requirements of a regulatory cycle 

{
    "isSuccess": true
}

Field descriptions

Name
Required
Comment/description
isSuccess

Boolean indicating whether or not the operation was carried out successfully.

Cycle/updatememberstatus

Updates the status of a user subject to the requirements of a regulatory cycle.
API call address : https://.../lmsapi/cycle/updatememberstatus


Request

Example of request call content to update the status of a user subject to the requirements of a regulatory cycle:

{
  "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
  "customFieldAPIName": "Num_membre",
  "customFieldValue": "17MQ198"
  "entryId": "UJaPnAzY1OXv6yI%2baYCqzA%3d%3d",
  "status": {
    "status": "Non-membre",
    "isActiveMember" : false,
    "startDate": "2021-01-01T00:00:00"
    "endDate": "2022-12-31T00:00:00"
  }
}

Field descriptions

Name
Required
Comment/description
userId
X

Unique identifier of the user. (String type) 

Used if known; otherwise use customFieldValue and customFieldAPIName.

customFieldAPIName

API name of the custom field to target. 

Used with customFieldValue if the user identifier is not known.

customFieldValue

Value of the custom field to target.

Used with customFieldAPIName if the user identifier is not known.

entryId
X
Identifier of the status entry. When a status is created for the first time, an "entryId" is assigned to it. You can obtain these "entryId" values through the /cycle/getmemberstatuses method. (String type)
Status
Status update information: 
  • status: name of the user's status. Used for identification in the API. (String type)
  • isActiveMember: boolean indicating whether the member is considered active or not within the defined date range. The system bases the assignment of the user to the requirements of the regulatory cycle on this field. If no value is specified (Null = default), the status will be ignored. The "status" field will then be used to set this value to true if the value matches one of the following entries: 
  • membre
  • member
  • 1ère inscription
  • inscription
  • temporaire
  • limitation du droit d'exercice
  • suspension du droit d'exercice
  • autorisation spéciale
  • startDate: start date of the status date range.
  • endDate: end date of the status date range. Leave empty if the range is ongoing.

Response

Example of response call content to update the status of a user subject to the requirements of a regulatory cycle:

{
    "isSuccess": true
}

Field descriptions

Name
Required
Comment/description
isSuccess

Boolean indicating whether or not the operation was carried out successfully.

Cycle/changecurrentmemberstatus

Closes the active date range of the status of a user subject to the requirements of a regulatory cycle and adds a new entry.
API call address : https://.../lmsapi/cycle/changecurrentmemberstatus


Request

Example of request call content to change the status of a user subject to the requirements of a regulatory cycle:

{
  "userId": "WhcMwDXxCq%2fsp4YP%2btHUjg%3d%3d",
  "customFieldAPIName": "Num_membre",
  "customFieldValue": "17MQ198"
  "status": {
    "status": "Membre",
    "isActiveMember" : true,
    "startDate": "2023-01-01T00:00:00"
    "endDate": "2025-01-01T00:00:00"
  }
}

Field descriptions

Name
Required
Comment/description
userId
X

Unique identifier of the user. (String type) 

Used if known; otherwise use customFieldValue and customFieldAPIName.

customFieldAPIName

API name of the custom field to target. 

Used with customFieldValue if the user identifier is not known.

customFieldValue

Value of the custom field to target.

Used with customFieldAPIName if the user identifier is not known.

Status
Status update information: 
  • status: name of the user's status. Used for identification in the API. (String type)
  • isActiveMember: boolean indicating whether the member is considered active or not within the defined date range. The system bases the assignment of the user to the requirements of the regulatory cycle on this field. If no value is specified (Null = default), the status will be ignored. The "status" field will then be used to set this value to true if the value matches one of the following entries: 
  • membre
  • member
  • 1ère inscription
  • inscription
  • temporaire
  • limitation du droit d'exercice
  • suspension du droit d'exercice
  • autorisation spéciale
  • startDate: start date of the status date range.
  • endDate: end date of the status date range. Leave empty if the range is ongoing.

Response

Example of response call content to change the status of a user subject to the requirements of a regulatory cycle:

{
    "isSuccess": true
}

Field descriptions

Name
Required
Comment/description
isSuccess

Boolean indicating whether or not the operation was carried out successfully.

Cycle/getperiodstatuseslist

Returns the list of existing statuses for a regulatory cycle.
API call address : https://.../lmsapi/cycle/getperiodstatuseslist


Request

Example of request call content for the list of statuses of a regulatory cycle:

{
   "id": "m1V3F8viVz8bSXg45m3pOA%3d%3d"
}

Field descriptions

Name
Required
Comment/description
id
X

Unique identifier of the regulatory cycle. (String type)

Response

Example of response call content for the list of statuses of a regulatory cycle:

[
    {
        "id": "m1V3F8viVz8bSXg45m3pOA%3d%3d",
        "statusId": "Lhp7lNjdUAnQc4pGKe4tDg%3d%3d",
        "adminName": "En cours",
        "name": {
            "texts": [
                {
                    "text": "En cours",
                    "languageId": 1
                },
                {
                    "text": "Ongoing",
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "shortDescription": {
            "texts": [
                {
                    "text": "Voici ma description courte",
                    "languageId": 1
                },
                {
                    "text": "Short description",                    
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "fullDescription": {
            "texts": [
                {
                    "text": "<p>Le nombre d'heures obligatoires à compléter sur deux ans est inscrit dans la partie supérieure droite de votre registre.</p>",
                    "languageId": 1
                },
                {
                    "text": "<p>The number of mandatory hours to be completed over two years is listed in the upper right hand corner of your folder.</p>",                    
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        }
    },
    {
        "id": "m1V3F8viVz8bSXg45m3pOA%3d%3d",
        "statusId": "xsZkyQGVStGJwPRu4xt0Fg%3d%3d",
        "adminName": "Conforme",
        "name": {
            "texts": [
                {
                    "text": "Conforme",
                    "languageId": 1
                },
                {
                    "text": "Completed",
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "shortDescription": {
            "texts": [
                {
                    "text": "Heures complétées",
                    "languageId": 1
                },
                {
                    "text": "Hours completed",
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        },
        "fullDescription": {
            "texts": [
                {
                    "text": "Description complète",
                    "languageId": 1
                },
                {
                    "text": "Complete description",
                    "languageId": 2
                },
                {
                    "languageId": 3
                },
                {
                    "languageId": 4
                }
            ],
            "ErrorID": 0
        }
    }
]

Field descriptions

Name

Required

Comments/description

id

X

Unique identifier of the regulatory cycle. (String type)

statusId

 

Unique identifier of the member status for the regulatory cycle. (String type)

adminName
Administrative name of the status 
name
Name of the status displayed to the user subject to the requirements of the regulatory cycle:
  • texts: name of the status displayed to the user. (String type)
  • languageId: The name of the status can be multilingual (Number type): 
    • 1 = French (Canada) 
    • 2 = English
    • 3 = Spanish
    • 4 = German

ErrorId : 

shortDescription




Short description of the status displayed to the user subject to the requirements of the regulatory cycle:
  • texts: short description displayed to the user. (String type)
  • languageId: The name of the status can be multilingual (Number type): 
    • 1 = French (Canada) 
    • 2 = English
    • 3 = Spanish
    • 4 = German

ErrorId :

fullDescription
Long description of the status displayed to the user subject to the requirements of the regulatory cycle:
  • texts: long description displayed to the user. (String type)
  • languageId: The name of the status can be multilingual (Number type): 
    • 1 = French (Canada) 
    • 2 = English
    • 3 = Spanish
    • 4 = German

ErrorId :

Cycle/getupdateduserprogress

Returns  a list of the users who have had a modification in their cycle.
API call address : https://.../lmsapi/cycle/getupdateduserprogress

Request


{
   "id": "BzEm1iKI2qP86aUK38RlVg%3d%3d",
   filterDate: "2018-06-29 11:05:00.000",
   filterIndex: 1
}


Field descriptions

Name
Required
Comment/description
id
X
Unique identifier of the regulatory cycle. (String type)
filterDate
X

Date of the last modification of the user's progress in the regulatory cycle. Used to retrieve all the modifications made after this date.

(String type): YYYY-MM-DDTHH:MM:SSZ

filterIndex
Corresponds to pagination of 200 users. Returns the list of 200 objects based on the index passed as a filter.
An index filter of 1 returns users 1 to 200, and an index filter of 2 returns users 201 to 400, ordered by modification date in their cycle from the most recent to the oldest.
If the parameter is not used, the return of this call will contain at most 200 elements.

Response

Example of the content of the response call for a request for the list of users who have had a modification in a cycle from a certain date onwards  : 

[
    "p8V%2fzu0l1%2f5NDo%2ftHpCEkQ%3d%3d",
    "DgQuequMs7sEpeiQjW%2bc3g%3d%3d"
]

Field descriptions

NameRequiredComments/description


Unique identifier of the users
(String type)

Cycle error code descriptions

Number

Message

Comments/description

1000

Required id

You must provide an identifier for the cycle

1001

Invalid id

The identifier provided for the cycle is invalid.

1002

Required memberId

You must provide an identifier for the member.

1003

Invalid memberId

The identifier provided for the member is invalid.

1004

Required customFieldAPIName

You must provide the name of the custom field in the API.

1005

Invalid customFieldAPIName

The name of the custom field in the API that was provided is invalid.

1006

A list of statuses must be provided

The list of statuses must be provided.

1007

A status must be provided

A non-empty status must be defined.

1008

Invalid status id

The identifier of a status entry is invalid.

1009

Invalid user

The user identifier provided is invalid.

1010

Invalid date

The end date of the status range must be greater than or equal to the start date.

1011

User has not access to this period

The user must have access to the selected cycle

1012Required filterDateThe filter date is required 

Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.