API 레퍼런스
Units
Customer API: POST /units/{id}/open, POST /units/{id}/quiz
Parameters
idstring · pathrequiredlocalestring · queryLocale code (any letter case) or URL prefix of a live locale. Omitted: the customer's own locale (Contact.locale, set by their last checkout, sign-in or form submission), falling back to the site's primary locale. The unit title in the response follows it.
Request body
mode"read" | "download"
Response 200
mode"read" | "download"requiredurlstringrequiredSigned URL of the original file (download, or playback when there is no streaming version).
expiresInintegerrequiredSeconds. Videos: 1.5 × duration + 10 minutes, between 15 minutes and 4 hours; other files: 600.
titlestring | nullrequiredfileNamestringrequiredmimeTypestring | nullrequiredallowDownloadbooleanrequiredrenditionsobject[]Playback sources: original, plus hls (adaptive-streaming master manifest on a signed path, play this one when present), thumbnails (progress-bar storyboard VTT) and poster for transcoded videos. Same validity as expiresIn.
renditions[].kind"original" | "mp4" | "hls" | "poster" | "thumbnails"requiredrenditions[].urlstringrequiredrenditions[].mimeTypestringrequiredrenditions[].widthintegerrenditions[].heightintegerrenditions[].bytesintegerposterstring | nullthumbnailsstring | nullstreaming"none" | "partial" | "ready"partial: only the lowest quality is in the manifest yet; ready: all qualities.
Errors
UNIT_NOT_FOUND404NO_FILE404FILE_NOT_PROTECTED409FORBIDDEN403DOWNLOAD_NOT_ALLOWED403NOT_RELEASED403EXPIRED403LOCKED403
curl -X POST "https://{site}/api/v1/customer/units/{id}/open" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'Parameters
idstring · pathrequired
Request body
answersobjectrequiredquestion id → chosen option ids
Response 200
scoreintegerrequiredcorrectintegerrequiredtotalintegerrequiredpassedbooleanrequiredperQuestionobjectrequiredattemptsUsedintegerrequiredmaxAttemptsinteger | nullrequiredcanRetrybooleanrequiredrevealobject | nullrequiredreveal.questionsobject[]requiredreveal.questions[].idstringrequiredreveal.questions[].correctOptionIdsstring[]requiredreveal.questions[].explanationstring | nullrequiredunit"not_started" | "in-progress" | "completed"requireddeliverableobjectrequireddeliverable.idstringrequireddeliverable.percentnumberrequireddeliverable.completedbooleanrequireddeliverable.completedAtstring | nulldeliverableJustCompletedbooleanrequired
Errors
UNIT_NOT_FOUND404VALIDATION400NOT_A_QUIZ409QUIZ_NOT_READY409NO_ATTEMPTS_LEFT403LOCKED403
curl -X POST "https://{site}/api/v1/customer/units/{id}/quiz" \
-H "Authorization: Bearer $KANORIO_CUSTOMER_TOKEN" \
-H "Content-Type: application/json" \
-d '{}'