{"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":{"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,}$"},{"type":"null"}],"description":"User email address","example":"user@email.com"},"user_identity":{"anyOf":[{"type":"string"},{"type":"null"}]},"password":{"type":"string","minLength":1}},"required":["password"],"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"},"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"}]},"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"},"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)$"},"products":{"type":"array","items":{"type":"string","enum":["hrms","crm","accounting"]}}},"required":["id","employeeId","email","displayName","tenantId","activeCompanyId","products"],"additionalProperties":false}},"required":["accessToken","refreshToken","tokenType","expiresIn","user"],"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/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/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"}]},"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":["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"},"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"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{"type":"object","properties":{"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"}},"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":["companies"],"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}":{"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"}]},"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"}]}},"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"},"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"},"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","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-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":{"get":{"summary":"List branches","tags":["Platform - Org"],"parameters":[{"schema":{"type":"string"},"in":"query","name":"status","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":{"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","name","code","status","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"]}}}}}}},"/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/org/companies/{company_id}/branches/{branch_id}":{"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/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","enum":["hrms","crm","accounting"]}},"locale":{"type":"string"},"timezone":{"type":"string"}},"required":["id","email","displayName","tenantId","activeCompanyId","companyIds","companies","products","locale","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","enum":["hrms","crm","accounting"]}}},"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"},"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","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","enum":["hrms","crm","accounting"]},"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","format":"uuid"},{"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","format":"uuid"},{"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":{"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},"code_format":{"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},"hierarchy_rule":{"type":"object","properties":{"enable_designation_hierarchy":{"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","prevent_circular_hierarchy","root_designation_id"],"additionalProperties":false}},"required":["general","code_format","hierarchy_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/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"},"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","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"},"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","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"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","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":{"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"}]},"hod_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"default":null,"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"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","hod","hod_name","hod_avatar_url","hod_designation","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"},"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"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","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":{"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"}]},"hod_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"default":null,"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"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","hod","hod_name","hod_avatar_url","hod_designation","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":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"code":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","code"]},{"type":"null"}]},"hod":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid"},"name":{"type":"string"},"employee_code":{"type":"string"}},"required":["id","name","employee_code"]},{"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/{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"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","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":{"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"}]},"hod_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"default":null,"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"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","hod","hod_name","hod_avatar_url","hod_designation","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"},"designation":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","name","role_type","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":{"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"}]},"hod_name":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_avatar_url":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"hod_designation":{"default":null,"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"}]}},"required":["id","tenant_id","name","code","parent_department_id","parent_department","hod","hod_name","hod_avatar_url","hod_designation","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)$"},"joining_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])))$"},"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"}]}},"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":{"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])))$"},"grade_percentage":{"anyOf":[{"type":"number"},{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["account_holder_name","bank_name","account_number","ifsc_code"],"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":{"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"}]},"hr_policy_group_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":null,"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"work_location":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"grace_period":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"grace_period_unit":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"work_from_home_allowed":{"default":null,"anyOf":[{"type":"boolean"},{"type":"null"}]},"monthly_wfh_days":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]}},"required":["shift_id","role_id","leave_policy_id","hr_policy_group_id","weekly_off","work_location","grace_period","grace_period_unit","work_from_home_allowed","monthly_wfh_days"],"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":{"type":"string"},"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"}]}},"required":["contract_type"],"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)$"},"employee_code":{"type":"string"},"full_name":{"type":"string"},"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"}]},"phone":{"anyOf":[{"type":"string"},{"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"}]},"department":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"highest_education":{"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_education":{"anyOf":[{"type":"string"},{"type":"null"}]},"total_experience":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_tenure":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_start_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_end_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"leave_policy":{"anyOf":[{"type":"string"},{"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"}]}},"required":["id","employee_code","full_name","joining_date","department","designation","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"]}}}},"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":{"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)$"},"employee_code":{"type":"string"},"full_name":{"type":"string"},"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"}]},"phone":{"anyOf":[{"type":"string"},{"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"}]},"department":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"highest_education":{"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_education":{"anyOf":[{"type":"string"},{"type":"null"}]},"total_experience":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_tenure":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_start_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_end_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"leave_policy":{"anyOf":[{"type":"string"},{"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"}]}},"required":["id","employee_code","full_name","joining_date","department","designation","status"],"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/{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)$"},"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"}]},"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"}]}},"required":["id","tenant_id","company_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","other_email","other_phone","whatsapp","email","phone","other_whatsapp"],"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"},"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","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)))$"},"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","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":{"type":"number"},"latitude":{"type":"number"},"radius":{"type":"number"}},"required":["longitude","latitude","radius"],"additionalProperties":false},"office_geo_location":{"type":"object","properties":{"longitude":{"type":"number"},"latitude":{"type":"number"},"radius":{"type":"number"}},"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"}]},"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"}]},"hr_policy_group_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","leave_policy_id","hr_policy_group_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)$"},"joining_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])))$"},"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"}]}},"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":{"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])))$"},"grade_percentage":{"anyOf":[{"type":"number"},{"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":{"anyOf":[{"type":"string"},{"type":"null"}]},"account_type":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["account_holder_name","bank_name","account_number","ifsc_code"],"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"}},"additionalProperties":false}},{"type":"null"}]},"work_info":{"anyOf":[{"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"}]},"hr_policy_group_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":null,"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"work_location":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"grace_period":{"default":null,"anyOf":[{"type":"number"},{"type":"null"}]},"grace_period_unit":{"default":null,"anyOf":[{"type":"string"},{"type":"null"}]},"work_from_home_allowed":{"default":null,"anyOf":[{"type":"boolean"},{"type":"null"}]},"monthly_wfh_days":{"default":null,"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"}},"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"}},"additionalProperties":false}},{"type":"null"}]},"contract_info":{"anyOf":[{"type":"object","properties":{"contract_type":{"type":"string"},"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)$"},"employee_code":{"type":"string"},"full_name":{"type":"string"},"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"}]},"phone":{"anyOf":[{"type":"string"},{"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"}]},"department":{"anyOf":[{"type":"string"},{"type":"null"}]},"designation":{"anyOf":[{"type":"string"},{"type":"null"}]},"status":{"type":"string"},"avatar_url":{"anyOf":[{"type":"string"},{"type":"null"}]},"highest_education":{"anyOf":[{"type":"string"},{"type":"null"}]},"relevant_education":{"anyOf":[{"type":"string"},{"type":"null"}]},"total_experience":{"anyOf":[{"type":"string"},{"type":"null"}]},"company_tenure":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_start_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"shift_end_time":{"anyOf":[{"type":"string"},{"type":"null"}]},"leave_policy":{"anyOf":[{"type":"string"},{"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"}]}},"required":["id","employee_code","full_name","joining_date","department","designation","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"]}}}},"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/settings/":{"get":{"summary":"Get employee module settings","tags":["Core Domains — Employees Settings"],"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"401":{"description":"Default Response","content":{"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":{}}}},"security":[{"bearerAuth":[]}],"responses":{"200":{"description":"Default Response","content":{"application/json":{"schema":{}}}},"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},"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+)?)?$"},"working_days":{"minItems":1,"type":"array","items":{"type":"string","enum":["sun","mon","tue","wed","thu","fri","sat"]}}},"required":["name","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"},"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","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}],"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"},"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","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"},"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","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},"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+)?)?$"},"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"},"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","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":"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":"employee_id","required":false},{"schema":{"type":"string"},"in":"query","name":"to_date","required":false},{"schema":{"type":"string"},"in":"query","name":"from_date","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":{"type":"number"},"full_name":{"type":"string"},"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"},"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"}]},"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"},"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":[{"type":"string"},{"type":"null"}]}},"required":["employee_id","attendance_id","full_name","check_in","check_out","total_hours","break_minutes","overtime_minutes","designation","department","location_type","mode","check_in_offset","check_out_offset","productive_time","status","attendance_date","leave"],"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/{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"},"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","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-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"}]}},"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"}]}},"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"}]}},"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)$"}},"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}],"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)$"}},"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)$"}},"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}}},"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)$"}},"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"}]}},"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"},"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}},"approver":{"type":"object","properties":{"name":{"type":"string"},"status":{"anyOf":[{"type":"string"},{"type":"null"}]},"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"avatar":{"anyOf":[{"type":"string"},{"type":"null"}]},"can_take_action":{"default":false,"type":"boolean"}},"required":["name","id","can_take_action"],"additionalProperties":false},"leave_balance":{"anyOf":[{"type":"object","properties":{"opening":{"type":"string"},"accrued":{"type":"string"},"expired":{"type":"string"},"availed":{"type":"string"},"hold":{"type":"string"},"closing":{"type":"string"}},"required":["opening","accrued","expired","availed","hold","closing"],"additionalProperties":false},{"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","approver"],"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}],"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"}},"required":["leave_type_id","code","title","opening","accrued","expired","availed","hold","closing","available"],"additionalProperties":false}}},"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}/{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"}]}},"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"}]}},"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"}]},"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/my-team/":{"get":{"summary":"Get all leave requests","tags":["HRMS — My Team"],"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"]}}}}}}}}},"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/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"},"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"}]},"rejected_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejected_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection_reason":{"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":{"type":"object","properties":{"name":{"type":"string"},"avatar":{"type":"string"},"id":{"type":"string"},"can_take_action":{"default":false,"type":"boolean"},"status":{"type":"string"}},"required":["name","avatar","id","can_take_action","status"],"additionalProperties":false},"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","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":"status","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":"time_off_type_code","required":false},{"schema":{"type":"string"},"in":"query","name":"limit","required":false},{"schema":{"type":"string"},"in":"query","name":"page","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"},"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"}]},"rejected_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejected_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection_reason":{"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":{"type":"object","properties":{"name":{"type":"string"},"avatar":{"type":"string"},"id":{"type":"string"},"can_take_action":{"default":false,"type":"boolean"},"status":{"type":"string"}},"required":["name","avatar","id","can_take_action","status"],"additionalProperties":false},"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","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"},"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"}]},"rejected_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejected_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection_reason":{"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":{"type":"object","properties":{"name":{"type":"string"},"avatar":{"type":"string"},"id":{"type":"string"},"can_take_action":{"default":false,"type":"boolean"},"status":{"type":"string"}},"required":["name","avatar","id","can_take_action","status"],"additionalProperties":false},"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","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"},"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"}]},"rejected_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejected_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection_reason":{"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":{"type":"object","properties":{"name":{"type":"string"},"avatar":{"type":"string"},"id":{"type":"string"},"can_take_action":{"default":false,"type":"boolean"},"status":{"type":"string"}},"required":["name","avatar","id","can_take_action","status"],"additionalProperties":false},"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","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"},"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"}]},"rejected_by":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejected_at":{"anyOf":[{"type":"string"},{"type":"null"}]},"rejection_reason":{"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":{"type":"object","properties":{"name":{"type":"string"},"avatar":{"type":"string"},"id":{"type":"string"},"can_take_action":{"default":false,"type":"boolean"},"status":{"type":"string"}},"required":["name","avatar","id","can_take_action","status"],"additionalProperties":false},"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","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"]}}}}}}},"/api/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"],"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":"state","required":false},{"schema":{"type":"string"},"in":"query","name":"country","required":false},{"schema":{"type":"string"},"in":"query","name":"location_type","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}],"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"]}}}}}}},"/api/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"]}}}}}}},"/api/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"]}}}}}}},"/api/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"]}}}}}}},"/api/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)$"},"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":"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}],"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"]}}}}}}},"/api/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)$"},"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"]}}}}}}},"/api/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"]}}}}}}},"/api/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"]}}}}}}},"/api/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":"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}],"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"]}}}}}}},"/api/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"]}}}}}}},"/api/v1/calendars/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-10-03T06:20:49.951Z"},"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-10-03T06:20:49.951Z"},"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"]}}}}}}},"/api/v1/calendars/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-10-03T06:20:49.951Z"},"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-10-03T06:20:49.951Z"},"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"]}}}}}}},"/api/v1/calendars/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"]}}}}}}},"/api/v1/calendars":{"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"]}}}}}}},"/api/v1/calendars/{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"},"on_time":{"default":0,"type":"number"},"late_in":{"default":0,"type":"number"},"early_out":{"default":0,"type":"number"},"shortBreak":{"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","on_time","late_in","early_out","shortBreak","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"]}}}}}}},"/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"}]},"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"}]},"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":"department_id","required":false},{"schema":{"type":"string"},"in":"query","name":"creator_id","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}],"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"}]},"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"}]}},"required":["id","task_number","title","status_code","priority_code","due_date","due_time","tentative_start_date","estimated_time","assignee"],"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":{"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}],"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"},"total_estimated_time":{"type":"string","nullable":true},"total_spent_time":{"type":"string","nullable":true},"designation":{"type":"string","nullable":true},"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/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":{"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}],"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"},"total_estimated_time":{"type":"string","nullable":true},"total_spent_time":{"type":"string","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"}]},"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}},"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","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"}]},"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"}]},"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}},"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","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/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"},"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","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","format":"uuid"},"in":"query","name":"project_id","required":false,"description":"Filter by project"}],"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"},"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","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/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"},"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","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"},"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","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","format":"uuid"},"in":"query","name":"project_id","required":false,"description":"Filter by project"}],"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"}]}},"required":["id","code","name","color"],"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"}]}},"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"]}}}}}}}},"servers":[{"url":"http://localhost:3002","description":"development"},{"url":"https://hrms-api.wayvidaerp.in","description":"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"}]}