{"openapi":"3.0.0","info":{"title":"Comedi API","description":"API documentation for Comedi application","license":{"name":"MIT"},"version":"1.0.0"},"servers":[{"url":"\/api","description":"API base path"}],"paths":{"\/admin\/auth\/login":{"post":{"tags":["Admin"],"summary":"Login","description":"Login: email + password, returns JWT access_token + refresh_token and user.","operationId":"0d4bd5d2bd75b40d68161afda0ef07ac","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"admin@example.com"},"password":{"type":"string","format":"password","example":"password"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Login successfully."},"data":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":3600},"user":{"properties":{"id":{"type":"integer"},"user_id":{"type":"integer"},"name":{"type":"string"},"email":{"type":"string"},"phone_number":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Invalid credentials","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"These credentials do not match our records."},"error":{"properties":{"key":{"type":"string","example":"auth.unauthorized"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/forgot-password":{"post":{"tags":["Admin"],"summary":"Forgot password","description":"Forgot password: queues email with reset link containing a stateless JWT (`token` query).","operationId":"a030ad5ab947dcee46ed18344316b9f2","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email"],"properties":{"email":{"type":"string","format":"email","example":"admin@example.com"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"If your email is registered, you will receive password reset instructions shortly."},"data":{"type":"array","items":[],"example":[]}},"type":"object"}}}},"400":{"description":"User email not registered","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"We could not find a user with that email address."},"error":{"properties":{"key":{"type":"string","example":"admin.password_reset_user_not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/reset-password":{"post":{"tags":["Admin"],"summary":"Reset password","description":"Reset password: submit JWT from the reset email plus new password and confirmation.","operationId":"4fbf358eedfcf4f75780db592fbdcb42","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["token","password","password_confirmation"],"properties":{"token":{"description":"JWT from email link query","type":"string","example":"eyJ0eXAiOiJKV1QiLCJhbGc..."},"password":{"type":"string","format":"password","minLength":6,"example":"newpassword123"},"password_confirmation":{"type":"string","format":"password","example":"newpassword123"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Password has been reset successfully."},"data":{"type":"array","items":[],"example":[]}},"type":"object"}}}},"400":{"description":"Reset failed (invalid\/expired token, admin not found, stale token_version)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"error":{"properties":{"key":{"description":"One of: admin.invalid_or_expired_reset_token, admin.invalid_reset_token, admin.password_reset_user_not_found","type":"string","example":"admin.invalid_or_expired_reset_token"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error (including password_confirmation mismatch)","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/refresh-token":{"post":{"tags":["Admin"],"summary":"Refresh token","description":"Refresh tokens: submit a valid refresh_token, server returns fresh access_token + refresh_token.","operationId":"e36448ffce4750de0ec71bd7f24a84a7","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["refresh_token"],"properties":{"refresh_token":{"description":"JWT refresh token","type":"string"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Token refreshed successfully."},"data":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer"},"user":{"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid or expired refresh token","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or expired refresh token."},"error":{"properties":{"key":{"type":"string","example":"jwt.exception"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/admin\/auth\/logout":{"post":{"tags":["Admin"],"summary":"Logout","description":"Logout current admin account (increments `token_version` to invalidate existing JWTs).","operationId":"12d9d47117cc79b77b180802b77422ae","responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Logout successfully."},"data":{"type":"array","items":[],"example":[]}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company-branch":{"get":{"tags":["Admin Company Branch"],"summary":"Get list of company branches","description":"List company branches with filtering and pagination.\n\nResponse uses the shared flat pagination shape from\n{@see \\App\\Http\\Controllers\\AppBaseController::pagination()}.","operationId":"002a25e792faf7562e8d98c38c4d4845","parameters":[{"name":"company_id","in":"query","description":"Filter by company id","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"search_key","in":"query","description":"Search by branch name or responsible person email","required":false,"schema":{"type":"string","maxLength":255,"example":"Tokyo"}},{"name":"prefecture_id","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":13}},{"name":"district_id","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":101}},{"name":"limit","in":"query","description":"Results per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"order_by","in":"query","description":"Sort column","required":false,"schema":{"type":"string","enum":["id","name","company_id"]}},{"name":"order_direction","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Company branch list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"total":{"type":"integer","example":45},"last_page":{"type":"integer","example":3},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company":{"get":{"tags":["Admin Company"],"summary":"Get list of companies","description":"List companies with filtering and pagination. Response uses the shared\n{@see \\App\\Http\\Controllers\\AppBaseController::pagination()} flat shape\n(NOT the standard success\/message\/data envelope).","operationId":"f5be04970302f023f6d4ae67f81d3edf","parameters":[{"name":"name","in":"query","required":false,"schema":{"type":"string","example":"Acme Inc"}},{"name":"address","in":"query","required":false,"schema":{"type":"string","example":"Tokyo St"}},{"name":"status","in":"query","required":false,"schema":{"description":"1=active 2=inactive","type":"integer","enum":[1,2]}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["id","name","created_at"]}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Filtered company list","content":{"application\/json":{"schema":{"properties":{"data":{"description":"Laravel paginator payload","properties":{"current_page":{"type":"integer","example":1},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/company"}},"per_page":{"type":"integer","example":15},"total":{"type":"integer","example":43}},"type":"object"},"total":{"type":"integer","example":43},"last_page":{"type":"integer","example":3},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Admin Company"],"summary":"Create a new company","description":"Create a new company.","operationId":"e87b14fda83cd7f7e23cb8bbe3bb45a6","requestBody":{"description":"Use `application\/json` when no file is sent. Use `multipart\/form-data` to upload `company_file` and\/or `company_avatar`.","required":true,"content":{"multipart\/form-data":{"schema":{"required":["name"],"properties":{"name":{"type":"string","example":"ABC Pvt Ltd"},"furigana":{"type":"string","example":"\u30a8\u30fc\u30d3\u30fc\u30b7\u30fc"},"email":{"type":"string","format":"email","example":"company@example.com","nullable":true},"tax_code":{"description":"Business \/ corporate registration number (\u6cd5\u4eba\u756a\u53f7).","type":"string","example":"1234567890123","nullable":true},"prefecture_id":{"description":"Prefecture ID, must exist in m_prefectures.","type":"integer","example":13,"nullable":true},"district_id":{"description":"District\/city ID, must exist in m_districts.","type":"integer","example":101,"nullable":true},"latitude":{"description":"Required with longitude when either is sent.","type":"number","format":"float","maximum":90,"minimum":-90,"example":35.681236,"nullable":true},"longitude":{"description":"Required with latitude when either is sent.","type":"number","format":"float","maximum":180,"minimum":-180,"example":139.767125,"nullable":true},"address":{"type":"string","maxLength":255,"example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"company_file":{"description":"Company face photo image (jpeg, jpg, png, gif, webp, heic, heif; max 5 MB).","type":"string","format":"binary"},"company_avatar":{"description":"Company logo \/ avatar image (jpeg, jpg, png, gif, webp, heic, heif; max 5 MB).","type":"string","format":"binary"},"representative_name":{"type":"string","example":"John Representative"},"business_content":{"type":"string","maxLength":2000,"example":"Healthcare staffing and care services.","nullable":true},"category_ids[]":{"description":"Company-level category IDs (repeat field for multiple values)","type":"array","items":{"type":"integer","example":1},"nullable":true},"person_in_charge_name":{"type":"string","example":"John Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"john.doe@example.com"},"area":{"description":"Company area \/ region label.","type":"string","example":"Kanto","nullable":true},"person_in_charge_expenses[0][name]":{"description":"Use index 0..4 for up to 5 expense contacts.","type":"string","example":"Expense Contact","nullable":true},"person_in_charge_expenses[0][email]":{"type":"string","format":"email","example":"john.doe@example.com"}},"type":"object"}},"application\/json":{"schema":{"required":["name"],"properties":{"name":{"type":"string","example":"ABC Pvt Ltd"},"furigana":{"type":"string","example":"\u30a8\u30fc\u30d3\u30fc\u30b7\u30fc"},"email":{"type":"string","format":"email","example":"company@example.com","nullable":true},"tax_code":{"description":"Business \/ corporate registration number (\u6cd5\u4eba\u756a\u53f7).","type":"string","example":"1234567890123","nullable":true},"prefecture_id":{"description":"Prefecture ID, must exist in m_prefectures.","type":"integer","example":13,"nullable":true},"district_id":{"description":"District\/city ID, must exist in m_districts.","type":"integer","example":101,"nullable":true},"latitude":{"description":"Required with longitude when either is sent.","type":"number","format":"float","maximum":90,"minimum":-90,"example":35.681236,"nullable":true},"longitude":{"description":"Required with latitude when either is sent.","type":"number","format":"float","maximum":180,"minimum":-180,"example":139.767125,"nullable":true},"address":{"type":"string","maxLength":255,"example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"representative_name":{"type":"string","example":"John Representative"},"business_content":{"type":"string","maxLength":2000,"example":"Healthcare staffing and care services.","nullable":true},"category_ids":{"description":"Company-level category IDs from m_category (pivot t_company_category)","type":"array","items":{"type":"integer","example":1},"nullable":true},"person_in_charge_name":{"type":"string","example":"John Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"john.doe@example.com"},"area":{"description":"Company area \/ region label.","type":"string","example":"Kanto","nullable":true},"person_in_charge_expenses":{"type":"array","items":{"properties":{"name":{"type":"string","example":"Expense Contact","nullable":true},"email":{"type":"string","format":"email","example":"john.doe@example.com"}},"type":"object"},"maxItems":5,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profile created successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company\/{id}":{"get":{"tags":["Admin Company"],"summary":"Get details of a company","description":"Get company detail by ID.","operationId":"e54aa1644c12879d511b90fd09cc6c14","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Successful operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company detail retrieved successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"400":{"description":"Company not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company not found."},"error":{"properties":{"key":{"type":"string","example":"company.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Admin Company"],"summary":"Update an existing company","description":"Update a company's details.","operationId":"30ee8f2112aec4304c66b4e9296972c7","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"description":"Use `application\/json` when no file is sent. Use `multipart\/form-data` to upload or replace `company_file` and\/or `company_avatar`. Send `category_ids: []` to clear company-level category links.","required":true,"content":{"multipart\/form-data":{"schema":{"properties":{"name":{"type":"string","example":"Acme Inc"},"furigana":{"type":"string","example":"\u30a2\u30af\u30e1"},"email":{"type":"string","format":"email","example":"info@acme.com"},"tax_code":{"description":"Business \/ corporate registration number (\u6cd5\u4eba\u756a\u53f7).","type":"string","example":"1234567890123","nullable":true},"prefecture_id":{"description":"Prefecture ID, must exist in m_prefectures.","type":"integer","example":13,"nullable":true},"district_id":{"description":"District\/city ID, must exist in m_districts.","type":"integer","example":101,"nullable":true},"latitude":{"description":"Required with longitude when either is sent.","type":"number","format":"float","maximum":90,"minimum":-90,"example":35.681236,"nullable":true},"longitude":{"description":"Required with latitude when either is sent.","type":"number","format":"float","maximum":180,"minimum":-180,"example":139.767125,"nullable":true},"address":{"type":"string","maxLength":255,"example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"company_file":{"description":"Replace company face photo image (jpeg, jpg, png, gif, webp, heic, heif; max 5 MB).","type":"string","format":"binary"},"company_avatar":{"description":"Replace company logo \/ avatar image (jpeg, jpg, png, gif, webp, heic, heif; max 5 MB).","type":"string","format":"binary"},"representative_name":{"type":"string","example":"Jane Representative"},"business_content":{"type":"string","maxLength":2000,"example":"Healthcare staffing and care services.","nullable":true},"category_ids[]":{"description":"Company-level category IDs (repeat field for multiple values). Send empty to clear links.","type":"array","items":{"type":"integer","example":1},"nullable":true},"person_in_charge_name":{"type":"string","example":"Jane Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"jane.doe@acme.com"},"area":{"description":"Company area \/ region label.","type":"string","example":"Kanto","nullable":true},"person_in_charge_expenses[0][name]":{"description":"Use index 0..4 for up to 5 expense contacts.","type":"string","example":"Expense Contact","nullable":true},"person_in_charge_expenses[0][email]":{"type":"string","format":"email","example":"accounting@acme.com"}},"type":"object"}},"application\/json":{"schema":{"properties":{"name":{"type":"string","example":"Acme Inc"},"furigana":{"type":"string","example":"\u30a2\u30af\u30e1"},"email":{"type":"string","format":"email","example":"info@acme.com"},"tax_code":{"description":"Business \/ corporate registration number (\u6cd5\u4eba\u756a\u53f7).","type":"string","example":"1234567890123","nullable":true},"prefecture_id":{"description":"Prefecture ID, must exist in m_prefectures.","type":"integer","example":13,"nullable":true},"district_id":{"description":"District\/city ID, must exist in m_districts.","type":"integer","example":101,"nullable":true},"latitude":{"description":"Required with longitude when either is sent.","type":"number","format":"float","maximum":90,"minimum":-90,"example":35.681236,"nullable":true},"longitude":{"description":"Required with latitude when either is sent.","type":"number","format":"float","maximum":180,"minimum":-180,"example":139.767125,"nullable":true},"address":{"type":"string","maxLength":255,"example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"representative_name":{"type":"string","example":"Jane Representative"},"business_content":{"type":"string","maxLength":2000,"example":"Healthcare staffing and care services.","nullable":true},"category_ids":{"description":"Company-level category IDs from m_category (pivot t_company_category). Empty array clears links.","type":"array","items":{"type":"integer","example":1},"nullable":true},"person_in_charge_name":{"type":"string","example":"Jane Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"jane.doe@acme.com"},"area":{"description":"Company area \/ region label.","type":"string","example":"Kanto","nullable":true},"person_in_charge_expenses":{"type":"array","items":{"properties":{"name":{"type":"string","example":"Expense Contact","nullable":true},"email":{"type":"string","format":"email","example":"accounting@acme.com"}},"type":"object"},"maxItems":5,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Company updated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company updated successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"400":{"description":"Company not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company not found."},"error":{"properties":{"key":{"type":"string","example":"company.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company\/{id}\/status":{"put":{"tags":["Admin Company"],"summary":"Update company active\/inactive status","description":"Activate or inactivate a company.","operationId":"6fd7b2d0e8aed6203b019d28af549d46","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["status"],"properties":{"status":{"description":"1=active 2=inactive","type":"integer","enum":[1,2],"example":2}},"type":"object"}}}},"responses":{"200":{"description":"Status updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company status updated successfully."},"data":{"$ref":"#\/components\/schemas\/company"}},"type":"object"}}}},"400":{"description":"Business rule error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"This company cannot be set inactive."},"error":{"properties":{"key":{"type":"string","example":"company.cannot_inactivate"},"content":{"type":"string"},"reasons":{"type":"array","items":{"properties":{"key":{"type":"string","example":"company.has_live_jobs"},"content":{"type":"string"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company-profile":{"get":{"tags":["Admin"],"summary":"Get list of company users","description":"List company users with filtering and pagination.","operationId":"b94768c0ca8a58e2dc192e109f638a8d","parameters":[{"name":"name","in":"query","description":"Company user name to filter","required":false,"schema":{"type":"string","example":"Acme Profile"}},{"name":"company_id","in":"query","description":"Filter by company ID","required":false,"schema":{"type":"integer","example":123}},{"name":"limit","in":"query","description":"Results per page (default: 20, max: 100)","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"order_by","in":"query","description":"Sort column (single field; use with order_direction)","required":false,"schema":{"type":"string","enum":["id","name","company_id","created_at"]}},{"name":"order_direction","in":"query","description":"asc or desc (with order_by)","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Filtered company user list","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profiles listed successfully."},"data":{"description":"Laravel paginator payload","properties":{"current_page":{"type":"integer","example":1},"data":{"type":"array","items":{"type":"object"}},"per_page":{"type":"integer","example":15},"total":{"type":"integer","example":43}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Admin"],"summary":"Create a new company user","description":"Create a new company user.","operationId":"e32fe6da0d8f9c44810b388630ff3353","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","company_id","email"],"properties":{"name":{"description":"Name of the company user","type":"string","maxLength":255,"example":"Acme Profile"},"company_id":{"description":"ID of the associated company","type":"integer","example":123},"email":{"description":"Login email that receives the generated initial password; must be unique","type":"string","format":"email","maxLength":255,"example":"acme@example.com"},"phone_number":{"description":"Phone number of the company user","type":"string","maxLength":255,"example":"0909090909"}},"type":"object"}}}},"responses":{"200":{"description":"Company user created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profile created successfully."},"data":{"properties":{"id":{"type":"integer","example":321},"user_id":{"type":"integer","example":456},"company_id":{"type":"integer","example":123},"name":{"type":"string","example":"Acme Profile"},"email":{"type":"string","example":"acme@example.com"},"phone_number":{"type":"string","example":"0909090909"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (missing required, unknown company_id, duplicate email\/phone)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/company-profile\/{id}":{"get":{"tags":["Admin"],"summary":"Get details of a company user","description":"Returns details of a specific company user by ID.","operationId":"getCompanyProfileDetail","parameters":[{"name":"id","in":"path","description":"ID of the company user","required":true,"schema":{"type":"integer","example":321}}],"responses":{"200":{"description":"Company user retrieved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company user detail retrieved successfully"},"data":{"properties":{"id":{"type":"integer","example":321},"user_id":{"type":"integer","example":456},"company_id":{"type":"integer","example":123},"name":{"type":"string","example":"Acme Profile"},"email":{"type":"string","example":"acme@example.com"},"phone_number":{"type":"string","example":"0909090909"},"company":{"properties":{"id":{"type":"integer","example":123},"name":{"type":"string","example":"Acme Inc"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"400":{"description":"Company profile not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company profile not found."},"error":{"properties":{"key":{"type":"string","example":"company_profile.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Admin"],"summary":"Update a company user","description":"Swagger endpoint: `update` (PUT `\/admin\/company-profile\/{id}`).\n\nUpdate a company user.","operationId":"e99787d8fd45049c6e541f8da34e03e6","parameters":[{"name":"id","in":"path","description":"ID of the company user to update","required":true,"schema":{"type":"integer","example":321}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":[],"properties":{"email":{"description":"Login email; must be unique","type":"string","format":"email","maxLength":255,"example":"new-acme@example.com"},"company_id":{"description":"ID of the associated company","type":"integer","example":123},"name":{"description":"Name of the company user","type":"string","maxLength":255,"example":"Acme Profile"},"phone_number":{"description":"Phone number of the company user","type":"string","maxLength":255,"example":"0909090909"}},"type":"object"}}}},"responses":{"200":{"description":"Company profile updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company profile updated successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"Company profile not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company profile not found."},"error":{"properties":{"key":{"type":"string","example":"company_profile.not_found"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (including duplicate email\/phone)","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/dashboard":{"get":{"tags":["Admin Dashboard"],"summary":"Get admin dashboard summary","operationId":"48eae2542ce5d48288ee45fd07672345","responses":{"200":{"description":"Admin dashboard totals","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"total_payment_amount":{"type":"string","example":"3000.50"},"total_companies":{"type":"integer","example":2},"total_company_branches":{"type":"integer","example":2},"total_registered_users":{"type":"integer","example":2}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"}},"security":[{"bearerAuth":[]}]}},"\/admin\/google-maps\/api-key":{"get":{"tags":["Admin Google Maps"],"summary":"Get Google Maps API key","operationId":"adminGoogleMapsApiKey","responses":{"200":{"description":"Google Maps API key fetched","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Google Maps API key fetched successfully."},"data":{"properties":{"api_key":{"type":"string","example":"AIzaSyD-EXAMPLE"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/masters":{"get":{"tags":["Admin Master"],"summary":"Get admin master data","description":"Get admin master data (medical profile categories).","operationId":"a5a4bde8fea630200c14b51497401e8e","responses":{"200":{"description":"Master data payload","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Get master data successfully."},"data":{"properties":{"categories":{"description":"Per-category medical profile master payload. Unused sections are empty arrays.","type":"array","items":{"properties":{"id":{"type":"integer","example":1},"key":{"type":"string","example":"nurse"},"name":{"type":"string","example":"\u770b\u8b77\u5e2b"},"display_order":{"type":"integer","example":1},"license_required":{"type":"boolean","example":true},"experience_years":{"type":"array","items":{"type":"object"}},"sub_categories":{"type":"array","items":{"type":"object"}},"certificates":{"type":"array","items":{"type":"object"}},"skills":{"type":"array","items":{"type":"object"}},"workplaces":{"type":"array","items":{"type":"object"}},"workplace_types":{"type":"array","items":{"type":"object"}}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/masters\/locations":{"get":{"tags":["Admin Master"],"summary":"Get location master data (prefectures and districts)","description":"Get prefecture and district master data.","operationId":"4a7cf39c426c1fad824a3bef41106c09","responses":{"200":{"description":"Location master data payload","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Get master data successfully."},"data":{"properties":{"prefectures":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Tokyo"},"short":{"type":"string","example":"TK","nullable":true},"kana":{"type":"string","example":"\u3068\u3046\u304d\u3087\u3046","nullable":true},"en":{"type":"string","example":"Tokyo","nullable":true},"salary":{"description":"Minimum hourly wage (JPY) for this prefecture","type":"number","format":"float","example":1072},"districts":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"prefecture_id":{"type":"integer","example":1},"name":{"type":"string","example":"Chiyoda"}},"type":"object"}}},"type":"object"}},"districts":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"prefecture_id":{"type":"integer","example":1},"name":{"type":"string","example":"Chiyoda"},"prefecture":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Tokyo"},"short":{"type":"string","nullable":true},"kana":{"type":"string","nullable":true},"en":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/monthly-payment-stats":{"get":{"tags":["Admin Monthly Payment Stats"],"summary":"Get system-wide monthly payment stats","description":"Aggregates salary-confirmed company wallet totals (`t_company_wallets`) across all companies by calendar month.","operationId":"b345130b5288e3225e77ae53fa236987","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"year_month","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-01"}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["year_month","transaction_count","worker_count","total_paid_amount"]}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"System-wide monthly payment stats list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"year_month":{"type":"string","example":"2026-01"},"transaction_count":{"type":"integer","example":12},"worker_count":{"type":"integer","example":8},"total_paid_amount":{"type":"number","format":"float","example":12000.5}},"type":"object"}},"total":{"type":"integer","example":10},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/monthly-payment-stats\/workers":{"get":{"tags":["Admin Monthly Payment Stats"],"summary":"Get worker breakdown for a monthly payment stats period","description":"Lists workers with salary-confirmed monthly totals from `t_worker_salary` for the given `year_month`. Rows are aggregated from `payment`\/`done` job workings (`income_after_tax` > 0). `base_pay` is the sum of `standard_salary` per shift. `transfer_amount` is the sum of `income_after_tax` per shift.","operationId":"461ed6a5ddcf930a588c5a4edcc46384","parameters":[{"name":"year_month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-02"}},{"name":"user_name","in":"query","required":false,"schema":{"type":"string","example":"Tanaka"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["user_id","user_name","shift_count","working_minutes","base_pay","transport_expenses","deduction","transfer_amount"]}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Worker monthly payment breakdown","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"year_month":{"type":"string","example":"2026-02"},"user_id":{"type":"integer","example":1},"user_name":{"type":"string","example":"Tanaka Taro"},"avatar_file_id":{"type":"integer","example":10,"nullable":true},"avatar_file":{"properties":{"id":{"type":"integer","example":10},"url":{"type":"string","example":"https:\/\/cdn.example.com\/uploads\/avatars\/user.png"}},"type":"object","nullable":true},"late_cancel_rate_within_1h":{"description":"Percentage of late cancellations within 1 hour before shift start.","type":"number","format":"float","example":12.34},"shift_count":{"type":"integer","example":3},"working_minutes":{"type":"integer","example":1440},"base_pay":{"type":"number","format":"float","example":9000},"transport_expenses":{"type":"number","format":"float","example":500},"deduction":{"type":"number","format":"float","example":120},"transfer_amount":{"type":"number","format":"float","example":9380}},"type":"object"}},"total":{"type":"integer","example":10},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/monthly-payment-stats\/workers\/{userId}":{"get":{"tags":["Admin Monthly Payment Stats"],"summary":"Get worker shift payment details for a month","description":"Drill-down from worker list. Returns paginated salary-confirmed shifts (`payment`\/`done`, `income_after_tax` > 0) for one worker in `year_month`. `monthly_total_payment` is `transfer_amount` from `t_worker_salary` (sum of `income_after_tax` per shift). `review_summary` is the worker's aggregated company review scores from `t_user_review_summaries` (null when no reviews). `working_minutes` per shift is `actual_total_working_minutes` (same field aggregated into `t_worker_salary`). `payment_amount` per shift is `income_after_tax`.","operationId":"5576aa5984eae44bb89c29ec4e93b52a","parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"integer","example":1}},{"name":"year_month","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-02"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["working_date","workplace_name","working_minutes","overtime_minutes","night_working_minutes","hourly_salary","transport_expenses","payment_amount"]}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Worker shift payment detail","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"user_id":{"type":"integer","example":1},"user_name":{"type":"string","example":"Tanaka Taro"},"avatar_file_id":{"type":"integer","nullable":true},"avatar_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"late_cancel_rate_within_1h":{"description":"Percentage of late cancellations within 1 hour before shift start.","type":"number","format":"float","example":12.34},"year_month":{"type":"string","example":"2026-02"},"monthly_total_payment":{"type":"number","format":"float","example":2500},"review_summary":{"properties":{"punctuality_avg":{"type":"number","format":"float","example":4.5},"work_handling_avg":{"type":"number","format":"float","example":4.25},"communication_avg":{"type":"number","format":"float","example":4},"work_attitude_avg":{"type":"number","format":"float","example":4.75},"total_avg":{"type":"number","format":"float","example":4.38},"total_reviews":{"type":"integer","example":12}},"type":"object","nullable":true},"shifts":{"type":"array","items":{"properties":{"job_working_id":{"type":"integer","example":101},"working_date":{"type":"string","format":"date","example":"2026-02-15"},"workplace_name":{"type":"string","example":"Tokyo Branch"},"working_minutes":{"type":"integer","example":480},"overtime_minutes":{"type":"integer","example":0},"night_working_minutes":{"type":"integer","example":0},"hourly_salary":{"type":"number","format":"float","example":1500},"transport_expenses":{"type":"number","format":"float","example":100},"payment_amount":{"type":"number","format":"float","example":2000},"job_apply":{"properties":{"id":{"type":"integer","example":10},"status":{"type":"string","example":"approved"},"start_working_date":{"type":"string","format":"date","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true}},"type":"object","nullable":true},"transaction":{"description":"Latest withdraw transaction log for this shift.","properties":{"id":{"type":"integer","example":1},"type":{"type":"string","example":"withdraw"},"user_status":{"type":"string","nullable":true},"company_status":{"type":"string","nullable":true},"status":{"description":"Legacy alias of company_status","type":"string","nullable":true},"transaction_id":{"type":"string","nullable":true},"amount":{"type":"string","example":"2000.00","nullable":true},"action":{"type":"string","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"total":{"type":"integer","example":2},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"User not found or no salary stats for the given month","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/salary-payments":{"get":{"tags":["Admin Salary Payment"],"summary":"Get salary payment list","description":"List salary payments with filtering and pagination. Response uses the shared\n{@see \\App\\Http\\Controllers\\AppBaseController::pagination()} flat shape\n(NOT the standard success\/message\/data envelope).","operationId":"dd1da3b1c6bdcb22712e6d9f83e6c964","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","description":"Items per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"order_by","in":"query","description":"Sort column (single field; use with order_direction). Defaults to id desc.","required":false,"schema":{"type":"string","enum":["id","amount","status","withdraw_at","company_branch_id","job_working_id"]}},{"name":"order_direction","in":"query","description":"asc or desc (required with order_by)","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"user_name","in":"query","description":"Filter by user profile name (LIKE)","required":false,"schema":{"type":"string","example":"Demo User"}},{"name":"user_katakana_name","in":"query","description":"Filter by user profile katakana name (LIKE)","required":false,"schema":{"type":"string","example":"\u30c7\u30e2\u30e6\u30fc\u30b6\u30fc"}},{"name":"user_phone_number","in":"query","description":"Filter by user profile phone number (LIKE)","required":false,"schema":{"type":"string","example":"09012345678"}},{"name":"company_id","in":"query","description":"Company ID (must exist in t_companies)","required":false,"schema":{"type":"integer","example":1}},{"name":"company_name","in":"query","description":"Filter by company name (LIKE)","required":false,"schema":{"type":"string","example":"Demo Company"}},{"name":"job_working_id","in":"query","description":"Job working ID (must exist in t_job_workings)","required":false,"schema":{"type":"integer","example":1}},{"name":"status","in":"query","description":"Transaction log status (t_transaction_logs.status)","required":false,"schema":{"type":"string","enum":["processing","success","failed"],"example":"success"}},{"name":"withdraw_at_from","in":"query","description":"Withdraw date from (YYYY-MM-DD)","required":false,"schema":{"type":"string","format":"date","example":"2025-01-01"}},{"name":"withdraw_at_to","in":"query","description":"Withdraw date to (YYYY-MM-DD, must be >= withdraw_at_from)","required":false,"schema":{"type":"string","format":"date","example":"2025-01-31"}},{"name":"transaction_id","in":"query","description":"Transaction ID","required":false,"schema":{"type":"string","example":"txn_123456"}}],"responses":{"200":{"description":"Salary payment list (pagination flat shape)","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":2},"user_id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"job_working_id":{"type":"integer","example":1},"amount":{"type":"string","example":"78667.00"},"status":{"type":"string","example":"in-wallet"},"withdraw_at":{"type":"string","example":null,"nullable":true},"transaction_id":{"type":"string","example":null,"nullable":true}},"type":"object"}},"total":{"type":"integer","example":3},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The given data was invalid."},"errors":{"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/salary-payments\/{id}":{"get":{"tags":["Admin Salary Payment"],"summary":"Get salary payment detail","description":"Show salary payment detail. Response includes the `user.profile` relation\n(requested via `firstById($id, ['user.profile'])`).","operationId":"9c737ac9611e2a20f45078603146ff2e","parameters":[{"name":"id","in":"path","description":"Salary payment ID","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Salary payment detail","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"job_working_id":{"type":"integer","example":1},"amount":{"type":"string","example":"99999.00"},"status":{"type":"string","example":"in-wallet"},"withdraw_at":{"type":"string","example":null,"nullable":true},"transaction_id":{"type":"string","example":null,"nullable":true},"user":{"properties":{"id":{"type":"integer","example":1},"profile":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo User"},"katakana_name":{"type":"string","example":"\u30c7\u30e2\u30e6\u30fc\u30b6\u30fc"},"phone_number":{"type":"string","example":"09012345678"}},"type":"object","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Salary payment not found","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Salary payment not found."},"error":{"properties":{"key":{"type":"string","example":"company_payment.not_found"},"content":{"type":"string","example":"Salary payment not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/system-fees":{"get":{"tags":["Admin System Fee"],"summary":"Get system fee branch monthly stats","operationId":"adab2af089aa518dd879585d992c82bc","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":15}},{"name":"branch_ids[]","in":"query","description":"Filter by branch IDs. Example: branch_ids[]=1&branch_ids[]=2","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"integer"},"example":[1,2]}},{"name":"year_month","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-01"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","paid","unbilled"]}},{"name":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["branch_id"]}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"System fee branch monthly stats list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"billing_id":{"type":"integer","example":12,"nullable":true},"branch_id":{"type":"integer","example":1},"branch_name":{"type":"string","example":"Tokyo Branch"},"year_month":{"type":"string","example":"2026-01"},"jobs_created_count":{"description":"Snapshot stored on t_system_fee_billings","type":"integer","example":3},"hired_users_count":{"description":"Snapshot stored on t_system_fee_billings","type":"integer","example":2},"total_paid_amount":{"description":"Snapshot stored on t_system_fee_billings","type":"number","format":"float","example":12000.5},"status":{"type":"string","enum":["pending","paid"],"example":"pending","nullable":true},"paid_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"total":{"type":"integer","example":10},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/system-fees\/export-csv":{"post":{"tags":["Admin System Fee"],"summary":"Export system fee branch monthly stats CSV","operationId":"683b75363f780d1430b2458eebc148d8","requestBody":{"required":false,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AdminSystemFeeExportRequest"}}}},"responses":{"200":{"description":"CSV file download"},"400":{"description":"No data","content":{"application\/json":{"schema":[]}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/system-fees\/export-excel":{"post":{"tags":["Admin System Fee"],"summary":"Export system fee branch monthly stats Excel","operationId":"2f1699515848fe82bf5bb77b7922ea36","requestBody":{"required":false,"content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/AdminSystemFeeExportRequest"}}}},"responses":{"200":{"description":"Excel file download"},"400":{"description":"No data","content":{"application\/json":{"schema":[]}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/admin\/companies\/system-fees\/{billingId}\/mark-paid":{"patch":{"tags":["Admin System Fee"],"summary":"Mark system fee billing as paid","operationId":"286a0fb024ba4f28c44c736c96505e13","parameters":[{"name":"billingId","in":"path","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Billing marked as paid"},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"404":{"description":"Not found","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"App healthcheck (liveness\/readiness)","description":"Returns the status of the application and database connection.","operationId":"36aa242901966c71ee8e9806980157bc","responses":{"200":{"description":"Healthy app","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"status":{"type":"string","example":"ok"},"app":{"type":"string","example":"running"},"database":{"type":"string","example":"connected"}},"type":"object"}},"type":"object"}}}},"500":{"description":"App or database unhealthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/worker\/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"Worker healthcheck","description":"Checks whether Supervisor is running and its processes report RUNNING state.","operationId":"b037906f4978567c1c946bd27ff4a5b5","responses":{"200":{"description":"Supervisor healthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"status":{"type":"string","example":"ok"},"supervisor":{"type":"string","example":"running"},"details":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"500":{"description":"Supervisor unhealthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/schedule\/healthcheck":{"get":{"tags":["Healthcheck"],"summary":"Schedule healthcheck","description":"Checks whether scheduler\/cron service is running.","operationId":"2b873539c485ea7292ea0e296bd80049","responses":{"200":{"description":"Scheduler healthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"status":{"type":"string","example":"ok"},"scheduler":{"type":"string","example":"running"},"details":{"type":"string","nullable":true}},"type":"object"}},"type":"object"}}}},"500":{"description":"Scheduler unhealthy","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error"},"data":{"type":"object","nullable":true}},"type":"object"}}}}}}},"\/test\/log":{"get":{"tags":["Test"],"summary":"Test structured logging (INFO)","description":"Triggers a manual Log::info() with structured context to verify CloudWatch JSON formatting.","operationId":"f2f61a574fb0876990036021b9ea8d50","responses":{"200":{"description":"Log sent successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Log sent successfully"}},"type":"object"}}}}}}},"\/test\/log-error":{"get":{"tags":["Test"],"summary":"Test structured logging (ERROR)","description":"Triggers a manual Log::error() with structured context to verify CloudWatch JSON formatting.","operationId":"0fb6168ad6d18e75c94fef5ddcc5b50e","responses":{"200":{"description":"Log sent successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Log sent successfully"}},"type":"object"}}}}}}},"\/test\/exception\/base":{"get":{"tags":["Test"],"summary":"Test BaseException handling","description":"Throws a BaseException to verify JSON rendering and logging behavior (should NOT show stack trace in production).","operationId":"a07986fd9fcf77891e0f6f1650ac0678","responses":{"400":{"description":"BaseException triggered","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Test BaseException message"},"error":{"properties":{"key":{"type":"string","example":"auth.failed"},"content":{"type":"string","example":"Test BaseException message"}},"type":"object"}},"type":"object"}}}}}}},"\/test\/exception\/generic":{"get":{"tags":["Test"],"summary":"Test generic Exception handling","description":"Throws a generic Exception to verify 500 JSON rendering and logging behavior (should show full stack trace).","operationId":"2d51e5f727e95c4675b6b656381f4392","responses":{"500":{"description":"Internal Server Error","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Internal server error."}},"type":"object"}}}}}}}},"components":{"schemas":{"AdminSystemFeeExportRequest":{"properties":{"branch_ids":{"type":"array","items":{"type":"integer","example":1}},"year_month":{"type":"string","example":"2026-01"},"order_by":{"type":"string","enum":["branch_id"]},"order_direction":{"type":"string","enum":["asc","desc"]}},"type":"object"},"user":{"description":"User model","properties":{"id":{"description":"OpenAPI definition: root + components (schemas, security).","type":"integer","example":1},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","format":"email","example":"john@example.com"},"email_verified_at":{"type":"string","format":"date-time","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"api_response":{"description":"Standard API response wrapper","properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"description":"Response payload (object, array or null)"}},"type":"object"},"UnprocessableEntity":{"description":"Laravel validation error (HTTP 422)","properties":{"message":{"type":"string","example":"The given data was invalid."},"errors":{"description":"Field name to list of validation messages","type":"object","additionalProperties":{"type":"array","items":{"type":"string"}}}},"type":"object"},"paginated_response":{"description":"Paginator object (value of response.data for list endpoints)","properties":{"current_page":{"type":"integer","example":1},"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/user"}},"first_page_url":{"type":"string"},"from":{"type":"integer"},"last_page":{"type":"integer"},"last_page_url":{"type":"string"},"links":{"type":"array","items":{"type":"object"}},"next_page_url":{"type":"string","nullable":true},"path":{"type":"string"},"per_page":{"type":"integer","example":15},"prev_page_url":{"type":"string","nullable":true},"to":{"type":"integer"},"total":{"type":"integer"}},"type":"object"},"company":{"description":"Company model","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Comedi Inc."},"status":{"description":"1=active 2=inactive","type":"integer","example":1},"furigana":{"type":"string","example":"\u30b3\u30e1\u30c7\u30a3"},"email":{"type":"string","format":"email","example":"contact@example.com"},"tax_code":{"description":"Business \/ corporate registration number (\u6cd5\u4eba\u756a\u53f7).","type":"string","example":"1234567890123","nullable":true},"address":{"type":"string","example":"1-2-3 Shibuya"},"latitude":{"type":"number","format":"float","example":35.681236,"nullable":true},"longitude":{"type":"number","format":"float","example":139.767125,"nullable":true},"company_file_id":{"type":"integer","example":10,"nullable":true},"company_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"company_avatar_id":{"type":"integer","example":11,"nullable":true},"company_avatar":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"branch_count":{"description":"Current non-deleted company branch count, included in admin company list and detail.","type":"integer","example":3},"prefecture_id":{"type":"integer","example":13},"district_id":{"type":"integer","example":101,"nullable":true},"representative_name":{"type":"string","example":"Tanaka Taro"},"business_content":{"type":"string","example":"Software development"},"area":{"description":"Company area \/ region label.","type":"string","example":"Kanto","nullable":true},"categories":{"description":"Company-level job categories (m_category via t_company_category)","type":"array","items":{"properties":{"id":{"type":"integer","example":1},"key":{"type":"string","example":"nurse"},"name":{"type":"string","example":"\u770b\u8b77\u5e2b"},"display_order":{"type":"integer","example":1}},"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"CompanyUser":{"description":"Company user (login account linked to a company)","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"type":{"description":"1=admin 2=branch","type":"integer","example":1},"status":{"description":"1=active 2=inactive","type":"integer","example":1},"name":{"type":"string","example":"ABC Clinic"},"email":{"type":"string","format":"email","example":"clinic@example.com"},"token_version":{"type":"integer","example":0},"phone_number":{"type":"string","example":"08012345678","nullable":true},"branch_user_roles":{"description":"Assigned branch roles (empty for company admin accounts)","type":"array","items":{"$ref":"#\/components\/schemas\/BranchUserRole"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"FileUpload":{"description":"t_file_uploads: `path` is the S3 object key (persisted). `url` is a temporary presigned URL for S3 (fallback: public base + path if signing is unavailable).","properties":{"id":{"type":"integer","example":1},"path":{"description":"Object key on S3 (always stored)","type":"string","example":"uploads\/avatars\/abc.png"},"url":{"description":"Temporary presigned URL (TTL controlled by FILE_UPLOAD_PRESIGNED_TTL_MINUTES). Falls back to public base URL if signing is unavailable; null only when path\/base is missing.","type":"string","format":"uri","nullable":true},"name":{"type":"string","example":"photo.jpg"},"extension":{"type":"string","example":"jpg"}},"type":"object"},"CompanyBranch":{"description":"Company branch (t_company_branches)","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Shibuya Branch"},"prefecture_id":{"type":"integer","example":13,"nullable":true},"district_id":{"type":"integer","example":101,"nullable":true},"postal_code":{"type":"string","example":"1500002","nullable":true},"address_line":{"type":"string","nullable":true},"latitude":{"type":"number","format":"float","example":35.658034,"nullable":true},"longitude":{"type":"number","format":"float","example":139.701636,"nullable":true},"access_note":{"type":"string","nullable":true},"has_on_site_parking":{"type":"boolean","example":true},"commuting_note":{"type":"string","nullable":true},"responsible_person_name":{"type":"string","nullable":true},"face_photo_file_id":{"type":"integer","nullable":true},"face_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"responsible_person_photo_file_id":{"type":"integer","nullable":true},"responsible_person_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"greeting_message":{"type":"string","nullable":true},"worker_contact_name":{"type":"string","nullable":true},"worker_contact_photo_file_id":{"type":"integer","nullable":true},"worker_contact_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true},"worker_contact_phone":{"type":"string","nullable":true},"emergency_contact":{"type":"string","nullable":true},"responsible_person_email":{"type":"string","format":"email","nullable":true},"first_confirmation_auto_message":{"type":"string","nullable":true},"facility_open_date":{"type":"string","format":"date","nullable":true},"unemployment_insurance_office_number":{"type":"string","nullable":true},"company_regions":{"description":"Company regions this branch belongs to (t_company_regions via pivot)","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"categories":{"description":"Branch job categories (m_category via t_company_branch_category)","type":"array","items":{"properties":{"id":{"type":"integer","example":1},"key":{"type":"string","example":"nurse"},"name":{"type":"string","example":"\u770b\u8b77\u5e2b"},"display_order":{"type":"integer","example":1}},"type":"object"}},"travel_methods":{"description":"Commute options (m_travel_methods via pivot)","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"},"BranchRole":{"description":"Branch role master (m_branch_roles)","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Manager"},"description":{"type":"string","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"BranchUserRole":{"description":"Pivot row (t_branch_user_roles) with nested role","properties":{"id":{"type":"integer","example":1},"branch_user_profile_id":{"type":"integer","example":1},"branch_role_id":{"type":"integer","example":1},"branch_role":{"$ref":"#\/components\/schemas\/BranchRole"}},"type":"object"},"CompanyRegion":{"description":"Company region (t_company_regions)","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Kanto"}},"type":"object"},"BranchUser":{"description":"Branch user profile (t_branch_user_profiles) with relations","properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Yamada Taro"},"furigana":{"type":"string","nullable":true},"phone_number":{"type":"string","nullable":true},"company_user":{"description":"Login credentials (t_company_user)","properties":{"id":{"type":"integer"},"email":{"type":"string","format":"email"}},"type":"object","nullable":true},"branches":{"description":"Assigned branches (t_branch_user_branches pivot)","type":"array","items":{"$ref":"#\/components\/schemas\/CompanyBranch"}},"regions":{"description":"Assigned regions (t_branch_user_regions pivot)","type":"array","items":{"$ref":"#\/components\/schemas\/CompanyRegion"}},"branch_user_roles":{"type":"array","items":{"$ref":"#\/components\/schemas\/BranchUserRole"}},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"},"Region":{"description":"Region master (m_regions)","properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Kanto"},"key":{"type":"string","example":"kanto"},"description":{"type":"string","example":"Kanto region of Japan","nullable":true}},"type":"object"},"UserMedicalWorkplaceExperience":{"required":["workplace_type_id","experience_year_id"],"properties":{"workplace_type_id":{"description":"m_workplace_types.id","type":"integer","example":1},"experience_year_id":{"description":"m_experience_years.id","type":"integer","example":2}},"type":"object"},"UserMedicalLicenseInput":{"required":["type"],"properties":{"id":{"description":"Existing t_user_licenses.id when updating","type":"integer","example":1,"nullable":true},"type":{"type":"string","example":"doctor"},"category_id":{"type":"integer","example":1,"nullable":true},"license_number":{"type":"string","example":"123456","nullable":true},"registration_subtype_id":{"type":"integer","example":1,"nullable":true},"acquired_at":{"type":"string","format":"date","example":"2020-04-01","nullable":true},"clinical_training_end_at":{"type":"string","format":"date","example":"2025-03-31","nullable":true}},"type":"object"},"UserMedicalCategoryProfileBlock":{"description":"Medical profile data for one profession (m_category.id). Certificates and licenses must be nested here \u2014 root-level certificate_ids \/ licenses are rejected.","required":["category_id"],"properties":{"category_id":{"type":"integer","example":1},"experience_year_id":{"description":"m_experience_years.id","type":"integer","example":2,"nullable":true},"skill_ids":{"type":"array","items":{"type":"integer","example":1},"nullable":true},"workplace_ids":{"type":"array","items":{"type":"integer","example":1},"nullable":true},"workplace_experiences":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserMedicalWorkplaceExperience"},"nullable":true},"sub_category_ids":{"type":"array","items":{"type":"integer","example":1},"nullable":true},"sub_category_detail_ids":{"type":"array","items":{"type":"integer","example":1},"nullable":true},"certificate_ids":{"type":"array","items":{"type":"integer","example":1},"nullable":true},"licenses":{"type":"array","items":{"$ref":"#\/components\/schemas\/UserMedicalLicenseInput"},"nullable":true}},"type":"object"}},"securitySchemes":{"bearerAuth":{"type":"http","description":"JWT access token (tymon\/jwt-auth); send as Authorization: Bearer <token>","bearerFormat":"JWT","scheme":"bearer"}}},"tags":[{"name":"Admin","description":"Authentication API"},{"name":"Admin Google Maps","description":"Admin Google Maps helper endpoints"},{"name":"Admin Master","description":"Admin master data (reference tables)"},{"name":"Healthcheck","description":"Healthcheck endpoints"},{"name":"Test","description":"Test endpoints for logging and exception handling"},{"name":"Admin Company Branch","description":"Admin Company Branch"},{"name":"Admin Company","description":"Admin Company"},{"name":"Admin Dashboard","description":"Admin Dashboard"},{"name":"Admin Monthly Payment Stats","description":"Admin Monthly Payment Stats"},{"name":"Admin Salary Payment","description":"Admin Salary Payment"},{"name":"Admin System Fee","description":"Admin System Fee"}]}