POST /api/v1/diver/dive-logs accepts for a course_log dive. Served by LoggableCourseController::__invoke().App\Http\Controllers\Api\V1\Diver\LoggableCourseControllerapi.v1.diver.dive-logs.loggable-coursesAuthorization: Bearer {token}GET/api/v1/diver/dive-logs/loggable-courses200 OK{
"success": true,
"status": "success",
"message": "OK",
"data": [
{
"log_code": "9d3f6a1b2c4e4f7a8b0c1d2e3f4a5b6c",
"course": {
"id": 24,
"name": "Example Try Dive"
},
"instructor": {
"id": 700002,
"raid_id": "IT26-200-002",
"full_name": "Example Instructor"
},
"skills": [
{ "id": 796, "name": "Underwater tour in water no deeper than 5 metres/10 feet" },
{ "id": 806, "name": "Underwater tour in water no deeper than 12 metres/33 feet" }
]
}
]
}data is a plain array, empty ([]) when nothing is loggable. Entries are ordered by course log id.| Field | Type | Nullable | Description |
|---|---|---|---|
data[].log_code | string(32) | No | Course log code. Send it as log_code to POST /api/v1/diver/dive-logs |
data[].course.id | integer | No | Course id |
data[].course.name | string | Yes | Course name. null when the course no longer exists |
data[].instructor.id | integer | No | Send it as instructor_id to POST /api/v1/diver/dive-logs: it is the only value the create rule accepts for this course log |
data[].instructor.raid_id | string | Yes | RAID ID of the instructor. null when the user record is gone |
data[].instructor.full_name | string | Yes | Full name of the instructor. null when the user record is gone |
data[].skills | array | No | The skills still loggable on this course log, in the order of the course. Never empty: a course log without a loggable skill is not listed |
data[].skills[].id | integer | No | Send it as skill_id to POST /api/v1/diver/dive-logs |
data[].skills[].name | string | Yes | Skill name in the response language |
401 Unauthorized{
"success": false,
"status": "error",
"message": "Unauthenticated"
}message is Token expired or Invalid token when a bearer token was sent but is expired or unknown.422.skills[].name follows the response language (see "Response language" in the API README).docs/api/diver/dive-logs/GET_loggable_courses.mdcurl --location 'https://test.diveraid.com/api/v1/diver/dive-logs/loggable-courses' \
--header 'Authorization: Bearer <token>'{
"status": "success",
"message": "string",
"data": [
{
"log_code": "string",
"course": {
"id": 0,
"name": "string"
},
"instructor": {
"id": 0,
"raid_id": "string",
"full_name": "string"
},
"skills": [
{
"id": 0,
"name": "string"
}
]
}
]
}