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

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": []
}'

Parameters

NameTypeRequiredLocationDescription
criteriaCourseCompletionCriteriaInput[]YesbodyArray of completion criteria objects to create or update, each associated with a specific course.

Example response

{
  "data": {
    "APIBulkCreateCompletionCriteria": {
      "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.