Assign a training path

This endpoint allows assigning all the courses of a training path to several employees of a service, starting on a common date.

POST /api/v2/businesses/{businessId}/services/{serviceId}/training-paths/{trainingPathId}/assignments/bulk

Below is a detailed explanation of each of the fields that can make up the request body, with some being mandatory for the request to be successful.

All the fields of this request are mandatory.

Request body

JSON Analysis
{
  "employeeIds": [
    "string"
  ],
  "startDate": "string"
}
Details
  • employeeIds*: list of external identifiers of the employees the training path is assigned to. It cannot contain repeated employees.

  • startDate*: start date of the training path, which corresponds to its day 1. Format yyyy-MM-dd.

Request example

Once the analysis of the different fields has been done, an example of the request is shown:

POST /api/v2/businesses/BUSINESSID/services/SERVICEID/training-paths/TPID/assignments/bulk
{
  "employeeIds": [
    "000001"
  ],
  "startDate": "2026-10-19"
}

If the request is correct, the response will be a 201 Created with one course assignment per employee and per course of the training path.

Considerations

Assigning a training path is equivalent to assigning each of its courses separately: one course assignment is created per employee and per course of the training path.

The date of each training is calculated from startDate and the day the training has in the training path schedule. The date of each assignment (date) is the date of its first training.

The request is not idempotent: if it is repeated, duplicate assignments are created for the same employees.

Error codes

In addition to the common errors, this endpoint can return the following codes:

Code Message Description

404 Not Found

Training path not found: <trainingPathId>

The given trainingPathId does not exist in the business.

Person <personId> not found in service

One of the employees does not have a contract or an association with the service during the whole training path period. The message includes the internal Orquest identifier of the employee.

400 Bad Request

Training path has no courses

The training path has no courses.

Training path order is inconsistent with course

The schedule of the training path is not consistent with the current definition of one of its courses.

What is a course? And a training path?

What is a course assignment?