{"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":{"\/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":"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":"Company Branch User","description":"Company Branch User"},{"name":"Company Job Apply","description":"Company Job Apply"}]}