RAID API
  1. Medical
  • 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
        • Create dive log
        • Update dive log
        • List loggable courses
        • List dive logs (paginated)
        • Get dive log
      • 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
          GET
        • Submit medical questionnaire
          POST
      • 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. Medical

Submit medical questionnaire

POST
https://test.diveraid.com/api/v1/diver/medical
Diver / Medical
Maintainer:Not configured

Overview#

Submits the diver's medical questionnaire, deriving has_condition from the answers and creating a MedicalQuestionLog. Served by MedicalController::submit(). Blocked entirely while a non-expired medical log already exists.
Controller: App\Http\Controllers\Api\V1\Diver\MedicalController::submit()
Route name: api.v1.diver.medical.submit

Authentication#

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

Request#

Method: POST
Path: /api/v1/diver/medical
Content-Type: application/json

Body#

{
  "disclaimer_accepted": true,
  "answers": { "43": true, "44": false, "45": false },
  "group_answers": { "43": { "53": false, "54": false } },
  "policies": { "p1": true, "p2": true }
}
FieldTypeRequiredValidationDescription
disclaimer_acceptedbooleanYesrequired|boolean|acceptedMust be true — accepted rejects false
answersobjectYesrequired|array|min:1{questionId: bool}, keyed by GET_questions.md's questions[].id
answers.*booleanYesrequired|boolean
group_answersobjectNonullable|array{parentQuestionId: {subQuestionId: bool}}. Only consulted when the parent's own answer is true — see Notes
group_answers.*objectNoarray
group_answers.*.*booleanNoboolean
policiesobjectYesrequired|array|min:1{"p{policyId}": bool}, keyed by GET_questions.md's policies[].id prefixed with p
policies.*booleanYesrequired|boolean|acceptedEvery supplied policy value must itself be true
Validated by App\Http\Requests\Api\V1\Diver\SubmitMedicalRequest, extends ApiFormRequest — full envelope 422.

Example request#


Response 201 Created#

Captured live.
{
  "success": true,
  "status": "success",
  "message": "Medical form submitted successfully",
  "data": {
    "has_condition": false,
    "expire_date": "2027-09-17"
  }
}

Response fields#

FieldTypeNullableNotes
has_conditionbooleanNotrue if any leaf answer (a non-group question answered true, or a sub-question answered true) was positive
expire_datestringNoY-m-d, now()->addMonths($expireMonths), where $expireMonths comes from the diver's distributor settings (medical_expire_months) — not a fixed value across the platform
Confirmed live: answering the parent question true alone does not set has_condition when that parent has_group_questions — only the sub-question answers matter for a grouped question. In the example above, 43 (a grouped question) was answered true but every sub-answer under it was false, and has_condition came back false.

Errors#

401 Unauthorized#

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

422 Unprocessable Entity — a non-expired medical log already exists#

Captured live. App's own error shape, distinct from the validation shape below.
{
  "success": false,
  "status": "error",
  "message": "Medical form cannot be submitted until the current one expires"
}
This check runs before validation — an empty or malformed body against an account with a current medical log still returns this message, not a validation error.

422 Unprocessable Entity — validation#

Captured live, empty body, against an account with no current (or an expired) medical log — otherwise the check above masks it.
{
  "success": false,
  "status": "error",
  "message": "Validation failed",
  "errors": {
    "disclaimer_accepted": ["The disclaimer accepted field is required."],
    "answers": ["The answers field is required."],
    "policies": ["The policies field is required."]
  }
}

Notes#

Side effects: creates a MedicalQuestionLog row.
accept_safe_diving and accept_risks are hardcoded to true on the created log regardless of the actual submitted policies values (both are still required to be individually true by validation, but their specific values are not what gets stored — the stored flags don't distinguish which policy was which). TO VERIFY: intentional simplification vs. an oversight; not resolved by reading the controller alone.
answers keys that don't correspond to an active question id are stored as submitted but never evaluated for has_condition (the code looks up $activeQuestions->get((int) $questionId) and only acts when found) — inactive/unknown question ids are silently accepted and recorded without affecting the outcome.
Sub-answers are only merged from group_answers when the corresponding parent question was answered true; a true sub-answer submitted under a parent answered false is ignored entirely, not stored, not evaluated.

Source: docs/api/diver/medical/POST_submit.md

Request

Authorization
JWT Bearer
Add the parameter
Authorization
to Headers
Example:
Authorization: ********************
or
Body Params application/jsonRequired

Examples

Responses

🟢201
application/json
Medical form submitted
Bodyapplication/json

🟠401
🟠422
Request Request Example
Shell
JavaScript
Java
Swift
curl --location 'https://test.diveraid.com/api/v1/diver/medical' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "disclaimer_accepted": true,
    "answers": {
        "property1": true,
        "property2": true
    },
    "group_answers": {
        "property1": {
            "property1": true,
            "property2": true
        },
        "property2": {
            "property1": true,
            "property2": true
        }
    },
    "policies": {
        "property1": true,
        "property2": true
    }
}'
Response Response Example
201 - Example 1
{
    "status": "success",
    "message": "string",
    "data": {
        "has_condition": true,
        "expire_date": "2019-08-24"
    }
}
Modified at 2026-10-07 08:54:23
Previous
Get medical questionnaire structure
Next
List courses available for purchase
Built with