Skip to main content
https://.thoughtindustries.com

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.

POSThttps://example.thoughtindustries.com/incoming/v2/content/completion-criteria/bulk

Example 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.

NameTypeRequiredLocationDescription
criteriaCourseCompletionCriteriaInput[]YesbodyArray of completion criteria objects, each scoped to a course (see below).

Each object in criteria (CourseCompletionCriteriaInput):

FieldTypeRequiredDescription
courseIduuidYesUUID of the course the criteria applies to.
typeCourseCompletionCriteriaTypeYesThe completion rule. One of: coursePercentViewed, articlePercentViewed, videoPercentViewed, articleTimeViewedInSeconds, courseTopicViewed, courseAssessmentPassed, courseAssignmentComplete, courseMeetingAttended, scormComplete, xApiComplete, surveyGizmoComplete, bongoAssignmentCompleted, proctoredTopicComplete.
coursePercentViewedintegerRequired when type = coursePercentViewedPercentage of course pages viewed (1–100).
articlePercentViewedintegerRequired when type = articlePercentViewedPercentage of an article viewed (1–100).
videoPercentViewedintegerRequired when type = videoPercentViewedPercentage of a video viewed (1–100). Also requires videoTopicId.
videoTopicIduuidRequired when type = videoPercentViewedVideo topic the percentage applies to.
articleTimeViewedInSecondsintegerRequired when type = articleTimeViewedInSecondsTime spent viewing an article, in seconds.
courseTopicVieweduuidRequired when type = courseTopicViewedTopic (page) that must be viewed.
courseAssessmentPasseduuidRequired when type = courseAssessmentPassedAssessment topic that must be passed.
courseAssignmentCompleteuuidRequired when type = courseAssignmentCompleteAssignment topic that must be completed.
courseMeetingAttendeduuidRequired when type = courseMeetingAttendedMeeting topic that must be attended.
scormCompleteuuidRequired when type = scormCompleteSCORM topic that must be completed.
xApiCompleteuuidRequired when type = xApiCompletexAPI topic that must be completed.
surveyGizmoCompleteuuidRequired when type = surveyGizmoCompleteSurveyGizmo/Alchemer topic that must be completed.
bongoAssignmentCompleteduuidRequired when type = bongoAssignmentCompletedBongo assignment topic that must be completed.
proctoredTopicCompleteuuidRequired when type = proctoredTopicCompleteProctored 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

FieldTypeDescription
createdCountintegerNumber of completion criteria records successfully created.
updatedCountintegerNumber of completion criteria records successfully updated.
errorsBulkCompletionCriteriaError[]Array of errors encountered during processing, one entry per failed criteria record.
errors.courseIduuidID of the course associated with the failed criteria record.
errors.typeCourseCompletionCriteriaTypeCompletion criteria type that failed, such as coursePercentViewed.
errors.errorstringHuman-readable message describing why the criteria record failed.
errors.recordstringString representation of the criteria record that caused the error.
warningsstring[]Non-fatal warnings generated during processing that did not prevent record creation or update.