API · v1 · stable
CODEMETA OSDeveloper Center
EN
Open console
Entity · enrollments

Enrollment Schema

Schema ID
enrollment
Collection
enrollments
Permissions
  • Readenrollment_view
  • Createenrollment_create
  • Editenrollment_edit
  • Deleteenrollment_delete
Relationships

Fields

Enrollment Schema

enrollments4 permissions

Schema for validating student enrollment entities in the Academy/LMS module

courseIdstringrequired

ID of the course the student is enrolled in

min 1 characters
userIdstringrequired

ID of the enrolled student

min 1 charactersread-only
statusstringrequired

Current enrollment status. pending_payment is set for Stripe-direct charges before the PaymentIntent succeeds (ADR 0066b Phase 3). pending_approval/rejected gate self-enrollment behind team-lead approval (WP-D).

activecompleteddroppedsuspendedpending_paymentpending_approvalrejected
enrolledAtdatetimerequired

Date and time when the student enrolled

completedAtdatetimeoptional

Date and time when the course was completed

nullable
feedbackRatingnumberoptional

Completion feedback: 1–5 star satisfaction rating (WP-B).

1 – 5nullable
feedbackCommentstringoptional

Completion feedback: free-text comment (WP-B).

max 2000 charactersnullable
feedbackNpsnumberoptional

Completion feedback: optional 0–10 recommendation score (NPS, WP-B).

0 – 10nullable
feedbackAtdatetimeoptional

When completion feedback was submitted (WP-B).

nullable
submittedByUserIdstringoptional

User who self-enrolled and triggered the approval request (WP-D).

nullable
reviewedByUserIdstringoptional

Team lead / approver who approved or rejected the enrollment (WP-D).

nullable
rejectionReasonstringoptional

Reason given when an enrollment was rejected (WP-D).

max 1000 charactersnullable
progressnumberrequired

Course completion progress as percentage

0 – 100
lastAccessedAtdatetimeoptional

Last time the student accessed the course

nullable
certificateIssuedbooleanoptional

Whether a certificate has been issued for completion

nullable
certificateIssuedAtdatetimeoptional

Date and time when the certificate was issued

nullable
certificateRevokedAtdatetimeoptional

When the certificate of this enrollment was revoked. Blocks a new issue.

read-onlynullable
gradebookEntryIdstringoptional

ID of the associated gradebook entry

nullable
currentLessonIdstringoptional

ID of the last lesson/section the student visited

nullable
currentUnitIdstringoptional

ID of the last learning unit the student visited

nullable
consumerTenantIdstringoptional

Tenant the learner belongs to, when different from the course owner. Null for MSP-internal enrollments.

read-onlynullable
courseTenantIdstringoptional

Platform courses only: tenant holding the course content. The enrollment itself lives in the learner tenant.

read-onlynullable
shareIdstringoptional

course_shares row that authorised this cross-tenant enrollment.

nullable
pricingSnapshotobjectoptional

Frozen pricing at enrollment time (set on cross-tenant enrollments).

nullable
modestringoptional
freefixed_per_seat
amountCentsintegeroptional
≥ 0
currencystringoptional
taxRatePercentnumberoptional
0 – 100
enrolledCourseVersionintegeroptional

Course.contentVersion at the moment of enrollment. The frontend compares with the current course version and warns the learner if the course was updated mid-flight.

≥ 1nullable

Standard endpoints

This resource follows the platform's generic CRUD contract. Read the conventions for pagination, idempotency, optimistic locking and audit. The most important endpoints:

  • GET /api/v1/enrollments — List, paginated + filterable
  • GET /api/v1/enrollments/<id> — Single entity
  • POST /api/v1/enrollments — Create
  • PATCH /api/v1/enrollments/<id> — Partial update
  • DELETE /api/v1/enrollments/<id> — Soft delete
  • GET /api/v1/enrollments/<id>/timeline — Audit + activities

Search