GET Course Inscriptions
GET /course-inscriptions
This endpoint returns a list of inscriptions for all the courses your company has taken.
➤ URL
GET https://back.whalemate.com/api/companies/v1/course-inscriptions
➤ Headers
{
"X-API-KEY": "YOUR_API_KEY",
"Content-Type": "application/json"
}
➤ Filtering
Filters can be applied to the route using the following structure:
filter[filter_name]=value
Each filter corresponds to a specific field and helps refine the query results. Below is an explanation of the available filters:
| Param | Type | Description |
|---|---|---|
name | string[] | Employee's first name |
last_name | string[] | Employee's last name |
email | string[] | Employee's email address |
department | string[] | Employee's department within the company |
country | string[] | Employee's country of residence |
teams | string[] | List of teams the employee belongs to |
courses | string[] | List of courses the employee is enrolled in |
from_inscription_date | string | Start of the inscription period (YYYY-MM-DD) |
to_inscription_date | string | End of the inscription period (YYYY-MM-DD) |
from_due_date | string | Start of the due date range (YYYY-MM-DD) |
to_due_date | string | End of the due date range (YYYY-MM-DD) |
Example Usage
Multiple filters can be combined in a single request to refine the search results. Example:
filter[department]=Sales&filter[country]=USA,Argentina&filter[from_inscription_date]=2025-01-01
This query will return employees in the "Sales" department from Argentina and USA who enrolled on or after January 1, 2025.
➤ Pagination
Pagination parameters allow controlling the number of results per page and navigating through pages.
| Param | Type | Description |
|---|---|---|
page | number | Specifies the page number to retrieve |
per_page | number | Defines the number of results per page |
Example Usage
filter[department]=Sales&per_page=25&page=2
This query will return the second page of results, with up to 25 employees per page, filtered by the "Sales" department.
➤ Types
{
victim_name: STRING;
victim_department: STRING;
course_title: STRING;
start_date: DATE;
due_date: DATE;
status: STRING;
victim_email: STRING;
groups: {
name: STRING;
}[];
victim_country: STRING;
events: {
title: STRING;
section_type: STRING;
completed_at: DATE;
result: NUMBER | NULL
status: 'APPROVED' | 'DISAPPROVED' | NULL
}[];
}[]
➤ Response
Example of successful response (200 OK)
[
{
victim_name: "John Doe",
victim_department: "Sales",
course_title: "Advanced Cybersecurity Concepts",
start_date: "2024-01-15",
due_date: "2024-03-15",
status: "In Progress",
victim_email: "johndoe@example.com",
groups: [
{ name: "Leadership Training" },
{ name: "Sales" }
],
victim_country: "Argentina",
events: [
{
title: "Example section",
section_type: "lecture",
completed_at: "2024-02-10",
result: null,
status: null
},
{
title: "Final Assessment",
section_type: "exam",
completed_at: "2024-02-10",
result: 8,
status: "APPROVED"
}
]
}
]
➤ Common Errors
| Code | Message | Couse |
|---|---|---|
| 401 | Unauthorized | API Key invalid or missing |
| 400 | Bad Request | One or more filters have an invalid format |
| 429 | Too Many Requests | The limit of requests was exceeded |
| 500 | Internal Server Error | Unexpected server error |