RAID API
  1. Dive Logs
  • DiveRAID frontend public API
    • Search divers
      POST
    • Search instructors
      POST
    • Search dive centers
      POST
    • Search dive centers by country
      GET
  • DiveRAID rest API V1
    • Auth
      • Register a new user
      • Login and get a Sanctum token
      • Send password reset email
      • Reset password using token
      • Logout and revoke the current token
      • Resend email verification
      • Complete a two-factor login and get a Sanctum token
    • Profile
      • The user resource
      • Get authenticated user profile
      • Update profile
      • Register push token
      • Update password
      • Remove push token
      • Rotate exam unlock code
      • Delete account
      • Update dive center association
    • Diver
      • Shared diver resources
      • Courses
        • List active courses
        • Get exam result
        • Submit course exam
        • Sign skills (diver)
        • Get course detail
        • Submit module quiz
        • List expired courses
        • Get quiz result
        • Get skills progress
      • Free Learnings
        • List enrolled free learnings
        • Get free learning quiz result
        • List available free learning courses
        • Submit free learning module quiz
        • Get free learning detail
        • Enroll in a free learning course
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List diver certifications
      • Dive Logs
        • Delete dive log
          DELETE
        • Create dive log
          POST
        • Update dive log
          PATCH
        • List loggable courses
          GET
        • List dive logs (paginated)
          GET
        • Get dive log
          GET
      • Awards
        • List the recognition cards issued to the user
      • Documents
        • Upload own medical certificate or insurance
        • List own medical certificates and insurance
        • List diver documents
      • Forms
        • List diver forms
      • Medical
        • Get medical questionnaire structure
        • Submit medical questionnaire
      • Store
        • List courses available for purchase
        • Get order status
    • Professional
      • Students
        • List students
        • Get student progress
        • Sign student skills
        • Get student exam result
        • Get student quiz result
        • Get student skills progress
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List all professional certifications
        • List diver-level certifications
        • List examiner certifications
        • List professional certifications
        • List specialty certifications
        • List trainer certifications
      • Classroom
        • List classrooms
        • Get classroom progress (all students)
        • Get classroom student progress
        • Sign classroom student skills
        • Get classroom student exam result
        • Get classroom student quiz result
        • Get classroom student skills
      • Renewals
        • List renewal courses
        • Get renewal exam result
        • Submit renewal exam
        • Sign renewal skills
        • Renewal status
        • Get renewal progress
        • Submit renewal module quiz
        • Get renewal quiz result
        • Get renewal skills progress
      • Dive Logs
        • Get student dive log
        • Sign student dive log
        • List student dive logs for a course
    • Sync
      • Download full course data for offline use
      • Upload offline operations
      • Get sync status
    • Public
      • List all countries
      • Dive-log enum values with labels in the response language
      • Get country data
      • Get country divisions (states/provinces)
      • List time zone identifiers, optionally narrowed to one country
      • List, search, and radius-search publicly visible dive centres
      • Every publicly visible, geolocated dive centre as a map marker
      • Countries with at least one publicly visible dive centre
      • Full detail of one publicly visible dive centre
    • Library
      • List the RAID document library
      • List the current RAID standards
  • Schemas
    • Frontend API Schema
      • DiverSearch
    • SuccessResponse
    • DiverCertification
    • ValidationErrorResponse
    • TwoFactorChallengeResponse
    • TokenResponse
    • IssuedCertification
    • ErrorResponse
    • DiveLog
    • ExamResult
    • QuizResult
    • CourseLogDetail
    • CourseLog
    • UserProfile
    • SkillProgress
    • Certification
    • PaginatedDiveLogs
    • StoreItem
    • PaymentIntentResponse
    • OrderConfirmResponse
    • OrderStatusResponse
    • InstructorSearch
    • DiveCenterSearch
  1. Dive Logs

Delete dive log

DELETE
https://test.diveraid.com/api/v1/diver/dive-logs/{diveLog}
Diver / Dive Logs
Maintainer:Not configured

Overview#

Deletes one of the authenticated diver's dive logs. Served by DiveLogController::destroy(). The delete is a soft delete: the row stays in the database with deleted_at set, and from that moment the dive log no longer exists for the API (see Notes). After the delete the diver's remaining dive logs are renumbered.
A dive log that has been signed by an instructor (is_signed = true) cannot be deleted, not even by its owner.
Controller: App\Http\Controllers\Api\V1\Diver\DiveLogController::destroy()
Route name: api.v1.diver.dive-logs.destroy

Authentication#

Type: Bearer Token (Sanctum)
Header: Authorization: Bearer {token}
Ownership and the signed state are decided by DiveLogPolicy::deleteOwn(), which no role bypasses: an administrator token cannot delete a dive log that is not its own.

Request#

Method: DELETE
Path: /api/v1/diver/dive-logs/{diveLog}

Path parameters#

ParameterTypeDescription
{diveLog}integerDive log primary key, route-model-bound
There is no request body.

Example request#


Response 200 OK#

Captured live.
{
  "success": true,
  "status": "success",
  "message": "Dive log deleted successfully"
}
There is no data key: the envelope omits it when there is nothing to return.

Errors#

401 Unauthorized#

{
  "success": false,
  "status": "error",
  "message": "Unauthenticated"
}

403 Forbidden — not the owner, or the dive log is signed#

Captured live twice: against a dive log of another user, and against the diver's own signed dive log. Both answers are identical, so a client cannot tell the two cases apart. The refusal is raised inside the controller, so it carries the standard envelope (unlike the 403 of PATCH_update.md).
{
  "success": false,
  "status": "error",
  "message": "Forbidden"
}

404 Not Found#

Captured live by repeating the delete of the same id. Laravel's default route-model-binding 404; the body carries the looked-up id. An id that never existed answers the same way.
{
  "message": "No query results for model [App\\Models\\Users\\DiveLog] 671996"
}

Notes#

Side effects: sets deleted_at on the DiveLog row, then calls DiveLog::reorder($user), which renumbers every remaining dive log of the diver by date. The number of later dive logs therefore changes after a delete.
A deleted dive log answers 404 on GET /api/v1/diver/dive-logs/{diveLog}, PATCH /api/v1/diver/dive-logs/{diveLog} and a second DELETE, and is no longer listed by GET /api/v1/diver/dive-logs.
There is no endpoint to restore a deleted dive log through the API.

Source: docs/api/diver/dive-logs/DELETE_destroy.md

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Path Params

Responses

🟢200
application/json
Dive log deleted
Bodyapplication/json

🟠401
🟠403
🟠404
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request DELETE 'https://test.diveraid.com/api/v1/diver/dive-logs/' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "status": "success",
    "message": "string",
    "data": null
}
Modified at 2026-10-08 12:32:14
Previous
List diver certifications
Next
Create dive log
Built with