Bulk Create Completion Criteria
Creates or updates completion criteria for multiple courses in a single request
Creates or updates completion criteria for multiple courses in a single request.
POST
https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulkExample request — percentage of pages viewed
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": [
{
"courseId": "8f2a1c34-5b6d-4e7f-9a01-2b3c4d5e6f70",
"type": "coursePercentViewed",
"coursePercentViewed": 80
}
]
}'Example request — assessment passed
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": [
{
"courseId": "8f2a1c34-5b6d-4e7f-9a01-2b3c4d5e6f70",
"type": "courseAssessmentPassed",
"courseAssessmentPassed": "b2c3d4e5-6f70-4a1b-8c2d-3e4f5a6b7c80"
}
]
}'Example request — percentage of video viewed (requires videoTopicId)
curl -X POST "https://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk" \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"criteria": [
{
"courseId": "8f2a1c34-5b6d-4e7f-9a01-2b3c4d5e6f70",
"type": "videoPercentViewed",
"videoPercentViewed": 90,
"videoTopicId": "c3d4e5f6-7081-4b2c-9d3e-4f5a6b7c8d90"
}
]
}'Parameters
Requires the courses.edit permission.
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
criteria | CourseCompletionCriteriaInput[] | Yes | body | Array of completion criteria objects, each scoped to a course (see below). |
Each object in criteria (CourseCompletionCriteriaInput):
| Field | Type | Required | Description |
|---|---|---|---|
courseId | uuid | Yes | UUID of the course the criteria applies to. |
type | CourseCompletionCriteriaType | Yes | 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 successfully created. |
updatedCount | integer | Number of completion criteria records successfully updated. |
errors | BulkCompletionCriteriaError[] | Array of errors encountered during processing, one entry per failed criteria record. |
errors.courseId | uuid | ID of the course associated with the failed criteria record. |
errors.type | CourseCompletionCriteriaType | Completion criteria type that failed, such as coursePercentViewed. |
errors.error | string | Human-readable message describing why the criteria record failed. |
errors.record | string | String representation of the criteria record that caused the error. |
warnings | string[] | Non-fatal warnings generated during processing that did not prevent record creation or update. |