Get Certificate
B2B Learn
Get Certificate
The learner's certificate for a course.
Auth: portal API key + X-Learner-Email header. 404 "Not enrolled in this
course" if the header learner has no enrollment.
Eligibility (all required, no partial credit): every one of the course's
N modules has module_progress.completed_at set (watched, any order) AND
the best attempt passed every module quiz that has a question pool AND,
when the course has a final-exam pool, the final was passed at the 70%
threshold. N is courses.total_modules when set, else the count of
per-module video assets; N == 0 is NEVER eligible (an empty course cannot
certify).
Issued -> 200 {serial, course_id, final_score, issued_at} (first read
under the learner READ plane; final_score is null if the course has no
final exam). Not issued -> compute eligibility live on the owner plane:
lazy-issue when met (idempotent, same path as the grade/progress hooks,
ON CONFLICT DO NOTHING so a race never double-issues), else 200
{eligible: false, missing: [...]} where missing is a subset of
["watched_modules", "module_quizzes", "final_exam"].
GET
Get Certificate