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

Course Voucher Schema

Schema-ID
course_voucher
Collection
course_vouchers
Permissions
  • Lezencourse_voucher_view
  • Aanmakencourse_voucher_create
  • Wijzigencourse_voucher_edit
  • Verwijderencourse_voucher_delete
Relaties

Velden

Course Voucher Schema

course_vouchers4 permissions

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

codestringvereist

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

4–32 tekensPatternread-only
shareIduuidvereist

course_shares row this voucher is bound to.

consumerTenantIdstringoptioneel
PatternDefault: nullnullable
discountModestringoptioneel
freefixed_off_centspercent_off
Default: "free"
discountValueintegeroptioneel

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

≥ 0Default: 0
maxRedemptionsintegervereist

Total times the code may be redeemed across all users.

≥ 1Default: 1
redemptionsintegeroptioneel
≥ 0Default: 0read-only
redeemedByobject[]optioneel
Default: []read-only
userIduuidvereist
tenantIduuidvereist
read-only
redeemedAtdatetimevereist
enrollmentIduuidvereist
validFromdatetimeoptioneel
Default: nullnullable
validUntildatetimeoptioneel
Default: nullnullable
statusstringoptioneel
activedepletedexpiredrevoked
Default: "active"
notesstringoptioneel
max. 2000 tekensnullable

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_vouchers — Lijst, gepagineerd + filterbaar
  • GET /api/v1/course_vouchers/<id> — Enkele entity
  • POST /api/v1/course_vouchers — Aanmaken
  • PATCH /api/v1/course_vouchers/<id> — Gedeeltelijke update
  • DELETE /api/v1/course_vouchers/<id> — Soft-delete
  • GET /api/v1/course_vouchers/<id>/timeline — Audit + activiteiten

Zoeken