App\Http\Controllers\Api\V1\Diver\CourseController::show()api.v1.diver.courses.showAuthorization: Bearer {token}log_code and the authenticated user id, so another diver's log_code yields 404, not 403.GET/api/v1/diver/courses/{log_code}| Parameter | Type | Description |
|---|---|---|
log_code | string(32) | Opaque enrolment code from GET /api/v1/diver/courses. Not a primary key, and resolved manually rather than by route-model binding |
200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": {
"log_code": "a6b952760c2b672d2f45da6989b1a8c1",
"course": {
"id": 130,
"name": "Oxygen Administration",
"group": "recreational",
"need_quiz": true,
"need_exam": true,
"need_skills": true
},
"instructor": null,
"dive_center": {
"id": 308,
"name": "Simply Sidemount & Simply Tec Ltd"
},
"purchase_date": "2018-06-02",
"expire_date": "2019-06-02",
"quiz_lock": true,
"admin_lock": true,
"exam_enable": false,
"exam_unlock_hash": null,
"modules": [
{
"id": 463,
"name": "Management",
"quiz_questions": 10,
"quiz_minimum": 8,
"manual_url": "https://example.com/modules/463_course/manual-en.pdf",
"quiz_status": {
"passed": false,
"score": 30,
"date": "2026-09-17"
}
}
],
"exam_status": {
"passed": true,
"score": 93,
"date": "2018-02-11"
},
"skills_count": {
"total": 10,
"signed": 0
},
"is_completed": false
}
}GET /api/v1/diver/courses. The additions:| Field | Type | Nullable | Always present | Description |
|---|---|---|---|---|
data.instructor | object | Yes | Yes | id, full_name of the instructor, null without one |
data.exam_unlock_hash | string | Yes | Yes | sha256(unlock code) of the instructor, lowercase hex. null without an instructor and for a free learning. See the Offline exam unlock section of GET /api/v1/sync/download |
data.modules[].id | integer | No | Yes | Module id. Send it to the quiz endpoints |
data.modules[].name | string | No | Yes | |
data.modules[].quiz_questions | integer | Yes | Yes | How many questions the quiz draws |
data.modules[].quiz_minimum | integer | Yes | Yes | Score needed to pass |
data.modules[].manual_url | string | Yes | Yes | Absolute URL of the module manual (PDF) in the request locale. null when the module has no manual |
data.modules[].quiz_status | object | Yes | Yes | The latest attempt only: {passed, score, date}. null when never attempted |
data.exam_status | object | Yes | Yes | The latest exam attempt: {passed, score, date}. null when never attempted |
data.skills_count.total | integer | No | Yes | Skills in the enrolment's skill logs |
data.skills_count.signed | integer | No | Yes | Of those, signed by the diver |
quiz_status and exam_status show only the most recent attempt. There is no attempt history in this payload; use the quiz and exam result endpoints for that.401 Unauthorizedmessage is one of Unauthenticated, Invalid token, Token expired.404 Not Foundlog_code for this diver. Because the lookup is manual rather than route-model bound, the message does not include the looked-up value.skills_count.total counts the keys present in the skill logs' user_skills maps, which is the number of skills frozen for that enrolment at its course version. It is not the count of skills in the current catalogue version of the course.GET /api/v1/diver/free-learnings/{log_code}, where exam_status and skills_count are null by design.docs/api/diver/courses/GET_show.mdcurl --location 'https://test.diveraid.com/api/v1/diver/courses/' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": {
"log_code": "string",
"course": {
"id": 0,
"name": "string",
"group": "string",
"need_quiz": true,
"need_exam": true,
"need_skills": true
},
"instructor": {
"id": 0,
"full_name": "string"
},
"dive_center": {
"id": 0,
"name": "string"
},
"purchase_date": "2019-08-24",
"expire_date": "2019-08-24",
"quiz_lock": true,
"admin_lock": true,
"exam_enable": true,
"is_completed": true,
"is_repetition": true,
"repetition": {
"confirmed_at": "2019-08-24T14:15:22.123Z",
"confirmed_by": {
"id": 0,
"full_name": "string"
}
},
"exam_unlock_hash": "string",
"modules": [
{
"id": 0,
"name": "string",
"quiz_questions": 0,
"quiz_minimum": 0,
"manual_url": "string",
"quiz_status": {
"passed": true,
"score": 0,
"date": "2019-08-24"
}
}
],
"exam_status": {
"passed": true,
"score": 0,
"date": "2019-08-24"
},
"skills_count": {
"total": 0,
"signed": 0
}
}
}