Get an employee’s courses

This endpoint returns the courses an employee is assigned to, with the date and status of each of their trainings.

GET /api/v2/businesses/{businessId}/services/{serviceId}/employees/{employeeId}/course-assignments?fromDate={yyyy-MM-dd}&toDate={yyyy-MM-dd}&courseId={courseId}

If the data included in the request is correct, the response will return the list of course assignments of the employee.

Response example

[
  {
    "id": "5f0c2e1a-7b3d-4c2e-9a41-0d6f1b2c3e4f",
    "courseId": "CRS-CAJ",
    "employeeId": "093222",
    "date": "2026-10-19",
    "approved": true,
    "approvedUntil": "2027-10-19",
    "trainings": [
      {
        "trainingId": "TRN-CAJ-NOR",
        "date": "2026-10-19",
        "status": "ATTENDED"
      },
      {
        "trainingId": "TRN-CAJ-TPV",
        "date": "2026-10-19",
        "status": "ATTENDED"
      },
      {
        "trainingId": "TRN-CAJ-ARQ",
        "date": "2026-10-20",
        "status": "PASSED"
      }
    ]
  }
]
Details
  • id: external identifier of the course assignment. It is always generated by Orquest.

  • courseId: external identifier of the assigned course.

  • employeeId: external identifier of the employee.

  • date: start date of the assignment, that is, the date of its first training. Format yyyy-MM-dd.

  • approved: indicates whether the course has been passed (true) or not (false).

  • approvedUntil: date until which the approval is valid, in yyyy-MM-dd format. It is not included if the course has not been passed or if the approval does not expire, so approved must be checked to tell both cases apart.

  • trainings: trainings of the assignment, sorted by date. For each training, the following information is included:

    • trainingId: external identifier of the training.

    • date: date on which the training takes place, in yyyy-MM-dd format.

    • status: status of the training. The possible values are PENDING (no recorded result), ATTENDED (attended), NOT_ATTENDED (not attended), PASSED (passed) and FAILED (failed).

Considerations

The fromDate, toDate and courseId URL parameters are optional:

  • If courseId is given, only the assignments of that course are returned.

  • The fromDate and toDate parameters apply to the start date of the assignment (date), both dates included. An assignment that starts before fromDate is not returned, even if some of its trainings fall within the period.

If the employee has no course assignments, the request will return an empty array [].

Course status

The overall status of a course assignment depends on the current date and on the statuses of its trainings:

  • Planned: all trainings are in the future.

  • In training: there are past and future trainings.

If all trainings are in the past:

  • Passed: all assessed trainings are PASSED or, if no training is assessed, all of them are ATTENDED.

  • Failed: some training is FAILED.

  • Not attended: some training is NOT_ATTENDED.

  • Pending approval: in any other case.

To know whether the course is passed and in force, check the approved and approvedUntil fields.

If the course has been modified after the assignment was created, the assignment keeps the course definition it had at that time.

Error codes

This endpoint does not return any error codes of its own beyond those described in common errors.

What is a course?

What is a course assignment?