Assign a published course version; scoped token and stable request UUID required
/api/v1/partner/enrolments
Use this operation within the authenticated workflow described in the relevant feature guide.
Authentication does not grant every action. Company scope, roles and current record access still apply. Protected writes require CSRF verification; company writes also require recent sign-in. Read the authentication guide.
// Server-side only. Preserve requestId and payload on retries.
const response = await fetch('https://your-lms.example/api/v1/partner/enrolments', {
method: 'POST',
headers: { Authorization: 'Bearer ' + TOKEN, 'Content-Type': 'application/json' },
body: JSON.stringify({ requestId, userId, courseId, versionId }),
});
if (!response.ok) throw new Error('Request failed: ' + response.status);Request parameters
| Name | Location | Requirement | Schema |
|---|---|---|---|
Authorization | header | Required | {"type":"string"} |
Request body
Required body.
application/json
Schema: IntegrationAssignment
$schemastring · optional- A URL to the JSON Schema for this object.
courseIdstring · required- See the definition for constraints and nested fields.
dueAtstring · optional- See the definition for constraints and nested fields.
requestIdstring · required- See the definition for constraints and nested fields.
userIdstring · required- See the definition for constraints and nested fields.
versionIdstring · required- See the definition for constraints and nested fields.
Complete schema definition
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/IntegrationAssignment.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"courseId": {
"format": "uuid",
"type": "string"
},
"dueAt": {
"format": "date-time",
"type": "string"
},
"requestId": {
"format": "uuid",
"type": "string"
},
"userId": {
"format": "uuid",
"type": "string"
},
"versionId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"requestId",
"userId",
"courseId",
"versionId"
],
"type": "object"
}Responses
200 OK
{
"Cache-Control": {
"schema": {
"type": "string"
}
}
}application/json
Complete schema definition
{}default Error
application/problem+json
Schema: ErrorModel
$schemastring · optional- A URL to the JSON Schema for this object.
detailstring · optional- A human-readable explanation specific to this occurrence of the problem.
errorsarray | null · optional- Optional list of individual error details
instancestring · optional- A URI reference that identifies the specific occurrence of the problem.
statusinteger · optional- HTTP status code
titlestring · optional- A short, human-readable summary of the problem type. This value should not change between occurrences of the error.
typestring · optional- A URI reference to human-readable documentation for the error.
Complete schema definition
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/ErrorModel.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem.",
"examples": [
"Property foo is required but is missing."
],
"type": "string"
},
"errors": {
"description": "Optional list of individual error details",
"items": {
"$ref": "#/components/schemas/ErrorDetail"
},
"type": [
"array",
"null"
]
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem.",
"examples": [
"https://example.com/error-log/abc123"
],
"format": "uri",
"type": "string"
},
"status": {
"description": "HTTP status code",
"examples": [
400
],
"format": "int64",
"type": "integer"
},
"title": {
"description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
"examples": [
"Bad Request"
],
"type": "string"
},
"type": {
"default": "about:blank",
"description": "A URI reference to human-readable documentation for the error.",
"examples": [
"https://example.com/errors/example"
],
"format": "uri",
"type": "string"
}
},
"type": "object"
}The default error response can cover several status codes. Read error handling and retry guidance.
Referenced schemas
Expand a named definition to inspect nested fields and references. The download contains the complete OpenAPI document.
ErrorDetail
{
"additionalProperties": false,
"properties": {
"location": {
"description": "Where the error occurred, e.g. 'body.items[3].tags' or 'path.thing-id'",
"type": "string"
},
"message": {
"description": "Error message text",
"type": "string"
},
"value": {
"description": "The value at the given location"
}
},
"type": "object"
}ErrorModel
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/ErrorModel.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"detail": {
"description": "A human-readable explanation specific to this occurrence of the problem.",
"examples": [
"Property foo is required but is missing."
],
"type": "string"
},
"errors": {
"description": "Optional list of individual error details",
"items": {
"$ref": "#/components/schemas/ErrorDetail"
},
"type": [
"array",
"null"
]
},
"instance": {
"description": "A URI reference that identifies the specific occurrence of the problem.",
"examples": [
"https://example.com/error-log/abc123"
],
"format": "uri",
"type": "string"
},
"status": {
"description": "HTTP status code",
"examples": [
400
],
"format": "int64",
"type": "integer"
},
"title": {
"description": "A short, human-readable summary of the problem type. This value should not change between occurrences of the error.",
"examples": [
"Bad Request"
],
"type": "string"
},
"type": {
"default": "about:blank",
"description": "A URI reference to human-readable documentation for the error.",
"examples": [
"https://example.com/errors/example"
],
"format": "uri",
"type": "string"
}
},
"type": "object"
}IntegrationAssignment
{
"additionalProperties": false,
"properties": {
"$schema": {
"description": "A URL to the JSON Schema for this object.",
"examples": [
"https://example.com/schemas/IntegrationAssignment.json"
],
"format": "uri",
"readOnly": true,
"type": "string"
},
"courseId": {
"format": "uuid",
"type": "string"
},
"dueAt": {
"format": "date-time",
"type": "string"
},
"requestId": {
"format": "uuid",
"type": "string"
},
"userId": {
"format": "uuid",
"type": "string"
},
"versionId": {
"format": "uuid",
"type": "string"
}
},
"required": [
"requestId",
"userId",
"courseId",
"versionId"
],
"type": "object"
}Operation ID: partner-assign · Contract 0.0.0-dev