API – E-learning¶
Paths are under https://api.innovanet.com. Header Authorization: Bearer inv_mcp_…. The innovanet() helper is in API.
A course manager calls /api/education/courses. An employee loads assigned courses at /api/education/my-courses.
GET /api/education/courses¶
| Parameter | Type | Required | Description |
|---|---|---|---|
search |
string | no | |
categoryId |
integer | no | |
includeHidden |
boolean | no | hidden courses, manager only |
$res = innovanet('GET', '/api/education/courses?search=BOZP');
Response 200
{
"success": true,
"data": [
{
"id": 2,
"title": "BOZP",
"questionCount": 8,
"minResult": 80,
"categoryId": 1,
"categoryName": "Povinné",
"hide": 0
}
]
}
My courses: GET /api/education/my-courses. Categories: GET /api/education/categories.
POST /api/education/courses¶
| Field | Type | Required | Description |
|---|---|---|---|
title |
string | yes | at most 500 |
description |
string | no | |
intro |
string | no | |
categoryId |
integer | no | |
minResult |
integer | no | percent 0–100, default 80 |
timeLimitMinutes |
integer | no | |
daysToComplete |
integer | no | |
onlyOnce |
integer | no | 0 or 1 |
hide |
integer | no | 1 hides the course from the normal list |
PHP
$res = innovanet('POST', '/api/education/courses', [
'title' => 'BOZP',
'minResult' => 80,
'categoryId' => 1,
]);
Response 201
{
"success": true,
"message": "Course was created",
"data": { "id": 2 }
}
Assign people: POST /api/education/courses/2/assign-users. Submit a test: POST /api/education/courses/2/submit.
{
"answers": { "1": 2, "2": 1 },
"startedAt": "2026-11-05T10:00:00"
}
answers is an object. The key is the question id, the value is 1, 2 or 3. Response 200 has data.passed for whether the test passed.
Other paths¶
Each path below belongs to this module. Field names are the ones the API reads. A downloaded file is not JSON.
PUT /api/education/categories/{id}¶
Body
| Field | Type | Required |
|---|---|---|
name |
string | no |
{
"name": "text"
}
$res = innovanet('PUT', '/api/education/categories/1', [
'name' => 'text',
]);
Response 200 – Envelope { "success": true, "data": ... }.
DELETE /api/education/categories/{id}¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/education/courses/{id}/my-attempts¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/education/courses/{id}/stats¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
POST /api/education/courses/{id}/mark-material-read¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/education/courses/{id}/questions¶
No body.
The questions of a course are visible to e-learning managers, the course author and the people it is assigned to (403 otherwise). The correct field (right answer 1 to 3) is sent only to managers and the author. Whoever takes the test does not get the key: the test is graded on the server (POST /api/education/courses/{id}/submit) and the right answers are shown in the result.
Response 200 – Envelope { "success": true, "data": ... }.
POST /api/education/courses/{id}/questions¶
Body
| Field | Type | Required |
|---|---|---|
question |
string | yes |
image |
string | no |
answer1 |
string | yes |
answer2 |
string | yes |
answer3 |
string | yes |
correct |
integer | yes |
{
"question": "text",
"image": "text",
"answer1": "text",
"answer2": "text",
"answer3": "text",
"correct": 1
}
$res = innovanet('POST', '/api/education/courses/1/questions', [
'question' => 'text',
'image' => 'text',
'answer1' => 'text',
'answer2' => 'text',
'answer3' => 'text',
'correct' => 1,
]);
Response 201 – Envelope { "success": true, "data": ... }.
PUT /api/education/courses/{courseId}/questions/{questionId}¶
Body
| Field | Type | Required |
|---|---|---|
question |
string | no |
image |
string | no |
answer1 |
string | no |
answer2 |
string | no |
answer3 |
string | no |
correct |
integer | no |
{
"question": "text",
"image": "text",
"answer1": "text",
"answer2": "text",
"answer3": "text",
"correct": 1
}
$res = innovanet('PUT', '/api/education/courses/1/questions/1', [
'question' => 'text',
'image' => 'text',
'answer1' => 'text',
'answer2' => 'text',
'answer3' => 'text',
'correct' => 1,
]);
Response 200 – Envelope { "success": true, "data": ... }.
DELETE /api/education/courses/{courseId}/questions/{questionId}¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/education/courses/{id}/assigned-users¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
DELETE /api/education/courses/{courseId}/users/{userId}¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
POST /api/education/courses/{id}/pdf¶
Body
| Field | Type | Required |
|---|---|---|
file |
file | yes |
The file is sent as multipart, not in JSON.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/education/courses/{id}/pdf¶
No body.
Response – The response is a file, not JSON.
GET /api/education/certificate/{resultId}/pdf¶
Parameters
| Field | Type | Required |
|---|---|---|
lang |
string | no |
language |
string | no |
The API reads these fields. A field is required when the table says yes.
Response – The response is a file, not JSON.
GET /api/education/results/{resultId}/detail¶
No body.
Response 200 – Envelope { "success": true, "data": ... }.
GET /api/education/courses/{courseId}/certificate/{resultId}/pdf¶
Parameters
| Field | Type | Required |
|---|---|---|
lang |
string | no |
language |
string | no |
The API reads these fields. A field is required when the table says yes.
Response – The response is a file, not JSON.
Want to try this feature? Start your innovanet trial →