← Back to support

Manage API integration

With the GET API connector, clients can retrieve user data, including module completion, test results, scores, course completion, phishing data, badges and certificates. The API key and API secret are generated in Edit organisation and provide an encrypted connection.

Please note: this functionality requires a Freedom licence.

Implementing the GET API connector offers several advantages. It allows you to efficiently extract user data, saving time and effort. In addition, it enables seamless integration with other platforms, improving the overall experience.

The configuration can be found in the menu Edit organisation.

Example configuration

Course completed by date by user

Path: https://portal.2lrn4.com/api/courses

Header:

api_key

api_secret

Parameters:

date_from (optional, string, format: \"Y-m-d\")

date_to (optional, string, format: \"Y-m-d\")

users (optional, array)

Response (example):

{

\"status\": \"success\",

\"message\": \"Complete courses\",

\"data\": [

{

\"name\": \"John Doe\",

\"email\": \"john@mail.test\",

\"complete_courses\": [

{

\"course\": \"Test Course\",

\"start_at\": \"2023-01-01\",

\"end_at\": \"2023-01-01\",

\"complete_at\": \"2023-01-01\"

}

]

}

]

}

Retrieving open trainings

Open trainings per user

Path: https://portal.2lrn4.com/api/courses/open

Header:

api_key

api_secret

Parameters:

overdue_only (optional, boolean)

due_before (optional, string, format: "Y-m-d")

This endpoint returns each employee's unfinished trainings, including the deadline, whether it has passed, the number of days overdue and the progress. With overdue_only and due_before you retrieve in one call who is behind. Employees without open trainings, inactive employees and deactivated courses are excluded. See the API documentation for the full response format.

Retrieving badges and certificates

Badges per user

Path: https://portal.2lrn4.com/api/badges

Certificates per user

Path: https://portal.2lrn4.com/api/certificates

Header:

api_key

api_secret

Parameters:

date_from (optional, string, format: "Y-m-d")

date_to (optional, string, format: "Y-m-d")

users (optional, array)

Response badges (example):

{

"status": "success",

"message": "Badges",

"data": [

{

"user_id": 1234,

"email": "john@mail.test",

"badge_key": "cursussen-1",

"badge_title": "First course",

"awarded_at": "2026-11-24T10:12:00+01:00",

"backfilled": false

}

]

}

Response certificates (example):

{

"status": "success",

"message": "Certificates",

"data": [

{

"user_id": 1234,

"email": "john@mail.test",

"number": "AB12-CD34-EF56",

"type": "learning_year",

"variant": null,

"course_id": null,

"learning_year": 1,

"title": "Learning year 1",

"completed_at": "2026-03-15",

"valid_until": "2027-03-15",

"expired": false,

"verification_url": "https://2lrn4.com/certificaat/AB12-CD34-EF56"

}

]

}

The badges endpoint returns each employee's badges, with the key and the English title of the badge and the moment it was awarded. Badges awarded before 22 November 2026 have no date. If backfilled is true, the badge was recorded afterwards. The certificates endpoint returns each employee's standard and own certificates, with the number, the type (course, learning_year or own), the completion date, the date until which the certificate is valid, whether it has expired and the address of the verification page. Employees who have since become inactive are included. Use date_from and date_to to filter on the date of award or completion, and users to limit the result to a list of user IDs. Totals per department are in the reports Badges per department and Certificates per department, see Configuring certificates.

The API secret is shown once

The API secret cannot be read back in the platform: it is shown once, when it is created. Store it in a safe place at that moment, for example a password vault. If the secret is lost, generate a new one in edit organisation; the old one then stops working. Existing integrations keep working as long as you do not renew the secret.

Stuck?

Ask a question or book a short demo. We'll help you move forward.