{"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":{"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":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"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":20},"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":{"required":true,"content":{"application\/json":{"schema":{"required":["name","email"],"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"},"insurance_number":{"type":"string","example":"1234567890"},"postal_code":{"type":"string","example":"1234567"},"address":{"type":"string","example":"123 Tokyo St, Minato-ku, Tokyo"},"phone_number":{"type":"string","example":"0123456789"},"fax_number":{"type":"string","example":"0123456789"},"tax_code":{"type":"string","example":"1234567890"},"person_in_charge_name":{"type":"string","example":"John Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"john.doe@example.com"},"person_in_charge_expense_email":{"type":"string","format":"email","example":"john.doe@example.com"},"bank_id":{"type":"integer","example":1},"bank_branch_id":{"type":"integer","example":1},"bank_account_number":{"type":"string","example":"1234567890"},"bank_account_name":{"type":"string","example":"John Doe"}},"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":{"required":true,"content":{"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"},"insurance_number":{"type":"string","example":"123456789"},"postal_code":{"type":"string","example":"100-0001"},"address":{"type":"string","example":"123 Tokyo St"},"phone_number":{"type":"string","example":"0312345678"},"fax_number":{"type":"string","example":"0312345679"},"tax_code":{"type":"string","example":"TAXCODE001"},"person_in_charge_name":{"type":"string","example":"Jane Doe"},"person_in_charge_email":{"type":"string","format":"email","example":"jane.doe@acme.com"},"person_in_charge_expense_email":{"type":"string","format":"email","example":"accounting@acme.com"},"bank_id":{"type":"integer","example":1},"bank_branch_id":{"type":"integer","example":15},"bank_account_number":{"type":"string","example":"1234567890"},"bank_account_name":{"type":"string","example":"Acme Inc"}},"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-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":20}},{"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":20},"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"],"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 (optional, must be unique if provided)","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":["name","phone_number"],"properties":{"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\/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":20}},{"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":[]}]}},"\/company-branches\/{id}":{"get":{"tags":["App company branches"],"summary":"Get company branch detail (app)","description":"Branch profile for workers. Response includes `is_favorite` for the authenticated user.","operationId":"62193f0297ca6411fc2fb87421cdff41","parameters":[{"name":"id","in":"path","description":"Company branch id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/app\/auth\/send-code":{"post":{"tags":["App"],"summary":"Send verify code to phone number","description":"Swagger endpoint: `sendVerifyCode` (POST `\/app\/auth\/send-code`).","operationId":"6f8437e44719fc3ed5c010e7af01811f","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["phone_number"],"properties":{"phone_number":{"type":"string","example":"09012345678"}},"type":"object"}}}},"responses":{"200":{"description":"Verify code sent successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Verify code sent successfully."},"data":{"properties":{"otp":{"type":"string","example":"1234"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/app\/auth\/confirm-code":{"post":{"tags":["App"],"summary":"Confirm the verification code sent to the phone number","description":"Swagger endpoint: `confirmVerifyCode` (POST `\/app\/auth\/confirm-code`).","operationId":"2a62c02b3c97aa0216083babf8dd5f0d","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["phone_number","code"],"properties":{"phone_number":{"type":"string","example":"09012345678"},"code":{"type":"string","example":"1234"}},"type":"object"}}}},"responses":{"200":{"description":"Verification successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Verification successful."},"data":{"properties":{"access_token":{"type":"string","example":"..."},"refresh_token":{"type":"string","example":"..."},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer","example":3600},"user":{"type":"object"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}},"400":{"description":"Invalid code","content":{"application\/json":{"schema":[]}}}}}},"\/app\/auth\/refresh-token":{"post":{"tags":["App"],"summary":"Refresh the JWT token for the user","description":"Swagger endpoint: `refreshToken` (POST `\/app\/auth\/refresh-token`).","operationId":"53336a66d03fb81abf47a0f680d9835f","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["refresh_token"],"properties":{"refresh_token":{"type":"string","example":"refresh_token"}},"type":"object"}}}},"responses":{"200":{"description":"Token refreshed successfully","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":{"$ref":"#\/components\/schemas\/user"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/app\/auth\/logout":{"post":{"tags":["App"],"summary":"Logout","description":"Swagger endpoint: `logout` (POST `\/app\/auth\/logout`).","operationId":"e29416956439a8018af81aefcdefdbb0","responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Logout successfully."},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/bank\/account":{"post":{"tags":["App Bank Account"],"summary":"Upsert bank account","description":"Create bank account if missing; otherwise update the existing bank account for the authenticated app user.","operationId":"003383ced616ced43b40a5884ef89c82","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["bank_id","bank_branch_id","bank_account_type","bank_account_name","bank_account_number"],"properties":{"bank_id":{"description":"Bank ID (m_banks.id)","type":"integer","example":1},"bank_branch_id":{"description":"Bank branch ID (m_bank_branches.id)","type":"integer","example":10},"bank_account_type":{"description":"Account type ID (m_bank_account_types.id)","type":"integer","example":1},"bank_account_name":{"description":"Account holder name","type":"string","example":"\u5c71\u7530 \u592a\u90ce"},"bank_account_number":{"description":"Account number","type":"string","example":"1234567"}},"type":"object"}}}},"responses":{"200":{"description":"Bank account saved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"\u9280\u884c\u53e3\u5ea7\u3092\u66f4\u65b0\u3057\u307e\u3057\u305f\u3002"},"data":{"properties":{"id":{"type":"integer"},"user_id":{"type":"integer"},"bank_id":{"type":"integer"},"bank_branch_id":{"type":"integer"},"bank_account_type":{"type":"integer"},"bank_account_name":{"type":"string"},"bank_account_number":{"type":"string"},"bank":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"bank_branch":{"properties":{"id":{"type":"integer"},"bank_id":{"type":"integer"},"name":{"type":"string"}},"type":"object"},"account_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/company-branch-favorites":{"get":{"tags":["App favorites"],"summary":"List company branch favorites (app)","operationId":"bdb334f66641a78368bf4932954c9fc1","parameters":[{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"order_by","in":"query","description":"Sort field (optional; requires `order_direction` if provided).","required":false,"schema":{"type":"string","enum":["id"]}},{"name":"order_direction","in":"query","description":"Sort direction (optional; requires `order_by` if provided).","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Paginated favorites"},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["App favorites"],"summary":"Add company branch to favorites","operationId":"7d8d114141b100dcb1b4396d45bf27dc","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["company_branch_id"],"properties":{"company_branch_id":{"description":"Company branch id","type":"integer","example":1}},"type":"object"}}}},"responses":{"200":{"description":"Created"},"400":{"description":"Business rule error"},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/company-branch-favorites\/{id}":{"delete":{"tags":["App favorites"],"summary":"Remove company branch favorite","operationId":"ebf630033c0a2f333c59c0233aec7912","parameters":[{"name":"id","in":"path","description":"Company branch id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted"},"400":{"description":"Not found"},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]}},"\/reviews\/company-branches\/{id}\/summary":{"get":{"tags":["App Review company branches"],"summary":"Get company branch review summary","description":"Get aggregated review summary for a specific company branch.","operationId":"1d0b5f77b431a775d73f37ceb0618157","parameters":[{"name":"id","in":"path","description":"Company Branch ID","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Review summary","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company branch review summary fetched successfully."},"data":{"properties":{"company_branch_id":{"type":"integer","example":3},"work_environment_avg":{"type":"string","example":"4.00"},"guidance_avg":{"type":"string","example":"3.75"},"equipment_avg":{"type":"string","example":"4.25"},"total_avg":{"type":"string","example":"4.00"},"total_reviews":{"type":"integer","example":8},"can_review":{"type":"boolean","example":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/reviews\/company-branches\/{id}\/reviews\/{review_id}\/reply":{"post":{"tags":["App Review company branches"],"summary":"Reply to a company branch review","description":"Create or update a single-level reply for a specific review. Only the author of the review can reply via this endpoint.","operationId":"61d8af0534a271d9c7af3dac86a1a133","parameters":[{"name":"id","in":"path","description":"Company Branch ID","required":true,"schema":{"type":"integer","minimum":1}},{"name":"review_id","in":"path","description":"Review ID","required":true,"schema":{"type":"integer","minimum":1}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["reply"],"properties":{"reply":{"type":"string","maxLength":1000,"example":"Thanks for the update."}},"type":"object"}}}},"responses":{"200":{"description":"Reply upserted","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company branch review replied successfully."},"data":{"type":"boolean","example":true}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Not found"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/reviews\/company-branches\/{id}\/me":{"get":{"tags":["App Review company branches"],"summary":"Get my company branch review","description":"Get the authenticated user's review for the specified company branch.","operationId":"a69fe5c52ecfe9c5f903221c83d47658","parameters":[{"name":"id","in":"path","description":"Company Branch ID","required":true,"schema":{"type":"integer","minimum":1}}],"responses":{"200":{"description":"Review detail","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company branch review fetched successfully."},"data":{"properties":{"id":{"type":"integer","example":1},"company_branch_id":{"type":"integer","example":3},"user_id":{"type":"integer","example":10},"work_environment":{"type":"integer","example":4},"guidance":{"type":"integer","example":3},"equipment":{"type":"integer","example":5},"average_score":{"type":"string","example":"4.00"},"comment":{"type":"string","example":"Nice place.","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Not found"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/reviews\/company-branches\/{id}":{"get":{"tags":["App Review company branches"],"summary":"List company branch reviews","description":"Get paginated reviews for a specific company branch.","operationId":"aaf72645dad3c4a86eb6bc2b868936ff","parameters":[{"name":"id","in":"path","description":"Company Branch ID","required":true,"schema":{"type":"integer","minimum":1}},{"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":20}},{"name":"order_by","in":"query","description":"Sort field","required":false,"schema":{"type":"string","enum":["id","created_at"]}},{"name":"order_direction","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Review list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"company_branch_id":{"type":"integer","example":3},"user_id":{"type":"integer","example":10},"work_environment":{"type":"integer","example":4},"guidance":{"type":"integer","example":3},"equipment":{"type":"integer","example":5},"average_score":{"type":"string","example":"4.00"},"comment":{"type":"string","example":"\u30b9\u30bf\u30c3\u30d5\u306e\u6848\u5185\u304c\u89aa\u5207\u3067\u3057\u305f\u3002","nullable":true},"reply":{"properties":{"user_id":{"type":"integer","example":5},"reply":{"type":"string","example":"Thanks for your feedback."},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true},"user":{"properties":{"id":{"type":"integer","example":5},"name":{"type":"string","example":"Demo User"},"katakana_name":{"type":"string","example":"\u30c7\u30e2\u30e6\u30fc\u30b6\u30fc"}},"type":"object","nullable":true}},"type":"object","nullable":true},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","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"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["App Review company branches"],"summary":"Submit company branch review","description":"Create or update the authenticated user's review for the specified company branch. Each user can submit one review per branch; re-submitting will overwrite the previous review.","operationId":"7b54c36507afa27aea9df158626e7502","parameters":[{"name":"id","in":"path","description":"Company Branch ID","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["work_environment","guidance","equipment"],"properties":{"work_environment":{"description":"Work environment rating (1-5)","type":"integer","maximum":5,"minimum":1,"example":4},"guidance":{"description":"Guidance and instruction rating (1-5)","type":"integer","maximum":5,"minimum":1,"example":3},"equipment":{"description":"Equipment and facilities rating (1-5)","type":"integer","maximum":5,"minimum":1,"example":5},"comment":{"type":"string","maxLength":1000,"example":"The staff guidance was very helpful.","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Review submitted successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"\u4e8b\u696d\u6240\u306e\u30ec\u30d3\u30e5\u30fc\u3092\u9001\u4fe1\u3057\u307e\u3057\u305f\u3002"},"data":{"type":"boolean","example":true}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Company branch not found"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/documents\/privacy-policy":{"get":{"tags":["App\/Documents"],"summary":"Get privacy-policy PDF URL","description":"Get privacy-policy PDF presigned URL.","operationId":"46f1f2c0099932ff2df11224f396ede7","responses":{"200":{"description":"Presigned URL","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"url":{"type":"string","example":"https:\/\/example.com\/presigned-url"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]}},"\/fcm\/devices":{"post":{"tags":["App - FCM"],"summary":"Register an FCM device token","operationId":"92873512364d106a0785dde0f364b5e3","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["fcm_token"],"properties":{"fcm_token":{"type":"string","example":"abcyxz123456789"},"device_model":{"type":"string","example":"09012345678"},"os":{"type":"string","example":"ios,android,web"},"os_version":{"type":"string","example":"1.1.1"}},"type":"object"}}}},"responses":{"200":{"description":"Token registered"}},"security":[{"bearerAuth":[]}]}},"\/fcm\/devices\/{id}":{"delete":{"tags":["App - FCM"],"summary":"Remove an FCM device token","operationId":"d0e759bffadb7158480505e62c877ba0","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Token removed"}},"security":[{"bearerAuth":[]}]}},"\/job-apply":{"get":{"tags":["App jobs"],"summary":"List applied jobs","description":"Get paginated applied jobs for the authenticated user.","operationId":"32abfdff2b15c36b24a2a4582b56998b","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","description":"Items per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"name":"status","in":"query","description":"Filter by status: pending, approved, rejected, cancelled","required":false,"schema":{"type":"string","enum":["pending","approved","rejected","cancelled"]}},{"name":"search_key","in":"query","description":"Search by keyword","required":false,"schema":{"type":"string","maxLength":255}},{"name":"start_working_date","in":"query","description":"Filter from date (Y-m-d)","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_working_date","in":"query","description":"Filter to date (Y-m-d)","required":false,"schema":{"type":"string","format":"date"}},{"name":"order_by","in":"query","description":"Sort field (optional; omit to use default ordering)","required":false,"schema":{"type":"string","enum":["id","created_at","status"]}},{"name":"order_direction","in":"query","description":"Sort direction (optional; omit to use default ordering)","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Paginated applied jobs","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"total":{"type":"integer","example":10},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/jobs\/{id}\/apply":{"post":{"tags":["App jobs"],"summary":"Apply to a job (app)","description":"Submit an application for a job.","operationId":"db83de3594510357864421136f737a99","parameters":[{"name":"id","in":"path","description":"Job ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Application submitted","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Application submitted successfully."},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Job not found"},"422":{"description":"Validation \/ business rule error"}},"security":[{"bearerAuth":[]}]}},"\/jobs\/{id}\/cancel":{"post":{"tags":["App jobs"],"summary":"Cancel job application (app)","description":"Cancel or request cancellation of a job application.\n\nBehaviour depends on the current application status:\n- `pending`  \u2192 cancelled immediately. `is_early_cancel` is not set.\n- `approved` \u2192 transitions to `cancel_requested`; company must approve\/reject.\n`is_early_cancel` is set to `true` when the request arrives\nmore than 1 hour before the shift start time, `false` otherwise.\n- `working` \/ `user_checkout` \/ `company_checkout` \u2192 400 error (cannot cancel while working).\n- Any other status \u2192 400 error (cannot cancel).","operationId":"e51f62731b5d740a38842d091cf48c99","parameters":[{"name":"id","in":"path","description":"t_jobs.id of the job to cancel the application for","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"cancel_note":{"description":"Mandatory note recorded in status history.","type":"string","maxLength":2000,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Cancelled (pending\u2192cancelled) or cancel request submitted (approved\u2192cancel_requested).","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"description":"'Application cancelled successfully.' when pending was cancelled directly; 'Cancellation request submitted successfully.' when an approved application moves to cancel_requested.","type":"string","example":"Application cancelled successfully."},"data":{"properties":{"id":{"type":"integer"},"job_id":{"type":"integer"},"user_id":{"type":"integer"},"status":{"description":"'cancelled' when the pending apply was cancelled directly; 'cancel_requested' when the approved apply is awaiting company decision.","type":"string","enum":["cancelled","cancel_requested"]},"is_early_cancel":{"description":"null when cancelled from pending. true when the cancel request was submitted more than 1 hour before shift start; false otherwise.","type":"boolean","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"Business rule error. Possible `error.key` values:\n     *       - `job_apply.not_found` \u2014 no active application found for this job\n     *       - `job_apply.cannot_cancel` \u2014 application is in a non-cancellable status (rejected, cancelled, cancel_requested)\n     *       - `job_apply.currently_working` \u2014 shift is currently in progress (working \/ user_checkout \/ company_checkout)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"This application cannot be cancelled."},"error":{"properties":{"key":{"type":"string","example":"job_apply.cannot_cancel"},"content":{"type":"string","example":"This application cannot be cancelled."}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/jobs\/{id}\/confirmed-note":{"post":{"tags":["App jobs"],"summary":"confirmed-note to an approved job (app)","description":"User agrees to an approved job application.","operationId":"aa2b4bc4bfee80bd19aad19b87289e7b","parameters":[{"name":"id","in":"path","description":"Job ID","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Agreement confirmed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Application note updated successfully."},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Application not found"},"400":{"description":"Status not APPROVED"}},"security":[{"bearerAuth":[]}]}},"\/jobs":{"get":{"tags":["App jobs"],"summary":"List jobs (app)","description":"List open job postings (requires logged-in app user).","operationId":"57a9be4c4972adfa99693561b4f9384d","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer"}},{"name":"order_by","in":"query","description":"Sort field (optional; omit to use default ordering)","required":false,"schema":{"type":"string","enum":["id","start_working_date","end_apply_date_time"]}},{"name":"order_direction","in":"query","description":"Sort direction (optional; omit to use default ordering)","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"search_key","in":"query","required":false,"schema":{"type":"string"}},{"name":"company_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"prefecture_ids","in":"query","description":"Comma-separated prefecture ids","required":false,"schema":{"type":"string"}},{"name":"district_ids","in":"query","description":"Comma-separated district ids","required":false,"schema":{"type":"string"}},{"name":"start_working_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_working_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"start_working_time","in":"query","required":false,"schema":{"type":"string","example":"09:00"}},{"name":"end_working_time","in":"query","required":false,"schema":{"type":"string","example":"18:00"}},{"name":"hourly_salary","in":"query","description":"Minimum hourly salary","required":false,"schema":{"type":"number"}},{"name":"service_type_ids","in":"query","description":"Comma-separated m_service_types ids \u2014 filters by job.service_type_id directly","required":false,"schema":{"type":"string"}},{"name":"strength_service_ids","in":"query","description":"Comma-separated m_strength_services ids","required":false,"schema":{"type":"string"}},{"name":"condition_ids","in":"query","description":"Comma-separated m_job_conditions ids (\u3053\u3060\u308f\u308a\u6761\u4ef6 checkbox filter)","required":false,"schema":{"type":"string"}},{"name":"experience_domain_ids","in":"query","description":"Comma-separated m_experience_domains ids","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated job rows: data, total, last_page, current_page"},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/jobs\/{id}":{"get":{"tags":["App jobs"],"summary":"Get job detail (app)","description":"Job detail for the app (open job only: published + deadline not passed).","operationId":"6a0571f1d8e8ad496d2ecaf70fd03d77","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Job detail fetched successfully."},"data":{"properties":{"job":{"description":"Job detail object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"service_type_id":{"type":"integer","nullable":true},"service_type":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object","nullable":true},"conditions":{"description":"\u3053\u3060\u308f\u308a\u6761\u4ef6 attached to this job","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"key":{"type":"string"},"display_order":{"type":"integer"}},"type":"object"}},"company":{"type":"object"},"category":{"type":"object"},"prefecture":{"type":"object","nullable":true},"district":{"type":"object","nullable":true},"company_branch":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"review_summary":{"description":"Review summary for the job's branch","properties":{"total_avg":{"type":"number","format":"float","example":4.12},"total_reviews":{"type":"integer","example":18}},"type":"object","nullable":true}},"type":"object"},"experience_domains":{"type":"array","items":{"type":"object"}},"strength_services":{"type":"array","items":{"type":"object"}},"job_levels":{"type":"array","items":{"type":"object"}},"job_travels":{"type":"array","items":{"type":"object"}},"job_shifts":{"type":"array","items":{"type":"object"}},"job_workings":{"description":"Job working row for this job, including check-in time.","type":"array","items":{"properties":{"id":{"type":"integer"},"user_id":{"type":"integer"},"job_id":{"type":"integer"},"status":{"type":"string","example":"working"},"working_date":{"type":"string","format":"date","nullable":true},"start_working_time":{"type":"string","format":"date-time","example":"2026-05-12 09:05:00","nullable":true},"end_working_time":{"type":"string","format":"date-time","nullable":true}},"type":"object"}}},"type":"object"},"is_applied":{"description":"Whether the authenticated user has already applied to this job.","type":"boolean","example":false},"job_apply_status":{"description":"Latest apply status for the authenticated user (pending\/approved\/rejected\/cancelled).","type":"string","example":"approved","nullable":true},"job_apply_qr":{"description":"QR code URL returned only when the latest apply status is approved.","type":"string","example":"https:\/\/example.com\/qrcode.svg","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"404":{"description":"Not found or not open for application"}},"security":[{"bearerAuth":[]}]}},"\/job-favorites":{"get":{"tags":["App favorites"],"summary":"List job favorites (app)","operationId":"13dc646c51317ea022293caded196372","parameters":[{"name":"type","in":"query","description":"Filter type. Use `published` to return only favorites whose job is still open for application.","required":false,"schema":{"type":"string","enum":["published"]}},{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}},{"name":"order_by","in":"query","description":"Sort field (optional; requires `order_direction` if provided).","required":false,"schema":{"type":"string","enum":["start_working_date","end_apply_date_time","hourly_salary"]}},{"name":"order_direction","in":"query","description":"Sort direction (optional; requires `order_by` if provided).","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Paginated favorites"},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["App favorites"],"summary":"Add job to favorites","operationId":"eb84438118e7462a1bf730a3d2199d0e","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["job_id"],"properties":{"job_id":{"description":"Job id","type":"integer","example":1}},"type":"object"}}}},"responses":{"200":{"description":"Created"},"400":{"description":"Business rule error"},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/job-favorites\/{id}":{"delete":{"tags":["App favorites"],"summary":"Remove job favorite","operationId":"50ba8908deb068e7a32a2c252f0240a6","parameters":[{"name":"id","in":"path","description":"Job id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Deleted"},"400":{"description":"Not found"},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]}},"\/kyc\/applicant":{"post":{"tags":["KYC"],"summary":"Create KYC applicant","description":"Swagger endpoint: `createApplicant` (POST `\/kyc\/applicant`).","operationId":"createKycApplicant","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["user_id","first_name","last_name","dob","nationality","country"],"properties":{"user_id":{"description":"User ID must exist in t_users table","type":"integer","example":1001},"first_name":{"type":"string","maxLength":100,"example":"John"},"last_name":{"type":"string","maxLength":100,"example":"Doe"},"dob":{"type":"string","format":"date","example":"1990-01-01"},"nationality":{"description":"ISO 3166-1 alpha-3","type":"string","maxLength":3,"minLength":3,"example":"USA"},"country":{"description":"ISO 3166-1 alpha-3","type":"string","maxLength":3,"minLength":3,"example":"USA"},"id_number":{"type":"string","maxLength":50,"example":"A1234567","nullable":true},"phone":{"type":"string","maxLength":20,"example":"+84901234567","nullable":true},"email":{"type":"string","format":"email","maxLength":255,"example":"user@email.com","nullable":true},"gender":{"type":"string","example":"male","nullable":true},"address":{"properties":{"street":{"type":"string","maxLength":255,"example":"123 Main St"},"city":{"type":"string","maxLength":100,"example":"New York"},"state":{"type":"string","maxLength":100,"example":"NY"},"postal_code":{"type":"string","maxLength":20,"example":"10001"},"country":{"description":"ISO 3166-1 alpha-2","type":"string","maxLength":2,"minLength":2,"example":"US"}},"type":"object","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Applicant created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"applicant_id":{"type":"string","example":"65f123abc"}},"type":"object"}}}},"422":{"description":"Validation error"}}}},"\/kyc\/generate-sdk-token":{"post":{"tags":["KYC"],"summary":"Generate Sumsub SDK token","description":"Generate SDK access token for Sumsub Web\/Mobile SDK using applicant_id","operationId":"generateKycSdkToken","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["applicant_id"],"properties":{"applicant_id":{"description":"Sumsub applicant ID","type":"string","maxLength":255,"example":"65f123abc987654321"}},"type":"object"}}}},"responses":{"200":{"description":"SDK token generated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"token":{"type":"string","example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9"},"expired_at":{"type":"integer","example":1710000000}},"type":"object"}}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"properties":{"message":{"type":"string","example":"The given data was invalid."}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]}},"\/kyc\/init":{"post":{"tags":["KYC"],"summary":"Init KYC applicant","description":"Swagger endpoint: `initKycApplicant` (POST `\/kyc\/init`).","operationId":"initKycApplicant","responses":{"200":{"description":"Applicant created successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"applicant_id":{"type":"string","example":"65f123abc"}},"type":"object"}}}},"422":{"description":"Validation error"}}}},"\/masters":{"get":{"tags":["App"],"summary":"Get master data","description":"Get master data for registration and job filters (includes service_types \/ facility types for \u65bd\u8a2d\u5f62\u614b).","operationId":"143715bd61650f0d0a686c697702cc8d","responses":{"200":{"description":"Master data payload","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"properties":{"countries":{"type":"array","items":{"type":"object"}},"prefectures":{"type":"array","items":{"type":"object"}},"districts":{"type":"array","items":{"type":"object"}},"job_categories":{"type":"array","items":{"type":"object"}},"job_sub_categories":{"type":"array","items":{"type":"object"}},"experience_domains":{"type":"array","items":{"type":"object"}},"experience_years":{"type":"array","items":{"type":"object"}},"current_work_types":{"type":"array","items":{"type":"object"}},"work_preferences":{"type":"array","items":{"type":"object"}},"job_change_interests":{"type":"array","items":{"type":"object"}},"service_types":{"type":"array","items":{"type":"object"}},"strength_services":{"type":"array","items":{"type":"object"}},"certificates":{"type":"array","items":{"type":"object"}},"travel_methods":{"type":"array","items":{"type":"object"}},"job_conditions":{"type":"array","items":{"type":"object"}},"banks":{"description":"List of banks (m_banks) with their branches","type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"\u4e09\u83f1UFJ\u9280\u884c"},"name_half_size":{"type":"string","example":"\uff90\uff82\uff8b\uff9e\uff7cUFJ\uff77\uff9e\uff9d\uff7a\uff73"},"branches":{"description":"Bank branches (m_bank_branches)","type":"array","items":{"properties":{"id":{"type":"integer","example":1},"bank_id":{"type":"integer","example":1},"code":{"type":"string","example":"001"},"name":{"type":"string","example":"\u6771\u4eac\u55b6\u696d\u90e8"},"kana":{"type":"string","example":"\u30c8\u30a6\u30ad\u30e7\u30a6\u30a8\u30a4\u30ae\u30e7\u30a6\u30d6"},"hira":{"type":"string","example":"\u3068\u3046\u304d\u3087\u3046\u3048\u3044\u304e\u3087\u3046\u3076"},"roma":{"type":"string","example":"tokyoeigyobu"}},"type":"object"}}},"type":"object"}},"bank_account_types":{"description":"Bank account types (m_bank_account_types)","type":"array","items":{"properties":{"id":{"type":"integer","example":1},"code":{"type":"string","example":"01"},"name":{"type":"string","example":"\u666e\u901a"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"500":{"description":"Internal Server Error"}}}},"\/salary\/list-year-working":{"get":{"tags":["App\/SalaryExport"],"summary":"List working years for withholding tax certificate","description":"List years (YYYY) where the authenticated user has completed job work.","operationId":"8558bf3026896fa043cfc1fe000f563f","responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"type":"array","items":{"type":"string","example":"2026"}}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]}},"\/salary\/source-income-slip-pdf":{"get":{"tags":["App\/SalaryExport"],"summary":"Download withholding tax certificate (PDF)","description":"SCR-001: file download \u6e90\u6cc9\u5fb4\u53ce\u7968. Name: \u6e90\u6cc9\u5fb4\u53ce\u7968_{staff}_{company}_{year}\u5e74.pdf. May return filled XLSX if PDF conversion (e.g. PSPDFKit) is unavailable.","operationId":"7f43bf4d64f492aaec91edd354eb505f","parameters":[{"name":"year","in":"query","description":"Target year (YYYY)","required":true,"schema":{"type":"integer","example":2026}},{"name":"company_id","in":"query","description":"Company ID. Defaults to 1 if omitted. Use 0 for all companies.","required":false,"schema":{"type":"integer","default":1,"minimum":0,"example":1}}],"responses":{"200":{"description":"File download","content":{"application\/pdf":{"schema":{"type":"string","format":"binary"}},"application\/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/timekeeping":{"post":{"tags":["App\/Timekeeping"],"summary":"Timekeeping: check-in \/ check-out","description":"Check-in or check-out (same endpoint, server branches by state).","operationId":"1b97488b02c2c429146913b82c730c03","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["job_id","branch_id"],"properties":{"job_id":{"description":"Job ID (`t_jobs.id`)","type":"integer","example":1},"branch_id":{"description":"Branch ID decoded from the branch QR. Must match `t_jobs.company_branch_id`.","type":"integer","example":10}},"type":"object"}}}},"responses":{"200":{"description":"Check-in or check-out success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Check-in \/ Check-out successful."},"data":{"description":"Updated `JobWorking` payload","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation or business rule error"}},"security":[{"bearerAuth":[]}]}},"\/timekeeping\/confirm":{"post":{"tags":["App\/Timekeeping"],"summary":"Confirm salary (finalize shift as done)","description":"Requires check-in and checkout (`start_working_time` and `end_working_time`). Writes consumption tax on net pay, sets `t_job_workings.status=done` and `t_job_applies.status=done` with actual minutes\/income snapshot.","operationId":"19cfcd1070ffa9a98535ab4d23c1a4f5","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["job_id","branch_id"],"properties":{"job_id":{"description":"Job ID (`t_jobs.id`)","type":"integer","example":1},"branch_id":{"description":"Branch ID decoded from the branch QR. Must match `t_jobs.company_branch_id` and working snapshot when set","type":"integer","example":10}},"type":"object"}}}},"responses":{"200":{"description":"Salary confirmed","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Salary confirmed successfully."},"data":{"description":"Updated `JobWorking` including `consumption_tax`, `user_salary_tax_value`, `user_salary_after_tax`, `done_at`","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation or business rule error (wrong status, branch mismatch, early checkout, etc.)"}},"security":[{"bearerAuth":[]}]}},"\/user\/profile":{"get":{"tags":["App"],"summary":"Get authenticated user profile","operationId":"94403608ae232233447fd9989443f1dc","responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"properties":{"total_withdrawable_amount":{"type":"string","example":"12000.00"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["App"],"summary":"Update user profile","description":"Partial update \u2014 send only fields to change. Phone number is excluded (use \/user\/phone\/send-code flow). Pivot arrays replace all existing records when sent.","operationId":"c1fe4ddeca043281e5eeb7d99788d527","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"properties":{"first_name":{"type":"string","example":"Taro"},"last_name":{"type":"string","example":"Yamada"},"first_katakana_name":{"type":"string","example":"\u30bf\u30ed\u30a6"},"last_katakana_name":{"type":"string","example":"\u30e4\u30de\u30c0"},"dob":{"type":"string","format":"date","example":"1995-08-20"},"gender":{"type":"string","example":"male","nullable":true},"country_id":{"description":"Nationality \/ country master id (m_countries.id)","type":"integer","example":1,"nullable":true},"postal_code":{"type":"string","example":"1000001"},"prefecture_id":{"type":"integer","example":1},"district_id":{"type":"integer","example":1,"nullable":true},"administrative_address":{"type":"string","example":"Chiyoda-ku"},"street_address":{"type":"string","example":"1-1-1 Marunouchi"},"building_address":{"type":"string","example":"ABC Building 101","nullable":true},"self_pr":{"type":"string","nullable":true},"experience_years":{"type":"integer","example":3,"nullable":true},"current_work_type":{"type":"integer","example":1,"nullable":true},"work_preference":{"type":"integer","example":2,"nullable":true},"job_change_interest":{"type":"integer","example":1,"nullable":true},"emergency_name":{"type":"string","example":"\u7dca\u6025\u9023\u7d61\u5148 \u592a\u90ce","nullable":true},"emergency_phone":{"type":"string","example":"09012345678","nullable":true},"experience_domain_ids[]":{"type":"array","items":{"type":"integer"},"nullable":true},"strength_service_ids[]":{"type":"array","items":{"type":"integer"},"nullable":true},"business_category_ids[]":{"description":"User category ids (m_user_categories.id)","type":"array","items":{"type":"integer"},"nullable":true},"certificate_ids[]":{"type":"array","items":{"type":"integer"},"nullable":true},"certificate_type_other":{"type":"string","nullable":true},"avatar":{"type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Profile updated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"description":"Updated user with all relations","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/user\/quit-app":{"put":{"tags":["App"],"summary":"Quit \/ deactivate account","description":"Deactivates the user's account after verifying no active job shifts remain. Records survey answers, sets status to inactive, and invalidates all JWT tokens. Re-registration is allowed after 30 days.","operationId":"8922fc4d8a1e25e0981cd24fdc45273b","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["few_number_of_jobs","heavy_penalty_mechanism","using_another_app"],"properties":{"few_number_of_jobs":{"description":"Survey answer key","type":"string","enum":["high","medium","low","unlike"],"example":"high"},"heavy_penalty_mechanism":{"description":"Survey answer key","type":"string","enum":["high","medium","low","unlike"],"example":"medium"},"using_another_app":{"description":"Survey answer key","type":"string","enum":["high","medium","low","unlike"],"example":"low"},"reason":{"description":"Optional free-text reason","type":"string","maxLength":200,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Account deactivated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Your account has been deactivated successfully."},"data":{"type":"array","items":[]}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error or active jobs exist"}},"security":[{"bearerAuth":[]}]}},"\/user\/job\/completed":{"get":{"tags":["App jobs"],"summary":"List completed job workings","description":"Paginated JobWorking rows in statuses company_checkout, done, or payment (optional status query filters to one). Each row includes selected JobWorking columns, nested job (id, name, status, company with name, company_branch with name), and transaction_logs: array of objects containing only the status field per wallet movement linked to the shift.","operationId":"dbb6ddadba3e16165d81b638a24183b9","parameters":[{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","description":"Items per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"name":"status","in":"query","description":"Filter by job working status: company_checkout, done, payment","required":false,"schema":{"type":"string","enum":["company_checkout","done","payment"]}}],"responses":{"200":{"description":"Paginated completed shifts","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"type":"object"}},"total":{"type":"integer","example":10},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/user\/company":{"get":{"tags":["App"],"summary":"List companies for withholding slip year","description":"Returns distinct `t_companies` where the user has `t_job_workings` in the given calendar year with completed statuses (same set as list-year-working \/ slip download).","operationId":"f5806ac5eeebaa61730a0ca3af83c272","parameters":[{"name":"year","in":"query","required":true,"schema":{"type":"integer","example":2026}}],"responses":{"200":{"description":"Array of objects with id and name properties, sorted by name","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Sample Corp"}},"type":"object"}}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error (e.g. missing year)"}},"security":[{"bearerAuth":[]}]}},"\/register\/update-info":{"post":{"tags":["App"],"summary":"Register user","description":"Requires Bearer token from phone OTP verification (`auth:phone`). Phone numbers are taken from that session, not from the request body.","operationId":"40cc7e6f523ba78485faa87682079589","requestBody":{"required":true,"content":{"multipart\/form-data":{"schema":{"required":["first_name","last_name","first_katakana_name","last_katakana_name","dob","country_id","postal_code","prefecture_id","administrative_address","street_address"],"properties":{"first_name":{"type":"string","example":"Taro"},"last_name":{"type":"string","example":"Yamada"},"first_katakana_name":{"type":"string","example":"\u30bf\u30ed\u30a6"},"last_katakana_name":{"type":"string","example":"\u30e4\u30de\u30c0"},"dob":{"type":"string","format":"date","example":"1995-08-20"},"gender":{"type":"string","example":"male"},"country_id":{"description":"Nationality \/ country master id (m_countries.id)","type":"integer","example":1},"postal_code":{"type":"string","example":"1000001"},"prefecture_id":{"type":"integer","example":1},"district_id":{"type":"integer","example":1},"administrative_address":{"type":"string","example":"Chiyoda-ku"},"street_address":{"type":"string","example":"1-1-1 Marunouchi"},"building_address":{"type":"string","example":"ABC Building 101"},"experience_years":{"type":"integer","example":3},"self_pr":{"type":"string","example":"Backend engineer"},"current_work_type":{"type":"integer","example":1},"work_preference":{"type":"integer","example":2},"job_change_interest":{"type":"integer","example":1},"experience_domain_ids[]":{"type":"array","items":{"type":"integer","example":1}},"strength_service_ids[]":{"type":"array","items":{"type":"integer","example":1}},"business_category_ids[]":{"description":"User category ids (m_user_categories.id)","type":"array","items":{"type":"integer","example":1}},"certificate_ids[]":{"type":"array","items":{"type":"integer","example":1}},"certificate_type_other":{"type":"string","example":"Other cert"},"avatar":{"type":"string","format":"binary"}},"type":"object"}}}},"responses":{"200":{"description":"Successful Operation"},"422":{"description":"Validation Error"},"500":{"description":"Internal Server Error"}}}},"\/user\/phone\/send-code":{"post":{"tags":["App"],"summary":"Send OTP to new phone number","description":"Send OTP to new phone number for phone change verification.","operationId":"8b575a9e556e6008decfc589d9333be0","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["phone_number"],"properties":{"phone_number":{"description":"New phone number (8-15 digits, optional leading +)","type":"string","example":"0901234567"}},"type":"object"}}}},"responses":{"200":{"description":"OTP sent successfully (mock OTP: 1234)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"array","items":[]}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation error or phone already taken"}},"security":[{"bearerAuth":[]}]}},"\/user\/phone\/verify-code":{"post":{"tags":["App"],"summary":"Verify OTP and update phone number","description":"Verify OTP and update phone number. Returns new JWT token.","operationId":"464b959a88b8f8b20fb6fa47a5e914da","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["phone_number","code"],"properties":{"phone_number":{"type":"string","example":"0901234567"},"code":{"description":"4-digit OTP code","type":"string","example":"1234"}},"type":"object"}}}},"responses":{"200":{"description":"Phone updated. Old token is invalidated \u2014 use the returned token.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"expires_in":{"type":"integer","example":3600},"token_type":{"type":"string","example":"bearer"},"user":{"description":"Updated user","type":"object"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Invalid or expired OTP"}},"security":[{"bearerAuth":[]}]}},"\/user\/withdraw":{"post":{"tags":["App Wallet"],"summary":"Withdraw from wallet","description":"Without `job_id`: withdraws every `in-wallet` company payment for the user (all jobs). With `job_id`: withdraws only lines linked to the user's latest job working for that job. Each distinct employer among the touched payments must have a row in `t_company_bank_accounts`. Until a bank payout API is integrated, success rows are persisted locally so wallet and transaction tables stay consistent.","operationId":"50ae986648fb489eadf05f2b5f7610eb","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"job_id":{"description":"Optional. Job ID (`t_jobs.id`); when present, only that job's latest shift is withdrawn. Omit or null to withdraw all in-wallet rows.","type":"integer","example":42,"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Withdrawal recorded","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"properties":{"transaction_id":{"type":"string","example":"550e8400-e29b-41d4-a716-446655440000"},"amount":{"type":"string","example":"5000.00"},"company_payment_ids":{"type":"array","items":{"type":"integer"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"422":{"description":"Validation or business rule error"}},"security":[{"bearerAuth":[]}]}},"\/company\/branch\/application-histories":{"get":{"tags":["Company Branch"],"summary":"Get application histories grouped by branch and month","operationId":"595b1681f8d2ec7b0280eee4efd4385e","parameters":[{"name":"approve_month","in":"query","description":"Filter by month (format: YYYY-MM). If omitted, all data is returned.","required":false,"schema":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$","example":"2026-04"}},{"name":"branch_ids[]","in":"query","description":"Filter by branch IDs","required":false,"schema":{"type":"array","items":{"type":"integer"},"example":[1,2]}},{"name":"order_by","in":"query","description":"Sort column","required":false,"schema":{"type":"string","enum":["approve_month","branch_name","approved_count"],"example":"approve_month"}},{"name":"order_direction","in":"query","description":"Sort direction","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"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":10}}],"responses":{"200":{"description":"Successful response","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"branch_id":{"type":"integer","example":1},"branch_name":{"type":"string","example":"Demo Branch 01"},"approve_month":{"type":"string","example":"2026-04"},"approved_count":{"type":"integer","example":3}},"type":"object"}},"total":{"type":"integer","example":2},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/company\/branch\/application-histories\/export-csv":{"post":{"tags":["Company Branch"],"summary":"Export application histories to CSV","description":"Export application histories filtered by branch and approve date","operationId":"exportApplicationHistoriesCsv","requestBody":{"required":false,"content":{"application\/json":{"schema":{"properties":{"branch_ids":{"description":"Branch IDs","type":"array","items":{"type":"integer"},"example":[1,2]},"approve_month":{"description":"Approve month (YYYY-MM)","type":"string","format":"string","example":"2026-04"}},"type":"object"}}}},"responses":{"200":{"description":"CSV file download","headers":{"Content-Disposition":{"description":"attachment; filename=application_histories.csv","schema":{"type":"string"}}},"content":{"text\/csv":[]}},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/company\/auth\/login":{"post":{"tags":["Company"],"summary":"Login as a company user","description":"Login: email + password, returns JWT access_token and user.","operationId":"84c1ecda349614c12e5d27b2c66948f5","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email","password"],"properties":{"email":{"type":"string","format":"email","example":"company@example.com"},"password":{"type":"string","format":"password","example":"password"}},"type":"object"}}}},"responses":{"200":{"description":"Successful login","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"},"user":{"$ref":"#\/components\/schemas\/user"}},"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","example":"These credentials do not match our records."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/company\/auth\/logout":{"post":{"tags":["Company"],"summary":"Logout","description":"Logout current company account.","operationId":"398d982c205fed86fbb79006061b633e","responses":{"200":{"description":"Successful Operation","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Logout successfully."},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/auth\/forgot-password":{"post":{"tags":["Company"],"summary":"Request password reset email","description":"Request a reset email for company user password. Unlike the admin forgot-password\nendpoint, this one returns a specific {@code admin.password_reset_user_not_found}\nerror (reusing admin lang keys) when the email is not registered.","operationId":"d14901118d7072d67cb6fdc57a58afa8","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email"],"properties":{"email":{"type":"string","format":"email","example":"company@example.com"}},"type":"object"}}}},"responses":{"200":{"description":"Password reset email sent","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Email was sent successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"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","example":"We could not find a user with that email address."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/company\/auth\/reset-password":{"post":{"tags":["Company"],"summary":"Reset company user password using token","description":"Reset company user password using the reset JWT. `password_confirmation` is\nrequired (enforced by the shared {@see \\App\\Http\\Requests\\Api\\Common\\Auth\\ResetPasswordRequest}).\nReuses admin lang keys for error responses.","operationId":"f2bac602ace2b8ae04cc38c12f9af356","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["token","password","password_confirmation"],"properties":{"token":{"type":"string","example":"reset_token_here"},"password":{"type":"string","example":"newPass123!"},"password_confirmation":{"type":"string","example":"newPass123!"}},"type":"object"}}}},"responses":{"200":{"description":"Password reset successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Password has been reset successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"Reset failed (invalid\/expired token, wrong token type, stale version, user not found)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Invalid or expired reset token."},"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","example":"Invalid or expired reset token."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error (missing fields or password_confirmation mismatch)","content":{"application\/json":{"schema":[]}}}}}},"\/company\/auth\/refresh-token":{"post":{"tags":["Company"],"summary":"Refresh JWT token","description":"Refresh company JWT access token with refresh token.","operationId":"ef7df4a8d2bf79cc0ba23f25f77034a2","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["refresh_token"],"properties":{"refresh_token":{"type":"string","example":"refresh_token_here"}},"type":"object"}}}},"responses":{"200":{"description":"Token was refreshed successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Token was refreshed successfully."},"data":{"properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string","example":"bearer"},"expires_in":{"type":"integer"},"user":{"$ref":"#\/components\/schemas\/user"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Invalid or expired refresh token","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"error":{"properties":{"key":{"type":"string","example":"jwt.exception"}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation Error","content":{"application\/json":{"schema":[]}}}}}},"\/company\/branch\/user":{"get":{"tags":["Company Branch User"],"summary":"List branch users for the company","description":"Returns branch users whose default branch belongs to the authenticated company. Loads roles from t_branch_user_roles and m_branch_roles, plus default branch info.","operationId":"companyListBranchUsers","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 company branch IDs. Supports array, comma-separated, or JSON array formats.","required":false,"schema":{"type":"array","items":{"type":"integer"},"example":[1,2]}},{"name":"branch_role_ids[]","in":"query","description":"Filter users by role IDs (t_branch_user_roles). Supports array, comma-separated, or JSON array formats.","required":false,"schema":{"type":"array","items":{"type":"integer"},"example":[1,2]}},{"name":"search","in":"query","description":"Search name or furigana (partial match)","required":false,"schema":{"type":"string","maxLength":255}},{"name":"order_by","in":"query","description":"Sort column (single field)","required":false,"schema":{"type":"string","enum":["id","name","email","created_at"],"example":"id"}},{"name":"order_direction","in":"query","description":"Used with order_by; asc or desc (case-insensitive)","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Paginated list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/BranchUser"}},"total":{"type":"integer","example":100},"last_page":{"type":"integer","example":7},"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":["Company Branch User"],"summary":"Create a branch user","description":"Create branch user.","operationId":"companyCreateBranchUser","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","email","password","branch_ids"],"properties":{"name":{"type":"string","maxLength":255,"example":"Yamada Taro"},"email":{"type":"string","format":"email","example":"branch@example.com"},"password":{"type":"string","format":"password","minLength":8,"example":"password"},"branch_ids":{"description":"Assigned branch ids (t_company_branches.id) belonging to the company","type":"array","items":{"type":"integer"},"example":[1,2]},"furigana":{"type":"string","maxLength":255,"nullable":true},"phone_number":{"type":"string","maxLength":64,"example":"0981111111","nullable":true},"branch_role_ids":{"description":"Role ids from m_branch_roles","type":"array","items":{"type":"integer"},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Branch user created successfully."},"data":{"$ref":"#\/components\/schemas\/BranchUser"}},"type":"object"}}}},"400":{"description":"Default branch does not belong to the authenticated company (secondary guard; validation normally catches this as 422)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"The selected branch does not belong to the company."},"error":{"properties":{"key":{"type":"string","example":"branch_user.invalid_company_branch"},"content":{"type":"string","example":"The selected branch does not belong to the company."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/branch\/user\/{id}":{"get":{"tags":["Company Branch User"],"summary":"Get branch user by id","description":"Returns a branch user belonging to the authenticated company.","operationId":"companyShowBranchUser","parameters":[{"name":"id","in":"path","description":"Branch user id (t_branch_user_profiles.id)","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Branch user fetched successfully."},"data":{"$ref":"#\/components\/schemas\/BranchUser"}},"type":"object"}}}},"400":{"description":"Branch user not found or does not belong to the authenticated company","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Branch user not found."},"error":{"properties":{"key":{"type":"string","example":"branch_user.not_found"},"content":{"type":"string","example":"Branch user not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Company Branch User"],"summary":"Update a branch user","description":"Update branch user.","operationId":"companyUpdateBranchUser","parameters":[{"name":"id","in":"path","description":"Branch user id (t_branch_user_profiles.id)","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","maxLength":255,"example":"Yamada Taro"},"email":{"description":"New email \u2014 must be unique across branch users","type":"string","format":"email","maxLength":255,"example":"new@example.com","nullable":true},"furigana":{"type":"string","maxLength":255,"nullable":true},"phone_number":{"type":"string","maxLength":64,"example":"0981111111","nullable":true},"branch_ids":{"description":"Replace assigned branches (must belong to the same company)","type":"array","items":{"type":"integer"},"example":[2,3],"nullable":true},"password":{"description":"New password","type":"string","format":"password","minLength":8,"nullable":true},"branch_role_ids":{"description":"Role ids from m_branch_roles","type":"array","items":{"type":"integer"},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Branch user updated successfully."},"data":{"$ref":"#\/components\/schemas\/BranchUser"}},"type":"object"}}}},"400":{"description":"Branch user not found or does not belong to the authenticated company","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Branch user not found."},"error":{"properties":{"key":{"type":"string","example":"branch_user.not_found"},"content":{"type":"string","example":"Branch user not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Company Branch User"],"summary":"Delete a branch user","description":"Soft deletes a branch user whose default branch belongs to the authenticated company. Also removes the user's role assignments.","operationId":"companyDeleteBranchUser","parameters":[{"name":"id","in":"path","description":"Branch user id (t_branch_user_profiles.id)","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Deleted","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"object","nullable":true}},"type":"object"}}}},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":[]}}},"404":{"description":"Not found"}},"security":[{"bearerAuth":[]}]}},"\/company\/branch":{"get":{"tags":["Company Branch"],"summary":"Get a list of company branches","description":"List company branches.","operationId":"f1fac361e9edfcfefa02d05f49942e23","parameters":[{"name":"page","in":"query","description":"Page number for pagination","required":false,"schema":{"type":"integer","minimum":1,"example":1}},{"name":"limit","in":"query","description":"Number of items per page","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"example":20}},{"name":"region_ids[]","in":"query","description":"Filter by one or more company region IDs (t_company_regions.id). Pass as region_ids[]=1&region_ids[]=2","required":false,"schema":{"type":"array","items":{"type":"integer","example":1}}},{"name":"prefecture_id","in":"query","description":"Filter by prefecture ID","required":false,"schema":{"type":"integer","example":10}},{"name":"district_id","in":"query","description":"Filter by district ID","required":false,"schema":{"type":"integer","example":8}},{"name":"search_key","in":"query","description":"Search in branch name and responsible_person_email (partial match)","required":false,"schema":{"type":"string","maxLength":255,"example":"Shibuya"}},{"name":"order_by","in":"query","description":"Sort column (with order_direction)","required":false,"schema":{"type":"string","enum":["id","name","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":"Paginated list of branches scoped to the authenticated company. Response is the bare paginator shape from AppBaseController::pagination() (no success\/message wrapper).","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"$ref":"#\/components\/schemas\/CompanyBranch"}},"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":[]}]},"post":{"tags":["Company Branch"],"summary":"Create a new company branch (company is taken from the authenticated company JWT, not the request body)","description":"Use `application\/json` or `multipart\/form-data`. For face image upload, send `face_photo` as a file (multipart).","operationId":"50fed7f0aacd8b8d037aed3b35c945a9","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","prefecture_id","address_line"],"properties":{"name":{"type":"string","maxLength":255,"example":"Branch A"},"region_ids":{"description":"Company region IDs (t_company_regions.id)","type":"array","items":{"type":"integer","example":1},"nullable":true},"prefecture_id":{"description":"ID of the prefecture, must exist in m_prefectures table","type":"integer","example":13},"district_id":{"description":"ID of the district, must exist in m_districts table","type":"integer","example":5,"nullable":true},"postal_code":{"type":"string","maxLength":32,"example":"1500002","nullable":true},"address_line":{"type":"string","maxLength":500,"example":"123 Some St, City"},"access_note":{"type":"string","maxLength":2000,"example":"How to access the branch","nullable":true},"has_on_site_parking":{"type":"boolean","example":true,"nullable":true},"commuting_note":{"type":"string","maxLength":2000,"example":"Commuting information","nullable":true},"responsible_person_name":{"type":"string","maxLength":255,"example":"Mr. Yamada","nullable":true},"greeting_message":{"type":"string","maxLength":2000,"example":"Welcome to our branch!","nullable":true},"worker_contact_name":{"type":"string","maxLength":255,"example":"Jane Smith","nullable":true},"worker_contact_phone":{"type":"string","maxLength":20,"example":"09012345678","nullable":true},"emergency_contact":{"type":"string","maxLength":255,"example":"Call 119","nullable":true},"responsible_person_email":{"type":"string","maxLength":255,"example":"yamada@example.com","nullable":true},"first_confirmation_auto_message":{"type":"string","maxLength":2000,"example":"Thank you for your application.","nullable":true},"facility_open_date":{"type":"string","format":"date","example":"2023-04-01","nullable":true},"unemployment_insurance_office_number":{"type":"string","maxLength":50,"example":"87654321","nullable":true},"service_type_ids":{"description":"IDs from m_service_types (pivot t_company_branch_service_types)","type":"array","items":{"type":"integer","example":1},"nullable":true},"travel_method_ids":{"description":"IDs from m_travel_methods (pivot t_company_branch_travel_methods)","type":"array","items":{"type":"integer","example":1},"nullable":true},"face_photo":{"description":"Branch face \/ facility image (jpeg, png, gif, webp; max 10 MB). Multipart only.","type":"string","format":"binary","nullable":true},"responsible_person_photo":{"description":"Responsible person photo (multipart)","type":"string","format":"binary","nullable":true},"worker_contact_photo":{"description":"Worker contact photo (multipart)","type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Successful creation of company branch","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"data":{"$ref":"#\/components\/schemas\/CompanyBranch"},"message":{"type":"string","example":"Company branch created successfully."}},"type":"object"}}}},"422":{"description":"Unprocessable Entity (validation error; includes missing required fields and invalid prefecture\/region\/district ids)","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/branch\/{id}":{"get":{"tags":["Company Branch"],"summary":"Show company branch","description":"Retrieve a specific company branch by its ID.","operationId":"showCompanyBranch","parameters":[{"name":"id","in":"path","description":"The ID of the company branch","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 branch fetched successfully."},"data":{"$ref":"#\/components\/schemas\/CompanyBranch"}},"type":"object"}}}},"400":{"description":"Branch not found or does not belong to the authenticated company","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company branch not found."},"error":{"properties":{"key":{"type":"string","example":"company_branch.not_found"},"content":{"type":"string","example":"Company branch not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Company Branch"],"summary":"Update a specific company branch (company scope from JWT)","description":"Update company branch (PUT `\/company\/branch\/{id}`). Company cannot be changed via the body. Use `multipart\/form-data` to upload or replace `face_photo`.","operationId":"e951555623686331db24e3443ded6ccf","parameters":[{"name":"id","in":"path","description":"ID of the company branch to update","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","maxLength":255,"example":"Branch A"},"address_line":{"type":"string","maxLength":500,"example":"123 Some St, City"},"prefecture_id":{"description":"ID of the prefecture, must exist in m_prefectures table","type":"integer","example":13},"region_ids":{"description":"Company region IDs (t_company_regions.id)","type":"array","items":{"type":"integer","example":1},"nullable":true},"district_id":{"description":"ID of the district, must exist in m_districts table","type":"integer","example":5,"nullable":true},"postal_code":{"type":"string","maxLength":32,"example":"1500002","nullable":true},"access_note":{"type":"string","maxLength":2000,"example":"How to access the branch","nullable":true},"has_on_site_parking":{"type":"boolean","example":true,"nullable":true},"commuting_note":{"type":"string","maxLength":2000,"example":"Commuting information","nullable":true},"responsible_person_name":{"type":"string","maxLength":255,"example":"Mr. Yamada","nullable":true},"greeting_message":{"type":"string","maxLength":2000,"example":"Welcome to our branch!","nullable":true},"worker_contact_name":{"type":"string","maxLength":255,"example":"Jane Smith","nullable":true},"worker_contact_phone":{"type":"string","maxLength":20,"example":"09012345678","nullable":true},"emergency_contact":{"type":"string","maxLength":255,"example":"Call 119","nullable":true},"responsible_person_email":{"type":"string","maxLength":255,"example":"yamada@example.com","nullable":true},"first_confirmation_auto_message":{"type":"string","maxLength":2000,"nullable":true},"facility_open_date":{"type":"string","format":"date","nullable":true},"unemployment_insurance_office_number":{"type":"string","maxLength":50,"nullable":true},"service_type_ids":{"type":"array","items":{"type":"integer"},"nullable":true},"travel_method_ids":{"type":"array","items":{"type":"integer"},"nullable":true},"face_photo":{"description":"Replace branch face image (multipart)","type":"string","format":"binary","nullable":true},"responsible_person_photo":{"description":"Replace responsible person photo (multipart)","type":"string","format":"binary","nullable":true},"worker_contact_photo":{"description":"Replace worker contact photo (multipart)","type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Branch updated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company branch updated successfully."},"data":{"$ref":"#\/components\/schemas\/CompanyBranch"}},"type":"object"}}}},"400":{"description":"Branch not found or does not belong to the authenticated company","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Company branch not found."},"error":{"properties":{"key":{"type":"string","example":"company_branch.not_found"},"content":{"type":"string","example":"Company branch not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation failed","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/branch\/{id}\/reviews":{"get":{"tags":["Company Branch"],"summary":"List reviews of a company branch","description":"Returns paginated reviews (t_company_branch_reviews) for a branch belonging to the authenticated company.","operationId":"companyListBranchReviews","parameters":[{"name":"id","in":"path","description":"Company branch id (t_company_branches.id)","required":true,"schema":{"type":"integer","example":1}},{"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":["id","created_at"],"example":"id"}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Paginated list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":10},"company_branch_id":{"type":"integer","example":1},"user_id":{"type":"integer","example":5},"work_environment":{"type":"integer","example":5},"guidance":{"type":"integer","example":4},"equipment":{"type":"integer","example":5},"average_score":{"type":"number","format":"float","example":4.67},"comment":{"type":"string","example":"Great place.","nullable":true},"created_at":{"type":"string","format":"date-time"},"user":{"properties":{"id":{"type":"integer","example":5},"name":{"type":"string","example":"Yamada Taro"}},"type":"object"},"reply":{"properties":{"user_id":{"type":"integer","example":5},"reply":{"type":"string","example":"Thanks for your feedback."},"created_at":{"type":"string","format":"date-time","nullable":true},"updated_at":{"type":"string","format":"date-time","nullable":true},"user":{"properties":{"id":{"type":"integer","example":5},"name":{"type":"string","example":"Yamada Taro"}},"type":"object","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"total":{"type":"integer","example":23},"last_page":{"type":"integer","example":2},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"400":{"description":"Branch not found or does not belong to the company"},"401":{"description":"Unauthorized","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/information":{"get":{"tags":["Company Information"],"summary":"Get company information","description":"Returns the company's information. Requires company admin type.","operationId":"5e449e303f28f3770d84b0cae76d5b08","responses":{"200":{"description":"Company information retrieved successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company information retrieved successfully."},"data":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo Company"},"furigana":{"type":"string","example":"\u30c7\u30e2\u30ab\u30f3\u30d1\u30cb\u30fc","nullable":true},"email":{"type":"string","format":"email","example":"company@example.com"},"phone_number":{"type":"string","example":"0312345678","nullable":true},"fax_number":{"type":"string","example":"0312345680","nullable":true},"postal_code":{"type":"string","example":"1000001","nullable":true},"prefecture_id":{"type":"integer","example":13,"nullable":true},"address":{"type":"string","example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"work_place":{"type":"string","example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a","nullable":true},"representative_name":{"type":"string","example":"\u5c71\u7530 \u592a\u90ce","nullable":true},"total_staff":{"type":"integer","example":50,"nullable":true},"business_content":{"type":"string","example":"IT staffing services.","nullable":true},"contact_name":{"type":"string","example":"\u7530\u4e2d \u82b1\u5b50","nullable":true},"contact_furigana":{"type":"string","example":"\u305f\u306a\u304b \u306f\u306a\u3053","nullable":true},"contact_phone_number":{"type":"string","example":"0312345679","nullable":true},"position":{"type":"string","example":"HR Manager","nullable":true},"department":{"type":"string","example":"Human Resources","nullable":true},"person_in_charge_name":{"type":"string","example":"\u9234\u6728 \u4e00\u90ce","nullable":true},"person_in_charge_email":{"type":"string","format":"email","example":"billing@example.com","nullable":true},"person_in_charge_expense_name":{"type":"string","example":"\u4f50\u85e4 \u6b21\u90ce","nullable":true},"person_in_charge_expense_email":{"type":"string","format":"email","example":"expense@example.com","nullable":true},"insurance_number":{"type":"string","example":"12-345678-9","nullable":true},"tax_code":{"type":"string","example":"T1234567890","nullable":true},"cc_email":{"type":"string","format":"email","example":"cc@example.com","nullable":true},"note":{"type":"string","example":"\u5099\u8003\u6b04","nullable":true},"bank_account":{"description":"Bank account info (t_company_bank_accounts)","properties":{"bank_id":{"type":"integer","example":1,"nullable":true},"bank_branch_id":{"type":"integer","example":1,"nullable":true},"bank_account_type_id":{"type":"integer","example":1,"nullable":true},"bank_account_number":{"type":"string","example":"1234567","nullable":true},"bank_account_name":{"type":"string","example":"\u30e4\u30de\u30c0\u30bf\u30ed\u30a6","nullable":true},"bank":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"\u4e09\u83f1UFJ\u9280\u884c"},"name_half_size":{"type":"string","example":"\uff90\uff82\uff8b\uff9e\uff7cUFJ\uff77\uff9e\uff9d\uff7a\uff73"}},"type":"object","nullable":true},"bank_branch":{"properties":{"id":{"type":"integer","example":1},"bank_id":{"type":"integer","example":1},"code":{"type":"string","example":"001"},"name":{"type":"string","example":"\u6771\u4eac\u55b6\u696d\u90e8"}},"type":"object","nullable":true},"account_type":{"properties":{"id":{"type":"integer","example":1},"code":{"type":"string","example":"01"},"name":{"type":"string","example":"\u666e\u901a"}},"type":"object","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden \u2014 company user is not admin type"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Company Information"],"summary":"Update company information","description":"Updates the company's information. Requires company admin type.","operationId":"f11df1bba1903309496c3926e381e55d","requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","maxLength":255,"example":"Demo Company"},"furigana":{"type":"string","maxLength":255,"example":"\u30c7\u30e2\u30ab\u30f3\u30d1\u30cb\u30fc","nullable":true},"email":{"type":"string","format":"email","maxLength":255,"example":"company@example.com","nullable":true},"phone_number":{"type":"string","maxLength":20,"example":"0312345678","nullable":true},"fax_number":{"type":"string","maxLength":20,"example":"0312345680","nullable":true},"postal_code":{"type":"string","maxLength":32,"example":"1000001","nullable":true},"prefecture_id":{"type":"integer","example":13,"nullable":true},"address":{"type":"string","maxLength":500,"example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"work_place":{"type":"string","maxLength":500,"example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a","nullable":true},"representative_name":{"type":"string","maxLength":255,"example":"\u5c71\u7530 \u592a\u90ce","nullable":true},"total_staff":{"type":"integer","minimum":0,"example":50,"nullable":true},"business_content":{"type":"string","maxLength":2000,"example":"IT staffing services.","nullable":true},"contact_name":{"type":"string","maxLength":255,"example":"\u7530\u4e2d \u82b1\u5b50","nullable":true},"contact_furigana":{"type":"string","maxLength":255,"example":"\u305f\u306a\u304b \u306f\u306a\u3053","nullable":true},"contact_phone_number":{"type":"string","maxLength":20,"example":"0312345679","nullable":true},"position":{"type":"string","maxLength":255,"example":"HR Manager","nullable":true},"department":{"type":"string","maxLength":255,"example":"Human Resources","nullable":true},"person_in_charge_name":{"type":"string","maxLength":255,"example":"\u9234\u6728 \u4e00\u90ce","nullable":true},"person_in_charge_email":{"type":"string","format":"email","maxLength":255,"example":"billing@example.com","nullable":true},"person_in_charge_expense_name":{"type":"string","maxLength":255,"example":"\u4f50\u85e4 \u6b21\u90ce","nullable":true},"person_in_charge_expense_email":{"type":"string","format":"email","maxLength":255,"example":"expense@example.com","nullable":true},"insurance_number":{"type":"string","maxLength":50,"example":"12-345678-9","nullable":true},"tax_code":{"type":"string","maxLength":50,"example":"T1234567890","nullable":true},"cc_email":{"type":"string","format":"email","maxLength":255,"example":"cc@example.com","nullable":true},"note":{"type":"string","maxLength":2000,"example":"\u5099\u8003\u6b04","nullable":true},"bank_id":{"description":"Bank id (m_banks.id)","type":"integer","example":1,"nullable":true},"bank_branch_id":{"description":"Bank branch id (m_bank_branches.id)","type":"integer","example":1,"nullable":true},"bank_account_type_id":{"description":"Bank account type id (m_bank_account_types.id)","type":"integer","example":1,"nullable":true},"bank_account_number":{"type":"string","maxLength":50,"example":"1234567","nullable":true},"bank_account_name":{"type":"string","maxLength":255,"example":"\u30e4\u30de\u30c0\u30bf\u30ed\u30a6","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Company information updated successfully","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company information updated successfully."},"data":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo Company"},"furigana":{"type":"string","example":"\u30c7\u30e2\u30ab\u30f3\u30d1\u30cb\u30fc","nullable":true},"email":{"type":"string","format":"email","example":"company@example.com","nullable":true},"phone_number":{"type":"string","example":"0312345678","nullable":true},"postal_code":{"type":"string","example":"1000001","nullable":true},"prefecture_id":{"type":"integer","example":13,"nullable":true},"address":{"type":"string","example":"\u6771\u4eac\u90fd\u5343\u4ee3\u7530\u533a1-1-1","nullable":true},"representative_name":{"type":"string","example":"\u5c71\u7530 \u592a\u90ce","nullable":true},"total_staff":{"type":"integer","example":50,"nullable":true},"bank_account":{"properties":{"bank_id":{"type":"integer","example":1,"nullable":true},"bank_branch_id":{"type":"integer","example":1,"nullable":true},"bank_account_type_id":{"type":"integer","example":1,"nullable":true},"bank_account_number":{"type":"string","example":"1234567","nullable":true},"bank_account_name":{"type":"string","example":"\u30e4\u30de\u30c0\u30bf\u30ed\u30a6","nullable":true},"bank":{"properties":{"id":{"type":"integer","example":1},"name":{"type":"string","example":"\u4e09\u83f1UFJ\u9280\u884c"},"name_half_size":{"type":"string","example":"\uff90\uff82\uff8b\uff9e\uff7cUFJ\uff77\uff9e\uff9d\uff7a\uff73"}},"type":"object","nullable":true},"bank_branch":{"properties":{"id":{"type":"integer","example":1},"bank_id":{"type":"integer","example":1},"code":{"type":"string","example":"001"},"name":{"type":"string","example":"\u6771\u4eac\u55b6\u696d\u90e8"}},"type":"object","nullable":true},"account_type":{"properties":{"id":{"type":"integer","example":1},"code":{"type":"string","example":"01"},"name":{"type":"string","example":"\u666e\u901a"}},"type":"object","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated"},"403":{"description":"Forbidden \u2014 company user is not admin type"},"422":{"description":"Validation error"}},"security":[{"bearerAuth":[]}]}},"\/company\/documents\/terms-of-use":{"get":{"tags":["Company Documents"],"summary":"Get terms-of-use PDF URL","description":"Get terms-of-use PDF URL.","operationId":"c209b9c31287087ef0a699b5672d9394","responses":{"200":{"description":"Presigned URL","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"url":{"type":"string","example":"https:\/\/example.com\/presigned-url"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/documents\/privacy-policy":{"get":{"tags":["Company Documents"],"summary":"Get privacy-policy PDF URL","description":"Get privacy-policy PDF URL.","operationId":"e65740e331b03615d476627d9655b30e","responses":{"200":{"description":"Presigned URL","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"url":{"type":"string","example":"https:\/\/example.com\/presigned-url"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/documents\/usage-guide":{"get":{"tags":["Company Documents"],"summary":"Get usage-guide PDF URL","description":"Get usage-guide PDF URL.","operationId":"35939a6e2f3b9218b2e545d0336e5c5f","responses":{"200":{"description":"Presigned URL","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Succeed"},"data":{"properties":{"url":{"type":"string","example":"https:\/\/example.com\/presigned-url"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/job\/applies":{"get":{"tags":["Company Job Apply"],"summary":"List job applications (company)","description":"List job applications for the authenticated company (optionally one job).","operationId":"b59544246161d23875748e310f44296d","parameters":[{"name":"job_id","in":"query","description":"Optional: limit to applications for this job id","required":false,"schema":{"type":"integer","minimum":1}},{"name":"company_branch_id","in":"query","description":"Optional: limit to applications whose job belongs to this company branch. Must belong to the authenticated company, otherwise 422.","required":false,"schema":{"type":"integer"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1}},{"name":"status[]","in":"query","description":"Filter by application status. Pass multiple values as status[]=pending&status[]=approved. Allowed: pending, approved, rejected, cancelled, cancel_requested.","required":false,"schema":{"type":"array","items":{"type":"string","enum":["pending","approved","rejected","cancelled","cancel_requested"]}}},{"name":"job_template_ids[]","in":"query","description":"Filter by job template IDs. Pass multiple values as job_template_ids[]=1&job_template_ids[]=2.","required":false,"schema":{"type":"array","items":{"type":"integer","minimum":1}}},{"name":"year_month","in":"query","description":"Year-month filter in format YYYY-MM","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}$","example":"2026-04"}},{"name":"search_key","in":"query","description":"Free-text search (job name, branch name, applicant profile name).","required":false,"schema":{"type":"string","maxLength":255}},{"name":"order_by","in":"query","description":"Sort field (requires order_direction)","required":false,"schema":{"type":"string","example":"id"}},{"name":"order_direction","in":"query","description":"Sort direction (requires order_by)","required":false,"schema":{"type":"string","enum":["asc","desc"]}}],"responses":{"200":{"description":"Paginated list: each row has `user` (t_users) and `company_branch` only \u2014 no full job object.","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"description":"t_job_applies.id","type":"integer"},"job_id":{"type":"integer"},"user_id":{"type":"integer"},"status":{"type":"string","enum":["pending","approved","rejected","cancelled","cancel_requested"]},"user":{"description":"Worker user (t_users)","properties":{"id":{"description":"t_users.id","type":"integer"},"name":{"type":"string","nullable":true},"katakana_name":{"type":"string","nullable":true},"phone_number":{"type":"string","nullable":true},"avatar_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true}},"type":"object"},"company_branch":{"description":"Applicant profile (t_user_profiles)","type":"object","nullable":true},"job":{"description":"Job summary with category, companyBranch, prefecture, thumbnailFile","type":"object","nullable":true}},"type":"object"}},"total":{"type":"integer"},"last_page":{"type":"integer"},"current_page":{"type":"integer"},"company_id":{"type":"integer"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (e.g., invalid status value, company_branch_id not owned by the authenticated company, invalid order_by, etc.)","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/job\/applies\/{id}":{"get":{"tags":["Company Job Apply"],"summary":"Get a job application by ID","description":"Get a job application by ID (must belong to the authenticated company).","operationId":"f86be8af30a80584f061490ca7b67877","parameters":[{"name":"id","in":"path","description":"The ID of the job application","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Job application detail (includes applicant profile, user certificates, bank account, job with branch\/prefecture\/media, and status change history).","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Application detail fetched successfully."},"data":{"properties":{"id":{"type":"integer"},"job_id":{"type":"integer"},"user_id":{"type":"integer"},"status":{"type":"string"},"user_profile":{"type":"object","nullable":true},"job":{"type":"object","nullable":true},"status_histories":{"description":"Status change history ordered by creation time.","type":"array","items":{"properties":{"id":{"type":"integer"},"job_apply_id":{"type":"integer"},"status":{"type":"string","enum":["approved","rejected","cancelled","cancel_requested"]},"note":{"type":"string","nullable":true},"changed_by":{"description":"t_company_users.id","type":"integer","nullable":true},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"Application not found (either does not exist, soft-deleted, or its job belongs to another company).","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Application not found."},"error":{"properties":{"key":{"type":"string","example":"job_apply.not_found"},"content":{"type":"string","example":"Application not found."}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/job\/applies\/{id}\/cancel":{"put":{"tags":["Company Job Apply"],"summary":"Approve or reject a user cancellation request","description":"Resolve a user-submitted cancellation request.\n- `action=approve` \u2192 cancel_requested \u2192 cancelled (also cancels the JobWorking if still in `approved` state; reopens job if slot available)\n- `action=reject`  \u2192 cancel_requested \u2192 approved (application restored)","operationId":"565871f9f085130eff6ff659f666c4e2","parameters":[{"name":"id","in":"path","description":"t_job_applies.id of the application","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["action","note"],"properties":{"action":{"description":"`approve` \u2192 cancelled; `reject` \u2192 approved","type":"string","enum":["approve","reject"],"example":"approve"},"note":{"description":"Mandatory note recorded in status history.","type":"string","maxLength":2000}},"type":"object"}}}},"responses":{"200":{"description":"Cancel request resolved. Message and resulting status depend on action.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"description":"'Cancellation request approved.' for approve; 'Cancellation request rejected.' for reject.","type":"string"},"data":{"properties":{"id":{"type":"integer"},"job_id":{"type":"integer"},"user_id":{"type":"integer"},"status":{"description":"'cancelled' after approve; 'approved' after reject.","type":"string","enum":["cancelled","approved"]},"is_early_cancel":{"type":"boolean","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (missing or invalid action).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}},"400":{"description":"Business rule error. Possible `error.key` values:\n     *       - `job_apply.not_found` \u2014 application not found or soft-deleted\n     *       - `job_apply.forbidden` \u2014 job belongs to another company\n     *       - `job_apply.cannot_cancel` \u2014 application is not in `cancel_requested` status (approve action)\n     *       - `job_apply.cannot_reject_cancel` \u2014 application is not in `cancel_requested` status (reject action)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"error":{"properties":{"key":{"type":"string","example":"job_apply.cannot_cancel"},"content":{"type":"string"}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/job\/applies\/{id}\/status":{"put":{"tags":["Company Job Apply"],"summary":"Update status or note of a job application","description":"Update status or note of a job application.\n- With `status`: change application status (approved\/rejected\/cancelled).\n- Without `status`: update note only. `note` is required in both cases.","operationId":"f0f01a1d5ca83527cd4a43d166920255","parameters":[{"name":"id","in":"path","description":"t_job_applies.id of the application","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["note"],"properties":{"status":{"description":"Omit or pass null to only update the note without changing status.","type":"string","enum":["approved","rejected","cancelled"],"example":"approved","nullable":true},"note":{"type":"string","maxLength":2000,"example":"Confirmed via phone."}},"type":"object"}}}},"responses":{"200":{"description":"Status changed or note updated. Returns the refreshed job application record.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Application approved successfully."},"data":{"properties":{"id":{"type":"integer"},"job_id":{"type":"integer"},"user_id":{"type":"integer"},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (e.g. missing note, invalid status value).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}},"400":{"description":"Business rule error. Possible `error.key` values:\n     *       - `job_apply.not_found` (application missing \/ soft-deleted)\n     *       - `job_apply.forbidden` (job belongs to another company)\n     *       - `job_apply.job_not_found` \/ `job_apply.job_not_open` \/ `job_apply.apply_deadline_passed`\n     *       - `job_apply.user_not_found` \/ `job_apply.forbidden_role` \/ `job_apply.user_not_active` \/ `job_apply.kyc_not_approved`\n     *       - `bank_account.not_found`\n     *       - `job_apply.job_full` (capacity reached; only for approved)\n     *       - `job_apply.already_approved` \/ `job_apply.already_rejected` \/ `job_apply.already_cancelled`\n     *       - `job_apply.time_overlap` (overlapping apply; only for approved)\n     *       - `job_apply.already_cancelled` (cancel requires status=approved)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"error":{"properties":{"key":{"type":"string","example":"job_apply.already_approved"},"content":{"type":"string","example":"This application has already been approved."}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/jobs":{"get":{"tags":["Company Job"],"summary":"List jobs (company)","description":"List job postings for the authenticated company.","operationId":"baf2c9d3ef5722833003737f3c9f2f83","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":"status[]","in":"query","description":"Filter by status (repeatable array). Allowed: un_published, published, paused, expired, cancelled, completed","required":false,"schema":{"type":"array","items":{"type":"string","enum":["un_published","published","paused","expired","cancelled","completed"]},"example":["published"]}},{"name":"order_by","in":"query","description":"Sort field. Allowed: id, start_working_date, created_at","required":false,"schema":{"type":"string","enum":["id","start_working_date","created_at"]}},{"name":"order_direction","in":"query","description":"Sort direction (used with order_by)","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"search_key","in":"query","required":false,"schema":{"type":"string","maxLength":255}},{"name":"prefecture_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"company_branch_id","in":"query","required":false,"schema":{"type":"integer"}},{"name":"job_template_ids[]","in":"query","description":"Filter by job template IDs (repeatable array). Jobs matching any of the given template IDs are returned.","required":false,"schema":{"type":"array","items":{"type":"integer","minimum":1}}},{"name":"start_working_date","in":"query","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_working_date","in":"query","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Paginated job list. Bare paginator shape from AppBaseController::pagination() (no success\/message wrapper).","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"company_branch_id":{"type":"integer"},"job_template_id":{"type":"integer","nullable":true},"total_user":{"type":"integer"},"status":{"type":"string"},"favorite_count":{"description":"Number of users who favorited this job","type":"integer","example":2},"company_branch":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"company_id":{"type":"integer"}},"type":"object","nullable":true},"job_template":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object","nullable":true}},"type":"object"}},"total":{"type":"integer","example":100},"last_page":{"type":"integer","example":5},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Company Job"],"summary":"Create job","description":"Accepts JSON or multipart\/form-data (file: thumbnail). Server runs schedule + payroll calculations and may return 400 with a specific business-rule error key.","operationId":"7e4e9970048647b7261584747af98b4d","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name","company_branch_id","start_working_date","start_working_time","end_working_time","end_apply_time","hourly_salary","total_user","requirement_level_ids","travel_method_ids","description","note","appointment_note","costume_note"],"properties":{"job_template_id":{"description":"t_job_templates.id \u2014 template used to create this job","type":"integer","nullable":true},"name":{"type":"string"},"company_branch_id":{"description":"t_company_branches.id for this company (required)","type":"integer","example":1},"service_type_id":{"description":"m_service_types.id \u2014 service type for this job","type":"integer","nullable":true},"condition_ids":{"description":"m_job_conditions ids (t_job_conditions)","type":"array","items":{"type":"integer"},"nullable":true},"prefecture_id":{"type":"integer","nullable":true},"district_id":{"description":"m_districts.id \u2014 must belong to prefecture_id if both provided","type":"integer","nullable":true},"latitude":{"description":"Map latitude (-90..90)","type":"number","format":"float","example":35.681236,"nullable":true},"longitude":{"description":"Map longitude (-180..180)","type":"number","format":"float","example":139.767125,"nullable":true},"start_working_date":{"type":"string","format":"date","example":"2026-04-01"},"start_working_time":{"type":"string","example":"09:00"},"end_working_time":{"type":"string","example":"18:00"},"start_break_time":{"type":"string","example":"12:00","nullable":true},"end_break_time":{"type":"string","example":"13:00","nullable":true},"end_apply_date":{"type":"string","format":"date","nullable":true},"end_apply_time":{"type":"string","example":"08:00"},"hourly_salary":{"type":"number","format":"float"},"transport_expenses":{"type":"number","format":"float","nullable":true},"total_user":{"type":"integer","example":2},"requirement_level_ids":{"type":"array","items":{"type":"integer"}},"travel_method_ids":{"type":"array","items":{"type":"integer"}},"experience_domain_ids":{"description":"FK ids from m_experience_domains (t_job_experience_domains)","type":"array","items":{"type":"integer"},"nullable":true},"strength_service_ids":{"description":"FK ids from m_strength_services (t_job_strength_services)","type":"array","items":{"type":"integer"},"nullable":true},"service_type_job_ids":{"description":"FK ids from m_service_type_job (t_job_service_type_jobs)","type":"array","items":{"type":"integer"},"nullable":true},"description":{"type":"string"},"note":{"type":"string"},"appointment_note":{"type":"string"},"costume_note":{"type":"string"},"belongings":{"description":"Things to bring (\u6301\u3061\u7269), legacy field name","type":"string","nullable":true},"facility_types":{"description":"\u65bd\u8a2d\u5f62\u614b (checkbox)","type":"array","items":{"type":"string","enum":["medical_care","childcare_education"]},"nullable":true},"special_conditions":{"description":"\u3053\u3060\u308f\u308a\u6761\u4ef6 (checkbox)","type":"array","items":{"type":"string","enum":["spot_ok","near_station","parking","bicycle_parking"]},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Job created successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"Business rule error. Possible `error.key` values: `job.minimum_working_time`, `job.maximum_working_time`, `job.working_time_past`, `job.apply_time_past`, `job.apply_before_working_required`, `job.break_time_min_60`, `job.break_time_min_45`.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Working time must be at least 1 hour."},"error":{"properties":{"key":{"type":"string","example":"job.minimum_working_time"},"content":{"type":"string","example":"Working time must be at least 1 hour."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/jobs\/{id}":{"get":{"tags":["Company Job"],"summary":"Get job detail (company)","description":"Get job detail by id for the authenticated company.","operationId":"c287e10693c92d4a3cd962c1b9422323","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Job detail fetched successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"Job not found (soft-delete race) or does not belong to the authenticated company","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Job not found."},"error":{"properties":{"key":{"type":"string","example":"job.not_found"},"content":{"type":"string","example":"Job not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Id validation failed (non-existent t_jobs.id)","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Company Job"],"summary":"Update job","description":"JSON or multipart\/form-data. Only fields sent are updated. When schedule fields change, server re-runs working-time calculation and payroll math. Bracket of possible business-rule errors is the same as create.","operationId":"438a6a73f7bc46e31b64827344a18743","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"requestBody":{"description":"JSON or multipart\/form-data (file: thumbnail). Send only fields to change.","required":true,"content":{"application\/json":{"schema":{"properties":{"job_template_id":{"description":"t_job_templates.id \u2014 template used to create this job","type":"integer","nullable":true},"name":{"type":"string","nullable":true},"company_branch_id":{"description":"Required by validation; may be omitted if unchanged (merged from existing job).","type":"integer","example":1,"nullable":true},"service_type_id":{"description":"m_service_types.id \u2014 service type for this job","type":"integer","nullable":true},"condition_ids":{"description":"m_job_conditions ids \u2014 replaces all existing conditions when sent","type":"array","items":{"type":"integer"},"nullable":true},"prefecture_id":{"type":"integer","nullable":true},"district_id":{"description":"m_districts.id \u2014 must belong to prefecture_id if both provided","type":"integer","nullable":true},"latitude":{"description":"Map latitude (-90..90)","type":"number","format":"float","example":35.681236,"nullable":true},"longitude":{"description":"Map longitude (-180..180)","type":"number","format":"float","example":139.767125,"nullable":true},"start_working_date":{"type":"string","format":"date","nullable":true},"start_working_time":{"type":"string","example":"09:00","nullable":true},"end_working_time":{"type":"string","example":"18:00","nullable":true},"start_break_time":{"type":"string","example":"12:00","nullable":true},"end_break_time":{"type":"string","example":"13:00","nullable":true},"end_apply_date":{"type":"string","format":"date","nullable":true},"end_apply_time":{"type":"string","example":"08:00","nullable":true},"hourly_salary":{"type":"number","format":"float","nullable":true},"transport_expenses":{"type":"number","format":"float","nullable":true},"total_user":{"type":"integer","nullable":true},"requirement_level_ids":{"type":"array","items":{"type":"integer"},"nullable":true},"travel_method_ids":{"type":"array","items":{"type":"integer"},"nullable":true},"experience_domain_ids":{"description":"m_experience_domains ids (t_job_experience_domains)","type":"array","items":{"type":"integer"},"nullable":true},"strength_service_ids":{"description":"m_strength_services ids (t_job_strength_services)","type":"array","items":{"type":"integer"},"nullable":true},"service_type_job_ids":{"description":"m_service_type_job ids (t_job_service_type_jobs) \u2014 replaces all existing when sent","type":"array","items":{"type":"integer"},"nullable":true},"description":{"type":"string","nullable":true},"note":{"type":"string","nullable":true},"appointment_note":{"type":"string","nullable":true},"costume_note":{"type":"string","nullable":true},"belongings":{"type":"string","nullable":true},"facility_types":{"description":"\u65bd\u8a2d\u5f62\u614b (checkbox)","type":"array","items":{"type":"string","enum":["medical_care","childcare_education"]},"nullable":true},"special_conditions":{"description":"\u3053\u3060\u308f\u308a\u6761\u4ef6 (checkbox)","type":"array","items":{"type":"string","enum":["spot_ok","near_station","parking","bicycle_parking"]},"nullable":true},"thumbnail":{"type":"string","format":"binary","nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Job updated successfully."},"data":{"type":"object"}},"type":"object"}}}},"400":{"description":"Job not found (soft-delete race) or does not belong to the authenticated company, or business rule error (same `error.key` values as create).","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Job not found."},"error":{"properties":{"key":{"type":"string","example":"job.not_found"},"content":{"type":"string","example":"Job not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (includes non-existent id, company_branch_id not owned by company, etc.)","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Company Job"],"summary":"Delete a job","description":"Delete a job. Only allowed if no one has applied.","operationId":"959e3577ad1ca5e1aa4161c8b58e33a2","parameters":[{"name":"id","in":"path","description":"t_jobs.id \u2014 must belong to the authenticated company","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Job deleted successfully.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Job deleted successfully."},"data":{"example":null,"nullable":true}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"Business rule error. Possible `error.key` values:\n     *       - `job.not_found` (job does not exist or belongs to another company)\n     *       - `job.has_applies` (job already has applicants and cannot be deleted)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"error":{"properties":{"key":{"type":"string","example":"job.has_applies"},"content":{"type":"string","example":"Cannot delete a job that already has applicants."}},"type":"object"}},"type":"object"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/jobs\/{id}\/contract-pdf":{"get":{"tags":["Company Job"],"summary":"Export job contract PDF","description":"Export a job contract PDF.","operationId":"86d88bc93b658bb92eee68649a57db40","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"PDF file download","content":{"application\/pdf":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Job not found or does not belong to the authenticated company","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Job not found."},"error":{"properties":{"key":{"type":"string","example":"job.not_found"},"content":{"type":"string","example":"Job not found."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Id validation failed (non-existent t_jobs.id)","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/jobs\/{id}\/status":{"put":{"tags":["Company Job"],"summary":"Update job status","description":"Transition a job to a new status. Only the transitions listed above are permitted. Terminal statuses (expired, cancelled, completed) have no outgoing transitions.","operationId":"0e36d12540a60bdd6dfe49f6a8e7f24e","parameters":[{"name":"id","in":"path","description":"t_jobs.id \u2014 must belong to the authenticated company","required":true,"schema":{"type":"integer"}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["status"],"properties":{"status":{"description":"Target status. Must be a valid transition from the job's current status.","type":"string","enum":["un_published","published","paused","expired","cancelled"],"example":"published"}},"type":"object"}}}},"responses":{"200":{"description":"Job status updated successfully.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Job status updated successfully."},"data":{"description":"Updated job object","type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"Business rule error. Possible `error.key` values:\n     *       - `job.not_found` (job does not exist or belongs to another company)\n     *       - `job.invalid_status_transition` (the requested transition is not allowed from the current status)","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"This status transition is not allowed."},"error":{"properties":{"key":{"type":"string","example":"job.invalid_status_transition"},"content":{"type":"string","example":"This status transition is not allowed."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error (status value is not one of the allowed enum values)","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/job-templates":{"get":{"tags":["Company Job Template"],"summary":"List job templates (company)","description":"List job templates for the authenticated company.","operationId":"dbaeec64e66b80ddbe236acc25e424f9","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":"search_key","in":"query","description":"Filter by template name (partial match)","required":false,"schema":{"type":"string","maxLength":255}},{"name":"company_branch_id","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Paginated job template list.","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"creator_id":{"type":"integer","example":1},"name":{"type":"string","example":"Ca s\u00e1ng 8 ti\u1ebfng"},"company_branch_id":{"type":"integer","example":1,"nullable":true},"service_type_id":{"type":"integer","example":null,"nullable":true},"prefecture_id":{"type":"integer","example":1,"nullable":true},"district_id":{"type":"integer","example":null,"nullable":true},"latitude":{"type":"number","format":"float","example":null,"nullable":true},"longitude":{"type":"number","format":"float","example":null,"nullable":true},"start_working_time":{"type":"string","example":"08:00:00"},"end_working_time":{"type":"string","example":"17:00:00"},"start_break_time":{"type":"string","example":"12:00:00","nullable":true},"end_break_time":{"type":"string","example":"13:00:00","nullable":true},"total_working_minutes":{"type":"integer","example":480,"nullable":true},"standard_working_minutes":{"type":"integer","example":480,"nullable":true},"night_working_minutes":{"type":"integer","example":0},"overtime_working_minutes":{"type":"integer","example":0},"night_overtime_working_minutes":{"type":"integer","example":0},"total_breaking_minutes":{"type":"integer","example":60},"end_apply_time":{"type":"string","example":"20:00:00","nullable":true},"hourly_salary":{"type":"string","example":"1200.0000"},"night_hourly_salary":{"type":"string","example":"1500.0000"},"overtime_hourly_salary":{"type":"string","example":"1800.0000"},"night_overtime_hourly_salary":{"type":"string","example":"2250.0000"},"standard_salary":{"type":"string","example":"9600.0000"},"night_salary":{"type":"string","example":"0.0000"},"overtime_salary":{"type":"string","example":"0.0000"},"night_overtime_salary":{"type":"string","example":"0.0000"},"income_tax":{"type":"string","example":"0.0000"},"income_before_tax":{"type":"string","example":"9600.0000","nullable":true},"income_after_tax":{"type":"string","example":"10100.0000","nullable":true},"fee_rate":{"type":"string","example":"0.1000","nullable":true},"transport_expenses":{"type":"string","example":"500.0000"},"total_user":{"type":"integer","example":5,"nullable":true},"description":{"type":"string","example":"Template m\u00f4 t\u1ea3","nullable":true},"note":{"type":"string","example":"Template note.","nullable":true},"appointment_note":{"type":"string","example":"Template appointment note.","nullable":true},"costume_note":{"type":"string","example":"Template costume note.","nullable":true},"belongings":{"type":"string","example":null,"nullable":true},"thumbnail":{"type":"integer","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":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/masters":{"get":{"tags":["Company Master"],"summary":"Get company master data","description":"Get all company-facing master data in a single payload.","operationId":"3faa1a40df838ef6ace148193591273a","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":{"prefectures":{"type":"array","items":{"type":"object"}},"regions":{"type":"array","items":{"type":"object"}},"districts":{"type":"array","items":{"type":"object"}},"job_categories":{"type":"array","items":{"type":"object"}},"experience_domains":{"type":"array","items":{"type":"object"}},"service_types":{"type":"array","items":{"type":"object"}},"strength_services":{"type":"array","items":{"type":"object"}},"travel_methods":{"type":"array","items":{"type":"object"}},"branch_roles":{"type":"array","items":{"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/profile":{"get":{"tags":["Company Profile"],"summary":"Get profile","description":"Get profile for the authenticated company user.","operationId":"891ba9cdbd9400dd2068ee5a2e9c7391","responses":{"200":{"description":"Company profile","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"The company profile was retrieved successfully."},"data":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":3},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo Company"},"email":{"type":"string","format":"email","example":"company@example.com"},"phone_number":{"type":"string","example":null,"nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Company Profile"],"summary":"Update company email","description":"Update the authenticated company user's email. On success, the current JWT is\ninvalidated by bumping `token_version` (logout side-effect) \u2014 the client must\nre-login.","operationId":"cec140559218cd6b40110cca6f0e6f62","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["email","email_confirmation","password"],"properties":{"email":{"description":"New email. Must be unique across t_company_profiles, ignoring the authenticated user.","type":"string","format":"email","maxLength":255,"example":"company@example.com"},"email_confirmation":{"description":"Must match email","type":"string","format":"email","maxLength":255,"example":"company@example.com"},"password":{"description":"Current password; required to confirm the change.","type":"string","maxLength":255,"minLength":6,"example":"secret123"}},"type":"object"}}}},"responses":{"200":{"description":"Update successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Information updated successfully."},"data":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":3},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo Company"},"email":{"type":"string","format":"email","example":"company@example.com"},"phone_number":{"type":"string","example":null,"nullable":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Current password incorrect","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Password incorrect."},"error":{"properties":{"key":{"type":"string","example":"messages.auth.password_incorrect"},"content":{"type":"string","example":"Password incorrect."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (missing field, email_confirmation mismatch, or email already in use)","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/profile\/password":{"put":{"tags":["Company Profile"],"summary":"Update company password","description":"Update the authenticated company user's password. On success, the current JWT is\ninvalidated by bumping `token_version` \u2014 the client must re-login.","operationId":"979011585b805bb5c6071fdbd0430d6e","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["current_password","password","password_confirmation"],"properties":{"current_password":{"type":"string","maxLength":255,"minLength":6,"example":"secret123"},"password":{"type":"string","maxLength":255,"minLength":6,"example":"newSecret123"},"password_confirmation":{"description":"Must match password","type":"string","maxLength":255,"minLength":6,"example":"newSecret123"}},"type":"object"}}}},"responses":{"200":{"description":"Update successful","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Information updated successfully."},"data":{"properties":{"id":{"type":"integer","example":1},"user_id":{"type":"integer","example":3},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Demo Company"},"email":{"type":"string","format":"email","example":"company@example.com"},"phone_number":{"type":"string","example":null,"nullable":true}},"type":"object"}},"type":"object"}}}},"400":{"description":"Current password incorrect","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Password incorrect."},"error":{"properties":{"key":{"type":"string","example":"messages.auth.password_incorrect"},"content":{"type":"string","example":"Password incorrect."}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (missing field, too short, or confirmation mismatch)","content":{"application\/json":{"schema":[]}}}},"security":[{"bearerAuth":[]}]}},"\/company\/regions":{"get":{"tags":["Company Region"],"summary":"List regions for the authenticated company","operationId":"companyListRegions","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":"order_by","in":"query","required":false,"schema":{"type":"string","enum":["id","name","created_at"],"example":"name"}},{"name":"order_direction","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"example":"asc"}},{"name":"search_key","in":"query","description":"Partial match on name","required":false,"schema":{"type":"string","maxLength":255}}],"responses":{"200":{"description":"Paginated list","content":{"application\/json":{"schema":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"type":"integer","example":1},"company_id":{"type":"integer","example":1},"name":{"type":"string","example":"Kanto"},"description":{"type":"string","nullable":true},"branches":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"face_photo_file_id":{"type":"integer","nullable":true},"thumbnail":{"type":"string","format":"uri","nullable":true},"face_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true}},"type":"object"}}},"type":"object"}},"total":{"type":"integer","example":10},"last_page":{"type":"integer","example":1},"current_page":{"type":"integer","example":1}},"type":"object"}}}},"401":{"description":"Unauthorized"}},"security":[{"bearerAuth":[]}]},"post":{"tags":["Company Region"],"summary":"Create a region for the authenticated company","operationId":"companyStoreRegion","requestBody":{"required":true,"content":{"application\/json":{"schema":{"required":["name"],"properties":{"name":{"type":"string","maxLength":255,"example":"Kanto"},"description":{"type":"string","maxLength":2000,"example":"Kanto area","nullable":true},"branch_ids":{"description":"Company branch ids to assign to this region","type":"array","items":{"type":"integer","example":1},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Region created","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"properties":{"id":{"type":"integer"},"company_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"branches":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"face_photo_file_id":{"type":"integer","nullable":true},"thumbnail":{"type":"string","format":"uri","nullable":true},"face_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/regions\/{id}":{"get":{"tags":["Company Region"],"summary":"Get region detail","operationId":"companyShowRegion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Region detail with branches","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"properties":{"id":{"type":"integer"},"company_id":{"type":"integer"},"name":{"type":"string"},"description":{"type":"string","nullable":true},"branches":{"type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"face_photo_file_id":{"type":"integer","nullable":true},"thumbnail":{"type":"string","format":"uri","nullable":true},"face_photo_file":{"oneOf":[{"$ref":"#\/components\/schemas\/FileUpload"}],"nullable":true}},"type":"object"}}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"security":[{"bearerAuth":[]}]},"put":{"tags":["Company Region"],"summary":"Update a region","operationId":"companyUpdateRegion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"requestBody":{"required":true,"content":{"application\/json":{"schema":{"properties":{"name":{"type":"string","maxLength":255,"example":"Kanto"},"description":{"type":"string","maxLength":2000,"nullable":true},"branch_ids":{"description":"Replaces all branch assignments for this region","type":"array","items":{"type":"integer","example":1},"nullable":true}},"type":"object"}}}},"responses":{"200":{"description":"Region updated","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthorized"},"404":{"description":"Not found"},"422":{"description":"Validation error","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]},"delete":{"tags":["Company Region"],"summary":"Delete a region","operationId":"companyDeleteRegion","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","example":1}}],"responses":{"200":{"description":"Region deleted"},"401":{"description":"Unauthorized"},"404":{"description":"Not found"}},"security":[{"bearerAuth":[]}]}},"\/company\/timekeepings":{"get":{"tags":["Company Timekeeping"],"summary":"List timekeeping records (company)","operationId":"2120ad066ec12a21e6b491106ea17dcd","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1}},{"name":"search_key","in":"query","description":"Partial match on job name, worker name (t_user_profiles.name), or worker katakana_name.","required":false,"schema":{"type":"string","maxLength":255}},{"name":"order_by","in":"query","description":"Sort field (requires order_direction). Default: working_date desc, id desc.","required":false,"schema":{"type":"string","enum":["id","working_date","created_at"]}},{"name":"order_direction","in":"query","description":"Sort direction (requires order_by).","required":false,"schema":{"type":"string","enum":["asc","desc"]}},{"name":"user_id","in":"query","description":"Filter by worker user id","required":false,"schema":{"type":"integer","minimum":1}},{"name":"job_id","in":"query","description":"Filter by job id","required":false,"schema":{"type":"integer","minimum":1}},{"name":"company_branch_id","in":"query","description":"Filter by company branch (job's branch). Must belong to the authenticated company \u2014 otherwise 422.","required":false,"schema":{"type":"integer"}},{"name":"status","in":"query","description":"Comma-separated t_job_workings.status values (e.g. `checked_in,checked_out`)","required":false,"schema":{"type":"string"}},{"name":"working_date_from","in":"query","description":"Lower bound for working_date (inclusive, format YYYY-MM-DD).","required":false,"schema":{"type":"string","format":"date"}},{"name":"working_date_to","in":"query","description":"Upper bound for working_date (inclusive, format YYYY-MM-DD). Must be >= working_date_from.","required":false,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Paginated list of t_job_workings belonging to the authenticated company.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string"},"data":{"properties":{"data":{"type":"array","items":{"properties":{"id":{"description":"t_job_workings.id","type":"integer"},"user_id":{"type":"integer"},"job_id":{"type":"integer"},"company_id":{"type":"integer"},"company_branch_id":{"type":"integer","nullable":true},"working_date":{"type":"string","format":"date","nullable":true},"start_working_time":{"type":"string","nullable":true},"end_working_time":{"type":"string","nullable":true},"status":{"type":"string"},"user":{"properties":{"profile":{"properties":{"name":{"type":"string","nullable":true},"katakana_name":{"type":"string","nullable":true}},"type":"object","nullable":true}},"type":"object","nullable":true},"job_summary":{"properties":{"id":{"type":"integer"},"name":{"type":"string"},"company_branch":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"type":"object","nullable":true}},"type":"object","nullable":true}},"type":"object"}},"total":{"type":"integer"},"last_page":{"type":"integer"},"current_page":{"type":"integer"}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"422":{"description":"Validation error (e.g., invalid order_by, company_branch_id not owned by the authenticated company, working_date_to < working_date_from).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/timekeepings\/{id}":{"get":{"tags":["Company Timekeeping"],"summary":"Get timekeeping record by id (company)","operationId":"10ca9d444517fa0c6dcc459cc8b45464","parameters":[{"name":"id","in":"path","description":"t_job_workings.id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Timekeeping record detail.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Timekeeping record fetched successfully."},"data":{"properties":{"id":{"type":"integer"},"user_id":{"type":"integer"},"job_id":{"type":"integer"},"company_id":{"type":"integer"},"status":{"type":"string"},"user":{"type":"object","nullable":true},"job_summary":{"type":"object","nullable":true}},"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"Record exists but belongs to another company (tenant isolation).","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string","example":"Timekeeping record not found."},"error":{"properties":{"key":{"type":"string","example":"timekeeping.not_found"},"content":{"type":"string","example":"Timekeeping record not found."}},"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error (e.g., non-existent id or soft-deleted record).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"security":[{"bearerAuth":[]}]}},"\/company\/timekeepings\/{id}\/company-checkout":{"post":{"tags":["Company Timekeeping"],"summary":"Company checkout on behalf of user","operationId":"73fe67458a18ba2205b33d20d8a485ea","parameters":[{"name":"id","in":"path","description":"t_job_workings.id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Company checkout completed.","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":true},"message":{"type":"string","example":"Company checkout completed successfully."},"data":{"type":"object"}},"type":"object"}}}},"401":{"description":"Unauthenticated","content":{"application\/json":{"schema":[]}}},"400":{"description":"Cannot checkout (e.g. not checked in, already checked out, or wrong state).","content":{"application\/json":{"schema":{"properties":{"success":{"type":"boolean","example":false},"message":{"type":"string"},"error":{"type":"object"}},"type":"object"}}}},"422":{"description":"Validation error (e.g., non-existent id).","content":{"application\/json":{"schema":{"$ref":"#\/components\/schemas\/UnprocessableEntity"}}}}},"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":{"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."},"furigana":{"type":"string","example":"\u30b3\u30e1\u30c7\u30a3"},"email":{"type":"string","format":"email","example":"contact@example.com"},"phone_number":{"type":"string","example":"08012345678"},"work_place":{"type":"string","example":"Tokyo"},"address":{"type":"string","example":"1-2-3 Shibuya"},"prefecture_id":{"type":"integer","example":13},"representative_name":{"type":"string","example":"Tanaka Taro"},"total_staff":{"type":"integer","example":20},"business_content":{"type":"string","example":"Software development"},"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},"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},"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"}},"service_types":{"description":"Facility service categories (m_service_types via pivot)","type":"array","items":{"properties":{"id":{"type":"integer"},"name":{"type":"string"}},"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"}},"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":"App company branches","description":"Company branch resources for the mobile app"},{"name":"App","description":"App API"},{"name":"App Bank Account","description":"Bank account management for app users"},{"name":"App\/Documents","description":"Policy documents (presigned URLs)"},{"name":"App jobs","description":"Job listings for the mobile app"},{"name":"App\/SalaryExport","description":"Withholding tax certificate (\u6e90\u6cc9\u5fb4\u53ce\u7968) exports"},{"name":"App\/Timekeeping","description":"App user check-in, check-out, and salary confirmation"},{"name":"App Wallet","description":"Wallet and withdrawals (app users)"},{"name":"Company","description":"Authentication endpoints for Companies"},{"name":"Company Branch","description":"Company branch management (scoped to authenticated company)"},{"name":"Company Information","description":"Company information endpoints (admin only)"},{"name":"Company Documents","description":"Company document presigned URLs"},{"name":"Company Job","description":"Job postings for company accounts (CRUD scoped to authenticated company)"},{"name":"Company Job Template","description":"Job templates for company accounts (scoped to authenticated company)"},{"name":"Company Master","description":"Company master data (reference tables)"},{"name":"Company Profile","description":"Company profile"},{"name":"Company Region","description":"Company-owned regions (t_company_regions)"},{"name":"Company Timekeeping","description":"Timekeeping (job working) records for company accounts"},{"name":"Healthcheck","description":"Healthcheck endpoints"},{"name":"Test","description":"Test endpoints for logging and exception handling"},{"name":"Admin Company","description":"Admin Company"},{"name":"Admin Salary Payment","description":"Admin Salary Payment"},{"name":"App favorites","description":"App favorites"},{"name":"App Review company branches","description":"App Review company branches"},{"name":"App - FCM","description":"App - FCM"},{"name":"KYC","description":"KYC"},{"name":"Company Branch User","description":"Company Branch User"},{"name":"Company Job Apply","description":"Company Job Apply"}]}