API · v1 · stabil
CODEMETA OSDeveloper Center
Konsole öffnen
Entity · course_vouchers

Course Voucher Schema

Schema-ID
course_voucher
Collection
course_vouchers
Permissions
  • Lesencourse_voucher_view
  • Anlegencourse_voucher_create
  • Änderncourse_voucher_edit
  • Löschencourse_voucher_delete
Beziehungen

Felder

Course Voucher Schema

course_vouchers4 Permissions

Single-use or limited-use voucher granting course access (ADR 0066b Phase 4)

codestringerforderlich

Voucher code (uppercased ASCII alnum + dash/underscore).

4–32 ZeichenPatternread-only
courseIduuiderforderlich→ course
shareIduuiderforderlich

course_shares row this voucher is bound to.

consumerTenantIdstringoptional
PatternDefault: nullnullable
discountModestringoptional
freefixed_off_centspercent_off
Default: "free"
discountValueintegeroptional

For fixed_off_cents: cents to subtract. For percent_off: 0..100. Ignored for free.

≥ 0Default: 0
maxRedemptionsintegererforderlich

Total times the code may be redeemed across all users.

≥ 1Default: 1
redemptionsintegeroptional
≥ 0Default: 0read-only
redeemedByobject[]optional
Default: []read-only
userIduuiderforderlich
tenantIduuiderforderlich
read-only
redeemedAtdatetimeerforderlich
enrollmentIduuiderforderlich
validFromdatetimeoptional
Default: nullnullable
validUntildatetimeoptional
Default: nullnullable
statusstringoptional
activedepletedexpiredrevoked
Default: "active"
notesstringoptional
max 2000 Zeichennullable

Standard-Endpoints

Diese Resource folgt dem generischen CRUD-Vertrag der Plattform. Lesen Sie die Konventionen für Pagination, Idempotenz, Optimistic Locking und Audit. Die wichtigsten Endpoints:

  • GET /api/v1/course_vouchers — Liste, paginiert + filterbar
  • GET /api/v1/course_vouchers/<id> — Einzelne Entity
  • POST /api/v1/course_vouchers — Anlegen
  • PATCH /api/v1/course_vouchers/<id> — Teil-Update
  • DELETE /api/v1/course_vouchers/<id> — Soft-Delete
  • GET /api/v1/course_vouchers/<id>/timeline — Audit + Aktivitäten

Suche