RAID API
  1. Documents
  • 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
      • Update profile
      • Get authenticated user profile
      • Delete account
      • Update password
      • Update dive center association
    • Diver
      • Shared diver resources
      • Courses
        • List active courses
        • List expired courses
        • Get course detail
        • Submit module quiz
        • Get quiz result
        • Submit course exam
        • Get exam result
        • Get skills progress
        • Sign skills (diver)
      • Free Learnings
        • List enrolled free learnings
        • List available free learning courses
        • Enroll in a free learning course
        • Get free learning detail
        • Submit free learning module quiz
        • Get free learning quiz result
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List diver certifications
      • Dive Logs
        • Delete dive log
        • Create dive log
        • Update dive log
        • List loggable courses
        • List dive logs (paginated)
        • Get dive log
      • Awards
        • List award cards
      • Documents
        • Upload own medical certificate or insurance
          POST
        • List own medical certificates and insurance
          GET
        • List diver documents
          GET
      • 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
        • Get student quiz result
        • Get student exam result
        • Get student skills progress
        • Sign student skills
      • Certifications
        • Get certification history
        • Get certification quiz result
        • Get certification exam result
        • Get certification skills
        • List all professional certifications
        • List diver-level certifications
        • List specialty certifications
        • List professional certifications
        • List trainer certifications
        • List examiner certifications
      • Classroom
        • List classrooms
        • Get classroom progress (all students)
        • Get classroom student progress
        • Get classroom student quiz result
        • Get classroom student exam result
        • Get classroom student skills
        • Sign classroom student skills
      • Renewals
        • List renewal courses
        • Renewal status
        • Get renewal progress
        • Submit renewal module quiz
        • Get renewal quiz result
        • Submit renewal exam
        • Get renewal exam result
        • Get renewal skills progress
        • Sign renewal skills
      • Recognitions
        • List recognition courses
      • Dive Logs
        • Get student dive log
        • Sign student dive log
        • List student dive logs for a course
      • Store
    • Sync
      • Upload offline operations
      • Download full course data for offline use
      • Get sync status
    • Dive Center
    • 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
  • Schemas
    • Frontend API Schema
      • DiverSearch
    • SuccessResponse
    • DiverCertification
    • ValidationErrorResponse
    • TwoFactorChallengeResponse
    • TokenResponse
    • ErrorResponse
    • DiveLog
    • UserProfile
    • CourseLog
    • CourseLogDetail
    • QuizResult
    • ExamResult
    • SkillProgress
    • Certification
    • PaginatedDiveLogs
    • StoreItem
    • PaymentIntentResponse
    • OrderConfirmResponse
    • OrderStatusResponse
    • InstructorSearch
    • DiveCenterSearch
  1. Documents

List own medical certificates and insurance

GET
https://test.diveraid.com/api/v1/diver/medical-documents
Diver / Documents
Maintainer:Not configured

Overview#

Lists the authenticated user's own medical certificates and insurance, with the state the model computes for each: whether one is required, whether it is valid, expired, approved or rejected. Served by DocumentController::medical(). Any authenticated user can call it, whatever their role.
The files come from the same collections POST /api/v1/diver/documents writes to (medical_certificate, medical_certificate_professional, insurance_certificate), which GET /api/v1/diver/documents does not list.
Controller: App\Http\Controllers\Api\V1\Diver\DocumentController::medical()
Route name: api.v1.diver.medical-documents.index

Authentication#

Type: Bearer Token
Header: Authorization: Bearer {token}

Request#

Method: GET
Path: /api/v1/diver/medical-documents
No parameters and no body.

Example request#


Response 200 OK#

Captured live against a professional with 4 medical certificates and 3 insurance documents, abbreviated to 2 of each. Issuer, number and file names are replaced with examples; every other value is as returned.
{
  "success": true,
  "status": "success",
  "message": "OK",
  "data": {
    "medical_certificate": {
      "required": false,
      "valid": true,
      "expired": false,
      "approved": false,
      "rejected": false,
      "current": {
        "id": 112465,
        "name": "example-certificate-1.jpg",
        "file_name": "example-certificate-1.jpg",
        "mime_type": "image/jpeg",
        "size": 1019974,
        "url": "https://raid-backend.s3.amazonaws.com/user_documents/112465/example-certificate-1.jpg",
        "created_at": "2026-04-27 20:06:20",
        "document": {
          "id": 7102,
          "type": "pro_medical_certificate",
          "status": "pending",
          "is_professional": true,
          "issuer": "Example Issuer",
          "number": "EX-7102",
          "issue_date": "2026-04-24",
          "expire_date": "2027-04-23",
          "approved_at": null,
          "rejected_at": null,
          "reject_notation": null
        }
      },
      "documents": [
        {
          "id": 112465,
          "name": "example-certificate-1.jpg",
          "file_name": "example-certificate-1.jpg",
          "mime_type": "image/jpeg",
          "size": 1019974,
          "url": "https://raid-backend.s3.amazonaws.com/user_documents/112465/example-certificate-1.jpg",
          "created_at": "2026-04-27 20:06:20",
          "document": {
            "id": 7102,
            "type": "pro_medical_certificate",
            "status": "pending",
            "is_professional": true,
            "issuer": "Example Issuer",
            "number": "EX-7102",
            "issue_date": "2026-04-24",
            "expire_date": "2027-04-23",
            "approved_at": null,
            "rejected_at": null,
            "reject_notation": null
          }
        },
        {
          "id": 112462,
          "name": "example-certificate-2.jpg",
          "file_name": "example-certificate-2.jpg",
          "mime_type": "image/jpeg",
          "size": 1086530,
          "url": "https://raid-backend.s3.amazonaws.com/user_documents/112462/example-certificate-2.jpg",
          "created_at": "2026-04-27 19:46:50",
          "document": {
            "id": 7099,
            "type": "diver_medical_certificate",
            "status": "approved",
            "is_professional": true,
            "issuer": "Example Issuer",
            "number": "EX-7099",
            "issue_date": "2026-04-24",
            "expire_date": "2027-04-23",
            "approved_at": "2026-04-27 19:46:50",
            "rejected_at": null,
            "reject_notation": null
          }
        }
      ]
    },
    "insurance": {
      "required": false,
      "valid": true,
      "expired": false,
      "approved": true,
      "rejected": false,
      "current": {
        "id": 112464,
        "name": "example-certificate-3.jpg",
        "file_name": "example-certificate-3.jpg",
        "mime_type": "image/jpeg",
        "size": 146424,
        "url": "https://raid-backend.s3.amazonaws.com/user_documents/112464/example-certificate-3.jpg",
        "created_at": "2026-04-27 20:05:29",
        "document": {
          "id": 7101,
          "type": "pro_insurance",
          "status": "approved",
          "is_professional": true,
          "issuer": "Example Issuer",
          "number": "EX-7101",
          "issue_date": "2026-04-22",
          "expire_date": "2027-04-21",
          "approved_at": "2026-05-13 18:07:16",
          "rejected_at": null,
          "reject_notation": null
        }
      },
      "documents": [
        {
          "id": 112464,
          "name": "example-certificate-3.jpg",
          "file_name": "example-certificate-3.jpg",
          "mime_type": "image/jpeg",
          "size": 146424,
          "url": "https://raid-backend.s3.amazonaws.com/user_documents/112464/example-certificate-3.jpg",
          "created_at": "2026-04-27 20:05:29",
          "document": {
            "id": 7101,
            "type": "pro_insurance",
            "status": "approved",
            "is_professional": true,
            "issuer": "Example Issuer",
            "number": "EX-7101",
            "issue_date": "2026-04-22",
            "expire_date": "2027-04-21",
            "approved_at": "2026-05-13 18:07:16",
            "rejected_at": null,
            "reject_notation": null
          }
        },
        {
          "id": 82019,
          "name": "example-certificate-4.jpg",
          "file_name": "example-certificate-4.jpg",
          "mime_type": "image/jpeg",
          "size": 520260,
          "url": "https://raid-backend.s3.amazonaws.com/user_documents/82019/example-certificate-4.jpg",
          "created_at": "2025-04-09 09:53:35",
          "document": {
            "id": 547,
            "type": "pro_insurance",
            "status": "approved",
            "is_professional": true,
            "issuer": "Example Issuer",
            "number": "EX-547",
            "issue_date": "2025-04-21",
            "expire_date": "2026-04-20",
            "approved_at": "2025-04-10 15:33:13",
            "rejected_at": null,
            "reject_notation": null
          }
        }
      ]
    }
  }
}
A user with no documents (captured live; a diver with nothing uploaded):
{
  "success": true,
  "status": "success",
  "message": "OK",
  "data": {
    "medical_certificate": {
      "required": false,
      "valid": true,
      "expired": true,
      "approved": false,
      "rejected": false,
      "current": null,
      "documents": []
    },
    "insurance": {
      "required": false,
      "valid": false,
      "expired": true,
      "approved": false,
      "rejected": false,
      "current": null,
      "documents": []
    }
  }
}

Response fields#

data has two sections, medical_certificate and insurance, with the same keys.
FieldTypeNullableNotes
requiredbooleanNoMedical: the distributor setting pro_certificate_required for a user whose qualification is professional, certificate_required otherwise. Insurance: the distributor setting pro_insurance_required for a professional qualification, always false otherwise. It follows the user's qualification, not the professional role the upload uses
validbooleanNoMedical: true when no certificate is required (by the distributor or by a medical condition declared in the last medical form), otherwise true only when the current certificate exists, has not expired and is approved. Insurance: false when the user has no insurance, even when none is required; otherwise, when insurance is required, true only if the current one has not expired and is approved, and when it is not required true
expiredbooleanNotrue when there is no current document. Medical: the current certificate's expire_date is in the past. Insurance: its expire_date is not after now in the user's timezone
approvedbooleanNoThe current document exists and has approved_at set (it reads the date, not status)
rejectedbooleanNoThe current document exists and has rejected_at set
currentobjectYesThe item of the user's current document, or null when there is none. See below
documentsarrayNoEvery document of the section, newest upload first (created_at, then id). Medical covers both diver_medical_certificate and pro_medical_certificate
The current document is the one with the latest expire_date, ties broken by the latest created_at, among documents that have a file. So current is not always documents[0]: a newer upload with an earlier expiry sits first in documents, while current stays the one that expires last.

Item fields#

The first seven keys are the item shape of GET /api/v1/diver/documents (see ../documents/GET_list.md) and document is the object of the upload response (see ../documents/POST_upload.md), with three keys added.
FieldTypeNullableNotes
id, name, file_name, mime_type, size, url, created_atYesAll null when the document's file no longer exists. The document is still listed
document.idintegerNoDocument row id
document.typestringNodiver_medical_certificate, pro_medical_certificate or pro_insurance
document.statusstringNopending, approved or rejected
document.is_professionalbooleanNo
document.issuer, document.numberstringYes
document.issue_date, document.expire_datestringYesY-m-d
document.approved_atstringYesY-m-d H:i:s. Only in this list, not in the upload response
document.rejected_atstringYesY-m-d H:i:s. Only in this list
document.reject_notationstringYesThe reason the reviewer gave when rejecting, up to 200 characters. Only in this list

Errors#

401 Unauthorized#

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

Notes#

Read-only, no side effects. The number of database queries does not depend on the number of documents.
There is no way to delete or replace a document through the API. Uploading a sixth document of a type deletes the oldest one.
A user without a distributor cannot be evaluated: the response is a 500. Their uploads fail the same way.

Source: docs/api/diver/medical-documents/GET_list.md

Request

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

Responses

🟢200
application/json
Success
Bodyapplication/json

🟠401
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://test.diveraid.com/api/v1/diver/medical-documents' \
--header 'Authorization: Bearer <token>'
Response Response Example
200 - Example 1
{
    "success": true,
    "status": "success",
    "message": "string",
    "data": {
        "medical_certificate": {
            "required": true,
            "valid": true,
            "expired": true,
            "approved": true,
            "rejected": true,
            "current": {
                "id": 0,
                "name": "string",
                "file_name": "string",
                "mime_type": "string",
                "size": 0,
                "url": "string",
                "created_at": "string",
                "document": {
                    "id": 0,
                    "type": "diver_medical_certificate",
                    "status": "pending",
                    "is_professional": true,
                    "issuer": "string",
                    "number": "string",
                    "issue_date": "2019-08-24",
                    "expire_date": "2019-08-24",
                    "approved_at": "string",
                    "rejected_at": "string",
                    "reject_notation": "string"
                }
            },
            "documents": [
                {
                    "id": 0,
                    "name": "string",
                    "file_name": "string",
                    "mime_type": "string",
                    "size": 0,
                    "url": "string",
                    "created_at": "string",
                    "document": {
                        "id": 0,
                        "type": "diver_medical_certificate",
                        "status": "pending",
                        "is_professional": true,
                        "issuer": "string",
                        "number": "string",
                        "issue_date": "2019-08-24",
                        "expire_date": "2019-08-24",
                        "approved_at": "string",
                        "rejected_at": "string",
                        "reject_notation": "string"
                    }
                }
            ]
        },
        "insurance": {
            "required": true,
            "valid": true,
            "expired": true,
            "approved": true,
            "rejected": true,
            "current": {
                "id": 0,
                "name": "string",
                "file_name": "string",
                "mime_type": "string",
                "size": 0,
                "url": "string",
                "created_at": "string",
                "document": {
                    "id": 0,
                    "type": "diver_medical_certificate",
                    "status": "pending",
                    "is_professional": true,
                    "issuer": "string",
                    "number": "string",
                    "issue_date": "2019-08-24",
                    "expire_date": "2019-08-24",
                    "approved_at": "string",
                    "rejected_at": "string",
                    "reject_notation": "string"
                }
            },
            "documents": [
                {
                    "id": 0,
                    "name": "string",
                    "file_name": "string",
                    "mime_type": "string",
                    "size": 0,
                    "url": "string",
                    "created_at": "string",
                    "document": {
                        "id": 0,
                        "type": "diver_medical_certificate",
                        "status": "pending",
                        "is_professional": true,
                        "issuer": "string",
                        "number": "string",
                        "issue_date": "2019-08-24",
                        "expire_date": "2019-08-24",
                        "approved_at": "string",
                        "rejected_at": "string",
                        "reject_notation": "string"
                    }
                }
            ]
        }
    }
}
Modified at 2026-10-09 08:49:40
Previous
Upload own medical certificate or insurance
Next
List diver documents
Built with