{"openapi":"3.1.0","info":{"title":"Wayvida HRMS API","description":"Platform IAM, portal bootstrap, and HRMS routes. Use test credentials from config/test-credentials.json for local login.","version":"0.1.0"},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"JWT","description":"Access token from POST /platform/v1/auth/login"}},"examples":{"LoginRequest":{"summary":"Demo admin (see config/test-credentials.json)","value":{"email":"admin@wayvida.local","password":"Admin@123"}}},"schemas":{}},"paths":{"/health":{"get":{"summary":"Liveness probe","tags":["System"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}}}}}},"/ready":{"get":{"summary":"Readiness probe (includes database)","tags":["System"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"database":{"type":"string"}}}}}},"503":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/":{"get":{"summary":"API index","tags":["System"],"responses":{"200":{"description":"HTML landing page","content":{"application/json":{"schema":{"type":"string","description":"HTML landing page"}}}}}}},"/platform/v1/auth/login":{"post":{"summary":"Login with email and password","tags":["Platform — Auth"],"description":"Authenticates against platform.users and user_credentials. Returns an access token and refresh token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"user_identity":{"type":"string","minLength":1},"otp_mode":{"type":"string","enum":["sms"]},"password":{"type":"string","minLength":1}},"required":["user_identity"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"tokenType":{"type":"string","enum":["Bearer"]},"expiresIn":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employeeId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"employeeCompanyId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},"displayName":{"type":"string"},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"is_primary":{"type":"boolean"}},"required":["id","name","is_primary"],"additionalProperties":false}},"tenantId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"activeCompanyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"products":{"type":"array","items":{"type":"string"}}},"required":["id","employeeId","employeeCompanyId","email","displayName","companies","tenantId","activeCompanyId","products"],"additionalProperties":false}},"required":["accessToken","refreshToken","tokenType","expiresIn","user"],"additionalProperties":false},{"type":"object","properties":{"otpId":{"type":"string"}},"required":["otpId"],"additionalProperties":false}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/auth/login/verfy-otp":{"post":{"summary":"Verify login OTP","tags":["Platform — Auth"],"description":"Verifies the OTP sent to the user and returns an access token and refresh token.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"otpId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"otp":{"type":"string","minLength":6}},"required":["otpId","otp"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"tokenType":{"type":"string","enum":["Bearer"]},"expiresIn":{"type":"string"},"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employeeId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"employeeCompanyId":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},"displayName":{"type":"string"},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"is_primary":{"type":"boolean"}},"required":["id","name","is_primary"],"additionalProperties":false}},"tenantId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"activeCompanyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"products":{"type":"array","items":{"type":"string"}}},"required":["id","employeeId","employeeCompanyId","email","displayName","companies","tenantId","activeCompanyId","products"],"additionalProperties":false}},"required":["accessToken","refreshToken","tokenType","expiresIn","user"],"additionalProperties":false},{"type":"object","properties":{"otpId":{"type":"string"}},"required":["otpId"],"additionalProperties":false}]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/auth/refresh":{"post":{"summary":"Refresh access token using a refresh token","tags":["Platform — Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"refreshToken":{"type":"string"},"tokenType":{"type":"string","enum":["Bearer"]},"expiresIn":{"type":"string"}},"required":["accessToken","refreshToken","tokenType","expiresIn"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/auth/send-password-reset-link":{"post":{"summary":"Send password reset link","tags":["Platform — Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string"}},"required":["email"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"429":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/auth/logout":{"post":{"summary":"Logout by revoking the current refresh token","tags":["Platform — Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":1}},"required":["refreshToken"],"additionalProperties":false}}}},"responses":{"204":{"description":"No content"}}}},"/platform/v1/auth/logout-all":{"post":{"summary":"Logout from all devices by revoking all refresh tokens","tags":["Platform — Auth"],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"No content"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/auth/reset-password":{"post":{"summary":"Reset password for a user using token or session","tags":["Platform — Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"anyOf":[{"type":"string"},{"type":"null"}]},"current_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"type":"string","minLength":8,"pattern":"^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d)(?=.*[^a-zA-Z0-9]).*$"},"confirm_password":{"type":"string","minLength":8}},"required":["password","confirm_password"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"default":"Password reset successfully","type":"string"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/auth/generate-password":{"post":{"summary":"Auto-generate password by employee ID (alias)","tags":["Platform — Auth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["employee_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"default":"Password auto-generated successfully","type":"string"},"password":{"type":"string"},"employee_id":{"type":"string"},"user_id":{"type":"string"}},"required":["message","password","employee_id","user_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/companies":{"post":{"summary":"Create a new company for the organization","tags":["Platform - Org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"legal_name":{"type":"string","minLength":1},"timezone":{"default":"Asia/Kolkata","type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"active","type":"string","enum":["active","inactive"]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"default":false,"type":"boolean"},"address":{"anyOf":[{"type":"object","properties":{"address_type":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["address_type","address_line1","address_line2","city","state","country","postal_code"],"additionalProperties":false},{"type":"null"}]},"registrations":{"anyOf":[{"type":"object","properties":{"pf":{"anyOf":[{"type":"string"},{"type":"null"}]},"esi":{"anyOf":[{"type":"string"},{"type":"null"}]},"pan":{"anyOf":[{"type":"string"},{"type":"null"}]},"tan":{"anyOf":[{"type":"string"},{"type":"null"}]},"gst":{"anyOf":[{"type":"string"},{"type":"null"}]},"ptrc":{"anyOf":[{"type":"string"},{"type":"null"}]},"lin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pf","esi","pan","tan","gst","ptrc","lin"],"additionalProperties":false},{"type":"null"}]},"bank_details":{"anyOf":[{"type":"object","properties":{"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_holder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"ifsc_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"upi_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["bank_name","account_holder_name","account_number","ifsc_code"],"additionalProperties":false},{"type":"null"}]}},"required":["name","legal_name","timezone","status","is_primary"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"isActive":{"default":false,"type":"boolean"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"type":"object","properties":{"address_type":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["address_type","address_line1","address_line2","city","state","country","postal_code"],"additionalProperties":false},"registrations":{"type":"object","properties":{"pf":{"anyOf":[{"type":"string"},{"type":"null"}]},"esi":{"anyOf":[{"type":"string"},{"type":"null"}]},"pan":{"anyOf":[{"type":"string"},{"type":"null"}]},"tan":{"anyOf":[{"type":"string"},{"type":"null"}]},"gst":{"anyOf":[{"type":"string"},{"type":"null"}]},"ptrc":{"anyOf":[{"type":"string"},{"type":"null"}]},"lin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pf","esi","pan","tan","gst","ptrc","lin"],"additionalProperties":false},"bank_details":{"type":"object","properties":{"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_holder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"ifsc_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"upi_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["bank_name","account_holder_name","account_number","ifsc_code"],"additionalProperties":false},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"default":false,"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","code","is_default"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","name","timezone","currency","status","isActive","legal_name","logo","website","phone","email","company_type","industry","incorporation_number","incorporation_place","is_primary","address","registrations","bank_details"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List active companies available to the current user","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"isActive":{"type":"boolean"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","timezone","currency","status","isActive","legal_name","logo","website","phone","email","company_type","industry","incorporation_number","incorporation_place","is_primary"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"isActive":{"type":"boolean"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","timezone","currency","status","isActive","legal_name","logo","website","phone","email","company_type","industry","incorporation_number","incorporation_place","is_primary"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","companies"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/companies/{company_id}":{"patch":{"summary":"Create a new company for the organization","tags":["Platform - Org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"legal_name":{"type":"string","minLength":1},"timezone":{"default":"Asia/Kolkata","type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"active","type":"string","enum":["active","inactive"]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"default":false,"type":"boolean"},"address":{"anyOf":[{"type":"object","properties":{"address_type":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["address_type","address_line1","address_line2","city","state","country","postal_code"],"additionalProperties":false},{"type":"null"}]},"registrations":{"anyOf":[{"type":"object","properties":{"pf":{"anyOf":[{"type":"string"},{"type":"null"}]},"esi":{"anyOf":[{"type":"string"},{"type":"null"}]},"pan":{"anyOf":[{"type":"string"},{"type":"null"}]},"tan":{"anyOf":[{"type":"string"},{"type":"null"}]},"gst":{"anyOf":[{"type":"string"},{"type":"null"}]},"ptrc":{"anyOf":[{"type":"string"},{"type":"null"}]},"lin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pf","esi","pan","tan","gst","ptrc","lin"],"additionalProperties":false},{"type":"null"}]},"bank_details":{"anyOf":[{"type":"object","properties":{"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_holder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"ifsc_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"upi_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["bank_name","account_holder_name","account_number","ifsc_code"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"isActive":{"default":false,"type":"boolean"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"type":"object","properties":{"address_type":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["address_type","address_line1","address_line2","city","state","country","postal_code"],"additionalProperties":false},"registrations":{"type":"object","properties":{"pf":{"anyOf":[{"type":"string"},{"type":"null"}]},"esi":{"anyOf":[{"type":"string"},{"type":"null"}]},"pan":{"anyOf":[{"type":"string"},{"type":"null"}]},"tan":{"anyOf":[{"type":"string"},{"type":"null"}]},"gst":{"anyOf":[{"type":"string"},{"type":"null"}]},"ptrc":{"anyOf":[{"type":"string"},{"type":"null"}]},"lin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pf","esi","pan","tan","gst","ptrc","lin"],"additionalProperties":false},"bank_details":{"type":"object","properties":{"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_holder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"ifsc_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"upi_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["bank_name","account_holder_name","account_number","ifsc_code"],"additionalProperties":false},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"default":false,"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","code","is_default"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","name","timezone","currency","status","isActive","legal_name","logo","website","phone","email","company_type","industry","incorporation_number","incorporation_place","is_primary","address","registrations","bank_details"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"Read one active company available to the current user","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"timezone":{"type":"string"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"isActive":{"default":false,"type":"boolean"},"legal_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"logo":{"anyOf":[{"type":"string"},{"type":"null"}]},"website":{"anyOf":[{"type":"string"},{"type":"null"}]},"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"industry":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"incorporation_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"incorporation_place":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_primary":{"type":"boolean"},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"type":"object","properties":{"address_type":{"type":"string"},"address_line1":{"type":"string"},"address_line2":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"country":{"type":"string"},"postal_code":{"type":"string"}},"required":["address_type","address_line1","address_line2","city","state","country","postal_code"],"additionalProperties":false},"registrations":{"type":"object","properties":{"pf":{"anyOf":[{"type":"string"},{"type":"null"}]},"esi":{"anyOf":[{"type":"string"},{"type":"null"}]},"pan":{"anyOf":[{"type":"string"},{"type":"null"}]},"tan":{"anyOf":[{"type":"string"},{"type":"null"}]},"gst":{"anyOf":[{"type":"string"},{"type":"null"}]},"ptrc":{"anyOf":[{"type":"string"},{"type":"null"}]},"lin":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["pf","esi","pan","tan","gst","ptrc","lin"],"additionalProperties":false},"bank_details":{"type":"object","properties":{"bank_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_holder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}]},"ifsc_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"branch_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"upi_id":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["bank_name","account_holder_name","account_number","ifsc_code"],"additionalProperties":false},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"code":{"type":"string"},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"default":false,"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","code","is_default"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","name","timezone","currency","status","isActive","legal_name","logo","website","phone","email","company_type","industry","incorporation_number","incorporation_place","is_primary","address","registrations","bank_details"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/companies/{company_id}/cost-centers":{"post":{"summary":"Create a new cost center","tags":["Platform - Org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"description":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"active","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","code"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"}},"required":["id","company_id","name","code","description","status"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List cost centers","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"type":"string"},"description":{"type":"string"},"status":{"type":"string"}},"required":["id","company_id","name","code","description","status"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/companies/{company_id}/branches":{"post":{"summary":"Create a new branch","tags":["Platform - Org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"description":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"status":{"default":"active","anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"default":false,"type":"boolean"},"state_gst_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["name","code","timezone"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_name":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"code":{"type":"string"},"timezone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_default":{"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","company_id","company_name","name","code","timezone","status","is_default"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List branches","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_name":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"code":{"type":"string"},"timezone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_default":{"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","company_id","company_name","name","code","timezone","status","is_default"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/companies/{company_id}/branches/{branch_id}":{"patch":{"summary":"Update a branch","tags":["Platform - Org"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"description":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"status":{"default":"active","anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"default":false,"type":"boolean"},"state_gst_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"in":"path","name":"branch_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_name":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"code":{"type":"string"},"timezone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_default":{"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","company_id","company_name","name","code","timezone","status","is_default"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a branch","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"in":"path","name":"branch_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"244":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/branches":{"get":{"summary":"List branches","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_name":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"name":{"type":"string"},"code":{"type":"string"},"timezone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"address":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_default":{"type":"boolean"},"state_gst_code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","company_id","company_name","name","code","timezone","status","is_default"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/org/companies/{company_id}/cost-centers/{cost_center_id}":{"delete":{"summary":"Delete a cost center","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"in":"path","name":"cost_center_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"244":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/users/me":{"get":{"summary":"Current session user","tags":["Platform — Users"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"displayName":{"type":"string"},"tenantId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"activeCompanyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companyIds":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"products":{"type":"array","items":{"type":"string"}},"locale":{"type":"string"},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"}},"required":["id","email","displayName","tenantId","activeCompanyId","companyIds","companies","products","locale","avatar_url","timezone"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/users/me/active-company":{"patch":{"summary":"Switch active company and return a new access token","tags":["Platform — Users"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"companyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["companyId"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"accessToken":{"type":"string"},"tokenType":{"type":"string","enum":["Bearer"]},"expiresIn":{"type":"string"},"activeCompanyId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"products":{"type":"array","items":{"type":"string"}}},"required":["accessToken","tokenType","expiresIn","activeCompanyId","products"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/users/":{"get":{"summary":"List all users","tags":["Platform — Users"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"role_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","example":"[user@email.com]"},{"type":"null"}]},"display_name":{"type":"string"},"avatar_url":{"type":"string"},"role":{"anyOf":[{"type":"string"},{"type":"null"}]},"department":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["phone","email","display_name","avatar_url","role","department","designation","user_id","employee_id"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/users/{user_id}":{"delete":{"summary":"Delete a user","tags":["Platform — Users"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"user_id","required":true,"description":"User ID"}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"default":"User deleted successfully!","type":"string"}},"required":["message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/roles-access/metadata":{"get":{"summary":"Get list of available modules and permissions","tags":["Platform - Roles & Access"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"modules":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"name":{"type":"string"},"sort_order":{"type":"number"},"is_active":{"type":"boolean"},"data_access_scope":{"anyOf":[{"type":"string"},{"type":"null"}]},"permissions":{"type":"array","items":{"type":"object","properties":{"permission_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"name":{"type":"string"},"is_granted":{"type":"boolean"}},"required":["permission_id","code","name","is_granted"],"additionalProperties":false}}},"required":["id","code","name","sort_order","is_active","data_access_scope","permissions"],"additionalProperties":false}}},"required":["modules"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/roles-access/roles":{"post":{"summary":"Create a new role","tags":["Platform - Roles & Access"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"modules":{"type":"array","items":{"type":"object","properties":{"module_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data_access_scope":{"default":"own_records","type":"string","enum":["all_records","own_records","own_team_records","custom"]},"custom_user_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"permission_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"is_granted":{"default":false,"type":"boolean"}},"required":["permission_id","is_granted"],"additionalProperties":false}}},"required":["module_id","data_access_scope","custom_user_ids","permissions"],"additionalProperties":false}},"status":{"default":"active","type":"string","enum":["active","inactive"]}},"required":["name","company_ids","department_ids","status"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"modules":{"type":"array","items":{}}},"required":["id","tenant_id","name","status","companies","departments","modules"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List roles for the tenant","tags":["Platform - Roles & Access"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"is_default":{"type":"boolean"},"is_system":{"type":"boolean"},"status":{"type":"string","enum":["active","inactive"]},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"users_count":{"default":0,"type":"number"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]}},"required":["id","tenant_id","name","is_default","is_system","status","created_by","created_at","updated_at","users_count"],"additionalProperties":false}}},"required":["roles"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/platform/v1/roles-access/roles/{id}":{"get":{"summary":"Get details of a specific role","tags":["Platform - Roles & Access"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"modules":{"type":"array","items":{}}},"required":["id","tenant_id","name","status","companies","departments","modules"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update an existing role","tags":["Platform - Roles & Access"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"company_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"department_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"modules":{"type":"array","items":{"type":"object","properties":{"module_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data_access_scope":{"default":"own_records","type":"string","enum":["all_records","own_records","own_team_records","custom"]},"custom_user_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"permission_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"is_granted":{"default":false,"type":"boolean"}},"required":["permission_id","is_granted"],"additionalProperties":false}}},"required":["module_id","data_access_scope","custom_user_ids","permissions"],"additionalProperties":false}},"status":{"anyOf":[{"type":"string","enum":["active","inactive"]},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"type":"string","enum":["active","inactive"]},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"modules":{"type":"array","items":{}}},"required":["id","tenant_id","name","status","companies","departments","modules"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a role","tags":["Platform - Roles & Access"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Role successfully deleted"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/portal/v1/bootstrap":{"get":{"summary":"Portal launcher bootstrap","tags":["Portal"],"description":"Apps, companies, and user context for the wrapper shell.","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"displayName":{"type":"string"},"email":{"anyOf":[{"type":"string"},{"type":"null"}]},"locale":{"type":"string"},"timezone":{"type":"string"}},"required":["id","locale","timezone"],"additionalProperties":false},"tenant":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["id"],"additionalProperties":false},"activeCompany":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"apps":{"type":"array","items":{"type":"object","properties":{"product":{"type":"string"},"label":{"type":"string"},"enabled":{"type":"boolean"},"baseUrl":{"type":"string"},"reason":{"type":"string"}},"required":["product","label","enabled","baseUrl"],"additionalProperties":false}}},"required":["user","tenant","activeCompany","companies","apps"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/portal/v1/global-dropdown-list":{"get":{"summary":"Get global dropdown options by keyword group","tags":["Portal"],"description":"Returns dropdown list options filtered by keyword group.","parameters":[{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"keyword_group","required":false,"description":"Keyword group(s) like relation, marital_status, blood_group (supports single string, comma-separated, or array)"},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"keyword_group[]","required":false,"description":"Keyword group(s) array format (e.g. ?keyword_group[]=relation&keyword_group[]=marital_status)"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"object","properties":{"keyword":{"type":"string"},"label":{"type":"string"}},"required":["keyword","label"],"additionalProperties":false}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/":{"post":{"summary":"Create a new designation","tags":["Core Domains — Designations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"level":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reporting_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"status":{"type":"string"}},"required":["name","code","company_ids","department_ids"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"level":{"type":"string"},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"reporting_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reporting_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","level","reporting_designation_id","reporting_designation","status","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List designations","tags":["Core Domains — Designations"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","format":"uuid"}}]},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"level":{"type":"string"},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"reporting_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reporting_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","level","reporting_designation_id","reporting_designation","status","created_at","updated_at"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/tree":{"get":{"summary":"Get designation hierarchy tree","tags":["Core Domains — Designations"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string","format":"uuid"}}]},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/$defs/__schema0"},"$defs":{"__schema0":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"level":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"departments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"employee_count":{"type":"number"},"children":{"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["id","name","code","level","status","parent_designation_id","departments","companies","employee_count","children"],"additionalProperties":false}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/{id}":{"get":{"summary":"Get a designation by ID","tags":["Core Domains — Designations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"level":{"type":"string"},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"reporting_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reporting_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","level","reporting_designation_id","reporting_designation","status","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a designation","tags":["Core Domains — Designations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"level":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reporting_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"type":"string"},"status":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"departments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"level":{"type":"string"},"parent_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"reporting_designation_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reporting_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","level","reporting_designation_id","reporting_designation","status","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a designation (soft delete)","tags":["Core Domains — Designations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/{id}/pre-delete-snapshot":{"get":{"summary":"Get designation deletion snapshot / reference counts","tags":["Core Domains — Designations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"entity_name":{"type":"string"},"count":{"type":"number"}},"required":["entity_name","count"]}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/settings/{company_id}":{"get":{"summary":"Get designation settings","tags":["Core Domains — Designation Settings"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"section_key","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"general":{"anyOf":[{"type":"object","properties":{"allow_designation_deactivation":{"default":true,"type":"boolean"},"allow_designation_reactivation":{"default":true,"type":"boolean"},"enable_archive":{"default":true,"type":"boolean"},"allow_designation_merge":{"default":false,"type":"boolean"},"system_designation_status":{"default":"active","type":"string"},"allow_permanent_delete":{"default":false,"type":"boolean"}},"required":["allow_designation_deactivation","allow_designation_reactivation","enable_archive","allow_designation_merge","system_designation_status","allow_permanent_delete"],"additionalProperties":false},{"type":"null"}]},"code_format":{"anyOf":[{"type":"object","properties":{"auto_code_generation":{"default":true,"type":"boolean"},"code_prefix":{"default":"","type":"string"},"code_suffix":{"default":"","type":"string"},"separator":{"default":"-","type":"string"},"number_length":{"default":4,"type":"number"},"starting_number":{"default":"0001","type":"string"},"reset_number_annually":{"default":false,"type":"boolean"},"code_format_variable":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["auto_code_generation","code_prefix","code_suffix","separator","number_length","starting_number","reset_number_annually","code_format_variable"],"additionalProperties":false},{"type":"null"}]},"hierarchy_rule":{"anyOf":[{"type":"object","properties":{"enable_designation_hierarchy":{"default":true,"type":"boolean"},"allow_parent_designation":{"default":true,"type":"boolean"},"prevent_circular_hierarchy":{"default":true,"type":"boolean"},"root_designation_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["enable_designation_hierarchy","allow_parent_designation","prevent_circular_hierarchy","root_designation_id"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/settings/{company_id}/general":{"put":{"summary":"Update designation general settings","tags":["Core Domains — Designation Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allow_designation_deactivation":{"default":true,"type":"boolean"},"allow_designation_reactivation":{"default":true,"type":"boolean"},"enable_archive":{"default":true,"type":"boolean"},"allow_designation_merge":{"default":false,"type":"boolean"},"system_designation_status":{"default":"active","type":"string"},"allow_permanent_delete":{"default":false,"type":"boolean"}},"required":["allow_designation_deactivation","allow_designation_reactivation","enable_archive","allow_designation_merge","system_designation_status","allow_permanent_delete"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"allow_designation_deactivation":{"default":true,"type":"boolean"},"allow_designation_reactivation":{"default":true,"type":"boolean"},"enable_archive":{"default":true,"type":"boolean"},"allow_designation_merge":{"default":false,"type":"boolean"},"system_designation_status":{"default":"active","type":"string"},"allow_permanent_delete":{"default":false,"type":"boolean"}},"required":["allow_designation_deactivation","allow_designation_reactivation","enable_archive","allow_designation_merge","system_designation_status","allow_permanent_delete"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/settings/{company_id}/code-format":{"put":{"summary":"Update designation code-format settings","tags":["Core Domains — Designation Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"auto_code_generation":{"default":true,"type":"boolean"},"code_prefix":{"default":"","type":"string"},"code_suffix":{"default":"","type":"string"},"separator":{"default":"-","type":"string"},"number_length":{"default":4,"type":"number"},"starting_number":{"default":"0001","type":"string"},"reset_number_annually":{"default":false,"type":"boolean"},"code_format_variable":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["auto_code_generation","code_prefix","code_suffix","separator","number_length","starting_number","reset_number_annually","code_format_variable"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"auto_code_generation":{"default":true,"type":"boolean"},"code_prefix":{"default":"","type":"string"},"code_suffix":{"default":"","type":"string"},"separator":{"default":"-","type":"string"},"number_length":{"default":4,"type":"number"},"starting_number":{"default":"0001","type":"string"},"reset_number_annually":{"default":false,"type":"boolean"},"code_format_variable":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["auto_code_generation","code_prefix","code_suffix","separator","number_length","starting_number","reset_number_annually","code_format_variable"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/settings/{company_id}/hierarchy-rule":{"put":{"summary":"Update designation hierarchy-rule settings","tags":["Core Domains — Designation Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enable_designation_hierarchy":{"default":true,"type":"boolean"},"allow_parent_designation":{"default":true,"type":"boolean"},"prevent_circular_hierarchy":{"default":true,"type":"boolean"},"root_designation_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["enable_designation_hierarchy","allow_parent_designation","prevent_circular_hierarchy","root_designation_id"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"enable_designation_hierarchy":{"default":true,"type":"boolean"},"allow_parent_designation":{"default":true,"type":"boolean"},"prevent_circular_hierarchy":{"default":true,"type":"boolean"},"root_designation_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["enable_designation_hierarchy","allow_parent_designation","prevent_circular_hierarchy","root_designation_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/job-families/{company_id}":{"put":{"summary":"Upsert a job family","tags":["Core Domains — Job Families"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"default":"active","type":"string","enum":["active","inactive"]}},"required":["name","code","department_id","status"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","code","description","department_id","status","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List job families for a company","tags":["Core Domains — Job Families"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","code","description","department_id","status","created_at","updated_at"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/job-families/{company_id}/{id}":{"delete":{"summary":"Soft delete a job family","tags":["Core Domains — Job Families"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/job-levels/{company_id}":{"put":{"summary":"Upsert a job level","tags":["Core Domains — Job Levels"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"rank":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"status":{"default":"active","type":"string","enum":["active","inactive"]}},"required":["name","code","rank","status"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"rank":{"type":"number"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","code","description","rank","status","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List job levels for a company","tags":["Core Domains — Job Levels"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"code":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"rank":{"type":"number"},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","code","description","rank","status","created_at","updated_at"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/designations/job-levels/{company_id}/{id}":{"delete":{"summary":"Soft delete a job level","tags":["Core Domains — Job Levels"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/departments/":{"post":{"summary":"Create a new department","tags":["Core Domains — Departments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"branch_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]}},"required":["name","code","company_ids"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"hods":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role_type":{"type":"string"},"effective_from":{"type":"string"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","effective_from","designation","avatar_url"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_department":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hod_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"created_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"updated_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"compact_tree":{"anyOf":[{},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","status","created_at","created_by","updated_at","updated_by"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List departments","tags":["Core Domains — Departments"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"is_archived","required":false},{"schema":{"type":"string"},"in":"query","name":"parent_department_id","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"hods":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role_type":{"type":"string"},"effective_from":{"type":"string"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","effective_from","designation","avatar_url"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_department":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hod_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"created_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"updated_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"compact_tree":{"anyOf":[{},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","status","created_at","created_by","updated_at","updated_by"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/departments/tree":{"get":{"summary":"List departments","tags":["Core Domains — Departments"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"departments":{"type":"array","items":{"$ref":"#/$defs/DepartmentTreeNode"}},"orphanedDepartments":{"type":"array","items":{"$ref":"#/$defs/DepartmentTreeNode"}},"integrityWarnings":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["orphaned_parent","cycle_detected"]},"departmentId":{"type":"string","format":"uuid"},"message":{"type":"string"}},"required":["type","departmentId","message"]}}},"required":["departments","orphanedDepartments","integrityWarnings"],"$defs":{"DepartmentTreeNode":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"tenant_id":{"type":"string","format":"uuid"},"companies":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"}},"required":["id","name"]}},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_department":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}]},"hod_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee_count":{"type":"number"},"integrity":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["orphaned_parent","cycle_detected"]},"message":{"type":"string"}},"required":["type","message"]},{"type":"null"}]},"children":{"type":"array","items":{"$ref":"#/$defs/DepartmentTreeNode"}}},"required":["id","tenant_id","companies","name","code","status","created_at","updated_at","integrity","children"]}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/departments/archive":{"put":{"summary":"Archive multiple departments (alias)","tags":["Core Domains — Departments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"department_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["department_ids"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"count":{"type":"number"},"archived_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["message","count","archived_ids"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/departments/{id}":{"get":{"summary":"Get a department by ID","tags":["Core Domains — Departments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"hods":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role_type":{"type":"string"},"effective_from":{"type":"string"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","effective_from","designation","avatar_url"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_department":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hod_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"created_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"updated_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"compact_tree":{"anyOf":[{},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","status","created_at","created_by","updated_at","updated_by"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a department","tags":["Core Domains — Departments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"branch_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"cost_center_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"companies":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"branches":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},{"type":"null"}]},"hods":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"role_type":{"type":"string"},"effective_from":{"type":"string"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","effective_from","designation","avatar_url"],"additionalProperties":false}},{"type":"null"}]},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]},"parent_department_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_department":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hod_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"type":"string"},"created_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"type":"string"},"updated_by":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employee_count":{"type":"number"},"compact_tree":{"anyOf":[{},{"type":"null"}]},"archived_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","status","created_at","created_by","updated_at","updated_by"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a department","tags":["Core Domains — Departments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/departments/{department_id}/assign-hod":{"put":{"summary":"Assign HOD to a department","tags":["Core Domains — Departments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hod":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deputy_hod":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["hod","effective_from"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"department_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"manager_id":{"type":"string","format":"uuid"},"role_type":{"type":"string"},"effective_from":{"type":"string"},"effective_to":{"type":"string","nullable":true},"created_by":{"type":"string","format":"uuid","nullable":true},"updated_by":{"type":"string","format":"uuid","nullable":true}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/departments/{department_id}/hod":{"get":{"summary":"Get HOD of a department","tags":["Core Domains — Departments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"department_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/":{"post":{"summary":"Create a new employee","tags":["Core Domains — Employees"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee":{"type":"object","properties":{"full_name":{"type":"string","minLength":1},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"designation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"branch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"joining_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"employee_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"User email address","example":"user@email.com"},"phone":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["confirmed","probation","notice_period","long_leave","intern","contract_active","terminated","resigned","retired","absconded","contract_expired","suspended","draft"]},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"other_email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},{"type":"null"}]},"other_phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsapp":{"anyOf":[{"type":"string"},{"type":"null"}]},"other_whatsapp":{"anyOf":[{"type":"string"},{"type":"null"}]},"employment_type":{"anyOf":[{"type":"string","enum":["permanent","part_time","contract","temporary","intern"]},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["full_name","company_id","designation_id","email","phone"],"additionalProperties":false},"personal_details":{"anyOf":[{"type":"object","properties":{"date_of_birth":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}]},"marital_status":{"anyOf":[{"type":"string","enum":["single","married","divorced","widowed"]},{"type":"null"}]},"blood_group":{"anyOf":[{"type":"string","enum":["a+","a-","b+","b-","ab+","ab-","o+","o-"]},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"present_address":{"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"required":["street","city","state","postal_code","country"],"additionalProperties":false},{"type":"null"}]},"permanent_address":{"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"required":["street","city","state","postal_code","country"],"additionalProperties":false},{"type":"null"}]},"education":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"institution_name":{"type":"string"},"degree":{"type":"string"},"field_of_study":{"type":"string"},"start_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"end_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"grade_percentage":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"is_highest":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"is_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"document_uri":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["institution_name","degree","field_of_study","end_date"],"additionalProperties":false}},{"type":"null"}]},"experience":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"organization_name":{"type":"string"},"title":{"type":"string"},"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"responsibilities":{"anyOf":[{"type":"string"},{"type":"null"}]},"exit_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"annual_ctc":{"anyOf":[{"type":"number"},{"type":"null"}]},"is_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"document_uri":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["title","start_date","end_date"],"additionalProperties":false}},{"type":"null"}]},"home_geo_locations":{"anyOf":[{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"radius":{"type":"number"}},"required":["longitude","latitude","radius"],"additionalProperties":false},{"type":"null"}]},"office_geo_locations":{"anyOf":[{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"radius":{"type":"number"}},"required":["longitude","latitude","radius"],"additionalProperties":false},{"type":"null"}]},"banking_info":{"anyOf":[{"type":"object","properties":{"account_holder_name":{"type":"string"},"bank_name":{"type":"string"},"account_number":{"type":"string"},"ifsc_code":{"type":"string"},"branch_name":{"type":"string"},"account_type":{"type":"string"}},"required":["account_holder_name","bank_name","account_number","ifsc_code","branch_name","account_type"],"additionalProperties":false},{"type":"null"}]},"manager_ids":{"anyOf":[{"type":"object","properties":{"primary_reporting_manager":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"secondary_manager":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"emergency_contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"emegency_contact_name":{"type":"string"},"emegency_contact_phone":{"type":"string"},"emegency_contact_relationship":{"type":"string"}},"required":["emegency_contact_name","emegency_contact_phone","emegency_contact_relationship"],"additionalProperties":false}},{"type":"null"}]},"work_info":{"anyOf":[{"type":"object","properties":{"shift_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"role_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leave_policy_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hr_policy_bundle_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"weekly_off":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"work_location":{"anyOf":[{"type":"string"},{"type":"null"}]},"grace_period":{"anyOf":[{"type":"number"},{"type":"null"}]},"grace_period_unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"work_from_home_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"monthly_wfh_days":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"send_login_invitation":{"default":false,"anyOf":[{"type":"boolean"},{"type":"null"}]},"modeule_access":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"module_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data_access_scope":{"default":"own_records","type":"string","enum":["all_records","own_records","own_team_records","custom"]},"custom_user_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"permission_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"is_granted":{"default":false,"type":"boolean"}},"required":["permission_id","is_granted"],"additionalProperties":false}}},"required":["module_id","data_access_scope","custom_user_ids","permissions"],"additionalProperties":false}},{"type":"null"}]},"identities":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"document_title":{"type":"string","description":"name of document.","examples":["pan","aadhar","uan","passport"]},"document_uri":{"type":"string","format":"uri","description":"path of document with extension.","examples":["https://wayvida.blob.core.windows.net/employee-documents/pan.pdf"]},"unique_code":{"type":"string","description":"unique code to avoid duplicate entry of same document.","examples":["pan","aadhar","uan","passport"]},"document_number":{"type":"string"}},"required":["document_title","document_uri","unique_code","document_number"],"additionalProperties":false}},{"type":"null"}]},"documents":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"document_title":{"type":"string"},"document_uri":{"type":"string","format":"uri"},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size_in_kb":{"type":"number"}},"required":["document_title","document_uri","file_size_in_kb"],"additionalProperties":false}},{"type":"null"}]},"contract_info":{"anyOf":[{"type":"object","properties":{"contract_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"payroll_group":{"anyOf":[{"type":"string"},{"type":"null"}]},"payroll_template_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"annual_ctc":{"anyOf":[{"type":"number"},{"type":"null"}]},"monthly_gross":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["employee","send_login_invitation"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"employee_code":{"type":"string"},"full_name":{"type":"string"},"email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},{"type":"null"}]},"phone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"joining_date":{"default":null,"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"department":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employment_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"blood_group":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"highest_education":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_education":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"total_experience":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_experience":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"company_tenure":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"shift_start_time":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"shift_end_time":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"leave_policy":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"role_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"manager_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"manager_name":{"type":"string"}},"required":["manager_id","manager_name"],"additionalProperties":false}},{"type":"null"}]},"create_and_continue":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["id","employee_code","full_name","email","phone","joining_date","department","designation","employment_type","blood_group","status","avatar_url","highest_education","relevant_education","total_experience","relevant_experience","company_tenure","shift_start_time","shift_end_time","leave_policy","role","role_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List employees","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"designation_id","required":false},{"schema":{"type":"string"},"in":"query","name":"employment_type","required":false},{"schema":{"type":"string"},"in":"query","name":"role_id","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"employee_code":{"type":"string"},"full_name":{"type":"string"},"email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},{"type":"null"}]},"phone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"joining_date":{"default":null,"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"department":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employment_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"blood_group":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"highest_education":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_education":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"total_experience":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_experience":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"company_tenure":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"shift_start_time":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"shift_end_time":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"leave_policy":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"role_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"manager_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"manager_name":{"type":"string"}},"required":["manager_id","manager_name"],"additionalProperties":false}},{"type":"null"}]},"create_and_continue":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["id","employee_code","full_name","email","phone","joining_date","department","designation","employment_type","blood_group","status","avatar_url","highest_education","relevant_education","total_experience","relevant_experience","company_tenure","shift_start_time","shift_end_time","leave_policy","role","role_id"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/slim-list":{"get":{"summary":"List employees","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"designation_id","required":false},{"schema":{"type":"string"},"in":"query","name":"employment_type","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"employee_code":{"type":"string"},"full_name":{"type":"string"},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},{"type":"null"}]},"phone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","employee_code","full_name","designation","email","phone","avatar_url"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/org-chart":{"get":{"summary":"Get organization chart by primary reporting manager","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"root_employee_id","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"total_employees":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"items":{"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["message","total_employees","items"],"additionalProperties":false,"$defs":{"__schema0":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"full_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"employee_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"department":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false},{"type":"null"}]},"manager_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"direct_reports_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"children":{"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["id","full_name","avatar_url","employee_code","designation","department","manager_id","direct_reports_count","children"],"additionalProperties":false}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/{id}/favorite":{"put":{"summary":"Mark or unmark an employee as favorite for the logged-in user","tags":["Core Domains — Employees"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["favorite"],"properties":{"favorite":{"type":"boolean"}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"employee_id":{"type":"string","format":"uuid"},"is_favorite":{"type":"boolean"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/{id}":{"get":{"summary":"Get an employee by ID","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"employee":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"branch_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_code":{"type":"string"},"full_name":{"type":"string"},"designation_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"department_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"joining_date":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"status":{"type":"string"},"created_at":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"updated_at":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"deleted_at":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"description":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employment_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"department":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"company":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"branch":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"other_email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"other_phone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"whatsapp":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"phone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"other_whatsapp":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","company_id","branch_id","user_id","employee_code","full_name","designation_id","department_id","joining_date","status","created_at","updated_at","deleted_at","description","employment_type","department","designation","company","branch","other_email","other_phone","whatsapp","email","phone","other_whatsapp","avatar_url"],"additionalProperties":false},"personal_details":{"type":"object","properties":{"date_of_birth":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"gender":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"marital_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"blood_group":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["date_of_birth","gender","marital_status","blood_group","avatar_url"],"additionalProperties":false},"identities":{"default":[],"type":"array","items":{"type":"object","properties":{"document_title":{"type":"string"},"document_number":{"type":"string"},"document_uri":{"type":"string","format":"uri"},"unique_code":{"type":"string"}},"required":["document_title","document_number","document_uri","unique_code"],"additionalProperties":false}},"permanent_address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"required":["street","city","state","postal_code","country"],"additionalProperties":false},"present_address":{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"required":["street","city","state","postal_code","country"],"additionalProperties":false},"education":{"default":[],"type":"array","items":{"type":"object","properties":{"institution_name":{"type":"string"},"degree":{"type":"string"},"field_of_study":{"type":"string"},"is_highest":{"default":false,"type":"boolean"},"is_relevant":{"default":false,"type":"boolean"},"start_date":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"end_date":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"grade_percentage":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"document_uri":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["institution_name","degree","field_of_study","is_highest","is_relevant","start_date","end_date","grade_percentage","document_uri"],"additionalProperties":false}},"experience":{"default":[],"type":"array","items":{"type":"object","properties":{"organization_name":{"type":"string"},"title":{"type":"string"},"start_date":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},"is_relevant":{"default":false,"type":"boolean"},"end_date":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]},"responsibilities":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"exit_reason":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"annual_ctc":{"default":"","anyOf":[{"type":"string"},{"type":"null"}]},"document_uri":{"default":null,"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["organization_name","title","start_date","is_relevant","end_date","responsibilities","exit_reason","annual_ctc","document_uri"],"additionalProperties":false}},"banking_info":{"type":"object","properties":{"account_holder_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"bank_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"account_number":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"ifsc_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"branch_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"account_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["account_holder_name","bank_name","account_number","ifsc_code","branch_name","account_type"],"additionalProperties":false},"home_geo_location":{"type":"object","properties":{"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["longitude","latitude","radius"],"additionalProperties":false},"office_geo_location":{"type":"object","properties":{"longitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"latitude":{"anyOf":[{"type":"number"},{"type":"null"}]},"radius":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["longitude","latitude","radius"],"additionalProperties":false},"managers":{"default":[],"type":"array","items":{"type":"object","properties":{"identifier_key":{"type":"string"},"manager_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"manager_name":{"type":"string"}},"required":["identifier_key","manager_id","manager_name"],"additionalProperties":false}},"emrgency_contacts":{"default":[],"type":"array","items":{"type":"object","properties":{"emegency_contact_name":{"type":"string"},"emegency_contact_phone":{"type":"string"},"emegency_contact_relationship":{"type":"string"}},"required":["emegency_contact_name","emegency_contact_phone","emegency_contact_relationship"],"additionalProperties":false}},"work_info":{"type":"object","properties":{"shift_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"role_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leave_policy_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leave_policy_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hr_policy_bundle_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"weekly_off":{"default":[],"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"grace_period":{"default":0,"type":"number"},"grace_period_unit":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"work_from_home_allowed":{"default":false,"anyOf":[{"type":"boolean"},{"type":"null"}]},"monthly_wfh_days":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"work_location":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["shift_id","role_id","leave_policy_id","leave_policy_name","hr_policy_bundle_id","weekly_off","grace_period","grace_period_unit","work_from_home_allowed","monthly_wfh_days","work_location"],"additionalProperties":false},"contract_info":{"type":"object","properties":{"contract_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"payroll_group":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"payroll_template_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"annual_ctc":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"monthly_gross":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"},{"type":"null"}]}},"required":["contract_type","payroll_group","payroll_template_id","annual_ctc","monthly_gross","effective_from"],"additionalProperties":false}},"required":["employee","personal_details","identities","permanent_address","present_address","education","experience","banking_info","home_geo_location","office_geo_location","managers","emrgency_contacts","work_info","contract_info"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update an employee","tags":["Core Domains — Employees"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee":{"anyOf":[{"type":"object","properties":{"full_name":{"type":"string","minLength":1},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"designation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"branch_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"joining_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"employee_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},"phone":{"type":"string"},"status":{"anyOf":[{"type":"string","enum":["confirmed","probation","notice_period","long_leave","intern","contract_active","terminated","resigned","retired","absconded","contract_expired","suspended","draft"]},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"other_email":{"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},{"type":"null"}]},"other_phone":{"anyOf":[{"type":"string"},{"type":"null"}]},"whatsapp":{"anyOf":[{"type":"string"},{"type":"null"}]},"other_whatsapp":{"anyOf":[{"type":"string"},{"type":"null"}]},"employment_type":{"anyOf":[{"type":"string","enum":["permanent","part_time","contract","temporary","intern"]},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"personal_details":{"anyOf":[{"type":"object","properties":{"date_of_birth":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"gender":{"anyOf":[{"type":"string","enum":["male","female","other"]},{"type":"null"}]},"marital_status":{"anyOf":[{"type":"string","enum":["single","married","divorced","widowed"]},{"type":"null"}]},"blood_group":{"anyOf":[{"type":"string","enum":["a+","a-","b+","b-","ab+","ab-","o+","o-"]},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"present_address":{"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"required":["street","city","state","postal_code","country"],"additionalProperties":false},{"type":"null"}]},"permanent_address":{"anyOf":[{"type":"object","properties":{"street":{"type":"string"},"city":{"type":"string"},"state":{"type":"string"},"postal_code":{"type":"string"},"country":{"type":"string"}},"required":["street","city","state","postal_code","country"],"additionalProperties":false},{"type":"null"}]},"education":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"institution_name":{"type":"string"},"degree":{"type":"string"},"field_of_study":{"type":"string"},"start_date":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"end_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"grade_percentage":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"is_highest":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"is_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"document_uri":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["institution_name","degree","field_of_study","end_date"],"additionalProperties":false}},{"type":"null"}]},"experience":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"organization_name":{"type":"string"},"title":{"type":"string"},"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"end_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"responsibilities":{"anyOf":[{"type":"string"},{"type":"null"}]},"exit_reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"annual_ctc":{"anyOf":[{"type":"number"},{"type":"null"}]},"is_relevant":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"document_uri":{"anyOf":[{"type":"string","format":"uri"},{"type":"null"}]}},"required":["title","start_date","end_date"],"additionalProperties":false}},{"type":"null"}]},"home_geo_locations":{"anyOf":[{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"radius":{"type":"number"}},"required":["longitude","latitude","radius"],"additionalProperties":false},{"type":"null"}]},"office_geo_locations":{"anyOf":[{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"radius":{"type":"number"}},"required":["longitude","latitude","radius"],"additionalProperties":false},{"type":"null"}]},"banking_info":{"anyOf":[{"type":"object","properties":{"account_holder_name":{"type":"string"},"bank_name":{"type":"string"},"account_number":{"type":"string"},"ifsc_code":{"type":"string"},"branch_name":{"type":"string"},"account_type":{"type":"string"}},"required":["account_holder_name","bank_name","account_number","ifsc_code","branch_name","account_type"],"additionalProperties":false},{"type":"null"}]},"manager_ids":{"anyOf":[{"type":"object","properties":{"primary_reporting_manager":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"secondary_manager":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"emergency_contacts":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"emegency_contact_name":{"type":"string"},"emegency_contact_phone":{"type":"string"},"emegency_contact_relationship":{"type":"string"}},"required":["emegency_contact_name","emegency_contact_phone","emegency_contact_relationship"],"additionalProperties":false}},{"type":"null"}]},"work_info":{"anyOf":[{"type":"object","properties":{"shift_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"role_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"leave_policy_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"hr_policy_bundle_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"weekly_off":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"work_location":{"anyOf":[{"type":"string"},{"type":"null"}]},"grace_period":{"anyOf":[{"type":"number"},{"type":"null"}]},"grace_period_unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"work_from_home_allowed":{"anyOf":[{"type":"boolean"},{"type":"null"}]},"monthly_wfh_days":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"modeule_access":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"module_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"data_access_scope":{"default":"own_records","type":"string","enum":["all_records","own_records","own_team_records","custom"]},"custom_user_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"permissions":{"minItems":1,"type":"array","items":{"type":"object","properties":{"permission_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"is_granted":{"default":false,"type":"boolean"}},"required":["permission_id","is_granted"],"additionalProperties":false}}},"additionalProperties":false}},{"type":"null"}]},"identities":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"document_title":{"type":"string","description":"name of document.","examples":["pan","aadhar","uan","passport"]},"document_uri":{"type":"string","format":"uri","description":"path of document with extension.","examples":["https://wayvida.blob.core.windows.net/employee-documents/pan.pdf"]},"unique_code":{"type":"string","description":"unique code to avoid duplicate entry of same document.","examples":["pan","aadhar","uan","passport"]},"document_number":{"type":"string"}},"required":["document_title","document_uri","unique_code","document_number"],"additionalProperties":false}},{"type":"null"}]},"documents":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"document_title":{"type":"string"},"document_uri":{"type":"string","format":"uri"},"folder_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size_in_kb":{"type":"number"}},"required":["document_title","document_uri","file_size_in_kb"],"additionalProperties":false}},{"type":"null"}]},"contract_info":{"anyOf":[{"type":"object","properties":{"contract_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"payroll_group":{"anyOf":[{"type":"string"},{"type":"null"}]},"payroll_template_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"annual_ctc":{"anyOf":[{"type":"number"},{"type":"null"}]},"monthly_gross":{"anyOf":[{"type":"number"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"employee_code":{"type":"string"},"full_name":{"type":"string"},"email":{"default":null,"anyOf":[{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","examples":["user@email.com"],"description":"User email address"},{"type":"null"}]},"phone":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"joining_date":{"default":null,"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]},"department":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"employment_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"blood_group":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"highest_education":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_education":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"total_experience":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_experience":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"company_tenure":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"shift_start_time":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"shift_end_time":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"leave_policy":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"role":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"role_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"managers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"manager_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"manager_name":{"type":"string"}},"required":["manager_id","manager_name"],"additionalProperties":false}},{"type":"null"}]},"create_and_continue":{"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["id","employee_code","full_name","email","phone","joining_date","department","designation","employment_type","blood_group","status","avatar_url","highest_education","relevant_education","total_experience","relevant_experience","company_tenure","shift_start_time","shift_end_time","leave_policy","role","role_id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete an employee (soft delete)","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/{id}/{action}":{"put":{"summary":"Apply or revoke employee lifecycle action (login_block, suspend, archive)","tags":["Core Domains — Employees"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"properties":{"reason":{"type":"string","minLength":1},"effective_date":{"type":"string","format":"date"},"remarks":{"type":"string"}},"required":["reason","effective_date"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true},{"schema":{"type":"string","enum":["login-block","suspend","archive"]},"in":"path","name":"action","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"action":{"type":"object","properties":{"id":{"type":"string"},"employee_id":{"type":"string"},"user_id":{"type":["null","string"]},"action_type":{"type":"string"},"effective_date":{"type":"string"},"reason":{"type":"string"},"remarks":{"type":["null","string"]},"status":{"type":"string"},"executed_at":{"type":["null","string"]},"revoked_at":{"type":["null","string"]},"created_at":{"type":"string"}},"additionalProperties":true}},"required":["message"],"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/{id}/actions":{"get":{"summary":"List employee lifecycle actions","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"actions":{"type":"array"}},"additionalProperties":true}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/{id}/termination":{"put":{"summary":"Terminate employee employment","tags":["Core Domains — Employees"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"termination_reason":{"type":"string"},"reason":{"type":"string"},"termination_type":{"type":"string"},"type":{"type":"string"},"notice_period":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"notice_period_unit":{"default":"day","anyOf":[{"type":"string"},{"type":"null"}]},"last_working_day":{"anyOf":[{"type":"string"},{"type":"null"}]},"rehiring_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"handover_completion_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"document_transfer_employee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"document_transfer":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"additional_notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"terminated","type":"string"}},"required":["notice_period_unit","status"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"is_terminated":{"type":"boolean"},"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"termination_reason":{"type":"string"},"termination_type":{"type":"string"},"notice_period":{"anyOf":[{"type":"number"},{"type":"null"}]},"notice_period_unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_working_day":{"type":"string"},"rehiring_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"handover_completion_date":{"type":"string"},"document_transfer_employee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"document_transfer_employee_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"document_transfer_employee_avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"additional_notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","employee_id","termination_reason","termination_type","last_working_day","handover_completion_date","status","created_at","updated_at"],"additionalProperties":false},{"type":"null"}]}},"required":["message","is_terminated"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"Get employee termination record","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"is_terminated":{"type":"boolean"},"data":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"termination_reason":{"type":"string"},"termination_type":{"type":"string"},"notice_period":{"anyOf":[{"type":"number"},{"type":"null"}]},"notice_period_unit":{"anyOf":[{"type":"string"},{"type":"null"}]},"last_working_day":{"type":"string"},"rehiring_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"handover_completion_date":{"type":"string"},"document_transfer_employee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"document_transfer_employee_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"document_transfer_employee_avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"additional_notes":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","tenant_id","employee_id","termination_reason","termination_type","last_working_day","handover_completion_date","status","created_at","updated_at"],"additionalProperties":false},{"type":"null"}]}},"required":["message","is_terminated"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/{id}/resend-invitation":{"post":{"summary":"Resend temporary password email to employee (alias)","tags":["Core Domains — Employees"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"email":{"type":"string"}},"required":["success","message"],"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/settings/{company_id}":{"get":{"summary":"Get employee module settings","tags":["Core Domains — Employees Settings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"creation_options":{"type":"object","properties":{"create_and_send_invite":{"type":"boolean"},"allow_draft":{"type":"boolean"},"create_and_continue":{"type":"boolean"}},"required":["create_and_send_invite","allow_draft","create_and_continue"],"additionalProperties":false},"employee_id_rule":{"type":"object","properties":{"starting_number_sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"employee_id_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"employee_id_seperator":{"anyOf":[{"type":"string"},{"type":"null"}]},"auto_generate_employee_id":{"type":"boolean"},"employee_id_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["starting_number_sequence","employee_id_length","employee_id_seperator","auto_generate_employee_id","employee_id_prefix"],"additionalProperties":false},"mandatory_documents_rule":{"type":"object","properties":{"experience_cretificates":{"type":"boolean"},"educational_certificates":{"type":"boolean"}},"required":["experience_cretificates","educational_certificates"],"additionalProperties":false},"account_setting_rule":{"type":"object","properties":{"disable_login_after_last_day":{"type":"boolean"},"restrict_multiple_device_login":{"type":"boolean"},"force_password_change_on_first_login":{"type":"boolean"},"auto_create_employee_id":{"type":"boolean"}},"required":["disable_login_after_last_day","restrict_multiple_device_login","force_password_change_on_first_login","auto_create_employee_id"],"additionalProperties":false}},"required":["creation_options","employee_id_rule","mandatory_documents_rule","account_setting_rule"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/settings/{company_id}/creation-options":{"get":{"summary":"Get employee module settings","tags":["Core Domains — Employees Settings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"create_and_send_invite":{"type":"boolean"},"allow_draft":{"type":"boolean"},"create_and_continue":{"type":"boolean"}},"required":["create_and_send_invite","allow_draft","create_and_continue"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update employee module settings","tags":["Core Domains — Employees Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"create_and_send_invite":{"type":"boolean"},"allow_draft":{"type":"boolean"},"create_and_continue":{"type":"boolean"}},"required":["create_and_send_invite","allow_draft","create_and_continue"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"enum":["creation_options","employee_id_rule","mandatory_documents_rule","account_setting_rule"]},"in":"path","name":"section_key","required":true}],"security":[{"bearerAuth":[]}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/settings/{company_id}/employee-id-rule":{"get":{"summary":"Get employee module settings","tags":["Core Domains — Employees Settings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"starting_number_sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"employee_id_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"employee_id_seperator":{"anyOf":[{"type":"string"},{"type":"null"}]},"auto_generate_employee_id":{"type":"boolean"},"employee_id_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["starting_number_sequence","employee_id_length","employee_id_seperator","auto_generate_employee_id","employee_id_prefix"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update employee module settings","tags":["Core Domains — Employees Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"starting_number_sequence":{"type":"integer","minimum":0,"maximum":9007199254740991},"employee_id_length":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"employee_id_seperator":{"anyOf":[{"type":"string"},{"type":"null"}]},"auto_generate_employee_id":{"type":"boolean"},"employee_id_prefix":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["starting_number_sequence","employee_id_length","employee_id_seperator","auto_generate_employee_id","employee_id_prefix"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"enum":["creation_options","employee_id_rule","mandatory_documents_rule","account_setting_rule"]},"in":"path","name":"section_key","required":true}],"security":[{"bearerAuth":[]}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/settings/{company_id}/mandatory-documents-rule":{"get":{"summary":"Get employee module settings","tags":["Core Domains — Employees Settings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"experience_cretificates":{"type":"boolean"},"educational_certificates":{"type":"boolean"}},"required":["experience_cretificates","educational_certificates"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update employee module settings","tags":["Core Domains — Employees Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"experience_cretificates":{"type":"boolean"},"educational_certificates":{"type":"boolean"}},"required":["experience_cretificates","educational_certificates"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"enum":["creation_options","employee_id_rule","mandatory_documents_rule","account_setting_rule"]},"in":"path","name":"section_key","required":true}],"security":[{"bearerAuth":[]}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/employees/settings/{company_id}/account-setting-rule":{"get":{"summary":"Get employee module settings","tags":["Core Domains — Employees Settings"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"disable_login_after_last_day":{"type":"boolean"},"restrict_multiple_device_login":{"type":"boolean"},"force_password_change_on_first_login":{"type":"boolean"},"auto_create_employee_id":{"type":"boolean"}},"required":["disable_login_after_last_day","restrict_multiple_device_login","force_password_change_on_first_login","auto_create_employee_id"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update employee module settings","tags":["Core Domains — Employees Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"disable_login_after_last_day":{"type":"boolean"},"restrict_multiple_device_login":{"type":"boolean"},"force_password_change_on_first_login":{"type":"boolean"},"auto_create_employee_id":{"type":"boolean"}},"required":["disable_login_after_last_day","restrict_multiple_device_login","force_password_change_on_first_login","auto_create_employee_id"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"company_id","required":true},{"schema":{"enum":["creation_options","employee_id_rule","mandatory_documents_rule","account_setting_rule"]},"in":"path","name":"section_key","required":true}],"security":[{"bearerAuth":[]}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/uploads/presigned-url":{"get":{"summary":"Get a presigned upload URL (SAS URL)","tags":["Core Domains — Uploads"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"fileName","required":true,"description":"Original name of the file"},{"schema":{"type":"string"},"in":"query","name":"contentType","required":true,"description":"MIME type of the file"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"uploadUrl":{"type":"string","description":"The presigned URL to PUT the file to"},"fileUrl":{"type":"string","description":"The final accessible URL of the file"}},"required":["uploadUrl","fileUrl"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/uploads/local-upload/{fileName}":{"put":{"summary":"Local mock upload endpoint (used as fallback)","tags":["Core Domains — Uploads"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"fileName","required":true}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/uploads/create-folder":{"post":{"summary":"create a folder","tags":["Core Domains — Uploads"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder_name":{"type":"string"}},"required":["folder_name"]}}}},"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"folder_slug":{"type":"string"},"folder_name":{"type":"string"}},"required":["folder_slug","folder_name"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/uploads/folders":{"get":{"summary":"get all folders","tags":["Core Domains — Uploads"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"folder_slug":{"type":"string"},"folder_name":{"type":"string"}},"required":["folder_slug","folder_name"]}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/core-domains/v1/uploads/get-signed-link":{"get":{"summary":"redirect to blob","tags":["Core Domains — Uploads"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"uri","required":true,"description":"Full blob URI to stream"},{"schema":{"type":"string"},"in":"query","name":"token","required":false,"description":"auth token"}],"responses":{"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/health":{"get":{"summary":"HRMS liveness","tags":["HRMS"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"product":{"type":"string"}}}}}}}}},"/hrms/v1/ready":{"get":{"summary":"HRMS readiness","tags":["HRMS"],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true}}}}}}},"/hrms/v1/session":{"get":{"summary":"HRMS session context","tags":["HRMS"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"userId":{"type":"string","format":"uuid"},"tenantId":{"type":"string","format":"uuid"},"activeCompanyId":{"type":"string","format":"uuid"},"locale":{"type":"string"},"timezone":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/shifts/":{"post":{"summary":"Create a new shift","tags":["HRMS — Shifts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"starts_at":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$"},"ends_at":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$"},"status":{"anyOf":[{"type":"string","enum":["active","inactive"]},{"type":"null"}]},"working_days":{"minItems":1,"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"required":["name","company_id","starts_at","ends_at","working_days"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"working_days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"required":["id","tenant_id","company_id","name","status","starts_at","ends_at","created_at","updated_at","working_days"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List shifts","tags":["HRMS — Shifts"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"working_days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"required":["id","tenant_id","company_id","name","status","starts_at","ends_at","created_at","updated_at","working_days"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/shifts/{id}":{"get":{"summary":"Get a shift by ID","tags":["HRMS — Shifts"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"working_days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"required":["id","tenant_id","company_id","name","status","starts_at","ends_at","created_at","updated_at","working_days"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a shift","tags":["HRMS — Shifts"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"starts_at":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$"},"ends_at":{"type":"string","pattern":"^(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?$"},"status":{"anyOf":[{"type":"string","enum":["active","inactive"]},{"type":"null"}]},"working_days":{"minItems":1,"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"starts_at":{"type":"string"},"ends_at":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"working_days":{"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"required":["id","tenant_id","company_id","name","status","starts_at","ends_at","created_at","updated_at","working_days"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a shift (soft delete)","tags":["HRMS — Shifts"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/check-in":{"put":{"summary":"Create or mark attendance","tags":["HRMS — Attendance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"mode":{"default":"app","type":"string","enum":["app","web","biometric","manual","system"]},"location_type":{"type":"string","enum":["home","onsite","office","other"]},"remark":{"type":"string"}},"required":["latitude","longitude","mode","location_type"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"default":"successfull","type":"string"},"id":{"type":"number"}},"required":["message","id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/check-out/{attendance_id}":{"put":{"summary":"Create or mark attendance","tags":["HRMS — Attendance"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"latitude":{"type":"number"},"longitude":{"type":"number"},"mode":{"default":"app","type":"string","enum":["app","web","biometric","manual","system"]},"location_type":{"type":"string","enum":["home","onsite","office","other"]},"remark":{"type":"string"}},"required":["latitude","longitude","mode","location_type"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"number"},"in":"path","name":"attendance_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"default":"successfull","type":"string"},"id":{"type":"number"}},"required":["message","id"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/":{"get":{"summary":"List attendance records","tags":["HRMS — Attendance"],"parameters":[{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"to_date","required":false},{"schema":{"type":"string"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"location_type","required":false},{"schema":{"type":"string"},"in":"query","name":"check_in_status","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"employee_id":{"type":"string"},"attendance_id":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"full_name":{"type":"string"},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"check_in":{"default":null,"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"check_out":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"total_hours":{"default":"00:00:00","type":"string"},"break_minutes":{"default":"00:00:00","type":"string"},"overtime_minutes":{"default":"00:00:00","type":"string"},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"department":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"check_in_offset":{"default":"00:00:00","type":"string"},"check_out_offset":{"default":"00:00:00","type":"string"},"productive_time":{"default":"00:00:00","type":"string"},"status":{"default":"absent","type":"string"},"check_in_status":{"default":null,"anyOf":[{"type":"string","enum":["late","on_time"]},{"type":"null"}]},"attendance_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"leave":{"default":null,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"remark":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"check_in_device":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"check_out_device":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"check_in_latitude":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"check_out_latitude":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"check_in_longitude":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"check_out_longitude":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"country":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"city":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"consumedCheckInGrace":{"default":false,"type":"boolean"},"consumedCheckOutGrace":{"default":false,"type":"boolean"}},"required":["employee_id","attendance_id","full_name","avatar_url","check_in","check_out","total_hours","break_minutes","overtime_minutes","designation","department","location_type","mode","shift_name","check_in_offset","check_out_offset","productive_time","status","check_in_status","attendance_date","leave","remark","check_in_device","check_out_device","check_in_latitude","check_out_latitude","check_in_longitude","check_out_longitude","country","city","consumedCheckInGrace","consumedCheckOutGrace"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/insight/segment":{"get":{"summary":"Get attendance deductions and exceptions for a month","tags":["HRMS — Attendance"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"number"},"example":2026,"in":"query","name":"year","required":false},{"schema":{"type":"number","minimum":1,"maximum":12},"example":4,"in":"query","name":"month","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"deductionOverview":{"default":{"count":0,"lopDays":0,"minHalfDayHours":4,"message":"No LOP deductions","items":[]},"type":"object","properties":{"count":{"default":0,"type":"number"},"lopDays":{"default":0,"type":"number"},"minHalfDayHours":{"default":4,"type":"number"},"message":{"default":"No LOP deductions","type":"string"},"items":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"attendanceDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"time":{"anyOf":[{"type":"string"},{"type":"null"}]},"workHours":{"anyOf":[{"type":"string"},{"type":"null"}]},"deductionDays":{"default":0.5,"type":"number"},"checkIn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOut":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"totalHours":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkInOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOutOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"minHalfDayHours":{"default":4,"type":"number"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["attendanceDate","checkIn","checkOut","totalHours","checkInOffset","checkOutOffset","minHalfDayHours"],"additionalProperties":false}}},"required":["count","lopDays","minHalfDayHours","message","items"],"additionalProperties":false},"lateIn":{"default":{"count":0,"items":[]},"type":"object","properties":{"count":{"default":0,"type":"number"},"items":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"attendanceDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"time":{"anyOf":[{"type":"string"},{"type":"null"}]},"workHours":{"anyOf":[{"type":"string"},{"type":"null"}]},"deductionDays":{"default":0.5,"type":"number"},"checkIn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOut":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"totalHours":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkInOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOutOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"minHalfDayHours":{"default":4,"type":"number"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["attendanceDate","checkIn","checkOut","totalHours","checkInOffset","checkOutOffset","minHalfDayHours"],"additionalProperties":false}}},"required":["count","items"],"additionalProperties":false},"earlyOut":{"default":{"count":0,"items":[]},"type":"object","properties":{"count":{"default":0,"type":"number"},"items":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"attendanceDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"time":{"anyOf":[{"type":"string"},{"type":"null"}]},"workHours":{"anyOf":[{"type":"string"},{"type":"null"}]},"deductionDays":{"default":0.5,"type":"number"},"checkIn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOut":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"totalHours":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkInOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOutOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"minHalfDayHours":{"default":4,"type":"number"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["attendanceDate","checkIn","checkOut","totalHours","checkInOffset","checkOutOffset","minHalfDayHours"],"additionalProperties":false}}},"required":["count","items"],"additionalProperties":false},"exceptions":{"default":{"count":0,"items":[]},"type":"object","properties":{"count":{"default":0,"type":"number"},"items":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"attendanceDate":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"time":{"anyOf":[{"type":"string"},{"type":"null"}]},"workHours":{"anyOf":[{"type":"string"},{"type":"null"}]},"deductionDays":{"default":0.5,"type":"number"},"checkIn":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOut":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"totalHours":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkInOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"checkOutOffset":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"minHalfDayHours":{"default":4,"type":"number"},"message":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["attendanceDate","checkIn","checkOut","totalHours","checkInOffset","checkOutOffset","minHalfDayHours"],"additionalProperties":false}}},"required":["count","items"],"additionalProperties":false}},"required":["deductionOverview","lateIn","earlyOut","exceptions"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/insight":{"get":{"summary":"Get monthly attendance insights for a user","tags":["HRMS — Attendance"],"parameters":[{"schema":{"type":"number"},"example":2026,"in":"query","name":"year","required":false},{"schema":{"type":"number"},"example":10,"in":"query","name":"month","required":false},{"schema":{"type":"string","format":"uuid"},"example":"19ee7f24-16a7-4a26-979a-80a5105f70d3","in":"query","name":"employee_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"startDate":{"default":"","type":"string"},"endDate":{"default":"","type":"string"},"calendarDays":{"default":0,"type":"number"},"workingDays":{"default":0,"type":"number"},"present":{"default":0,"type":"number"},"leave":{"default":0,"type":"number"},"lop":{"default":0,"type":"number"},"wfh":{"default":0,"type":"number"},"attendancePercentage":{"default":0,"type":"number"},"weeklyOff":{"default":{"available":0,"taken":0,"balance":0},"type":"object","properties":{"available":{"default":0,"type":"number"},"taken":{"default":0,"type":"number"},"balance":{"default":0,"type":"number"}},"required":["available","taken","balance"],"additionalProperties":false},"publicHoliday":{"default":{"available":0,"taken":0,"balance":0},"type":"object","properties":{"available":{"default":0,"type":"number"},"taken":{"default":0,"type":"number"},"balance":{"default":0,"type":"number"}},"required":["available","taken","balance"],"additionalProperties":false},"compensatoryOff":{"default":{"available":0,"taken":0,"balance":0},"type":"object","properties":{"available":{"default":0,"type":"number"},"taken":{"default":0,"type":"number"},"balance":{"default":0,"type":"number"}},"required":["available","taken","balance"],"additionalProperties":false},"leaveBalanceTotal":{"default":0,"type":"number"},"leaveBalance":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"weekends":{"default":[],"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"taken":{"type":"boolean"}},"required":["date","taken"],"additionalProperties":false}},"holidays":{"default":[],"type":"array","items":{"type":"object","properties":{"date":{"type":"string"},"title":{"type":"string"},"taken":{"type":"boolean"}},"required":["date","title","taken"],"additionalProperties":false}},"timeSummary":{"default":{"workHours":"0h 0m","productiveTime":"0h 0m","averageWorkHoursPerDay":"0h 0m","overtime":"0h 0m"},"type":"object","properties":{"workHours":{"default":"0h 0m","type":"string"},"productiveTime":{"default":"0h 0m","type":"string"},"averageWorkHoursPerDay":{"default":"0h 0m","type":"string"},"overtime":{"default":"0h 0m","type":"string"}},"required":["workHours","productiveTime","averageWorkHoursPerDay","overtime"],"additionalProperties":false}},"required":["startDate","endDate","calendarDays","workingDays","present","leave","lop","wfh","attendancePercentage","weeklyOff","publicHoliday","compensatoryOff","leaveBalanceTotal","leaveBalance","weekends","holidays","timeSummary"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/{attendance_id}":{"get":{"summary":"Get attendance record by ID","tags":["HRMS — Attendance"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"attendance_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"number"},"tenant_id":{"type":"string"},"company_id":{"type":"string"},"employee_id":{"type":"string"},"shift_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"mode":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"check_in":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"check_out":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"total_hours":{"default":"00:00:00","type":"string"},"break_minutes":{"default":"00:00:00","type":"string"},"overtime_minutes":{"default":"00:00:00","type":"string"},"created_at":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"updated_at":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"deleted_at":{"anyOf":[{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},{"type":"null"}]}},"required":["id","tenant_id","company_id","employee_id","shift_name","check_in","check_out","total_hours","break_minutes","overtime_minutes","created_at","updated_at","deleted_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance/{attendance_id}/punches":{"get":{"summary":"Get list of punches for an attendance record","tags":["HRMS — Attendance"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"attendance_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"default":"Punches retrieved successfully","type":"string"},"numberOfPunches":{"default":0,"type":"number"},"items":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"employee_id":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"attendance_id":{"default":null,"anyOf":[{"anyOf":[{"type":"string"},{"type":"number"}]},{"type":"null"}]},"punch_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"punch_time":{},"latitude":{"default":null,"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"longitude":{"default":null,"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mode":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"location_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"remark":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"ip_address":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"device_id":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{},"updated_at":{}},"required":["id","employee_id","attendance_id","punch_type","punch_time","latitude","longitude","mode","location_type","remark","ip_address","device_id"],"additionalProperties":false}}},"required":["message","numberOfPunches","items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance-settings/{company_id}/attendance-rules":{"get":{"summary":"Get attendance settings for current organization","tags":["HRMS — Attendance Settings"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"late_arrival_grace_period":{"default":15,"type":"number"},"late_arrival_grace_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]},"early_departure_grace_period":{"default":15,"type":"number"},"early_departure_grace_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]},"min_half_day_hours":{"default":4,"type":"number"},"auto_checkout_enabled":{"default":false,"type":"boolean"},"auto_checkout_after_hours":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"break_deduction_enabled":{"default":true,"type":"boolean"},"break_deduction_duration":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"break_deduction_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]}},"required":["late_arrival_grace_period","late_arrival_grace_unit","early_departure_grace_period","early_departure_grace_unit","min_half_day_hours","auto_checkout_enabled","auto_checkout_after_hours","break_deduction_enabled","break_deduction_duration","break_deduction_unit"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update attendance settings for current organization","tags":["HRMS — Attendance Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"late_arrival_grace_period":{"default":15,"type":"number"},"late_arrival_grace_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]},"early_departure_grace_period":{"default":15,"type":"number"},"early_departure_grace_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]},"min_half_day_hours":{"default":4,"type":"number"},"auto_checkout_enabled":{"default":false,"type":"boolean"},"auto_checkout_after_hours":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"break_deduction_enabled":{"default":true,"type":"boolean"},"break_deduction_duration":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"break_deduction_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]}},"required":["late_arrival_grace_period","late_arrival_grace_unit","early_departure_grace_period","early_departure_grace_unit","min_half_day_hours","auto_checkout_enabled","auto_checkout_after_hours","break_deduction_enabled","break_deduction_duration","break_deduction_unit"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"late_arrival_grace_period":{"default":15,"type":"number"},"late_arrival_grace_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]},"early_departure_grace_period":{"default":15,"type":"number"},"early_departure_grace_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]},"min_half_day_hours":{"default":4,"type":"number"},"auto_checkout_enabled":{"default":false,"type":"boolean"},"auto_checkout_after_hours":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"break_deduction_enabled":{"default":true,"type":"boolean"},"break_deduction_duration":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"break_deduction_unit":{"default":"minutes","type":"string","enum":["minutes","hours"]}},"required":["late_arrival_grace_period","late_arrival_grace_unit","early_departure_grace_period","early_departure_grace_unit","min_half_day_hours","auto_checkout_enabled","auto_checkout_after_hours","break_deduction_enabled","break_deduction_duration","break_deduction_unit"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance-settings/{company_id}/attendance-methods":{"get":{"summary":"Get attendance settings for current organization","tags":["HRMS — Attendance Settings"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"allow_web_checkin":{"default":true,"type":"boolean"},"allow_mobile_checkin":{"default":false,"type":"boolean"},"allow_biometric_checkin":{"default":false,"type":"boolean"},"office_geo_fencing_enabled":{"default":false,"type":"boolean"},"office_geo_fencing_radius":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"home_geo_fencing_enabled":{"default":false,"type":"boolean"},"home_geo_fencing_radius":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"ip_fencing_enabled":{"default":false,"type":"boolean"},"ip_fencing_addresses":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"default_attendace_method":{"anyOf":[{"type":"string","enum":["web","biometric","mobile"]},{"type":"null"}]}},"required":["allow_web_checkin","allow_mobile_checkin","allow_biometric_checkin","office_geo_fencing_enabled","office_geo_fencing_radius","home_geo_fencing_enabled","home_geo_fencing_radius","ip_fencing_enabled","ip_fencing_addresses"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update attendance settings for current organization","tags":["HRMS — Attendance Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"allow_web_checkin":{"default":true,"type":"boolean"},"allow_mobile_checkin":{"default":false,"type":"boolean"},"allow_biometric_checkin":{"default":false,"type":"boolean"},"office_geo_fencing_enabled":{"default":false,"type":"boolean"},"office_geo_fencing_radius":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"home_geo_fencing_enabled":{"default":false,"type":"boolean"},"home_geo_fencing_radius":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"ip_fencing_enabled":{"default":false,"type":"boolean"},"ip_fencing_addresses":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"default_attendace_method":{"anyOf":[{"type":"string","enum":["web","biometric","mobile"]},{"type":"null"}]}},"required":["allow_web_checkin","allow_mobile_checkin","allow_biometric_checkin","office_geo_fencing_enabled","office_geo_fencing_radius","home_geo_fencing_enabled","home_geo_fencing_radius","ip_fencing_enabled","ip_fencing_addresses"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"allow_web_checkin":{"default":true,"type":"boolean"},"allow_mobile_checkin":{"default":false,"type":"boolean"},"allow_biometric_checkin":{"default":false,"type":"boolean"},"office_geo_fencing_enabled":{"default":false,"type":"boolean"},"office_geo_fencing_radius":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"home_geo_fencing_enabled":{"default":false,"type":"boolean"},"home_geo_fencing_radius":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"ip_fencing_enabled":{"default":false,"type":"boolean"},"ip_fencing_addresses":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"default_attendace_method":{"anyOf":[{"type":"string","enum":["web","biometric","mobile"]},{"type":"null"}]}},"required":["allow_web_checkin","allow_mobile_checkin","allow_biometric_checkin","office_geo_fencing_enabled","office_geo_fencing_radius","home_geo_fencing_enabled","home_geo_fencing_radius","ip_fencing_enabled","ip_fencing_addresses"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance-settings/{company_id}/devices":{"get":{"summary":"List attendance devices for company","tags":["HRMS — Attendance Settings"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string","enum":["true","false"]},"in":"query","name":"is_active","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"serial_number":{"type":"string"},"device_type":{"type":"string"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"number"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"server_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_username":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","serial_number","device_type","manufacturer","model","ip_address","port","location","server_address","device_username","device_password","is_active","last_sync_at","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"post":{"summary":"Create attendance device for company","tags":["HRMS — Attendance Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"serial_number":{"type":"string","minLength":1,"maxLength":100},"manufacturer":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string","maxLength":45},{"type":"null"}]},"port":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]},"server_address":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"device_username":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"device_password":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"is_active":{"default":true,"type":"boolean"}},"required":["name","serial_number","is_active"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"serial_number":{"type":"string"},"device_type":{"type":"string"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"number"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"server_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_username":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","serial_number","device_type","manufacturer","model","ip_address","port","location","server_address","device_username","device_password","is_active","last_sync_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/attendance-settings/{company_id}/devices/{id}":{"get":{"summary":"Get attendance device by ID","tags":["HRMS — Attendance Settings"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"serial_number":{"type":"string"},"device_type":{"type":"string"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"number"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"server_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_username":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","serial_number","device_type","manufacturer","model","ip_address","port","location","server_address","device_username","device_password","is_active","last_sync_at","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update attendance device","tags":["HRMS — Attendance Settings"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"serial_number":{"type":"string","minLength":1,"maxLength":100},"manufacturer":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"model":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string","maxLength":45},{"type":"null"}]},"port":{"anyOf":[{"type":"integer","minimum":1,"maximum":65535},{"type":"null"}]},"server_address":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"device_username":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"device_password":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}]},"is_active":{"default":true,"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"serial_number":{"type":"string"},"device_type":{"type":"string"},"manufacturer":{"anyOf":[{"type":"string"},{"type":"null"}]},"model":{"anyOf":[{"type":"string"},{"type":"null"}]},"ip_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"port":{"anyOf":[{"type":"number"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"server_address":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_username":{"anyOf":[{"type":"string"},{"type":"null"}]},"device_password":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_active":{"type":"boolean"},"last_sync_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","company_id","name","serial_number","device_type","manufacturer","model","ip_address","port","location","server_address","device_username","device_password","is_active","last_sync_at","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete attendance device","tags":["HRMS — Attendance Settings"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-management/leave-types":{"post":{"summary":"Create a new leave type","tags":["HRMS — Leave Types"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"payment_type":{"default":"paid","type":"string","enum":["paid","unpaid"]},"unit":{"default":"days","type":"string","enum":["days","hours"]},"applicable_gender":{"default":"all","type":"string","enum":["all","male","female","others"]},"status":{"default":"active","type":"string","enum":["active","inactive"]},"allow_carry_forward":{"default":false,"type":"boolean"},"is_encashable":{"default":false,"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["title","code","payment_type","unit","applicable_gender","status","allow_carry_forward","is_encashable","company_ids"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"code":{"type":"string"},"payment_type":{"type":"string","enum":["paid","unpaid"]},"unit":{"type":"string","enum":["days","hours"]},"applicable_gender":{"type":"string","enum":["all","male","female","others"]},"status":{"type":"string","enum":["active","inactive"]},"allow_carry_forward":{"type":"boolean"},"is_encashable":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","tenant_id","title","code","payment_type","unit","applicable_gender","status","allow_carry_forward","is_encashable","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List all leave types","tags":["HRMS — Leave Types"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"code":{"type":"string"},"payment_type":{"type":"string","enum":["paid","unpaid"]},"unit":{"type":"string","enum":["days","hours"]},"applicable_gender":{"type":"string","enum":["all","male","female","others"]},"status":{"type":"string","enum":["active","inactive"]},"allow_carry_forward":{"type":"boolean"},"is_encashable":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","tenant_id","title","code","payment_type","unit","applicable_gender","status","allow_carry_forward","is_encashable","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-management/leave-types/summary":{"get":{"summary":"Get leave type summary (total, active, inactive)","tags":["HRMS — Leave Types"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"active":{"type":"number"},"inactive":{"type":"number"}},"required":["total","active","inactive"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-management/leave-types/{id}":{"get":{"summary":"Get leave type by ID","tags":["HRMS — Leave Types"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"code":{"type":"string"},"payment_type":{"type":"string","enum":["paid","unpaid"]},"unit":{"type":"string","enum":["days","hours"]},"applicable_gender":{"type":"string","enum":["all","male","female","others"]},"status":{"type":"string","enum":["active","inactive"]},"allow_carry_forward":{"type":"boolean"},"is_encashable":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","tenant_id","title","code","payment_type","unit","applicable_gender","status","allow_carry_forward","is_encashable","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update leave type by ID","tags":["HRMS — Leave Types"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1},"code":{"type":"string","minLength":1},"payment_type":{"default":"paid","type":"string","enum":["paid","unpaid"]},"unit":{"default":"days","type":"string","enum":["days","hours"]},"applicable_gender":{"default":"all","type":"string","enum":["all","male","female","others"]},"status":{"default":"active","type":"string","enum":["active","inactive"]},"allow_carry_forward":{"default":false,"type":"boolean"},"is_encashable":{"default":false,"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"code":{"type":"string"},"payment_type":{"type":"string","enum":["paid","unpaid"]},"unit":{"type":"string","enum":["days","hours"]},"applicable_gender":{"type":"string","enum":["all","male","female","others"]},"status":{"type":"string","enum":["active","inactive"]},"allow_carry_forward":{"type":"boolean"},"is_encashable":{"type":"boolean"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["id","tenant_id","title","code","payment_type","unit","applicable_gender","status","allow_carry_forward","is_encashable","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete leave type by ID","tags":["HRMS — Leave Types"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-management/leave-policies":{"post":{"summary":"Create a new leave policy","tags":["HRMS — Leave Policies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy_name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Date Format","example":"2022-01-01"},"status":{"default":"active","type":"string","enum":["active","inactive"]},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"designation_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"entitlements":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocation_method":{"default":"automatic","type":"string","enum":["automatic","manual"]},"allocation_frequency":{"default":"monthly","type":"string","enum":["one_time","monthly","quarterly","half_yearly","yearly"]},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"reset_expiry_frequency":{"default":"yearly","type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"carry_forward_allowed":{"default":false,"type":"boolean"}},"required":["leave_type_id","allocation_method","allocation_frequency","credit_per_period","annual_entitlement","reset_expiry_frequency","carry_forward_allowed"],"additionalProperties":false}}},"required":["policy_name","effective_from","status"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy_name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"type":"string"},"effective_till":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"departments":{"type":"array","items":{"type":"object","properties":{"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["department_id","name"],"additionalProperties":false}},"designations":{"type":"array","items":{"type":"object","properties":{"designation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["designation_id","name"],"additionalProperties":false}},"designation_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"employees_assigned_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"entitlements":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocation_method":{"default":"automatic","type":"string","enum":["automatic","manual"]},"allocation_frequency":{"default":"monthly","type":"string","enum":["one_time","monthly","quarterly","half_yearly","yearly"]},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"reset_expiry_frequency":{"default":"yearly","type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"carry_forward_allowed":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_name":{"type":"string"},"leave_type_code":{"type":"string"}},"required":["leave_type_id","allocation_method","allocation_frequency","credit_per_period","annual_entitlement","reset_expiry_frequency","carry_forward_allowed"],"additionalProperties":false}}},"required":["id","tenant_id","policy_name","effective_from","status","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List all leave policies","tags":["HRMS — Leave Policies"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"designation_id","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"effective_on","required":false,"description":"Only policies effective on this date (YYYY-MM-DD), e.g. today when assigning a policy to an employee"},{"schema":{"type":"boolean"},"in":"query","name":"include_future","required":false,"description":"When true, list includes policies not yet effective (admin). Default list is effective-as-of today (HRMS-106674)."}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy_name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"type":"string"},"effective_till":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"departments":{"type":"array","items":{"type":"object","properties":{"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["department_id","name"],"additionalProperties":false}},"designations":{"type":"array","items":{"type":"object","properties":{"designation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["designation_id","name"],"additionalProperties":false}},"designation_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"employees_assigned_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"entitlements":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocation_method":{"default":"automatic","type":"string","enum":["automatic","manual"]},"allocation_frequency":{"default":"monthly","type":"string","enum":["one_time","monthly","quarterly","half_yearly","yearly"]},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"reset_expiry_frequency":{"default":"yearly","type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"carry_forward_allowed":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_name":{"type":"string"},"leave_type_code":{"type":"string"}},"required":["leave_type_id","allocation_method","allocation_frequency","credit_per_period","annual_entitlement","reset_expiry_frequency","carry_forward_allowed"],"additionalProperties":false}}},"required":["id","tenant_id","policy_name","effective_from","status","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-management/leave-policies/{id}":{"get":{"summary":"Get leave policy by ID","tags":["HRMS — Leave Policies"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy_name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"type":"string"},"effective_till":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"departments":{"type":"array","items":{"type":"object","properties":{"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["department_id","name"],"additionalProperties":false}},"designations":{"type":"array","items":{"type":"object","properties":{"designation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["designation_id","name"],"additionalProperties":false}},"designation_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"employees_assigned_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"entitlements":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocation_method":{"default":"automatic","type":"string","enum":["automatic","manual"]},"allocation_frequency":{"default":"monthly","type":"string","enum":["one_time","monthly","quarterly","half_yearly","yearly"]},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"reset_expiry_frequency":{"default":"yearly","type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"carry_forward_allowed":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_name":{"type":"string"},"leave_type_code":{"type":"string"}},"required":["leave_type_id","allocation_method","allocation_frequency","credit_per_period","annual_entitlement","reset_expiry_frequency","carry_forward_allowed"],"additionalProperties":false}}},"required":["id","tenant_id","policy_name","effective_from","status","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update leave policy by ID","tags":["HRMS — Leave Policies"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"policy_name":{"type":"string","minLength":1},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","description":"Date Format","example":"2022-01-01"},"status":{"default":"active","type":"string","enum":["active","inactive"]},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"designation_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"entitlements":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocation_method":{"default":"automatic","type":"string","enum":["automatic","manual"]},"allocation_frequency":{"default":"monthly","type":"string","enum":["one_time","monthly","quarterly","half_yearly","yearly"]},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"reset_expiry_frequency":{"default":"yearly","type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"carry_forward_allowed":{"default":false,"type":"boolean"}},"required":["leave_type_id","allocation_method","allocation_frequency","credit_per_period","annual_entitlement","reset_expiry_frequency","carry_forward_allowed"],"additionalProperties":false}},"confirm_scope_change":{"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"policy_name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"type":"string"},"effective_till":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["active","inactive"]},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"department_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"departments":{"type":"array","items":{"type":"object","properties":{"department_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["department_id","name"],"additionalProperties":false}},"designations":{"type":"array","items":{"type":"object","properties":{"designation_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"}},"required":["designation_id","name"],"additionalProperties":false}},"designation_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"employees_assigned_count":{"type":"integer","minimum":0,"maximum":9007199254740991},"entitlements":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"allocation_method":{"default":"automatic","type":"string","enum":["automatic","manual"]},"allocation_frequency":{"default":"monthly","type":"string","enum":["one_time","monthly","quarterly","half_yearly","yearly"]},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"reset_expiry_frequency":{"default":"yearly","type":"string","enum":["monthly","quarterly","half_yearly","yearly"]},"carry_forward_allowed":{"default":false,"type":"boolean"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_name":{"type":"string"},"leave_type_code":{"type":"string"}},"required":["leave_type_id","allocation_method","allocation_frequency","credit_per_period","annual_entitlement","reset_expiry_frequency","carry_forward_allowed"],"additionalProperties":false}}},"required":["id","tenant_id","policy_name","effective_from","status","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete leave policy by ID","tags":["HRMS — Leave Policies"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-management/leave-policies/summary":{"get":{"summary":"Get leave policies summary (total, active, inactive, employees covered)","tags":["HRMS — Leave Policies"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"total":{"type":"number"},"active":{"type":"number"},"inactive":{"type":"number"},"employees_covered":{"type":"number"}},"required":["total","active","inactive","employees_covered"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/":{"post":{"summary":"Create a new leave request","tags":["HRMS — Leave Request"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","example":"2022-01-01"},"end_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$","example":"2022-01-05"},"start_session":{"type":"string","enum":["first_half","second_half"]},"end_session":{"type":"string","enum":["first_half","second_half"]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"file_type":{"type":"string"},"file_uri":{"type":"string"}},"required":["file_type","file_uri"],"additionalProperties":false}},{"type":"null"}]},"cc_recipients":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]}},"required":["leave_type_id","start_date","end_date","start_session","end_session"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string"},"end_date":{"type":"string"},"days_requested":{"type":"number"},"start_session":{"type":"string","enum":["first_half","second_half"]},"end_session":{"type":"string","enum":["first_half","second_half"]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"approved_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","employee_id","leave_type_id","start_date","end_date","days_requested","start_session","end_session","status","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"Get all leave requests","tags":["HRMS — Leave Request"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"leave_type_ids","required":false},{"schema":{"type":"string"},"in":"query","name":"start_date","required":false},{"schema":{"type":"string"},"in":"query","name":"end_date","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"show_balance_leave","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string"},"start_session":{"type":"string","enum":["first_half","second_half"]},"end_date":{"type":"string"},"end_session":{"type":"string","enum":["first_half","second_half"]},"days_requested":{"type":"number"},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"employee_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"department_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"leave_type":{"type":"string"},"leave_type_code":{"type":"string"},"attachments":{"type":"array","items":{"type":"object","properties":{"file_uri":{"type":"string"},"file_type":{"type":"string"}},"required":["file_uri","file_type"],"additionalProperties":false}},"approvers":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","comment","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"comment":{"default":null,"anyOf":[{"type":"object","properties":{"comment":{"type":"string"},"comment_for_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["comment","comment_for_status","created_at","commenter_name","commenter_code","commenter_avatar","commenter_designation"],"additionalProperties":{}},{"type":"null"}]},"leave_balance":{"anyOf":[{"type":"object","properties":{"opening":{"type":"string"},"accrued":{"type":"string"},"expired":{"type":"string"},"availed":{"type":"string"},"hold":{"type":"string"},"closing":{"type":"string"},"available":{"type":"string"}},"required":["opening","accrued","expired","availed","hold","closing","available"],"additionalProperties":false},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"applied_on":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","employee_id","leave_type_id","start_date","start_session","end_date","end_session","days_requested","status","employee_name","leave_type","leave_type_code","attachments","approvers","comment"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/balance-leave":{"get":{"summary":"Get balance leave requests","tags":["HRMS — Leave Request"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"leave_type_ids","required":false},{"schema":{"type":"string"},"in":"query","name":"year","required":false},{"schema":{"type":"string"},"in":"query","name":"include_orphans","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"default":true,"type":"boolean"},"message":{"default":"Balance leave fetched successfully","type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"leave_type_id":{"type":"string"},"code":{"type":"string"},"title":{"type":"string"},"opening":{"default":0,"type":"number"},"accrued":{"default":0,"type":"number"},"expired":{"default":0,"type":"number"},"availed":{"default":0,"type":"number"},"hold":{"default":0,"type":"number"},"closing":{"default":0,"type":"number"},"available":{"default":0,"type":"number"},"taken":{"default":0,"type":"number"},"consumed":{"default":0,"type":"number"},"balance":{"default":0,"type":"number"},"credit_per_period":{"default":0,"type":"number"},"annual_entitlement":{"default":0,"type":"number"},"credited_qty":{"default":0,"type":"number"},"display_total":{"default":0,"type":"number"},"allocation_frequency":{"anyOf":[{"type":"string"},{"type":"null"}]},"allocation_method":{"anyOf":[{"type":"string"},{"type":"null"}]},"carried_from_previous_policy":{"default":false,"type":"boolean"},"credited":{"type":"boolean"}},"required":["leave_type_id","code","title","opening","accrued","expired","availed","hold","closing","available","taken","consumed","balance","credit_per_period","annual_entitlement","credited_qty","display_total","carried_from_previous_policy"],"additionalProperties":{}}}},"required":["success","message","items"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/{leave_request_id}/forward-eligible-users":{"get":{"summary":"Get eligible approvers for forwarding a leave request","tags":["HRMS — Leave Request"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"leave_request_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","employee_id","user_id","name","avatar_url","designation"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/{leave_request_id}/forward":{"put":{"summary":"Forward a leave request to an eligible approver","tags":["HRMS — Leave Request"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"forward_to_employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"comment":{"type":"string"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"leave_request_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success","message"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/{leave_request_id}/{action}":{"put":{"summary":"Update leave request status","tags":["HRMS — Leave Request"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string"}}}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"leave_request_id","required":true},{"schema":{"type":"string","enum":["approve","reject","cancel"]},"in":"path","name":"action","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string"},"end_date":{"type":"string"},"days_requested":{"type":"number"},"start_session":{"type":"string","enum":["first_half","second_half"]},"end_session":{"type":"string","enum":["first_half","second_half"]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"approved_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","employee_id","leave_type_id","start_date","end_date","days_requested","start_session","end_session","status","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/{leave_request_id}":{"patch":{"summary":"Update a pending leave request","tags":["HRMS — Leave Request"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string","example":"2022-01-01"},"end_date":{"type":"string","example":"2022-01-05"},"start_session":{"type":"string","enum":["first_half","second_half"]},"end_session":{"type":"string","enum":["first_half","second_half"]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"file_type":{"type":"string"},"file_uri":{"type":"string"}},"required":["file_type","file_uri"],"additionalProperties":false}},{"type":"null"}]},"cc_recipients":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"leave_request_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_type_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"start_date":{"type":"string"},"end_date":{"type":"string"},"days_requested":{"type":"number"},"start_session":{"type":"string","enum":["first_half","second_half"]},"end_session":{"type":"string","enum":["first_half","second_half"]},"contact":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["pending","approved","rejected","cancelled"]},"approved_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","employee_id","leave_type_id","start_date","end_date","days_requested","start_session","end_session","status","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/{leave_request_id}/comments":{"post":{"summary":"Add a comment to a leave request","tags":["HRMS — Leave Request"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","minLength":1}},"required":["comment"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string"},"in":"path","name":"leave_request_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List comments for a leave request (paginated)","tags":["HRMS — Leave Request"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"path","name":"leave_request_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"leave_request_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"comment":{"type":"string"},"comment_for_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"commented_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"commenter_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","leave_request_id","comment","created_at"],"additionalProperties":false}},"totalitems":{"type":"number"},"totalPages":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["items","totalitems","totalPages","page","limit"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/leave-requests/{leave_request_id}/timeline":{"get":{"summary":"List timeline for a leave request","tags":["HRMS — Leave Request"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"path","name":"leave_request_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"leave_request_id":{"type":"string"},"current_status":{"type":"string"},"applied_on":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["CREATED","APPROVAL_LEVEL","COMMENT","STATUS_CHANGE"]},"title":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"remark":{"anyOf":[{"type":"string"},{"type":"null"}]},"level":{"anyOf":[{"type":"number"},{"type":"null"}]},"date":{"type":"string"},"created_at":{"type":"string"},"actor":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"role_name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","type","title","date"],"additionalProperties":false}},"totalitems":{"type":"number"},"totalPages":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["leave_request_id","current_status","items","totalitems"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/my-team/":{"get":{"summary":"Get all team members","tags":["HRMS — My Team"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"company_id","required":false,"description":"Filter team members by company"},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"department_id","required":false,"description":"Filter team members by department ID or comma-separated list of department IDs"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"data":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string"},"employee_id":{"type":"string"},"avatar_url":{"type":["null","string"]},"employee_name":{"type":["null","string"]},"designation_name":{"type":["null","string"]},"department_id":{"type":["null","string"]}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/approval-workflows/request-types":{"get":{"summary":"Get all available request types for approval workflows","tags":["HRMS — Approval Workflows"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/approval-workflows/approver-types":{"get":{"summary":"Get all available approver types for approval workflows","tags":["HRMS — Approval Workflows"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"},"requires_role":{"type":"boolean"}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/approval-workflows/company/{company_id}":{"get":{"summary":"List all approval workflows for a company","tags":["HRMS — Approval Workflows"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"skip_if_approver_unavailable":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"request_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"}}}},"levels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workflow_id":{"type":"string","format":"uuid"},"level_number":{"type":"integer"},"title":{"type":"string"},"approver_type_code":{"type":"string"},"approver_type_label":{"type":"string","nullable":true},"requires_role":{"type":"boolean","nullable":true},"role_id":{"type":"string","format":"uuid","nullable":true},"role_name":{"type":"string","nullable":true},"escalation_time_days":{"type":"integer"},"on_approve_move_to_next_level":{"type":"boolean"},"on_reject_move_to_next_level":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/approval-workflows/company/{company_id}/{slug}":{"get":{"summary":"Get approval workflow by company and slug","tags":["HRMS — Approval Workflows"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","enum":["break-leave-approval-workflow"]},"in":"path","name":"slug","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"skip_if_approver_unavailable":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"request_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"}}}},"levels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workflow_id":{"type":"string","format":"uuid"},"level_number":{"type":"integer"},"title":{"type":"string"},"approver_type_code":{"type":"string"},"approver_type_label":{"type":"string","nullable":true},"requires_role":{"type":"boolean","nullable":true},"role_id":{"type":"string","format":"uuid","nullable":true},"role_name":{"type":"string","nullable":true},"escalation_time_days":{"type":"integer"},"on_approve_move_to_next_level":{"type":"boolean"},"on_reject_move_to_next_level":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Create or update approval workflow by company and slug","tags":["HRMS — Approval Workflows"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"skip_if_approver_unavailable":{"type":"boolean","default":false},"is_active":{"type":"boolean","default":true},"request_type_codes":{"type":"array","items":{"type":"string"}},"levels":{"type":"array","items":{"type":"object","required":["level_number","title","approver_type_code"],"properties":{"level_number":{"type":"integer"},"title":{"type":"string"},"approver_type_code":{"type":"string"},"role_id":{"type":"string","format":"uuid","nullable":true},"escalation_time_days":{"type":"integer","default":2},"on_approve_move_to_next_level":{"type":"boolean","default":false},"on_reject_move_to_next_level":{"type":"boolean","default":false}}}}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","enum":["break-leave-approval-workflow"]},"in":"path","name":"slug","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"company_id":{"type":"string","format":"uuid"},"slug":{"type":"string"},"skip_if_approver_unavailable":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"request_types":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"code":{"type":"string"},"label":{"type":"string"}}}},"levels":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"workflow_id":{"type":"string","format":"uuid"},"level_number":{"type":"integer"},"title":{"type":"string"},"approver_type_code":{"type":"string"},"approver_type_label":{"type":"string","nullable":true},"requires_role":{"type":"boolean","nullable":true},"role_id":{"type":"string","format":"uuid","nullable":true},"role_name":{"type":"string","nullable":true},"escalation_time_days":{"type":"integer"},"on_approve_move_to_next_level":{"type":"boolean"},"on_reject_move_to_next_level":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete approval workflow by company and slug","tags":["HRMS — Approval Workflows"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"company_id","required":true},{"schema":{"type":"string","enum":["break-leave-approval-workflow"]},"in":"path","name":"slug","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/approval-workflows/current-aprrover/{employee_id}/{request_type_code}":{"get":{"summary":"Delete approval workflow by company and slug","tags":["HRMS — Approval Workflows"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"employee_id","required":true},{"schema":{"type":"string"},"in":"path","name":"request_type_code","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"id":{"type":"string"},"avatar_url":{"type":"string"},"type":{"type":"string"}},"required":[]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/types":{"get":{"summary":"List all active time off types","tags":["HRMS — Time Off"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number"},"code":{"type":"string"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"max_minutes":{"anyOf":[{"type":"number"},{"type":"null"}]},"max_requests":{"anyOf":[{"type":"number"},{"type":"null"}]},"is_paid":{"type":"boolean"},"requires_approval":{"type":"boolean"},"is_active":{"type":"boolean"}},"required":["id","code","name","is_paid","requires_approval","is_active"],"additionalProperties":false}}},"required":["items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/":{"post":{"summary":"Submit a time off request","tags":["HRMS — Time Off"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"time_off_type_code":{"type":"string","minLength":1},"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"start_at":{"anyOf":[{"type":"string","examples":["10:00:00+05:30"]},{"type":"null"}]},"end_at":{"anyOf":[{"type":"string","examples":["10:00:00+05:30"]},{"type":"null"}]},"duration_minutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":1000},"recipient_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"file_type":{"type":"string","maxLength":20},"file_url":{"type":"string","maxLength":255},"file_name":{"type":"string","maxLength":255},"file_size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_seconds":{"default":null,"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["file_type","file_url","file_name","file_size","duration_seconds"],"additionalProperties":false}},{"type":"null"}]}},"required":["time_off_type_code","date"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"employee_id":{"type":"string"},"time_off_type_code":{"type":"string"},"type_name":{"type":"string"},"employee_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"date":{"type":"string"},"start_at":{"type":"string"},"end_at":{"type":"string"},"duration_minutes":{"type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"time_off_request_id":{"type":"string"},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"type":"string"},"file_size":{"type":"number"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","time_off_request_id","file_type","file_url","file_name","file_size","created_at"],"additionalProperties":false}},"approver":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"approvers":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"comment":{"default":null,"anyOf":[{"type":"object","properties":{"comment":{"type":"string"},"comment_for_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["comment","comment_for_status","created_at","commenter_name","commenter_code","commenter_avatar","commenter_designation"],"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","employee_id","time_off_type_code","type_name","employee_name","date","start_at","end_at","duration_minutes","status","attachments","approver","approvers","comment","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List time off requests","tags":["HRMS — Time Off"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string"},"in":"query","name":"to_date","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"anyOf":[{"type":"string","enum":["APPROVED","REJECTED","PENDING","CANCELLED"]},{"type":"string"}]},"in":"query","name":"status","required":false},{"schema":{"anyOf":[{"type":"string","enum":["LATE_ENTRY","EARLY_EXIT","SHORT_BREAK"]},{"type":"string"}]},"in":"query","name":"time_off_type_code","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"employee_id":{"type":"string"},"time_off_type_code":{"type":"string"},"type_name":{"type":"string"},"employee_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"date":{"type":"string"},"start_at":{"type":"string"},"end_at":{"type":"string"},"duration_minutes":{"type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"time_off_request_id":{"type":"string"},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"type":"string"},"file_size":{"type":"number"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","time_off_request_id","file_type","file_url","file_name","file_size","created_at"],"additionalProperties":false}},"approver":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"approvers":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"comment":{"default":null,"anyOf":[{"type":"object","properties":{"comment":{"type":"string"},"comment_for_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["comment","comment_for_status","created_at","commenter_name","commenter_code","commenter_avatar","commenter_designation"],"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","employee_id","time_off_type_code","type_name","employee_name","date","start_at","end_at","duration_minutes","status","attachments","approver","approvers","comment","created_at","updated_at"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/{id}":{"get":{"summary":"Get a time off request by ID","tags":["HRMS — Time Off"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"employee_id":{"type":"string"},"time_off_type_code":{"type":"string"},"type_name":{"type":"string"},"employee_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"date":{"type":"string"},"start_at":{"type":"string"},"end_at":{"type":"string"},"duration_minutes":{"type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"time_off_request_id":{"type":"string"},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"type":"string"},"file_size":{"type":"number"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","time_off_request_id","file_type","file_url","file_name","file_size","created_at"],"additionalProperties":false}},"approver":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"approvers":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"comment":{"default":null,"anyOf":[{"type":"object","properties":{"comment":{"type":"string"},"comment_for_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["comment","comment_for_status","created_at","commenter_name","commenter_code","commenter_avatar","commenter_designation"],"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","employee_id","time_off_type_code","type_name","employee_name","date","start_at","end_at","duration_minutes","status","attachments","approver","approvers","comment","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a pending time off request","tags":["HRMS — Time Off"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"start_at":{"type":"string","example":"10:00:00+05:30"},"end_at":{"type":"string","example":"10:00:00+05:30"},"duration_minutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"reason":{"type":"string","maxLength":1000},"recipient_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"attachments":{"type":"array","items":{"type":"object","properties":{"file_type":{"type":"string","maxLength":20},"file_url":{"type":"string","maxLength":255},"file_name":{"type":"string","maxLength":255},"file_size":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_seconds":{"default":null,"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["file_type","file_url","file_name","file_size","duration_seconds"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"employee_id":{"type":"string"},"time_off_type_code":{"type":"string"},"type_name":{"type":"string"},"employee_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"date":{"type":"string"},"start_at":{"type":"string"},"end_at":{"type":"string"},"duration_minutes":{"type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"time_off_request_id":{"type":"string"},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"type":"string"},"file_size":{"type":"number"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","time_off_request_id","file_type","file_url","file_name","file_size","created_at"],"additionalProperties":false}},"approver":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"approvers":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"comment":{"default":null,"anyOf":[{"type":"object","properties":{"comment":{"type":"string"},"comment_for_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["comment","comment_for_status","created_at","commenter_name","commenter_code","commenter_avatar","commenter_designation"],"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","employee_id","time_off_type_code","type_name","employee_name","date","start_at","end_at","duration_minutes","status","attachments","approver","approvers","comment","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a pending or cancelled time off request","tags":["HRMS — Time Off"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/{id}/decision":{"patch":{"summary":"Approve a pending time off request","tags":["HRMS — Time Off"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approved","rejected","APPROVED","REJECTED"]},"comment":{"type":"string","maxLength":1000}},"required":["decision"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/{id}/cancel":{"post":{"summary":"Cancel own pending time off request","tags":["HRMS — Time Off"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string"},"employee_id":{"type":"string"},"time_off_type_code":{"type":"string"},"type_name":{"type":"string"},"employee_name":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"date":{"type":"string"},"start_at":{"type":"string"},"end_at":{"type":"string"},"duration_minutes":{"type":"number"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"approved_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"approved_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"attachments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"time_off_request_id":{"type":"string"},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"type":"string"},"file_size":{"type":"number"},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","time_off_request_id","file_type","file_url","file_name","file_size","created_at"],"additionalProperties":false}},"approver":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"approvers":{"default":[],"anyOf":[{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"string"}]},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"comment":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false}},{"type":"null"}]},"comment":{"default":null,"anyOf":[{"type":"object","properties":{"comment":{"type":"string"},"comment_for_status":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_code":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["comment","comment_for_status","created_at","commenter_name","commenter_code","commenter_avatar","commenter_designation"],"additionalProperties":{}},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","employee_id","time_off_type_code","type_name","employee_name","date","start_at","end_at","duration_minutes","status","attachments","approver","approvers","comment","created_at","updated_at"],"additionalProperties":false}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/{id}/comments":{"post":{"summary":"Add a comment to a time off request","tags":["HRMS — Time Off"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","minLength":1}},"required":["comment"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List comments for a time off request (paginated)","tags":["HRMS — Time Off"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"time_off_request_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"comment":{"type":"string"},"comment_for_status":{"anyOf":[{"type":"string"},{"type":"null"}]},"commented_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"commenter_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"commenter_avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"}},"required":["id","time_off_request_id","comment","created_at"],"additionalProperties":false}},"totalitems":{"type":"number"},"totalPages":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["items","totalitems","totalPages","page","limit"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/time-off/{id}/timeline":{"get":{"summary":"Get timeline for a time off request (who created, approval level remarks/actions, comments)","tags":["HRMS — Time Off"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"time_off_request_id":{"type":"string"},"current_status":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["CREATED","APPROVAL_LEVEL","COMMENT","STATUS_CHANGE"]},"title":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"remark":{"anyOf":[{"type":"string"},{"type":"null"}]},"level":{"anyOf":[{"type":"number"},{"type":"null"}]},"date":{"type":"string"},"created_at":{"type":"string"},"actor":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"role_name":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["id","type","title","date"],"additionalProperties":false}},"totalitems":{"type":"number"},"totalPages":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"}},"required":["time_off_request_id","current_status","items","totalitems"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/policy-bundles/":{"post":{"summary":"Create a new HR Policy Bundle with optional documents","tags":["HRMS — Policy Bundles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"draft","type":"string","enum":["draft","published","archived"]},"documents":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"file_url":{"type":"string","minLength":1},"file_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"file_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mime_type":{"default":"application/pdf","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","file_url","mime_type","sort_order"],"additionalProperties":false}}},"required":["name","status","documents"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List HR Policy Bundles with filtering and pagination","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","enum":["draft","published","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":true},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":true},{"schema":{"default":"created_at","type":"string"},"in":"query","name":"sort_by","required":true},{"schema":{"default":"DESC","type":"string","enum":["ASC","DESC","asc","desc"]},"in":"query","name":"sort_order","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total","page","limit"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/policy-bundles/{id}":{"get":{"summary":"Get HR Policy Bundle by ID including its documents","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update HR Policy Bundle details and/or sync its documents","tags":["HRMS — Policy Bundles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"file_url":{"type":"string","minLength":1},"file_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"file_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mime_type":{"default":"application/pdf","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","file_url","mime_type","sort_order"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Save/Update HR Policy Bundle and sync all documents in a single click","tags":["HRMS — Policy Bundles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"file_url":{"type":"string","minLength":1},"file_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"file_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mime_type":{"default":"application/pdf","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","file_url","mime_type","sort_order"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete (soft delete) HR Policy Bundle","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/policy-bundles/{id}/publish":{"post":{"summary":"Publish HR Policy Bundle","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/hr-policy-bundles/":{"post":{"summary":"Create a new HR Policy Bundle with optional documents","tags":["HRMS — Policy Bundles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"draft","type":"string","enum":["draft","published","archived"]},"documents":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"file_url":{"type":"string","minLength":1},"file_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"file_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mime_type":{"default":"application/pdf","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","file_url","mime_type","sort_order"],"additionalProperties":false}}},"required":["name","status","documents"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List HR Policy Bundles with filtering and pagination","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","enum":["draft","published","archived"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"default":20,"type":"integer","minimum":1,"maximum":100},"in":"query","name":"limit","required":true},{"schema":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"in":"query","name":"page","required":true},{"schema":{"default":"created_at","type":"string"},"in":"query","name":"sort_by","required":true},{"schema":{"default":"DESC","type":"string","enum":["ASC","DESC","asc","desc"]},"in":"query","name":"sort_order","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["data","total","page","limit"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/hr-policy-bundles/{id}":{"get":{"summary":"Get HR Policy Bundle by ID including its documents","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update HR Policy Bundle details and/or sync its documents","tags":["HRMS — Policy Bundles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"file_url":{"type":"string","minLength":1},"file_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"file_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mime_type":{"default":"application/pdf","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","file_url","mime_type","sort_order"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Save/Update HR Policy Bundle and sync all documents in a single click","tags":["HRMS — Policy Bundles"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["draft","published","archived"]},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string","minLength":1,"maxLength":255},"file_url":{"type":"string","minLength":1},"file_name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}]},"file_size":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"mime_type":{"default":"application/pdf","anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["name","file_url","mime_type","sort_order"],"additionalProperties":false}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete (soft delete) HR Policy Bundle","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/hrms/v1/hr-policy-bundles/{id}/publish":{"post":{"summary":"Publish HR Policy Bundle","tags":["HRMS — Policy Bundles"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"is_active":{"type":"boolean"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"documents":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"bundle_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"anyOf":[{"type":"number"},{"type":"string"}]},{"type":"null"}]},"mime_type":{"anyOf":[{"type":"string"},{"type":"null"}]},"effective_from":{"anyOf":[{"type":"string"},{"type":"null"}]},"sort_order":{"default":0,"anyOf":[{"type":"number"},{"type":"string"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","bundle_id","tenant_id","name","file_url","sort_order","created_at","updated_at"],"additionalProperties":false}},"document_count":{"anyOf":[{"type":"number"},{"type":"string"}]}},"required":["id","tenant_id","name","status","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/locations/":{"post":{"summary":"Create a new location","tags":["Locations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"timezone":{"default":"Asia/Kolkata","type":"string","maxLength":100},"location_type":{"default":"office","type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"default":true,"type":"boolean"}},"required":["timezone","location_type","is_active"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"location_type":{"type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","city","state","country","postal_code","timezone","location_type","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List locations","tags":["Locations"],"description":"Use query param `type` (country | state | district) to list geo hierarchy rows only. Requires `country` when type=state; requires `country` and `state` when type=district. Distinct from row field `location_type` (office, branch, etc.).","parameters":[{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"anyOf":[{"type":"string","enum":["country","state","city"]},{"type":"null"}]},"in":"query","name":"type","required":false,"description":"Geo hierarchy level: country rows, state rows, or district rows (district stored in city)"},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string","enum":["office","branch","warehouse","factory","store","other"]},"in":"query","name":"location_type","required":false},{"schema":{"type":"boolean"},"in":"query","name":"is_active","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string","enum":["ASC","DESC","asc","desc"]},"in":"query","name":"sort_order","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"location_type":{"type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","city","state","country","postal_code","timezone","location_type","is_active","created_at","updated_at"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/locations/{id}":{"get":{"summary":"Get a location by ID","tags":["Locations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"location_type":{"type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","city","state","country","postal_code","timezone","location_type","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a location","tags":["Locations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"city":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"state":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"country":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}]},"timezone":{"default":"Asia/Kolkata","type":"string","maxLength":100},"location_type":{"default":"office","type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"default":true,"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"location_type":{"type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","city","state","country","postal_code","timezone","location_type","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a location (soft delete)","tags":["Locations"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/locations/by-code/{code}":{"get":{"summary":"Get a location by code","tags":["Locations"],"parameters":[{"schema":{"type":"string"},"in":"path","name":"code","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"city":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"postal_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"timezone":{"type":"string"},"location_type":{"type":"string","enum":["office","branch","warehouse","factory","store","other"]},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","city","state","country","postal_code","timezone","location_type","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/locations/bulk-delete":{"post":{"summary":"Bulk delete locations","tags":["Locations"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["ids"]}}}},"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/holidays/":{"post":{"summary":"Create a new holiday","tags":["Holidays"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"states":{"type":"array","items":{"type":"string"}},"name":{"type":"string","minLength":1,"maxLength":255},"holiday_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"holiday_type":{"default":"public","type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"default":false,"type":"boolean"},"session":{"default":"full_day","type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"location_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"is_recurring_annually":{"default":false,"type":"boolean"},"is_active":{"default":true,"type":"boolean"}},"required":["name","holiday_date","holiday_type","is_half_day","session","classification","applies_to","is_recurring_annually","is_active"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"holiday_date":{"type":"string"},"holiday_type":{"type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"type":"boolean"},"session":{"type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"is_recurring_annually":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","calendar_id","name","holiday_date","holiday_type","description","is_half_day","session","classification","applies_to","country","state","location_coverage_type","is_recurring_annually","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List holidays","tags":["Holidays"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"session","required":false},{"schema":{"type":"string"},"in":"query","name":"classification","required":false},{"schema":{"type":"string"},"in":"query","name":"applies_to","required":false},{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"year","required":false},{"schema":{"type":"string"},"in":"query","name":"is_active","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_ids","required":false},{"schema":{"type":"string"},"in":"query","name":"calendar_id","required":false},{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"holiday_date":{"type":"string"},"holiday_type":{"type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"type":"boolean"},"session":{"type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"is_recurring_annually":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","calendar_id","name","holiday_date","holiday_type","description","is_half_day","session","classification","applies_to","country","state","location_coverage_type","is_recurring_annually","is_active","created_at","updated_at"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/holidays/{id}":{"get":{"summary":"Get a holiday by ID","tags":["Holidays"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"holiday_date":{"type":"string"},"holiday_type":{"type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"type":"boolean"},"session":{"type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"is_recurring_annually":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","calendar_id","name","holiday_date","holiday_type","description","is_half_day","session","classification","applies_to","country","state","location_coverage_type","is_recurring_annually","is_active","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a holiday","tags":["Holidays"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"states":{"type":"array","items":{"type":"string"}},"name":{"type":"string","minLength":1,"maxLength":255},"holiday_date":{"type":"string","format":"date","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))$"},"holiday_type":{"default":"public","type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"default":false,"type":"boolean"},"session":{"default":"full_day","type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"location_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"is_recurring_annually":{"default":false,"type":"boolean"},"is_active":{"default":true,"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"holiday_date":{"type":"string"},"holiday_type":{"type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"type":"boolean"},"session":{"type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"is_recurring_annually":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","calendar_id","name","holiday_date","holiday_type","description","is_half_day","session","classification","applies_to","country","state","location_coverage_type","is_recurring_annually","is_active","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a holiday (soft delete)","tags":["Holidays"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/holidays/bulk-delete":{"post":{"summary":"Bulk delete holidays","tags":["Holidays"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["ids"]}}}},"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/holidays/{id}/with-locations":{"get":{"summary":"Get a holiday with its locations","tags":["Holidays"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"holiday_date":{"type":"string"},"holiday_type":{"type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"type":"boolean"},"session":{"type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"is_recurring_annually":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"holiday_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"}},"required":["id","holiday_id","location_id","created_at"],"additionalProperties":false}}},"required":["id","calendar_id","name","holiday_date","holiday_type","description","is_half_day","session","classification","applies_to","country","state","location_coverage_type","is_recurring_annually","is_active","created_at","updated_at","locations"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/holidays/with-locations/list":{"get":{"summary":"List holidays with their locations","tags":["Holidays"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"session","required":false},{"schema":{"type":"string"},"in":"query","name":"classification","required":false},{"schema":{"type":"string"},"in":"query","name":"applies_to","required":false},{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string"},"in":"query","name":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"year","required":false},{"schema":{"type":"string"},"in":"query","name":"is_active","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_ids","required":false},{"schema":{"type":"string"},"in":"query","name":"calendar_id","required":false},{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"holiday_date":{"type":"string"},"holiday_type":{"type":"string","enum":["public","restricted","company"]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_half_day":{"type":"boolean"},"session":{"type":"string","enum":["full_day","first_half","second_half"]},"classification":{"type":"string","enum":["public","regional","company"]},"applies_to":{"type":"string","enum":["all","entire_calendar","state","location"]},"country":{"anyOf":[{"type":"string"},{"type":"null"}]},"state":{"anyOf":[{"type":"string"},{"type":"null"}]},"location_coverage_type":{"anyOf":[{"type":"string","enum":["all_in_state","selected_locations"]},{"type":"null"}]},"is_recurring_annually":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"locations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"holiday_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"location_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"created_at":{"type":"string"}},"required":["id","holiday_id","location_id","created_at"],"additionalProperties":false}}},"required":["id","calendar_id","name","holiday_date","holiday_type","description","is_half_day","session","classification","applies_to","country","state","location_coverage_type","is_recurring_annually","is_active","created_at","updated_at","locations"],"additionalProperties":false}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/v1/holidays/{id}/locations":{"post":{"summary":"Add locations to a holiday","tags":["Holidays"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"location_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["location_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Remove locations from a holiday","tags":["Holidays"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"location_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1}},"required":["location_ids"]}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"Get all locations for a holiday","tags":["Holidays"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"holiday_id":{"type":"string","format":"uuid"},"location_id":{"type":"string","format":"uuid"},"created_at":{"type":"string"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/calendars/v1/events/":{"post":{"summary":"Create a new calendar event","tags":["Calendar Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"start_datetime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","example":"2026-12-03T07:01:51.984Z"},"end_datetime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","example":"2026-12-03T07:01:51.984Z"},"is_all_day":{"type":"boolean"},"timezone":{"type":"string","maxLength":64},"is_recurring":{"type":"boolean"},"recurrence_rule":{"anyOf":[{"type":"object","properties":{"freq":{"type":"string","enum":["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"until":{"type":"string"},"byweekday":{"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"bymonth":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"bymonthday":{"type":"array","items":{"type":"integer","minimum":-31,"maximum":31}},"bysetpos":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["freq","interval"],"additionalProperties":false},{"type":"null"}]},"recurrence_end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"visibility":{"type":"string","enum":["default","public","private"]},"attendees":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"remind_before_minutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["company_id","title","start_datetime","end_datetime"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"is_all_day":{"type":"boolean"},"timezone":{"type":"string"},"is_recurring":{"type":"boolean"},"recurrence_rule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"freq":{"type":"string","enum":["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"until":{"type":"string"},"byweekday":{"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"bymonth":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"bymonthday":{"type":"array","items":{"type":"integer","minimum":-31,"maximum":31}},"bysetpos":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["freq","interval"],"additionalProperties":false},{"type":"string"}]},{"type":"null"}]},"recurrence_end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"visibility":{"type":"string","enum":["default","public","private"]},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"master_event_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_exception":{"type":"boolean"},"exception_type":{"anyOf":[{"type":"string","enum":["modified","cancelled"]},{"type":"null"}]},"original_start_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"attendees":{"type":"array","items":{"type":"object","properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"guest_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_status":{"type":"string"},"is_organizer":{"type":"boolean"}},"additionalProperties":false}},"remind_before_minutes":{"type":"number"}},"required":["id","calendar_id","title","description","location","start_datetime","end_datetime","is_all_day","timezone","is_recurring","recurrence_rule","recurrence_end_date","status","visibility","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List calendar events with filters","tags":["Calendar Events"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"calendar_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"user_id","required":false},{"schema":{"type":"string","minLength":1},"in":"query","name":"start_date","required":true},{"schema":{"type":"string","minLength":1},"in":"query","name":"end_date","required":true},{"schema":{"type":"string","enum":["confirmed","tentative","cancelled"]},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"example":"a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11","in":"header","name":"x-active-companies","required":true,"description":"Comma-separated list or single UUID of active company IDs for contextual scoping"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"is_all_day":{"type":"boolean"},"timezone":{"type":"string"},"is_recurring":{"type":"boolean"},"recurrence_rule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"freq":{"type":"string","enum":["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"until":{"type":"string"},"byweekday":{"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"bymonth":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"bymonthday":{"type":"array","items":{"type":"integer","minimum":-31,"maximum":31}},"bysetpos":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["freq","interval"],"additionalProperties":false},{"type":"string"}]},{"type":"null"}]},"recurrence_end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"visibility":{"type":"string","enum":["default","public","private"]},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"master_event_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_exception":{"type":"boolean"},"exception_type":{"anyOf":[{"type":"string","enum":["modified","cancelled"]},{"type":"null"}]},"original_start_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"attendees":{"type":"array","items":{"type":"object","properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"guest_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_status":{"type":"string"},"is_organizer":{"type":"boolean"}},"additionalProperties":false}},"remind_before_minutes":{"type":"number"}},"required":["id","calendar_id","title","description","location","start_datetime","end_datetime","is_all_day","timezone","is_recurring","recurrence_rule","recurrence_end_date","status","visibility","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}},"total":{"type":"number"}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/calendars/v1/events/{id}":{"get":{"summary":"Get a calendar event by ID","tags":["Calendar Events"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"is_all_day":{"type":"boolean"},"timezone":{"type":"string"},"is_recurring":{"type":"boolean"},"recurrence_rule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"freq":{"type":"string","enum":["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"until":{"type":"string"},"byweekday":{"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"bymonth":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"bymonthday":{"type":"array","items":{"type":"integer","minimum":-31,"maximum":31}},"bysetpos":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["freq","interval"],"additionalProperties":false},{"type":"string"}]},{"type":"null"}]},"recurrence_end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"visibility":{"type":"string","enum":["default","public","private"]},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"master_event_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_exception":{"type":"boolean"},"exception_type":{"anyOf":[{"type":"string","enum":["modified","cancelled"]},{"type":"null"}]},"original_start_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"attendees":{"type":"array","items":{"type":"object","properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"guest_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_status":{"type":"string"},"is_organizer":{"type":"boolean"}},"additionalProperties":false}},"remind_before_minutes":{"type":"number"}},"required":["id","calendar_id","title","description","location","start_datetime","end_datetime","is_all_day","timezone","is_recurring","recurrence_rule","recurrence_end_date","status","visibility","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a calendar event","tags":["Calendar Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"start_datetime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","example":"2026-12-03T07:01:51.984Z"},"end_datetime":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$","example":"2026-12-03T07:01:51.984Z"},"is_all_day":{"type":"boolean"},"timezone":{"type":"string","maxLength":64},"is_recurring":{"type":"boolean"},"recurrence_rule":{"anyOf":[{"type":"object","properties":{"freq":{"type":"string","enum":["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"until":{"type":"string"},"byweekday":{"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"bymonth":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"bymonthday":{"type":"array","items":{"type":"integer","minimum":-31,"maximum":31}},"bysetpos":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["freq","interval"],"additionalProperties":false},{"type":"null"}]},"recurrence_end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"visibility":{"type":"string","enum":["default","public","private"]},"attendees":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"remind_before_minutes":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"calendar_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"location":{"anyOf":[{"type":"string"},{"type":"null"}]},"start_datetime":{"type":"string"},"end_datetime":{"type":"string"},"is_all_day":{"type":"boolean"},"timezone":{"type":"string"},"is_recurring":{"type":"boolean"},"recurrence_rule":{"anyOf":[{"anyOf":[{"type":"object","properties":{"freq":{"type":"string","enum":["YEARLY","MONTHLY","WEEKLY","DAILY","HOURLY","MINUTELY","SECONDLY"]},"interval":{"default":1,"type":"integer","minimum":1,"maximum":9007199254740991},"count":{"type":"integer","minimum":1,"maximum":9007199254740991},"until":{"type":"string"},"byweekday":{"type":"array","items":{"type":"string","enum":["MO","TU","WE","TH","FR","SA","SU"]}},"bymonth":{"type":"array","items":{"type":"integer","minimum":1,"maximum":12}},"bymonthday":{"type":"array","items":{"type":"integer","minimum":-31,"maximum":31}},"bysetpos":{"type":"array","items":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}},"required":["freq","interval"],"additionalProperties":false},{"type":"string"}]},{"type":"null"}]},"recurrence_end_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["confirmed","tentative","cancelled"]},"visibility":{"type":"string","enum":["default","public","private"]},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"deleted_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"occurrence_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"master_event_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_exception":{"type":"boolean"},"exception_type":{"anyOf":[{"type":"string","enum":["modified","cancelled"]},{"type":"null"}]},"original_start_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"attendees":{"type":"array","items":{"type":"object","properties":{"user_id":{"anyOf":[{"type":"string"},{"type":"null"}]},"guest_email":{"anyOf":[{"type":"string"},{"type":"null"}]},"response_status":{"type":"string"},"is_organizer":{"type":"boolean"}},"additionalProperties":false}},"remind_before_minutes":{"type":"number"}},"required":["id","calendar_id","title","description","location","start_datetime","end_datetime","is_all_day","timezone","is_recurring","recurrence_rule","recurrence_end_date","status","visibility","created_by","created_at","updated_at","deleted_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a calendar event","tags":["Calendar Events"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/calendars/v1/events/{id}/exceptions":{"post":{"summary":"Create or update an event exception (modify or cancel a single occurrence of a recurring event)","tags":["Calendar Events"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"original_start_datetime":{"type":"string","minLength":1},"exception_type":{"type":"string","enum":["modified","cancelled"]},"new_start_datetime":{"type":"string"},"new_end_datetime":{"type":"string"},"new_title":{"type":"string","maxLength":500},"new_description":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_location":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["original_start_datetime","exception_type"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_event_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"original_start_datetime":{"type":"string"},"exception_type":{"type":"string","enum":["modified","cancelled"]},"new_start_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_end_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_description":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_location":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","parent_event_id","original_start_datetime","exception_type","new_start_datetime","new_end_datetime","new_title","new_description","new_location","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"Get all exceptions for a recurring event","tags":["Calendar Events"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"parent_event_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"original_start_datetime":{"type":"string"},"exception_type":{"type":"string","enum":["modified","cancelled"]},"new_start_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_end_datetime":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_title":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_description":{"anyOf":[{"type":"string"},{"type":"null"}]},"new_location":{"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","parent_event_id","original_start_datetime","exception_type","new_start_datetime","new_end_datetime","new_title","new_description","new_location","created_at","updated_at"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete an event exception (restores the original recurring occurrence)","tags":["Calendar Events"],"parameters":[{"schema":{"type":"string","minLength":1},"in":"query","name":"original_start_datetime","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/calendars/v1/":{"post":{"summary":"Create a new calendar","tags":["Calendars"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"country_code":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"year":{"type":"integer","minimum":2000,"maximum":2100},"is_default":{"default":false,"type":"boolean"},"is_active":{"default":true,"type":"boolean"}},"required":["name","year","is_default","is_active"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"type":"number"},"is_default":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"}},"required":["id","tenant_id","company_id","name","country_code","year","is_default","is_active","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List calendars","tags":["Calendars"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"type":"number"},"is_default":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"}},"required":["id","tenant_id","company_id","name","country_code","year","is_default","is_active","created_at"],"additionalProperties":false}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/calendars/v1/{id}":{"get":{"summary":"Get a calendar by ID","tags":["Calendars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"type":"number"},"is_default":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"}},"required":["id","tenant_id","company_id","name","country_code","year","is_default","is_active","created_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update a calendar","tags":["Calendars"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"country_code":{"anyOf":[{"type":"string","minLength":2,"maxLength":2},{"type":"null"}]},"year":{"type":"integer","minimum":2000,"maximum":2100},"is_default":{"default":false,"type":"boolean"},"is_active":{"default":true,"type":"boolean"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"year":{"type":"number"},"is_default":{"type":"boolean"},"is_active":{"type":"boolean"},"created_at":{"type":"string"}},"required":["id","tenant_id","company_id","name","country_code","year","is_default","is_active","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a calendar","tags":["Calendars"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Default Response"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/dashboard/v1/hrms":{"get":{"summary":"Get dashboard statistics","tags":["Dashboard"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"start_date","required":false},{"schema":{"type":"string"},"in":"query","name":"end_date","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"check_in":{"default":0,"type":"number"},"check_out":{"default":0,"type":"number"},"onLeave":{"default":0,"type":"number"},"newJoiniees":{"default":0,"type":"number"},"on_time":{"default":0,"type":"number"},"late_in":{"default":0,"type":"number"},"early_out":{"default":0,"type":"number"},"timeOff":{"default":0,"type":"number"},"absent":{"default":0,"type":"number"},"present":{"default":0,"type":"number"},"wfh":{"default":0,"type":"number"},"wfo":{"default":0,"type":"number"},"otherLocation":{"default":0,"type":"number"},"openTasks":{"default":0,"type":"number"},"avarageWorkDuration":{"default":0,"type":"number"},"avarageProductiveTime":{"default":0,"type":"number"},"productiveRate":{"default":0,"type":"number"},"total_employees":{"default":0,"type":"number"},"pendingPermissions":{"default":0,"type":"number"},"pendingLeaveRequests":{"default":0,"type":"number"},"pendingHelpDeskTickets":{"default":0,"type":"number"}},"required":["check_in","check_out","onLeave","newJoiniees","on_time","late_in","early_out","timeOff","absent","present","wfh","wfo","otherLocation","openTasks","avarageWorkDuration","avarageProductiveTime","productiveRate","total_employees","pendingPermissions","pendingLeaveRequests","pendingHelpDeskTickets"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/dashboard/v1/hrms/pending-actions":{"get":{"summary":"Get dashboard statistics","tags":["Dashboard"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"pendingPermissions":{"default":0,"type":"number"},"pendingLeaveRequests":{"default":0,"type":"number"},"pendingHelpDeskTickets":{"default":0,"type":"number"}},"required":["pendingPermissions","pendingLeaveRequests","pendingHelpDeskTickets"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/":{"post":{"summary":"Create a new task","tags":["Task — Tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"tentative_start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"remind_before_minutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"frequency":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}]},"repeat_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"repeat_unit":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}]},"ends_type":{"anyOf":[{"type":"string","enum":["never","on_date","after"]},{"type":"null"}]},"ends_on_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends_after_count":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tagged_members":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},{"type":"null"}]}},"required":["title"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"tentative_start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"remind_before_minutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"frequency":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}]},"repeat_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"repeat_unit":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}]},"ends_type":{"anyOf":[{"type":"string","enum":["never","on_date","after"]},{"type":"null"}]},"ends_on_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends_after_count":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tagged_members":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},{"type":"null"}]}},"required":["title"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List tasks","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string"},"in":"query","name":"to_date","required":false},{"schema":{"type":"string"},"in":"query","name":"due_date","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"creator_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_ids","required":false},{"schema":{"type":"string"},"in":"query","name":"completed_range","required":false},{"schema":{"type":"string"},"in":"query","name":"category_code","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_by","required":false},{"schema":{"type":"string"},"in":"query","name":"sort_order","required":false},{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"assignee_id","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"status_code","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"priority_code","required":false},{"schema":{"type":"string","enum":["delayed","on time","overdue"]},"in":"query","name":"timeline_status","required":false},{"schema":{"type":"boolean"},"in":"query","name":"is_unassigned","required":false},{"schema":{"type":"boolean"},"in":"query","name":"no_due_date","required":false},{"schema":{"type":"boolean"},"in":"query","name":"is_overdue","required":false},{"schema":{"type":"boolean"},"in":"query","name":"assigned_to_me","required":false},{"schema":{"type":"boolean"},"in":"query","name":"assigned_by_me","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"limit":{"type":"number"},"totalPages":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_number":{"type":"number"},"title":{"type":"string"},"status_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"stage":{"anyOf":[{"anyOf":[{"type":"string","enum":["overdue","todo","in_progress","done"]},{"type":"string"}]},{"type":"null"}]},"priority_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"tentative_start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"spent_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"difference":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeline_status":{"anyOf":[{"anyOf":[{"type":"string","enum":["delayed","on_time",""]},{"type":"string"}]},{"type":"null"}]},"delayed_by_days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"assignee":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"reviewers":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_reviewed":{"default":false,"type":"boolean"},"rating":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","name","avatar_url","is_reviewed","rating"],"additionalProperties":false}},{"type":"null"}]},"company_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"completed_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","task_number","title","status_code","priority_code","due_date","due_time","tentative_start_date","estimated_time","creator","assignee","company_ids"],"additionalProperties":false}}},"required":["message","totalitems","limit","totalPages","items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/snapshot/by-assignee":{"get":{"summary":"Task snapshot grouped by assignee (includes W.Time and P.Time for the date range)","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"creator_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_ids","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"category_code","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"assignee_id","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"priority_code","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"status_code","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to_date","required":false},{"schema":{"type":"string","enum":["delayed","on time","overdue"]},"in":"query","name":"timeline_status","required":false},{"schema":{"type":"boolean"},"in":"query","name":"is_overdue","required":false},{"schema":{"type":"boolean"},"in":"query","name":"assigned_to_me","required":false},{"schema":{"type":"boolean"},"in":"query","name":"assigned_by_me","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"group_id":{"type":"string","nullable":true},"group_name":{"type":"string","nullable":true},"avatar_url":{"type":"string","nullable":true},"task_count":{"type":"number"},"todo_count":{"type":"number"},"in_progress_count":{"type":"number"},"done_count":{"type":"number"},"completed_count":{"type":"number"},"in_review_count":{"type":"number"},"cancelled_count":{"type":"number"},"total_estimated_time":{"type":"string","nullable":true},"total_spent_time":{"type":"string","nullable":true},"rating":{"type":"number","nullable":true},"is_star_employee":{"type":"boolean"},"is_favorite":{"type":"boolean"},"task_ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"designation":{"type":"string","nullable":true},"total_w_time":{"type":"string","nullable":true},"total_p_time":{"type":"string","nullable":true},"productive_time_log_count":{"type":"number"},"daily_work_log_count":{"type":"number"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/snapshot/by-department":{"get":{"summary":"Task snapshot grouped by department","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"creator_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string"},"in":"query","name":"company_ids","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"category_code","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"assignee_id","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"priority_code","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"status_code","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to_date","required":false},{"schema":{"type":"string","enum":["delayed","on time","overdue"]},"in":"query","name":"timeline_status","required":false},{"schema":{"type":"boolean"},"in":"query","name":"is_overdue","required":false},{"schema":{"type":"boolean"},"in":"query","name":"assigned_to_me","required":false},{"schema":{"type":"boolean"},"in":"query","name":"assigned_by_me","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"group_id":{"type":"string","nullable":true},"group_name":{"type":"string","nullable":true},"avatar_url":{"type":"string","nullable":true},"task_count":{"type":"number"},"todo_count":{"type":"number"},"in_progress_count":{"type":"number"},"done_count":{"type":"number"},"completed_count":{"type":"number"},"in_review_count":{"type":"number"},"cancelled_count":{"type":"number"},"total_estimated_time":{"type":"string","nullable":true},"total_spent_time":{"type":"string","nullable":true},"rating":{"type":"number","nullable":true},"is_star_employee":{"type":"boolean"},"is_favorite":{"type":"boolean"},"task_ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"assignee_ids":{"type":"array","items":{"type":"string","format":"uuid"},"nullable":true},"assignee_count":{"type":"number"},"total_w_time":{"type":"string","nullable":true},"total_p_time":{"type":"string","nullable":true}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{id}":{"get":{"summary":"Get task by ID","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_number":{"type":"number"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"assignee":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"tentative_start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"spent_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"difference":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeline_status":{"anyOf":[{"anyOf":[{"type":"string","enum":["delayed","on_time",""]},{"type":"string"}]},{"type":"null"}]},"delayed_by_days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"remind_before_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"frequency":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"repeat_interval":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"repeat_unit":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"ends_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"ends_on_date":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"tagged_members":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false}},"reviewers":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false}},"company_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"company_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_number","title","description","status_code","priority_code","creator","assignee","parent_id","due_date","due_time","tentative_start_date","estimated_time","remind_before_minutes","frequency","repeat_interval","repeat_unit","ends_type","ends_on_date","tagged_members","reviewers","company_ids","company_id","attachments","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update task by ID","tags":["Task — Tasks"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":500},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"assignee_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"tentative_start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"remind_before_minutes":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"frequency":{"anyOf":[{"type":"string","enum":["daily","weekly","monthly","yearly"]},{"type":"null"}]},"repeat_interval":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"repeat_unit":{"anyOf":[{"type":"string","enum":["day","week","month","year"]},{"type":"null"}]},"ends_type":{"anyOf":[{"type":"string","enum":["never","on_date","after"]},{"type":"null"}]},"ends_on_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"ends_after_count":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"tagged_members":{"anyOf":[{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},{"type":"null"}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},{"type":"null"}]},"is_reminder_sent":{"type":"boolean"},"remind_at":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_number":{"type":"number"},"title":{"type":"string"},"description":{"anyOf":[{"type":"string"},{"type":"null"}]},"status_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority_code":{"anyOf":[{"type":"string"},{"type":"null"}]},"creator":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"assignee":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"due_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"due_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"tentative_start_date":{"anyOf":[{"type":"string"},{"type":"null"}]},"estimated_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"spent_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"difference":{"anyOf":[{"type":"string"},{"type":"null"}]},"timeline_status":{"anyOf":[{"anyOf":[{"type":"string","enum":["delayed","on_time",""]},{"type":"string"}]},{"type":"null"}]},"delayed_by_days":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status_label":{"anyOf":[{"type":"string"},{"type":"null"}]},"remind_before_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"frequency":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"repeat_interval":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"repeat_unit":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"ends_type":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"ends_on_date":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"tagged_members":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false}},"reviewers":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false}},"company_ids":{"default":[],"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"company_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_number","title","description","status_code","priority_code","creator","assignee","parent_id","due_date","due_time","tentative_start_date","estimated_time","remind_before_minutes","frequency","repeat_interval","repeat_unit","ends_type","ends_on_date","tagged_members","reviewers","company_ids","company_id","attachments","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete task by ID","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/insight":{"get":{"summary":"Task insight","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"assignee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string"},"in":"query","name":"to_date","required":false},{"schema":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"in":"query","name":"priority_code","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"stageWise":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"filterKey":{"type":"string"},"filterValue":{"type":"string"},"count":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["label","filterKey","filterValue","count"],"additionalProperties":false}},"Planner":{"type":"number","minimum":0},"Achievements":{"type":"number","minimum":0}},"required":["stageWise","Planner","Achievements"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/stages":{"post":{"summary":"Create a new stage (status)","tags":["Task — Stages & Priorities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"category_code":{"type":"string","minLength":1,"maxLength":20},"description":{"default":"","type":"string"},"position":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["name","category_code","description"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"category_code":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","category_code","tenant_id","name","position"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List all stages (statuses)","tags":["Task — Stages & Priorities"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Search stage or priority name/code"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"category_code":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","category_code","tenant_id","name","position"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/stages/categories":{"get":{"summary":"List task stage categories","tags":["Task — Stages & Priorities"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"code":{"type":"string"},"name":{"type":"string"}},"required":["code","name"]}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/stages/reposition":{"patch":{"summary":"Reposition stages (bulk update positions)","tags":["Task — Stages & Priorities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"position":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","position"],"additionalProperties":false}}},"required":["stages"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"category_code":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","category_code","tenant_id","name","position"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/stages/{id}":{"patch":{"summary":"Update a stage (name, code, category_code, position)","tags":["Task — Stages & Priorities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":50},"category_code":{"type":"string","minLength":1,"maxLength":20},"description":{"default":"","type":"string"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"category_code":{"type":"string"},"category":{"anyOf":[{"type":"string"},{"type":"null"}]},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"position":{"anyOf":[{"type":"number"},{"type":"null"}]},"description":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","code","category_code","tenant_id","name","position"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a stage","tags":["Task — Stages & Priorities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted successfully"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/priorities":{"get":{"summary":"List all priorities","tags":["Task — Stages & Priorities"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"search","required":false,"description":"Search stage or priority name/code"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"number"},"is_default":{"type":"boolean"}},"required":["id","name","priority","is_default"],"additionalProperties":false}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"post":{"summary":"Create a new priority","tags":["Task — Stages & Priorities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":20},"is_default":{"type":"boolean"},"priority":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["name"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"number"},"is_default":{"type":"boolean"}},"required":["id","name","priority","is_default"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/priorities/reposition":{"patch":{"summary":"Reposition priorities (bulk update ranks)","tags":["Task — Stages & Priorities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"priorities":{"minItems":1,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"priority":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["id","priority"],"additionalProperties":false}}},"required":["priorities"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"number"},"is_default":{"type":"boolean"}},"required":["id","name","priority","is_default"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/priorities/{id}":{"patch":{"summary":"Update a priority (name, code, color)","tags":["Task — Stages & Priorities"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":20},"is_default":{"type":"boolean"},"priority":{"type":"integer","minimum":1,"maximum":9007199254740991}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"priority":{"type":"number"},"is_default":{"type":"boolean"}},"required":["id","name","priority","is_default"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a priority","tags":["Task — Stages & Priorities"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted successfully"},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/metadata":{"get":{"summary":"Get task statuses and priorities","tags":["Task — Tasks"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"query","name":"project_id","required":false,"description":"Optionally scope to a project"}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"statuses":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"name":{"type":"string"},"position":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["id","code","name","position"],"additionalProperties":false}},"priorities":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"code":{"type":"string"},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"color":{"anyOf":[{"type":"string"},{"type":"null"}]},"is_default":{"default":false,"anyOf":[{"type":"boolean"},{"type":"null"}]}},"required":["id","code","name","color","is_default"],"additionalProperties":false}}},"required":["statuses","priorities"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{taskId}/comments":{"post":{"summary":"Add a comment to task","tags":["Task — Comments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","minLength":1},"parent_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},{"type":"null"}]}},"required":["comment"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"comment":{"type":"string"},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","author_id","author","parent_id","comment","attachments","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List comments for a task","tags":["Task — Comments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"comment":{"type":"string"},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"},"replies":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"comment":{"type":"string"},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","author_id","author","parent_id","comment","attachments","created_at","updated_at"],"additionalProperties":false}}},"required":["id","task_id","author_id","author","parent_id","comment","attachments","created_at","updated_at","replies"],"additionalProperties":false}}},"required":["message","items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{taskId}/comments/{commentId}":{"patch":{"summary":"Update a comment","tags":["Task — Comments"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","minLength":1},"attachments":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"parent_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"comment":{"type":"string"},"attachments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_type":{"type":"string"},"file_url":{"type":"string"},"file_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_size":{"anyOf":[{"type":"number"},{"type":"null"}]},"duration_seconds":{"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["file_type","file_url"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","author_id","author","parent_id","comment","attachments","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a comment","tags":["Task — Comments"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"commentId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{taskId}/reviews":{"post":{"summary":"Submit task for review","tags":["Task — Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ratings":{"default":0,"type":"number","minimum":0,"maximum":5},"is_reviewed":{"default":false,"type":"boolean"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["ratings","is_reviewed"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"is_reviewed":{"type":"boolean"},"ratings":{"default":0,"type":"number"},"feedback":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"comments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"review_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"comment":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","review_id","author_id","author","comment","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","reviewer_id","reviewer","is_reviewed","ratings","feedback","comments","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List review requests for a task","tags":["Task — Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"is_reviewed":{"type":"boolean"},"ratings":{"default":0,"type":"number"},"feedback":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"comments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"review_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"comment":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","review_id","author_id","author","comment","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","reviewer_id","reviewer","is_reviewed","ratings","feedback","comments","created_at","updated_at"],"additionalProperties":false}}},"required":["message","items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{taskId}/reviews/{reviewId}":{"get":{"summary":"Get review request by ID","tags":["Task — Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"reviewId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"is_reviewed":{"type":"boolean"},"ratings":{"default":0,"type":"number"},"feedback":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"comments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"review_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"comment":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","review_id","author_id","author","comment","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","reviewer_id","reviewer","is_reviewed","ratings","feedback","comments","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update review request (feedback / status / reviewer)","tags":["Task — Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ratings":{"type":"number","minimum":0,"maximum":5},"is_reviewed":{"type":"boolean"},"feedback":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"reviewId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"reviewer_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"reviewer":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"is_reviewed":{"type":"boolean"},"ratings":{"default":0,"type":"number"},"feedback":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"comments":{"default":[],"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"review_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"comment":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","review_id","author_id","author","comment","created_at","updated_at"],"additionalProperties":false}},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","task_id","reviewer_id","reviewer","is_reviewed","ratings","feedback","comments","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a review request","tags":["Task — Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"reviewId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{taskId}/reviews/{reviewId}/comments":{"post":{"summary":"Add a comment to a review request","tags":["Task — Reviews"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"comment":{"type":"string","minLength":1}},"required":["comment"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"reviewId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"review_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"comment":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","review_id","author_id","author","comment","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List comments for a review request","tags":["Task — Reviews"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"reviewId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"review_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"author":{"default":null,"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"comment":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","review_id","author_id","author","comment","created_at","updated_at"],"additionalProperties":false}}},"required":["message","items"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/{taskId}/activity-logs":{"get":{"summary":"Get activity logs for a task","tags":["Task — Activity Logs"],"parameters":[{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"number"},"in":"query","name":"page","required":false},{"schema":{"type":"string","format":"uuid"},"in":"path","name":"taskId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"totalitems":{"type":"number"},"totalPages":{"type":"number"},"page":{"type":"number"},"limit":{"type":"number"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"task_id":{"type":"string","format":"uuid"},"employee_id":{"type":"string","format":"uuid","nullable":true},"formatted_message":{"type":"string"},"created_at":{"type":"string"},"updated_at":{"type":"string"}}}}}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/daily-work-logs":{"post":{"summary":"Add a daily work log","tags":["Task — Daily Work Logs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"log_date":{"description":"Log date in YYYY-MM-DD format (e.g. \"2026-11-30\"). Defaults to current date if omitted.","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activity":{"type":"string","minLength":1,"description":"Detailed description of work done (e.g. \"Cold calls and client prospecting\", \"Customer support ticket resolution\")"},"time_spent":{"description":"Time spent on activity. Formats supported: \"1h 30m\", \"01:30\", \"45m\", \"2h\", \"90m\"","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"Completed","description":"Status of the activity log (e.g. \"Completed\", \"In Progress\")","anyOf":[{"type":"string"},{"type":"null"}]},"remarks":{"description":"Optional remarks or notes (e.g. \"Called 45 prospective leads, scheduled 12 follow-ups\")","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["activity","status"],"additionalProperties":false},"examples":{"example1":{"value":{"log_date":"2026-11-30","activity":"Cold calls and client prospecting","time_spent":"1h 30m","status":"Completed","remarks":"Called 45 prospective leads, scheduled 12 follow-ups"}},"example2":{"value":{"log_date":"2026-11-30","activity":"Customer support ticket resolution","time_spent":"02:15","status":"Completed","remarks":"Resolved 8 tier-2 customer support tickets"}}}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"Completed","anyOf":[{"type":"string"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","status","remarks","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List daily work logs","tags":["Task — Daily Work Logs"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to_date","required":false},{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"number"},"in":"query","name":"page","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"Completed","anyOf":[{"type":"string"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","status","remarks","created_at","updated_at"],"additionalProperties":false}},"totalitems":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["message","items","totalitems"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/daily-work-logs/{id}":{"get":{"summary":"Get daily work log by ID","tags":["Task — Daily Work Logs"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"Completed","anyOf":[{"type":"string"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","status","remarks","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update daily work log","tags":["Task — Daily Work Logs"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"log_date":{"description":"Log date in YYYY-MM-DD format (e.g. \"2026-11-30\")","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activity":{"description":"Detailed description of work done","type":"string","minLength":1},"time_spent":{"description":"Time spent on activity (e.g. \"1h 30m\", \"01:30\", \"45m\", \"2h\")","anyOf":[{"type":"string"},{"type":"null"}]},"status":{"description":"Status of the activity log (e.g. \"Completed\")","anyOf":[{"type":"string"},{"type":"null"}]},"remarks":{"description":"Optional remarks or notes","anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"example":{"log_date":"2026-11-30","activity":"Cold calls and client prospecting (updated)","time_spent":"2h 00m","status":"Completed","remarks":"Updated lead count to 52 callers"}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"default":"Completed","anyOf":[{"type":"string"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","status","remarks","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete daily work log","tags":["Task — Daily Work Logs"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted successfully"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/productive-time":{"post":{"summary":"Submit a productive time request","tags":["Task — Productive Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"log_date":{"description":"Log date in YYYY-MM-DD format (e.g. \"2026-11-30\")","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activity":{"type":"string","minLength":1,"description":"Productive work activity description (e.g. \"Sprint planning sync and architecture review\")"},"time_spent":{"type":"string","minLength":1,"description":"Time spent on activity. Formats supported: \"1h 30m\", \"01:30\", \"45m\", \"2h\", \"90m\""},"duration_minutes":{"description":"Duration in minutes (optional, auto-calculated from time_spent if omitted)","type":"integer","minimum":0,"maximum":9007199254740991},"remarks":{"description":"Optional remarks or notes","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["activity","time_spent"],"additionalProperties":false},"examples":{"example1":{"value":{"log_date":"2026-11-30","activity":"Sprint planning sync and architecture review","time_spent":"1h 30m","remarks":"Aligned on Q3 engineering roadmap"}},"example2":{"value":{"log_date":"2026-11-30","activity":"Code review and deployment monitoring","time_spent":"02:15","remarks":"Reviewed PR #142 and verified staging deploy"}}}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List productive time requests","tags":["Task — Productive Time"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"status","required":false},{"schema":{"type":"string"},"in":"query","name":"search","required":false},{"schema":{"type":"string"},"in":"query","name":"view_type","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"from_date","required":false},{"schema":{"type":"string","format":"date"},"in":"query","name":"to_date","required":false},{"schema":{"type":"number"},"in":"query","name":"limit","required":false},{"schema":{"type":"number"},"in":"query","name":"page","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}},"totalitems":{"type":"integer","minimum":0,"maximum":9007199254740991},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"totalPages":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["message","items","totalitems"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/productive-time/{id}":{"get":{"summary":"Get productive time request by ID","tags":["Task — Productive Time"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"patch":{"summary":"Update pending productive time request","tags":["Task — Productive Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"log_date":{"description":"Log date in YYYY-MM-DD format (e.g. \"2026-11-30\")","type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"activity":{"description":"Productive work activity description","type":"string","minLength":1},"time_spent":{"description":"Time spent on activity. Formats supported: \"1h 30m\", \"01:30\", \"45m\", \"2h\"","type":"string","minLength":1},"duration_minutes":{"description":"Duration in minutes","type":"integer","minimum":0,"maximum":9007199254740991},"remarks":{"description":"Optional remarks or notes","anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false},"example":{"log_date":"2026-11-30","activity":"Sprint planning sync and architecture review (updated)","time_spent":"2h 00m","remarks":"Extended discussion with design lead"}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete pending productive time request","tags":["Task — Productive Time"],"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"204":{"description":"Deleted successfully"},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/productive-time/{id}/cancel":{"post":{"summary":"Cancel own pending productive time request (Creator / Owner only)","tags":["Task — Productive Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remarks":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/productive-time/{id}/action":{"post":{"summary":"Approve or reject a productive time request (Manager / Deputy Manager)","tags":["Task — Productive Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"action":{"type":"string","enum":["approve","reject","cancel","APPROVE","REJECT","CANCEL"]},"status":{"type":"string","enum":["Approved","Rejected","Cancelled","APPROVED","REJECTED","CANCELLED","approved","rejected","cancelled"]},"remarks":{"anyOf":[{"type":"string"},{"type":"null"}]},"reason":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/productive-time/{id}/approve":{"post":{"summary":"Approve a productive time request (Reporting Manager or Deputy Manager)","tags":["Task — Productive Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remarks":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/task/v1/tasks/productive-time/{id}/reject":{"post":{"summary":"Reject a productive time request (Reporting Manager or Deputy Manager)","tags":["Task — Productive Time"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"remarks":{"type":"string","nullable":true},"reason":{"type":"string","nullable":true}}}}}},"parameters":[{"schema":{"type":"string","format":"uuid"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"},"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"employee_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"log_date":{"type":"string"},"activity":{"type":"string"},"time_spent":{"type":"string"},"duration_minutes":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string","enum":["Pending","Approved","Rejected","Cancelled"]},"approver_id":{"default":null,"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"acted_at":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"approver_remarks":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"created_at":{"type":"string"},"updated_at":{"type":"string"},"employee":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]},"approver":{"anyOf":[{"type":"object","properties":{"id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"name":{"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","avatar_url"],"additionalProperties":false},{"type":"null"}]}},"required":["id","tenant_id","employee_id","log_date","activity","time_spent","duration_minutes","remarks","status","approver_id","acted_at","approver_remarks","created_at","updated_at"],"additionalProperties":false}}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/xmpp/v1/token":{"get":{"summary":"Generates an ejabberd-compatible JWT token for XMPP SASL authentication. Defaults to the authenticated user handle if logged in, or accepts a `username` query parameter.","tags":["XMPP"],"description":"Get ejabberd JWT conversation history","security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","description":"JWT token to authenticate against ejabberd XMPP server"},"jid":{"type":"string","description":"Full JID of user, e.g. user@domain"},"username":{"type":"string","description":"Clean username or localpart of JID"},"domain":{"type":"string","description":"XMPP domain"},"expiresIn":{"type":"number","description":"Token expiration duration or format"},"wsUrl":{"description":"WebSocket URL for XMPP connection","type":"string"},"name":{"type":"string"},"initials":{"type":"string"},"tone":{"type":"number"}},"required":["token","jid","username","domain","expiresIn","name","initials"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/xmpp/v1/conversations":{"post":{"summary":"Fetch XMPP conversation history","tags":["XMPP"],"description":"Get ejabberd JWT conversation history","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"limit":{"anyOf":[{"type":"number","minimum":1},{"type":"null"}]},"offset":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}]},"chattoken":{"anyOf":[{"type":"string"},{"type":"null"}]}},"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"totalCount":{"default":0,"type":"number","exclusiveMinimum":0},"conversations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"jid":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"username":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"online":{"type":"boolean"},"time":{"type":"string"},"last":{"type":"string"},"unread":{"type":"number"},"tone":{"type":"number"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","jid","username","name","role","online","time","last","unread","tone","avatar_url"],"additionalProperties":false}}},"required":["totalCount","conversations"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/xmpp/v1/user-info/{userId}":{"get":{"summary":"Fetch XMPP conversation history","tags":["XMPP"],"description":"Get ejabberd JWT conversation history","parameters":[{"schema":{"type":"string"},"in":"path","name":"userId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"},"role":{"type":"string"},"avatar_url":{"type":"string","nullable":true}},"required":["name","role","avatar_url"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/storage":{"get":{"summary":"Get organization document storage usage and quota","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"company_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"quota_bytes":{"type":"string"},"used_bytes":{"type":"string"},"available_bytes":{"type":"string"},"percentage_used":{"type":"number"},"updated_at":{"type":"string"}},"required":["tenant_id","quota_bytes","used_bytes","available_bytes","percentage_used","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update organization document storage quota","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"quota_bytes":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"string","pattern":"^\\d+$"}]}},"required":["quota_bytes"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"quota_bytes":{"type":"string"},"used_bytes":{"type":"string"},"available_bytes":{"type":"string"},"percentage_used":{"type":"number"},"updated_at":{"type":"string"}},"required":["tenant_id","quota_bytes","used_bytes","available_bytes","percentage_used","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/categories":{"post":{"summary":"Create a document category","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"required":["name","company_ids"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"name":{"type":"string"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","tenant_id","company_ids","name","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List document categories","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string","maxLength":100},"in":"query","name":"search","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"name":{"type":"string"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","tenant_id","company_ids","name","created_at","updated_at"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/categories/{id}":{"patch":{"summary":"Update a document category","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"name":{"type":"string"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","tenant_id","company_ids","name","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"put":{"summary":"Update a document category","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"company_ids":{"minItems":1,"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"tenant_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"company_ids":{"type":"array","items":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"name":{"type":"string"},"created_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"created_at":{"type":"string"},"updated_at":{"type":"string"}},"required":["id","tenant_id","company_ids","name","created_at","updated_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a document category","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/folders":{"post":{"summary":"Create a document folder","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"storage_bytes":{"type":"string"},"is_shared":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","category_id","owner_user_id","owner_name","file_count","storage_bytes","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"List folders created by or shared with the current user","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"parent_folder_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"employee_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"storage_bytes":{"type":"string"},"is_shared":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","category_id","owner_user_id","owner_name","file_count","storage_bytes","created_at"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/folders/{id}":{"patch":{"summary":"Update a document folder (name, parent folder, or category)","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"parent_folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"file_count":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"storage_bytes":{"type":"string"},"is_shared":{"type":"boolean"},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","category_id","owner_user_id","owner_name","file_count","storage_bytes","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"delete":{"summary":"Delete a document folder and all its contents","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/folders/delete-multiple":{"post":{"summary":"Delete multiple document folders and all their contents","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"folder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"minItems":1,"description":"Array of folder IDs to delete"}},"required":["folder_ids"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"deleted_count":{"type":"integer"},"folder_ids":{"type":"array","items":{"type":"string","format":"uuid"}}},"required":["success","message","deleted_count","folder_ids"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/folders/{id}/access":{"get":{"summary":"List folder access grants","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":["null","string"]},"user_name":{"type":["null","string"]},"name":{"type":["null","string"]},"user_email":{"type":["null","string"]},"role_id":{"type":["null","string"]},"role_name":{"type":["null","string"]},"department_id":{"type":["null","string"]},"department_name":{"type":["null","string"]},"permission":{"type":"string","enum":["view","edit"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","permission","created_at"],"additionalProperties":true}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/folders/{id}/share":{"post":{"summary":"Share a folder with users, roles, or departments","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"default":"view","type":"string","enum":["view","edit"]}},"required":["user_id","permission"],"additionalProperties":false}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/folders/{id}/access/{accessId}":{"delete":{"summary":"Revoke folder access","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"accessId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files":{"get":{"summary":"List files for a company and folder","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"company_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"folder_id","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"category_id","required":false},{"schema":{"type":"string","maxLength":255},"in":"query","name":"search","required":false},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"query","name":"employee_id","required":false}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"storage_key":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"string"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"owner_name":{"anyOf":[{"type":"string"},{"type":"null"}]},"uploaded_by":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"updated_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"is_shared":{"type":"boolean"}},"required":["id","name","storage_key","mime_type","size_bytes","owner_user_id","created_at","owner_name","uploaded_by","updated_at"],"additionalProperties":false}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/uploads/presigned-url":{"post":{"summary":"Create a short-lived Azure Blob upload URL","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"content_type":{"type":"string","minLength":1,"maxLength":255},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["file_name","content_type"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"upload_url":{"type":"string"},"method":{"default":"PUT","type":"string"},"blob_name":{"type":"string"},"expires_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},"headers":{"type":"object","properties":{"x-ms-blob-type":{"type":"string"},"Content-Type":{"type":"string"}},"required":["x-ms-blob-type","Content-Type"],"additionalProperties":{"type":"string"}}},"required":["upload_url","method","blob_name","expires_at","headers"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/uploads/complete":{"post":{"summary":"Verify an uploaded blob and save its metadata","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_name":{"type":"string","minLength":1,"maxLength":255},"content_type":{"type":"string","minLength":1,"maxLength":255},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"blob_name":{"type":"string","minLength":1,"maxLength":1024}},"required":["file_name","content_type","blob_name"],"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"storage_key":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"string"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","storage_key","mime_type","size_bytes","owner_user_id","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"409":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}/move":{"patch":{"summary":"Move a file to another folder","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"target_folder_id":{"type":["string","null"],"format":"uuid"}},"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"storage_key":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"string"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","storage_key","mime_type","size_bytes","owner_user_id","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}/rename":{"patch":{"summary":"Rename a file (owner only)","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":255},"target_folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"storage_key":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"string"},"company_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"folder_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"category_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"owner_user_id":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"created_at":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"}},"required":["id","name","storage_key","mime_type","size_bytes","owner_user_id","created_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}":{"delete":{"summary":"Delete a document file (including Azure blob storage)","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"}},"required":["success"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}},"get":{"summary":"Get a short-lived download URL for an accessible file","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}/access":{"get":{"summary":"List file access grants","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"user_id":{"type":["null","string"]},"user_name":{"type":["null","string"]},"name":{"type":["null","string"]},"user_email":{"type":["null","string"]},"role_id":{"type":["null","string"]},"role_name":{"type":["null","string"]},"department_id":{"type":["null","string"]},"department_name":{"type":["null","string"]},"permission":{"type":"string","enum":["view","edit"]},"created_at":{"type":"string","format":"date-time"}},"required":["id","permission","created_at"],"additionalProperties":true}}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}/share":{"post":{"summary":"Share a file with a user, role, or department","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"minItems":1,"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"permission":{"default":"view","type":"string","enum":["view","edit"]}},"required":["user_id","permission"],"additionalProperties":false}}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/download":{"post":{"summary":"Get a short-lived Azure SAS URL for a single file download","tags":["Documents"],"description":"Bulk and folder zip download is temporarily disabled. Pass exactly one file_id.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid","description":"Single file ID to download (preferred)"},"file_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"File IDs (exactly one supported; bulk temporarily disabled)","maxItems":1},"folder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Folder download temporarily disabled"}},"additionalProperties":false}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"download_url":{"type":"string"},"expires_at":{"type":"string","format":"date-time"}},"required":["download_url","expires_at"],"additionalProperties":false}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/share-multiple":{"post":{"summary":"Share multiple files and folders","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of file IDs to share"},"folder_ids":{"type":"array","items":{"type":"string","format":"uuid"},"description":"Array of folder IDs to share"},"recipients":{"type":"array","items":{"type":"object","properties":{"user_id":{"type":"string","format":"uuid"},"permission":{"type":"string","enum":["view","edit"],"default":"view"}},"required":["user_id"],"additionalProperties":false},"description":"Array of users to share with and their permission (view or edit)"}},"required":["recipients"],"additionalProperties":true}}}},"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"message":{"type":"string"},"shared_files_count":{"type":"integer"},"shared_folders_count":{"type":"integer"},"grants_count":{"type":"integer"},"files":{"type":"array","items":{"type":"object","properties":{"file_id":{"type":"string","format":"uuid"},"access":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["file_id","access"],"additionalProperties":true}},"folders":{"type":"array","items":{"type":"object","properties":{"folder_id":{"type":"string","format":"uuid"},"access":{"type":"array","items":{"type":"object","additionalProperties":true}}},"required":["folder_id","access"],"additionalProperties":true}}},"required":["success","message","shared_files_count","shared_folders_count","grants_count"],"additionalProperties":true}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}/access/{accessId}":{"delete":{"summary":"Revoke file access","tags":["Documents"],"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"accessId","required":true}],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"}},"required":["success"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/files/{id}/share-link":{"post":{"summary":"Create a share link for a file","tags":["Documents"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"audience":{"default":"organization","type":"string","enum":["organization","anyone_with_link"]},"permission":{"default":"view","type":"string","enum":["view","edit"]},"expires_at":{"anyOf":[{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"},{"type":"null"}]},"require_login":{"default":false,"type":"boolean"},"block_download":{"default":false,"type":"boolean"},"block_printing":{"default":false,"type":"boolean"}},"required":["audience","permission","require_login","block_download","block_printing"],"additionalProperties":false}}}},"parameters":[{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"security":[{"bearerAuth":[]}],"responses":{"201":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"publicUrl":{"type":"string"}},"required":["publicUrl"]}}}},"400":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"401":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"403":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}},"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}},"/documents/v1/public/files/{id}/access":{"get":{"summary":"Access a file using its share token","tags":["Documents"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"token","required":true},{"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"in":"path","name":"id","required":true}],"responses":{"404":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","additionalProperties":true},"requestId":{"type":"string"}},"required":["code","message","requestId"]}}}}}}}},"servers":[{"url":"http://localhost:3002","description":"development"},{"url":"https://hrms-api.wayvidaerp.in","description":"QA"},{"url":"https://web.wayvidaerp.in/api","description":"Fronend proxy in qa"}],"tags":[{"name":"System","description":"Health and readiness"},{"name":"Platform — Auth","description":"Login, refresh, logout"},{"name":"Platform — Users","description":"Session user profile"},{"name":"Portal","description":"Wrapper launcher bootstrap"},{"name":"HRMS","description":"HR product API"}]}