Skip to main content

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:

ParamTypeDescription
namestring[]Employee's first name
last_namestring[]Employee's last name
emailstring[]Employee's email address
departmentstring[]Employee's department within the company
countrystring[]Employee's country of residence
teamsstring[]List of teams the employee belongs to
coursesstring[]List of courses the employee is enrolled in
from_inscription_datestringStart of the inscription period (YYYY-MM-DD)
to_inscription_datestringEnd of the inscription period (YYYY-MM-DD)
from_due_datestringStart of the due date range (YYYY-MM-DD)
to_due_datestringEnd 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.

ParamTypeDescription
pagenumberSpecifies the page number to retrieve
per_pagenumberDefines 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​

CodeMessageCouse
401UnauthorizedAPI Key invalid or missing
400Bad RequestOne or more filters have an invalid format
429Too Many RequestsThe limit of requests was exceeded
500Internal Server ErrorUnexpected server error

➤ Test Request​