Cohorts (Lära)

TABLE OF CONTENTS
Cohort/get
Cohort/getlist
Cohort/create
Cohort/edit
Cohort/getuserlist
Cohort/subscribeuser
Cohort/subscribeusers
Cohort/unsubscribeusers
Cohort/getuserdetailedprogress
Cohort/linksubscriptiontoblock
Cohort/unlinksubscriptionfromblock
Cohort/transfersubscriptiontoblock
Cohort/getcompletion
Cohort/setcompletion
Cohort/getusersubscriptions
Cohort error code descriptions

Cohorts

« Cohorts » are occurrences of training programs. They are the equivalent of a session for training. They are named « cohort » in the API.

Cohort/get

Retrieves information about a cohort in your environment.
API call address : https://.../lmsapi/cohort/get

Request

Example of request call content for information on a cohort:

{
"id": "7IoopVM73nHZMhUaQ3JvWw%3d%3d"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

Response

Example of the response call content for an information request on a cohort:

{
"id": "qUdyCbBEIdpfoVPrKETcjA%3d%3d",
"programId": "v79AV9j3B3OV8Ay%2fHmKiOQ%3d%3d",
"name": "Formation entretien 2",
"startDate": "0001-01-01T00:00:00",
"endDate": "0001-01-01T00:00:00",
"minParticipants": 0,
"maxParticipants": 20,
"creationDate": "2019-08-02T14:09:29.677",
"isHidden": false,
"status": 0,
"daysAvailable": 0,
"expirationType": 1,
"daysToComplete": 1,
"dateToComplete": "0001-01-01T00:00:00",
"taxEnabled": true,
"taxCountryId": 37,
"taxStateId": 11,
"isSinglePayment": true,
"nbUsersSubbed": 22,
"lastModificationDate": "2024-03-06T14:34:57.823",
"excProgramId": "9R%2btVNekvkoq1dRDux9GKA%3d%3d",
"excBlockId": "wCFBy4FYTaXktjmxqN7E5g%3d%3d",
"excMaximumCredits": 10.00,
"customFields": {
"cohortNum": "12"
}
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the cohort.
(String type)
programId
Unique identifier of the training program.
(String type)
name
Name of the cohort.
(String type)
startDate
Start date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
endDate
End date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
minParticipants
Minimum number of participants required to launch the cohort.
(Number type)
maxParticipants
Maximum number of participants required to launch the cohort.
(Number type)
creationDate
Creation date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
isHidden
Indicates whether the cohort is displayed and available for enrolment in the catalogue. The default value is False.
(Boolean type)
status
Indicates the status of the cohort in the system.
  • 0 = Active 
  • 1 = Cancelled
  • 2 = Deleted
(Number type)
expirationType

Expiration type for the enrolments of the cohort. 

  • 0 = No expiration; the user can complete the cohort at any time
  • 1 = Number of days after enrolment (daysToComplete)
  • 2 = Deadline (dateToComplete)
(Number type)
daysToComplete
Number of days the user has after enrolling to complete the cohort.
(Number type)
dateToComplete
Specific date by which the user must have completed the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
taxEnabled
Indicates whether taxes are enabled during a payment transaction for an enrolment at the cohort level ("isSinglePayment": true)
(Boolean type)
taxCountryId
Unique identifier of the country where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxStateId
Unique identifier of the province or state where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
isSinglePayment
Indicates whether payment is made at the cohort level or at the level of the training items it contains.
  • True: payment at the cohort level;
  • False: payment at the training item level.
(Boolean type)
nbUsersSubbed
Indicates the number of users currently enrolled in the cohort.
(Number type)
lastModificationDate
Date of the last modification of the administrative settings of the cohort by an administrator.
(String YYYY-MM-DDTHH:MM:SSZ)
excProgramId

Unique identifier of the program from which excess credits can be recognized in the cohort. 

(String type)

excBlockId

Unique identifier of the cohort block in which the excess credits from the program excProgramId are added. 

(String type)

excMaximumCredits

The maximum number of credits that can be recognized from the excess credits of the program identified by excProgramId

(Number type)

customFields
Custom fields linked to the cohort.

Cohort/getlist

Retrieves information about a list of cohorts in your environment.
API call address : https://.../lmsapi/cohort/getlist

Request

Example of request call content for information on a list of cohorts. The fields are optional, but at least one must be provided:

{
"id": "7IoopVM73nHZMhUaQ3JvWw%3d%3d",
"filterDate": "YYYY-MM-DDTHH:MM:SSZ",
"filterEditDate": "YYYY-MM-DDTHH:MM:SSZ",
"filterIncludeDisabled" : true
}

Field descriptions

Name

Required

Comments/description

id

Unique identifier of the training program.
(String type)

filterDate
Creation date of the cohort. The method returns the list of objects that were created after the date passed as a filter.
(String YYYY-MM-DDTHH:MM:SSZ)
filterEditDate
Date of the last modification of the administrative settings of the cohort. The method returns the list of objects that were modified after the date passed as a filter.
(String YYYY-MM-DDTHH:MM:SSZ)
filterIncludeDisabled
Filter used to include cohorts that have been cancelled.
  • True: Includes cancelled cohorts;
  • False (default): does not include cancelled cohorts.
(Boolean type)

Response

Example of the response call content for an information request on a list of cohorts:

[
{
"id": "qUdyCbBEIdpfoVPrKETcjA%3d%3d",
"programId": "v79AV9j3B3OV8Ay%2fHmKiOQ%3d%3d",
"name": "Formation entretien 2",
"startDate": "0001-01-01T00:00:00",
"endDate": "0001-01-01T00:00:00",
"minParticipants": 0,
"maxParticipants": 20,
"creationDate": "2019-08-02T14:09:29.677",
"isHidden": false,
"status": 0,
"daysAvailable": 0,
"expirationType": 1,
"daysToComplete": 1,
"dateToComplete": "0001-01-01T00:00:00",
"taxEnabled": true,
"taxCountryId": 37,
"taxStateId": 11,
"isSinglePayment": true,
"nbUsersSubbed": 22,
"lastModificationDate": "2024-03-06T14:34:57.823",
"excProgramId": "9R%2btVNekvkoq1dRDux9GKA%3d%3d",
"excBlockId": "wCFBy4FYTaXktjmxqN7E5g%3d%3d",
"excMaximumCredits": 10.00,
"customFields": {
"cohortNum": "12"
}
},
{
"id": "ask7rmhCGDQnv4pZ02WZlQ%3d%3d",
"programId": "v79AV9j3B3OV8Ay%2fHmKiOQ%3d%3d",
"name": "Formation entretien 1 - Copie",
"startDate": "0001-01-01T00:00:00",
"endDate": "0001-01-01T00:00:00",
"minParticipants": 0,
"maxParticipants": 20,
"creationDate": "2020-09-23T10:02:46.05",
"isHidden": false,
"status": 0,
"daysAvailable": 0,
"expirationType": 0,
"daysToComplete": 0,
"dateToComplete": "0001-01-01T00:00:00",
"taxEnabled": true,
"isSinglePayment": true,
"nbUsersSubbed": 0,
"lastModificationDate": "2020-09-23T10:08:41.453",
"customFields": {
"cohortNum": ""
}
}
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the cohort.
(String type)
programId
Unique identifier of the training program.
(String type)
name
Name of the cohort.
(String type)
startDate
Start date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
endDate
End date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
minParticipants
Minimum number of participants required to launch the cohort.
(Number type)
maxParticipants
Maximum number of participants required to launch the cohort.
(Number type)
creationDate
Creation date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
isHidden
Indicates whether the cohort is displayed and available for enrolment in the catalogue. The default value is False.
(Boolean type)
status
Indicates the status of the cohort in the system.
  • 0 = Active 
  • 1 = Cancelled
  • 2 = Deleted
(Number type)
expirationType

Expiration type for the enrolments of the cohort. 

  • 0 = No expiration; the user can complete the cohort at any time
  • 1 = Number of days after enrolment (daysToComplete)
  • 2 = Deadline (dateToComplete)
(Number type)
daysToComplete
Number of days the user has after enrolling to complete the cohort.
(Number type)
dateToComplete
Specific date by which the user must have completed the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
taxEnabled
Indicates whether taxes are enabled during a payment transaction for an enrolment at the cohort level ("isSinglePayment": true)
(Boolean type)
taxCountryId
Unique identifier of the country where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxStateId
Unique identifier of the province or state where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxEnabled
Indicates whether taxes are enabled on payments received for enrolments in the cohort.
(Boolean type)
isSinglePayment
Indicates whether payment is made at the cohort level or at the level of the training items it contains.
  • True: payment at the cohort level;
  • False: payment at the training item level.
(Boolean type)
nbUsersSubbed
Indicates the number of users currently enrolled in the cohort.
(Number type)
lastModificationDate
Date of the last modification of the administrative settings of the cohort by an administrator.
(String YYYY-MM-DDTHH:MM:SSZ)
excProgramId

Unique identifier of the program from which excess credits can be recognized in the cohort. 

(String type)

excBlockId

Unique identifier of the cohort block in which the excess credits from the program excProgramId are added. 

(String type)

excMaximumCredits

The maximum number of credits that can be recognized from the excess credits of the program identified by excProgramId

(Number type)

customFields
Custom fields linked to the cohort.

Cohort/create

Creates a cohort in a training program in your environment.
API call address : https://.../lmsapi/cohort/create

Request

Example of request call content to create a cohort:

{
"programId": "v79AV9j3B3OV8Ay%2fHmKiOQ%3d%3d",
"name": "Formation entretien 2",
"startDate": "0001-01-01T00:00:00",
"endDate": "0001-01-01T00:00:00",
"minParticipants": 0,
"maxParticipants": 20,
"creationDate": "2019-08-02T14:09:29.677",
"isHidden": false,
"status": 0,
"daysAvailable": 0,
"expirationType": 1,
"daysToComplete": 1,
"dateToComplete": "0001-01-01T00:00:00",
"taxEnabled": true,
"taxCountryId": 37,
"taxStateId": 11,
"isSinglePayment": true,
"nbUsersSubbed": 22,
"lastModificationDate": "2024-03-06T14:34:57.823",
"excProgramId": "9R%2btVNekvkoq1dRDux9GKA%3d%3d",
"excBlockId": "wCFBy4FYTaXktjmxqN7E5g%3d%3d",
"excMaximumCredits": 10.00,
"customFields": {
"cohortNum": "12"
}
}

Field descriptions

Name 

Required

Comments/description

programIdXUnique identifier of the training program.
(String type)
nameXName of the cohort.
(String type)
startDate
Start date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
endDate
End date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
minParticipantsXMinimum number of participants required to launch the cohort.
(Number type)
maxParticipantsXMaximum number of participants required to launch the cohort.
(Number type)
isHidden
Indicates whether the cohort is displayed and available for enrolment in the catalogue. The default value is False.
(Boolean type)
status
Indicates the status of the cohort in the system.
  • 0 = Active 
  • 1 = Cancelled
  • 2 = Deleted
(Number type)
expirationType

Expiration type for the enrolments of the cohort. 

  • 0 = No expiration; the user can complete the cohort at any time
  • 1 = Number of days after enrolment (daysToComplete)
  • 2 = Deadline (dateToComplete)
(Number type)
daysToComplete
Number of days the user has after enrolling to complete the cohort.
(Number type)
dateToComplete
Specific date by which the user must have completed the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
taxEnabled
Indicates whether taxes are enabled during a payment transaction for an enrolment at the cohort level ("isSinglePayment": true)
(Boolean type)
taxCountryId
Unique identifier of the country where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxStateId
Unique identifier of the province or state where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxEnabled
Indicates whether taxes are enabled on payments received for enrolments in the cohort.
(Boolean type)
isSinglePayment
Indicates whether payment is made at the cohort level or at the level of the training items it contains.
  • True: payment at the cohort level;
  • False: payment at the training item level.
(Boolean type)
nbUsersSubbed
Indicates the number of users currently enrolled in the cohort.
(Number type)
lastModificationDate
Date of the last modification of the administrative settings of the cohort by an administrator.
(String YYYY-MM-DDTHH:MM:SSZ)
excProgramId

Unique identifier of the program from which excess credits can be recognized in the cohort. 

(String type)

excBlockId

Unique identifier of the cohort block in which the excess credits from the program excProgramId are added. 

(String type)

excMaximumCredits

The maximum number of credits that can be recognized from the excess credits of the program identified by excProgramId

(Number type)

customFields
Custom fields linked to the cohort.

Response

Example of response call content for a request to create a cohort:

{
"id": "7IoopVM73nHZMhUaQ3JvWw%3d%3d"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

Cohort/edit

Modifies a cohort of a training program in your environment.
API call address : https://.../lmsapi/cohort/edit

Request

Example of request call content to modify a cohort:

{
"id": "2WYVweCCZqYONzOvft3LZQ%3d%3d",
"name": "Formation entretien 2",
"startDate": "0001-01-01T00:00:00",
"endDate": "0001-01-01T00:00:00",
"minParticipants": 0,
"maxParticipants": 20,
"creationDate": "2019-08-02T14:09:29.677",
"isHidden": false,
"status": 0,
"daysAvailable": 0,
"expirationType": 1,
"daysToComplete": 1,
"dateToComplete": "0001-01-01T00:00:00",
"taxEnabled": true,
"taxCountryId": 37,
"taxStateId": 11,
"isSinglePayment": true,
"nbUsersSubbed": 22,
"lastModificationDate": "2024-03-06T14:34:57.823",
"excProgramId": "9R%2btVNekvkoq1dRDux9GKA%3d%3d",
"excBlockId": "wCFBy4FYTaXktjmxqN7E5g%3d%3d",
"excMaximumCredits": 10.00,
"customFields": {
"cohortNum": "12"
}
}

Field descriptions

Name 

Required

Comments/description

idXUnique identifier of the cohort.
(String type)
name
Name of the cohort.
(String type)
startDate
Start date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
endDate
End date of the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
minParticipants
Minimum number of participants required to launch the cohort.
(Number type)
maxParticipants
Maximum number of participants required to launch the cohort.
(Number type)
isHidden
Indicates whether the cohort is displayed and available for enrolment in the catalogue. The default value is False.
(Boolean type)
status
Indicates the status of the cohort in the system.
  • 0 = Active 
  • 1 = Cancelled
  • 2 = Deleted
(Number type)
expirationType

Expiration type for the enrolments of the cohort. 

  • 0 = No expiration; the user can complete the cohort at any time
  • 1 = Number of days after enrolment (daysToComplete)
  • 2 = Deadline (dateToComplete)
(Number type)
daysToComplete
Number of days the user has after enrolling to complete the cohort.
(Number type)
dateToComplete
Specific date by which the user must have completed the cohort.
(String YYYY-MM-DDTHH:MM:SSZ)
taxEnabled
Indicates whether taxes are enabled during a payment transaction for an enrolment at the cohort level ("isSinglePayment": true)
(Boolean type)
taxCountryId
Unique identifier of the country where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxStateId
Unique identifier of the province or state where the cohort is deemed to be held. Please refer to Appendix 3: Countries and States/Provinces.
(Number type)
taxEnabled
Indicates whether taxes are enabled on payments received for enrolments in the cohort.
(Boolean type)
isSinglePayment
Indicates whether payment is made at the cohort level or at the level of the training items it contains.
  • True: payment at the cohort level;
  • False: payment at the training item level.
(Boolean type)
nbUsersSubbed
Indicates the number of users currently enrolled in the cohort.
(Number type)
lastModificationDate
Date of the last modification of the administrative settings of the cohort by an administrator.
(String YYYY-MM-DDTHH:MM:SSZ)
excProgramId

Unique identifier of the program from which excess credits can be recognized in the cohort. 

(String type)

excBlockId

Unique identifier of the cohort block in which the excess credits from the program excProgramId are added. 

(String type)

excMaximumCredits

The maximum number of credits that can be recognized from the excess credits of the program identified by excProgramId

(Number type)

customFields
Custom fields linked to the cohort.

Response

Example of response call content for a request to modify a cohort:

{
"id": "2WYVweCCZqYONzOvft3LZQ%3d%3d"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

Cohort/getuserlist

Retrieves information about a list of users enrolled in a cohort in your environment.
API call address : https://.../lmsapi/cohort/getuserlist

Request

Example of request call content for information on a list of users enrolled in a cohort. The fields are optional, but at least one must be provided:

{
"id": "7IoopVM73nHZMhUaQ3JvWw%3d%3d",
"filterDate": "YYYY-MM-DDTHH:MM:SSZ",
"filterIncludeDisabled" : true
}

Field descriptions

Name

Required

Comments/description

id

Unique identifier of the training program.
(String type)

filterDate
Enrolment date of the user. The method returns the list of enrolments made after the date passed as a filter.
(String YYYY-MM-DDTHH:MM:SSZ)
filterIncludeDisabled
Filter used to include the enrolments of users who have been unenrolled.
  • Not provided: includes all active enrolments;
  • True: Includes cancelled enrolments;
  • False (default): does not include cancelled enrolments.
(Boolean type)

Response

Example of the response call content for an information request on the list of users enrolled in a cohort:

[
    {
        "userId": "LGKfjxcqN18BWQ9HM%2fYBMQ%3d%3d",
        "firstName": "Jacques",
        "lastName": "Bonaventure",
        "billingId": "GHJfC4VuX1cYpJdrd7xzrA%3d%3d",
        "status": 1,
        "creationDate": "2024-03-06T13:51:45.983",
        "subscriptionDate": "2024-03-06T13:51:45.983",
        "roleId": "n8%2fYjDQpXpCCzeBXIJuS7w%3d%3d",
        "provenance": 3
    },
    {
        "userId": "LGKfjxcqN18BWQ9HM%2fYBMQ%3d%3d",
        "firstName": "Maryse",
        "lastName": "Laframboise",
        "billingId": "JyA5JpRh35MX83rrun7sfw%3d%3d",
        "status": 1,
        "creationDate": "2024-02-06T08:36:30.617",
        "subscriptionDate": "2024-02-06T08:36:30.617",
        "roleId": "n8%2fYjDQpXpCCzeBXIJuS7w%3d%3d",
        "provenance": 3
    }
]

Field descriptions

Name 

Required

Comments/description

userId
Unique identifier of the user.
(String type)
firstName
First name of the enrolled user.
(String type)
lastName
Last name of the enrolled user.
(String type)
billingId
Unique identifier of the user's enrolment.
(String type)
status

Enrolment status

  • 0 = Inactive
  • 1 = Enrolled
  • 2 = Pending
  • 3 = Unenrolled
  • 4 = Disabled
  • 5 = Transferred
  • 6 = Expired
  • 7 = Unconfirmed
  • 8 = Expired with access

(Number type)

creationDate
Enrolment date of the user, date of the initial enrolment.
(String YYYY-MM-DDTHH:MM:SSZ)
subscriptionDate

Date on which the enrolment was confirmed or accepted.

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

roleId

Unique identifier of the role of the enrolled user.

(String type)

provenance
Source of the user's enrolment
  • 0 = GroupSubscription  
  • 1 = BranchSubscription  
  • 2 = ManualSubscription  
  • 3 = SelfSubscription  
  • 4 = LotPurchaseSubscription  
  • 5 = ProgramSubscription  
  • 6 = AutoResubscription  
(Number type)

Cohort/subscribeuser

Enrols a user in a cohort in your environment.
API call address : https://.../lmsapi/cohort/subscribeuser

Request

Example of request call content to enrol a user in a cohort. 

{
"id": "7Zi3zYvuHTZ7YLK7TQjdlQ%3d%3d",
"userId": "5G5hg343fggalp4JQ%3d%3d",
"subscriptionDate": "2021-02-22T09:30:00.000"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

userIdXUnique identifier of the user.
(String type)
subscriptionDate
Used to specify an enrolment date. If none is specified, the date and time of the call will be used. If you change the date with the same call, the enrolment date will be updated.
(String YYYY-MM-DDTHH:MM:SSZ)

Response

Example of the response call content for a request to enrol a user in a cohort:

{
"id": "06tCdKtg%2bvnVpQYJOWhXAQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

Id
Unique identifier of the cohort.
(String type)

Cohort/subscribeusers

Enrols users in a cohort in your environment.
API call address : https://.../lmsapi/cohort/subscribeusers

Request

Example of request call content to enrol users in a cohort. 

{ 
"id" : "2WYVweCCZqYONzOvft3LZQ%3d%3d",
"userIds" : [
"32hdyyJ%2brWlI5nnr1IoncQ%3d%3d",
"l8Lf1hYHzqpK4x%2fVfaDfRw%3d%3d"
],
"subscriptionDate": "2021-02-22T09:30:00.000"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

userIdsXUnique identifiers of the users.
(String type)
subscriptionDate
Used to specify an enrolment date. If none is specified, the date and time of the call will be used. If you change the date with the same call, the enrolment date will be updated.
(String YYYY-MM-DDTHH:MM:SSZ)

Response

Example of the response call content for a request to enrol users in a cohort:

{
"id" : "2WYVweCCZqYONzOvft3LZQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

Id
Unique identifier of the cohort.
(String type)

Cohort/unsubscribeusers

Unenrols users from a cohort in your environment.
API call address : https://.../lmsapi/cohort/unsubscribeusers

Request

Example of request call content to unenrol users from a cohort. 

{ 
"id" : "2WYVweCCZqYONzOvft3LZQ%3d%3d",
"userIds" : [
"32hdyyJ%2brWlI5nnr1IoncQ%3d%3d",
"l8Lf1hYHzqpK4x%2fVfaDfRw%3d%3d"
]
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

userIdsXUnique identifiers of the users.
(String type)

Response

Example of the response call content for a request to unenrol users from a cohort:

{
"id" : "2WYVweCCZqYONzOvft3LZQ%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

Id
Unique identifier of the cohort.
(String type)

Cohort/getuserdetailedprogress

Retrieves the enrolment and progress details of a user enrolled in a cohort in your environment.
API call address : https://.../lmsapi/cohort/getuserdetailedprogress

Request

Example of request call content for the enrolment and progress details of a user enrolled in a cohort in your environment: 

{
"id": "vBW5xMw1VQ2A8DFaNy22zA%3d%3d",
"billingId": "vBW5xMw1VQ2A8DFaNy22zA%3d%3d"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the cohort.
(String type)

billingIdXUnique identifier of the enrolment.
(String type)

Response

Example of the response call content for a request for the enrolment and progress details of a user enrolled in a cohort in your environment:

{
"id": "vrj0IrWe0HF%2bK9OKGpDF5A%3d%3d",
"billingId": "xEN29J7ON5HaVuxG3076JA%3d%3d",
"userId": "DR7sYn48%2fuzi3b4fTGZ1nQ%3d%3d",
"commitmentId": "DR7sYn48asda%2asfduaszdif3sgb4dfgfsTdffGhZ1nQ%3d%3d",
"progressPercent": 33,
"isCompleted": true,
"isSuccess": true,
"completionDate": "2021-02-22T08:39:35.617",
"manualCompletionDate": "2021-02-22T08:39:35.617",
"modifiedByUserId": "DR7sYn48%2fuzi3b4fTGZ1nQ%3d%3d",
"certificateId": "",
"blocks": [{
"id": "TRXbb9r1WIhbXuvpujVt0Q%3d%3d",
"name": "bloc 1",
"amountRequired": 10.00,
"amountObtained": 9.55,
"progressPercent": 95,
"workspaces": [{
"id": "l6Cu6xppc7CcaSEfC38sPw%3d%3d",
"workspaceInstanceId": "ysK6Zneh46rHStA0fAW34A%3d%3d",
"autodeclarationId": "",
"billingId": "dWSVQtK7g%2fscn9WVxXmoAg%3d%3d",
"commitmentId": "DR3465g7ssas3dfv35ghj",
"name": "#JG",
"credits": 9.55,
"creditsObtained": 9.55,
"progressPercent": 100,
"isCompleted": true,
"isSuccess": true,
"isRequired": true
}, {
"id": "8VEjbODj%2fMTeWWFKtYI58Q%3d%3d",
"workspaceInstanceId": "",
"autodeclarationId": "3xYFzaDYQsqn0YTlFjAeFw%3d%3d",
"billingId": "",
"commitmentId": null,
"name": "formation 2",
"credits": 3.00,
"creditsObtained": 3.00,
"progressPercent": 100,
"isCompleted": true,
"isSuccess": true,
"isRequired": false
}]
}, {
"id": "uprlbtvuqNuwmncYPu1ljg%3d%3d",
"name": "Bloc 2",
"amountRequired": 5.00,
"amountObtained": 0,
"progressPercent": 0,
"workspaces": [{
"id": "5EJOaP8xOZr0tq%2fLtdU3Og%3d%3d",
"workspaceInstanceId": "",
"autodeclarationId": "",
"billingId": "",
"name": "#jg'2 (",
"credits": 5.00,
"creditsObtained": 0,
"progressPercent": 0,
"isCompleted": false,
"isSuccess": false,
"isRequired": true
}]
}, {
"id": "VXVTs0R3Vz8hHLbQ9MsCHQ%3d%3d",
"name": "bloc de programme",
"amountRequired": 5.00,
"amountObtained": 0.00,
"progressPercent": 0,
"workspaces": [{
"id": "KZYQXl9ud%2bgHA7lefzjQzA%3d%3d",
"workspaceInstanceId": "ysK6Zneh46rHStA0fAW34A%3d%3d",
"autodeclarationId": "",
"billingId": "dWSVQtK7g%2fscn9WVxXmoAg%3d%3d",
"name": "workspace name test",
"credits": 9.55,
"creditsObtained": 0.0,
"progressPercent": 100,
"isCompleted": true,
"isSuccess": true,
"isRequired": true
}, {
"id": "oqJ4%2bCp2dAhtoR3IJfpi8g%3d%3d",
"workspaceInstanceId": "O7Ruw8bvCEkOh6%2b113xgGA%3d%3d",
"autodeclarationId": "",
"billingId": "PXCvDjOtb5UAUwuUp870tA%3d%3d",
"name": "Formation de test",
"credits": 3.00,
"creditsObtained": 0.0,
"progressPercent": 100,
"isCompleted": true,
"isSuccess": false,
"isRequired": true
}]
}]
}

Field descriptions

Name 

Required

Comments/description

id

 

Unique identifier of the cohort.
(String type)

billingId

 

Unique identifier of the enrolment in the cohort.
(String type)

userId

 

Unique identifier of the user.
(String type)

commitmentId

 

Unique identifier of the commitment linked to the cohort.
(String type)

progressPercent

 

Progress percentage of the user in the cohort.
(Number type)

excAccCredits

 

Number of excess credits accumulated by the user in the cohort. As long as the cohort is not successfully completed, this value will remain at zero.
(Number type)

isCompleted

 

Completion status of the cohort for the enrolment.

  • true = completed
  • false = not completed
(Boolean type)

isSuccess

 

Indicates whether the cohort was successfully completed.

  • true = successfully completed
  • false = not completed

(Boolean type)

completionDate   

 

Completion date.
(String YYYY-MM-DDTHH:MM:SSZ)

manualCompletionDate     

 

Date on which the completion was performed manually by an administrator. Empty if completed otherwise.
(String YYYY-MM-DDTHH:MM:SSZ)

modificationDate 

 

Date of the last modification of the completion.
(String YYYY-MM-DDTHH:MM:SSZ)

modifiedByUserId 

 

Unique identifier of the user who modified the completion manually.
(Type: String)

certificateId          

 

Unique identifier of the certificate associated with the completion.
(Type: String)

blocks

 

Detailed progress list of the cohort blocks.
(List type)

blocks.id

 

Unique identifier of the cohort block.
(String type)

blocks.name

 

Name of the block.
(String type)

blocks.amountRequired

 

Number of training items or credits required to complete the block.
(Number type)

blocks.amountObtained

 

Number of training items or credits obtained toward completion of the block.
(Number type)

blocks.progressPercent

 

Progress of the user in the block.
(Number type)

blocks.workspaces

 

Detailed progress list of the training items in which the user is enrolled in the block.
(List type)

blocks.workspaces.id

 

Unique identifier of the training item.
(String type)

blocks.workspaces.workspaceInstanceId

 

Unique identifier of the session in which the user is enrolled.
(String type)

blocks.workspaces.autodeclarationId

Unique identifier of the self-declaration made by the user in the block.
(String type)

blocks.workspaces.billingId

 

Unique identifier of the user's enrolment in the session.
(String type)

blocks.workspaces.commitmentId

 

Unique identifier of the commitment associated with the training item.
(String type)

blocks.workspaces.name

 

Name of the training item.
(String type)

blocks.workspaces.credits

 

Number of credits associated with the successful completion of this training item.
(Number type)

blocks.workspaces.creditsObtained

 

Number of credits obtained following the successful completion of this training item.
(Number type)

blocks.workspaces.progressPercent

 

Progress percentage of the user in the session.
(Number type)

blocks.workspaces.isCompleted

 

Completion status of the session.

  • true = completed
  • false = not completed
(Boolean type)

blocks.workspaces.isSuccess

 

Success type of the session completion.

  • true = successfully completed
  • false = not completed

(Boolean type)

blocks.workspaces.isRequired

 

Indicates whether the completion of this training item is required for the block.

  • true = required
  • false = not required

(Boolean type)

Cohort/linksubscriptiontoblock

Links an existing enrolment to a block of a cohort in your environment. This call is used in specific cases when an enrolment is not recognized in a program context for a user.
API call address : https://.../lmsapi/cohort/linksubscriptiontoblock

Request

Example of request call content to link an enrolment in a block of a cohort:

{
  "billingId": "7Zi3zYvuHTZ7YLK7TQjdlQ%3d%3d",
  "workspaceBillingId": "%2bcSfyhuuFvha809UcfbkJw%3d%3d",
  "targetBlockId": "TRXbb9r1WIhbXuvpujVt0Q%3d%3d"
}

Field descriptions

Name

Required

Comments/description

billingIdX

Unique identifier of the user's enrolment in the cohort.
(String type)

workspaceBillingIdXUnique identifier of the session enrolment to link to the block.
(String type)
targetBlockIdXUnique identifier of the block to which the session enrolment is to be linked.
(String type)

Response

Example of the response call content for a request to link an enrolment in a block of a cohort:

{
    "id" : "%2bcSfyhuuFvha809UcfbkJw%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

Id
Unique identifier of the enrolment.
(String type)

Cohort/unlinksubscriptionfromblock

Unlinks an existing enrolment from a block of a cohort in your environment. This call is used in specific cases when an enrolment must not be recognized in a program context for a user.
API call address : https://.../lmsapi/cohort/unlinksubscriptionfromblock

Request

Example of request call content to unlink an enrolment from a block of a cohort:

{
  "billingId": "7Zi3zYvuHTZ7YLK7TQjdlQ%3d%3d",
  "workspaceBillingId": "%2bcSfyhuuFvha809UcfbkJw%3d%3d"
}

Field descriptions

Name

Required

Comments/description

billingIdX

Unique identifier of the user's enrolment in the cohort.
(String type)

workspaceBillingIdXUnique identifier of the session enrolment to unlink from the block.
(String type)

Response

Example of the response call content for a request to unlink an enrolment from a block of a cohort:

{
    "id" : "%2bcSfyhuuFvha809UcfbkJw%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

Id
Unique identifier of the unlinked enrolment.
(String type)

Cohort/transfersubscriptiontoblock

Transfers an existing enrolment from a block of a cohort in your environment to another block. This call is used in specific cases when an enrolment must not be recognized in one program block for a user, but rather in another.
API call address : https://.../lmsapi/cohort/transfersubscriptiontoblock

Request

Example of request call content to transfer an enrolment from a block of a cohort to another block:

{
  "billingId": "7Zi3zYvuHTZ7YLK7TQjdlQ%3d%3d",
  "workspaceBillingId": "%2bcSfyhuuFvha809UcfbkJw%3d%3d",
  "targetBlockId": "TRXbb9r1WIhbXuvpujVt0Q%3d%3d",
  "targetBillingId": "7kGFIIstMwCbP4W3td0G5w%3d%3d"
}

Field descriptions

Name

Required

Comments/description

billingIdX

Unique identifier of the user's enrolment in the cohort.
(String type)

workspaceBillingIdXUnique identifier of the session enrolment to transfer.
(String type)
targetBlockIdX

Unique identifier of the cohort block to which the enrolment is to be linked.
(String type)

targetBillingId

Unique identifier of the cohort enrolment to which the training item enrolment is to be transferred.
(String type)

Response

Example of the response call content for a request to transfer an enrolment from a block of a cohort to another block:

{
  "id": "%2bcSfyhuuFvha809UcfbkJw%3d%3d"
}

Field descriptions

Name 

Required

Comments/description

Id
Unique identifier of the transferred enrolment.
(String type)

Cohort/getcompletion

Retrieves information about a user's completion of a cohort in your environment.
API call address : https://.../lmsapi/cohort/getcompletion

Request

Example of request call content for information on a user's completion of a cohort in your environment:

{
  "id": "7Zi3zYvuHTZ7YsdfsdLK7TQjdlQ%3d%3d"
}

Field descriptions

Name

Required

Comments/description

id

Unique identifier of the user's enrolment in the cohort.
(String type)

Response

Example of the response call content for a request for information on a user's completion of a cohort in your environment:

{
    "id": "vrj0IrWe0HasdFg%2bK9OKGpDFdfg5A%3d%3d",
    "billingId": "7Zi3zYvuHTZ7YsdfsdLK7TQjdlQ%3d%3d ",
    "userId": "%2bgdfgGMWE4uzG6RLeasdKzgpoz%2bLQ%3d%3d",
    "progressPercent": 0,
    "isCompleted": true,
    "isSuccess": true,
    "completionDate": "2024-02-22T08:39:35.617",
    "manualCompletionDate": "2021-02-22T08:39:35.617",
    "modifiedByUserId": "DR7sYn48%2fuasdgfzi3b4fTGZ1nQdf%3d%3d",
    "modificationDate": "2024-03-27T14:23:39.38",
    "certificateId": "gQ7xp1ryuU4Z88utY825mQj2Qha"
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the cohort.
(String type)
billingId

Unique identifier of the user's enrolment.
(String type)

userId
Unique identifier of the user.
(String type)
progressPercent

Indicates the completion rate of the user in the cohort.
(Type: Number)

excAccCredits


Number of excess credits accumulated by the user in the cohort. As long as the cohort is not successfully completed, this value will remain at zero.

(Number type)

isCompleted


Indicates whether the user has completed the cohort.

  • True = Completed
  • False = Not completed

(Boolean type)

isSuccess

Indicates whether the user successfully completed the cohort, if completed.

  • True = Successfully completed
  • False = Completed with failure (or not completed)

(Boolean type)

completionDate


Cohort completion date by the user.

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

manualCompletionDate


Date on which the completion was modified manually by an administrator. The value will be absent if the completion was performed otherwise.

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

modificationDate


Date of the last modification of the completion.
(String YYYY-MM-DDTHH:MM:SSZ)

modifiedByUserId

Unique identifier of the user who modified the completion manually.
(String type)

certificateId


Unique identifier of the certificate issued upon completion of the cohort.
(String type)

Cohort/setcompletion

Sets the information about a user's completion of a cohort in your environment.
API call address : https://.../lmsapi/cohort/setcompletion

Request

Example of request call content to modify the information about a user's completion of a cohort in your environment:

{
  "id": "7Zi3zYvuHTZ7YsdfsddfgLK7TQjdlQ%3d%3d"
  "isCompleted": true,
  "isSuccess": true,
  "completionDate": "2024-02-17T15:04:06.687"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the user's enrolment in the cohort.
(String type)

isCompletedX

Indicates whether the user has completed the cohort.

  • True = Completed
  • False = Not completed

(Boolean type)

isSuccess

Indicates whether the user successfully completed the cohort, if completed.

  • True = Successfully completed
  • False = Completed with failure (or not completed)

(Boolean type)

CompletionDate
Cohort completion date by the user.

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

Response

Example of the response call content for a request to modify the information about a user's completion of a cohort in your environment:

{
    "id": "3%2b7WR6GktOVVXe7EEsy%2b4g%3d%3d",
    "isCompleted": true,
    "isSuccess": true
}

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the cohort.
(String type)

isCompleted


Indicates whether the user has completed the cohort.

  • True = Completed
  • False = Not completed

(Boolean type)

isSucces

Indicates whether the user successfully completed the cohort, if completed.

  • True = Successfully completed
  • False = Completed with failure (or not completed)

(Boolean type)

Cohort/getusersubscriptions

Retrieves the list of cohort enrolments of a user in your environment.
API call address : https://.../lmsapi/cohort/getusersubscriptions

Request

Example of request call content for the list of cohort enrolments of a user in your environment:

{ 
    "id" : "X4xXx3cmb%2bIghRgDqzFWjg%3d%3d"
}

Field descriptions

Name

Required

Comments/description

idX

Unique identifier of the user.
(String type)

Response

Example of the response call content for a request for the list of cohort enrolments of a user in your environment:

[
    {
        "id": "nhballNGFCIDULtrCj9vqg%3d%3d",
        "billingId": "6Z4N%2btR63WqvFjxH%2bZ1fkA%3d%3d",
        "subscriptionDate": "2022-10-10T00:00:00",
        "provenance": 3
    },
    {
        "id": "Pf09tOl0SkMVF%2bXe%2bO9sDA%3d%3d",
        "billingId": "l2hplw8e7%2fZzyGbVqtJUEQ%3d%3d",
        "subscriptionDate": "2023-06-12T13:41:02.767",
        "provenance": 3
    }
]

Field descriptions

Name 

Required

Comments/description

id
Unique identifier of the cohort.
(String type)

bilingId


Unique identifier of the enrolment in the cohort.
(String type)

subscriptionDate

Enrolment date
(String YYYY-MM-DDTHH:MM:SSZ)

provenance
Source of the user's enrolment
  • 0 = GroupSubscription  
  • 1 = BranchSubscription  
  • 2 = ManualSubscription  
  • 3 = SelfSubscription  
  • 4 = LotPurchaseSubscription  
  • 5 = ProgramSubscription  
  • 6 = AutoResubscription  
(Number type)

Cohort error code descriptions

Number

Message

Comments/description

1500

Required id

You must provide an identifier for the cohort.

1501

Invalid id

The identifier provided for the cohort is invalid.

1502

At least 1 of the parameters needs to be filled

At least one of the two search parameters must be sent.

1503

Invalid Program id

The identifier provided for the training program is invalid.

1504

Required User Ids

You must provide a list of user identifiers.

1505

Invalid User Ids

One or more user identifiers are invalid.

1506

Required Billing Ids

You must provide a list of enrolment billing identifiers.

1507

Invalid Billing Ids

One or more enrolment billing identifiers are invalid.

1508

Cancel Subscription Failure

An error occurred during the unenrolment.

1509

Required Cohort Id

The cohort identifier is required.

1510

Invalid Cohort Id

The cohort identifier is invalid.

1511

Group Already In Wsi

(Not implemented)

1512

Required Cohort Name

You must provide the name of the cohort.

1513

Invalid Cohort Name Length

The name of the cohort must have at least 3 characters and must not exceed 150 characters.

1514

Required Program Id

The program identifier is required.

1515

Required Min Participant

You must provide the minimum number of participants.

1516

Invalid Min Participant

The minimum number of participants is invalid.

1517

Required Max Participant

You must provide the maximum number of participants.

1518

Invalid Max Participant

The maximum number of participants is invalid.

1519

Invalid Days Available

The number of days available is invalid.

1520

Invalid Days To Complete

The maximum number of days to complete the cohort is invalid.

1521

Required Billing Id

The cohort enrolment identifier is required.

1522

Invalid Billing Id

The cohort enrolment identifier is invalid.

1523

Required Block Id

The cohort block identifier is required.

1524

Invalid Block Id

The cohort block identifier is invalid.

1525

Required Workspace Billing Id

The training item enrolment identifier is required.

1526

Invalid Workspace Billing Id

The training item enrolment identifier is invalid.

1527

Already Subscribed

The training item in the cohort block is already linked to an enrolment.

1528

Target Not Subscribed

No enrolment in the cohort targeted by the call.

1529

Invalid Target BillingId

The enrolment identifier for the targeted cohort is invalid.

1530

Required isCompleted

The parameter indicating the completion to assign to the enrolment 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.