Delete a course

This endpoint allows removing a course from the business catalog by its identifier.

DELETE /api/v2/businesses/{businessId}/courses/{courseId}

If the data included in the request is correct, the indicated course will be removed and the response will be a 204 No Content.

Considerations

If the course is a requirement of other courses, the request fails unless the optional parameter force=true is given. In that case, the course is also removed from the requirements of the courses that depended on it.

The (optional) force parameter determines whether the course is removed even if it is a requirement of other courses ?force=true. Defaults to false.

DELETE /api/v2/businesses/{businessId}/courses/{courseId}?force=true

When executed, the course is removed from every training path that includes it. If a training path is left without courses after the removal, the training path is also removed.

Existing assignments of the course are not removed. However, for the API the course no longer exists: it cannot be queried, modified or assigned.

Error codes

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

Code Message Description

404 Not Found

Course not found: […​]

The given courseId does not exist in the business.

400 Bad Request

error.course_is_requirement_of_others

The course is a requirement of other courses and force=true was not given. The message includes the names of the courses that depend on it.

What is a course?

What is a training path?