API · v1 · stable
CODEMETA OSDeveloper Center
FR
Ouvrir la console
Entité · course_shares

Course Share Schema

ID du schéma
course_share
Collection
course_shares
Autorisations
  • Lirecourse_share_view
  • Créercourse_share_create
  • Modifiercourse_share_edit
  • Supprimercourse_share_delete
Relations

Champs

Course Share Schema

course_shares4 autorisations

Cross-tenant sharing configuration for an academy course

courseIduuidobligatoire→ course

Reference to a course in the sharing (MSP) tenant

recipientTypestringobligatoire

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

TENANTTEAMUSER
recipientIdstringobligatoire

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.

Motifnullable
pricingSnapshotobjectfacultatif

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

Par défaut : {}
modestringfacultatif

Pricing mode. Phase 1 supports free + fixed_per_seat.

freefixed_per_seat
Par défaut : "free"
amountCentsintegerfacultatif

Charge per enrollment in EUR cents (gross).

≥ 0Par défaut : 0
currencystringfacultatif
Par défaut : "EUR"
taxRatePercentnumberfacultatif
0 – 100Par défaut : 19
chargingModestringfacultatif

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
Par défaut : "wholesale"
publishToPublicCatalogbooleanfacultatif

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.

Par défaut : false
maxEnrollmentsintegerfacultatif

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

≥ 1Par défaut : nullnullable
enrollmentDeadlinedatetimefacultatif

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

Par défaut : nullnullable
allowSelfEnrollmentbooleanfacultatif

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

Par défaut : true
requireManagerApprovalbooleanfacultatif

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

Par défaut : false
shareSettingsobjectfacultatif

Per-share rendering and branding tweaks

Par défaut : {}
showMspBrandingbooleanfacultatif

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

Par défaut : true
statusstringfacultatif

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
Par défaut : "active"
invitationCodeHashstringfacultatif

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

lecture seulenullable
invitedAtdatetimefacultatif

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

lecture seulenullable
invitedBystringfacultatif

User in the source tenant who issued the invitation.

lecture seulenullable
invitationExpiresAtdatetimefacultatif

The code can no longer be redeemed after this time.

lecture seulenullable
acceptedAtdatetimefacultatif

When the recipient tenant agreed to the terms.

lecture seulenullable
acceptedBystringfacultatif

User in the RECIPIENT tenant who agreed to the terms.

lecture seulenullable
declinedAtdatetimefacultatif

When a recipient declined the invitation.

lecture seulenullable
recipientEndedAtdatetimefacultatif

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

lecture seulenullable
createdByuuidfacultatif

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

lecture seule
updatedBystringfacultatif

User ID who last updated the share.

Motiflecture seulenullable

Endpoints standard

Cette ressource suit le contrat CRUD générique de la plateforme. Lisez les conventions pour la pagination, l'idempotence, le verrouillage optimiste et l'audit. Les endpoints principaux :

  • GET /api/v1/course_shares — Liste, paginée et filtrable
  • GET /api/v1/course_shares/<id> — Une entité
  • POST /api/v1/course_shares — Créer
  • PATCH /api/v1/course_shares/<id> — Mise à jour partielle
  • DELETE /api/v1/course_shares/<id> — Suppression logique
  • GET /api/v1/course_shares/<id>/timeline — Audit et activités

Recherche