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

Course Share Schema

Schema ID
course_share
Collection
course_shares
Permissions
  • Readcourse_share_view
  • Createcourse_share_create
  • Editcourse_share_edit
  • Deletecourse_share_delete
Relationships

Fields

Course Share Schema

course_shares4 permissions

Cross-tenant sharing configuration for an academy course

courseIduuidrequired→ course

Reference to a course in the sharing (MSP) tenant

recipientTypestringrequired

Type of recipient. Phase 1 of ADR 0066b only implements TENANT; TEAM/USER reserved.

TENANTTEAMUSER
recipientIdstringrequired

ID of the recipient tenant (or team/user in future phases). Null only while an invitation is open or was declined (ADR 1168): the code decides who accepts.

Patternnullable
pricingSnapshotobjectoptional

Frozen pricing terms at the time of the share. Phase 1 stores the values; actual charging happens in Phase 2 (course_charges).

Default: {}
modestringoptional

Pricing mode. Phase 1 supports free + fixed_per_seat.

freefixed_per_seat
Default: "free"
amountCentsintegeroptional

Charge per enrollment in EUR cents (gross).

≥ 0Default: 0
currencystringoptional
Default: "EUR"
taxRatePercentnumberoptional
0 – 100Default: 19
chargingModestringoptional

external: the tenants settle between themselves, Codemeta only records the enrollments (invitation to an unrelated tenant, ADR 1168). wholesale: charge is bundled into the customer-tenant wholesale invoice (Phase 2). direct_stripe: customer pays in real-time via Stripe Connect on the MSP account (Phase 3).

wholesaledirect_stripeexternal
Default: "wholesale"
publishToPublicCatalogbooleanoptional

If true, the course is listed on the MSP public catalog at /academy/:mspSlug. Anonymous users can browse and self-register via email-token flow.

Default: false
maxEnrollmentsintegeroptional

Optional cap on total enrollments via this share. Null = unlimited.

≥ 1Default: nullnullable
enrollmentDeadlinedatetimeoptional

Optional ISO date-time after which no further enrollments are allowed.

Default: nullnullable
allowSelfEnrollmentbooleanoptional

If true, customer-tenant users can self-enroll; if false, only a customer-tenant manager may enroll others.

Default: true
requireManagerApprovalbooleanoptional

If true, self-enrollments are pending until a customer-tenant manager approves them.

Default: false
shareSettingsobjectoptional

Per-share rendering and branding tweaks

Default: {}
showMspBrandingbooleanoptional

Show the MSP-tenant logo on certificates and course pages.

Default: true
statusstringoptional

Share lifecycle. Auto-paused when either tenant loses the required academy module. invited/declined belong to invitations to unrelated tenants (ADR 1168) and grant no access.

activepausedrevokedinviteddeclined
Default: "active"
invitationCodeHashstringoptional

SHA-256 of the invitation code. Null once redeemed or declined. Never returned.

read-onlynullable
invitedAtdatetimeoptional

Set when the share started as an invitation; stays after acceptance.

read-onlynullable
invitedBystringoptional

User in the source tenant who issued the invitation.

read-onlynullable
invitationExpiresAtdatetimeoptional

The code can no longer be redeemed after this time.

read-onlynullable
acceptedAtdatetimeoptional

When the recipient tenant agreed to the terms.

read-onlynullable
acceptedBystringoptional

User in the RECIPIENT tenant who agreed to the terms.

read-onlynullable
declinedAtdatetimeoptional

When a recipient declined the invitation.

read-onlynullable
recipientEndedAtdatetimeoptional

When the recipient ended the share. The source tenant cannot reactivate it afterwards.

read-onlynullable
createdByuuidoptional

User ID (in source tenant) who created the share.

read-only
updatedBystringoptional

User ID who last updated the share.

Patternread-onlynullable

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/course_shares — List, paginated + filterable
  • GET /api/v1/course_shares/<id> — Single entity
  • POST /api/v1/course_shares — Create
  • PATCH /api/v1/course_shares/<id> — Partial update
  • DELETE /api/v1/course_shares/<id> — Soft delete
  • GET /api/v1/course_shares/<id>/timeline — Audit + activities

Search