API · v1 · stabiel
CODEMETA OSDeveloper Center
NL
Console openen
Entity · course_shares

Course Share Schema

Schema-ID
course_share
Collection
course_shares
Permissions
  • Lezencourse_share_view
  • Aanmakencourse_share_create
  • Wijzigencourse_share_edit
  • Verwijderencourse_share_delete
Relaties

Velden

Course Share Schema

course_shares4 permissions

Cross-tenant sharing configuration for an academy course

courseIduuidvereist→ course

Reference to a course in the sharing (MSP) tenant

recipientTypestringvereist

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

TENANTTEAMUSER
recipientIdstringvereist

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
pricingSnapshotobjectoptioneel

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

Default: {}
modestringoptioneel

Pricing mode. Phase 1 supports free + fixed_per_seat.

freefixed_per_seat
Default: "free"
amountCentsintegeroptioneel

Charge per enrollment in EUR cents (gross).

≥ 0Default: 0
currencystringoptioneel
Default: "EUR"
taxRatePercentnumberoptioneel
0 – 100Default: 19
chargingModestringoptioneel

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"
publishToPublicCatalogbooleanoptioneel

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
maxEnrollmentsintegeroptioneel

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

≥ 1Default: nullnullable
enrollmentDeadlinedatetimeoptioneel

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

Default: nullnullable
allowSelfEnrollmentbooleanoptioneel

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

Default: true
requireManagerApprovalbooleanoptioneel

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

Default: false
shareSettingsobjectoptioneel

Per-share rendering and branding tweaks

Default: {}
showMspBrandingbooleanoptioneel

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

Default: true
statusstringoptioneel

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"
invitationCodeHashstringoptioneel

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

read-onlynullable
invitedAtdatetimeoptioneel

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

read-onlynullable
invitedBystringoptioneel

User in the source tenant who issued the invitation.

read-onlynullable
invitationExpiresAtdatetimeoptioneel

The code can no longer be redeemed after this time.

read-onlynullable
acceptedAtdatetimeoptioneel

When the recipient tenant agreed to the terms.

read-onlynullable
acceptedBystringoptioneel

User in the RECIPIENT tenant who agreed to the terms.

read-onlynullable
declinedAtdatetimeoptioneel

When a recipient declined the invitation.

read-onlynullable
recipientEndedAtdatetimeoptioneel

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

read-onlynullable
createdByuuidoptioneel

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

read-only
updatedBystringoptioneel

User ID who last updated the share.

Patternread-onlynullable

Standaard-endpoints

Deze resource volgt het generieke CRUD-contract van het platform. Lees de conventies voor paginering, idempotentie, optimistic locking en audit. De belangrijkste endpoints:

  • GET /api/v1/course_shares — Lijst, gepagineerd + filterbaar
  • GET /api/v1/course_shares/<id> — Enkele entity
  • POST /api/v1/course_shares — Aanmaken
  • PATCH /api/v1/course_shares/<id> — Gedeeltelijke update
  • DELETE /api/v1/course_shares/<id> — Soft-delete
  • GET /api/v1/course_shares/<id>/timeline — Audit + activiteiten

Zoeken