Bulk Update Completion Criteria
Bulk-creates or updates completion criteria for one or more courses in a single request
Bulk-creates or updates completion criteria for one or more courses in a single request.
POST
https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk/updateExample request — update an existing criterion's threshold
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk/update" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": [
{
"id": "d4e5f6a7-1829-4c3d-8e4f-5a6b7c8d9e01",
"coursePercentViewed": 95
}
]
}'Example request — create a new criterion (omit id)
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk/update" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": [
{
"courseId": "8f2a1c34-5b6d-4e7f-9a01-2b3c4d5e6f70",
"type": "courseAssignmentComplete",
"courseAssignmentComplete": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c80"
}
]
}'Example request — change a criterion's type
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk/update" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": [
{
"id": "d4e5f6a7-1829-4c3d-8e4f-5a6b7c8d9e01",
"type": "videoPercentViewed",
"videoPercentViewed": 90,
"videoTopicId": "c3d4e5f6-7081-4b2c-9d3e-4f5a6b7c8d90"
}
]
}'Parameters
Requires the courses.edit permission. Omit id to create a new criterion; provide id to update an existing one. When changing type, fields belonging to the previous type are cleared automatically.
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
criteria | UpdateCourseCompletionCriteria[] | Yes | body | Array of completion criteria objects to create or update (see below). |
Each object in criteria (UpdateCourseCompletionCriteria):
| Field | Type | Required | Description |
|---|---|---|---|
id | uuid | No | UUID of the criterion to update. Omit to create a new criterion. |
courseId | uuid | Required when creating (no id) | UUID of the course the criterion applies to. |
type | CourseCompletionCriteriaType | No (required when creating) | The completion rule. One of: coursePercentViewed, articlePercentViewed, videoPercentViewed, articleTimeViewedInSeconds, courseTopicViewed, courseAssessmentPassed, courseAssignmentComplete, courseMeetingAttended, scormComplete, xApiComplete, surveyGizmoComplete, bongoAssignmentCompleted, proctoredTopicComplete. |
coursePercentViewed | integer | Required when type = coursePercentViewed | Percentage of course pages viewed (1–100). |
articlePercentViewed | integer | Required when type = articlePercentViewed | Percentage of an article viewed (1–100). |
videoPercentViewed | integer | Required when type = videoPercentViewed | Percentage of a video viewed (1–100). Also requires videoTopicId. |
videoTopicId | uuid | Required when type = videoPercentViewed | Video topic the percentage applies to. |
articleTimeViewedInSeconds | integer | Required when type = articleTimeViewedInSeconds | Time spent viewing an article, in seconds. |
courseTopicViewed | uuid | Required when type = courseTopicViewed | Topic (page) that must be viewed. |
courseAssessmentPassed | uuid | Required when type = courseAssessmentPassed | Assessment topic that must be passed. |
courseAssignmentComplete | uuid | Required when type = courseAssignmentComplete | Assignment topic that must be completed. |
courseMeetingAttended | uuid | Required when type = courseMeetingAttended | Meeting topic that must be attended. |
scormComplete | uuid | Required when type = scormComplete | SCORM topic that must be completed. |
xApiComplete | uuid | Required when type = xApiComplete | xAPI topic that must be completed. |
surveyGizmoComplete | uuid | Required when type = surveyGizmoComplete | SurveyGizmo/Alchemer topic that must be completed. |
bongoAssignmentCompleted | uuid | Required when type = bongoAssignmentCompleted | Bongo assignment topic that must be completed. |
proctoredTopicComplete | uuid | Required when type = proctoredTopicComplete | Proctored topic that must be completed. |
Example response
{
"createdCount": 0,
"updatedCount": 0,
"errors": [
{
"courseId": "00000000-0000-0000-0000-000000000000",
"type": "coursePercentViewed",
"error": "string",
"record": "string"
}
],
"warnings": [
"string"
]
}Response fields
| Field | Type | Description |
|---|---|---|
createdCount | integer | Number of completion criteria records created during this operation. |
updatedCount | integer | Number of completion criteria records updated during this operation. |
errors | BulkCompletionCriteriaError[] | Array of errors encountered while processing individual criteria records. |
errors.courseId | uuid | ID of the course associated with the failed criteria record. |
errors.type | CourseCompletionCriteriaType | Completion criteria type that failed to be created or updated (e.g., coursePercentViewed). |
errors.error | string | Human-readable message describing why the criteria record failed. |
errors.record | string | Serialized representation of the criteria record that caused the error. |
warnings | string[] | Non-fatal warnings generated during the bulk update, such as skipped or deprecated fields. |