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
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
| Name | Type | Required | Location | Description |
|---|---|---|---|---|
criteria | CourseCompletionCriteriaInput[] | Yes | body | Array 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
| 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. |