API · v1 · estable
CODEMETA OSDeveloper Center
ES
Abrir la consola
Entidad · course_shares

Course Share Schema

ID del esquema
course_share
Colección
course_shares
Permisos
  • Leercourse_share_view
  • Crearcourse_share_create
  • Modificarcourse_share_edit
  • Eliminarcourse_share_delete
Relaciones

Campos

Course Share Schema

course_shares4 permisos

Cross-tenant sharing configuration for an academy course

courseIduuidobligatorio→ course

Reference to a course in the sharing (MSP) tenant

recipientTypestringobligatorio

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

TENANTTEAMUSER
recipientIdstringobligatorio

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.

Patrónadmite null
pricingSnapshotobjectopcional

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

Valor por defecto: {}
modestringopcional

Pricing mode. Phase 1 supports free + fixed_per_seat.

freefixed_per_seat
Valor por defecto: "free"
amountCentsintegeropcional

Charge per enrollment in EUR cents (gross).

≥ 0Valor por defecto: 0
currencystringopcional
Valor por defecto: "EUR"
taxRatePercentnumberopcional
0 – 100Valor por defecto: 19
chargingModestringopcional

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
Valor por defecto: "wholesale"
publishToPublicCatalogbooleanopcional

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.

Valor por defecto: false
maxEnrollmentsintegeropcional

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

≥ 1Valor por defecto: nulladmite null
enrollmentDeadlinedatetimeopcional

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

Valor por defecto: nulladmite null
allowSelfEnrollmentbooleanopcional

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

Valor por defecto: true
requireManagerApprovalbooleanopcional

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

Valor por defecto: false
shareSettingsobjectopcional

Per-share rendering and branding tweaks

Valor por defecto: {}
showMspBrandingbooleanopcional

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

Valor por defecto: true
statusstringopcional

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
Valor por defecto: "active"
invitationCodeHashstringopcional

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

solo lecturaadmite null
invitedAtdatetimeopcional

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

solo lecturaadmite null
invitedBystringopcional

User in the source tenant who issued the invitation.

solo lecturaadmite null
invitationExpiresAtdatetimeopcional

The code can no longer be redeemed after this time.

solo lecturaadmite null
acceptedAtdatetimeopcional

When the recipient tenant agreed to the terms.

solo lecturaadmite null
acceptedBystringopcional

User in the RECIPIENT tenant who agreed to the terms.

solo lecturaadmite null
declinedAtdatetimeopcional

When a recipient declined the invitation.

solo lecturaadmite null
recipientEndedAtdatetimeopcional

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

solo lecturaadmite null
createdByuuidopcional

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

solo lectura
updatedBystringopcional

User ID who last updated the share.

Patrónsolo lecturaadmite null

Endpoints estándar

Este recurso sigue el contrato CRUD genérico de la plataforma. Lea las convenciones sobre paginación, idempotencia, bloqueo optimista y auditoría. Los endpoints principales:

  • GET /api/v1/course_shares — Lista, paginada y filtrable
  • GET /api/v1/course_shares/<id> — Una entidad
  • POST /api/v1/course_shares — Crear
  • PATCH /api/v1/course_shares/<id> — Actualización parcial
  • DELETE /api/v1/course_shares/<id> — Eliminación lógica
  • GET /api/v1/course_shares/<id>/timeline — Auditoría y actividades

Búsqueda