{"openapi":"3.1.0","info":{"title":"Mellow API","version":"1.1.0","description":"The Mellow public API — manage employees, payslips, leave, pensions, RTI, pay runs, compliance, onboarding, time, performance, recruitment and AI agents across UK, Ireland, USA, UAE, India and Australia. Authenticate with a Bearer API key (sk_live_* / sk_test_*)."},"servers":[{"url":"https://mellow-production.up.railway.app/api","description":"Production"}],"paths":{"/v1/absence/balances":{"get":{"operationId":"listAbsenceBalances","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List leave balances per employee","tags":["Absence"],"security":[{"bearerAuth":[]}]}},"/v1/absence/bank-holidays":{"get":{"operationId":"listBankHolidays","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List bank holidays for the organisation","tags":["Absence"],"security":[{"bearerAuth":[]}]}},"/v1/absence/calendar":{"get":{"operationId":"getAbsenceCalendar","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve the team absence calendar","tags":["Absence"],"security":[{"bearerAuth":[]}]}},"/v1/agents":{"get":{"operationId":"listAgents","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List available AI agents","tags":["Agents"],"security":[{"bearerAuth":[]}]}},"/v1/agents/query":{"post":{"operationId":"queryAgent","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Query a specific Mellow AI agent","tags":["Agents"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"agent_id":{"type":"string","minLength":1,"maxLength":64},"message":{"type":"string","minLength":1,"maxLength":2000},"context":{"type":"object","properties":{"employee_id":{"type":"string"},"topic":{"type":"string","maxLength":32}}}},"required":["agent_id","message"]}}}}}},"/v1/ai/query":{"post":{"operationId":"queryEmber","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Ask the Employee Assistant a question","tags":["AI"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","minLength":1,"maxLength":2000},"context":{"type":"object","properties":{"employee_id":{"type":"string"},"topic":{"type":"string","enum":["payroll","leave","compliance","general"]}}}},"required":["message"]}}}}}},"/v1/compliance/alerts":{"get":{"operationId":"listComplianceAlerts","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List compliance alerts","tags":["Compliance"],"security":[{"bearerAuth":[]}]}},"/v1/compliance/checks":{"get":{"operationId":"listComplianceChecks","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List compliance checks","tags":["Compliance"],"security":[{"bearerAuth":[]}]}},"/v1/compliance/deadlines":{"get":{"operationId":"listComplianceDeadlines","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List upcoming compliance deadlines","tags":["Compliance"],"security":[{"bearerAuth":[]}]}},"/v1/compliance/policies":{"get":{"operationId":"listPolicies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List company policies","tags":["Compliance"],"security":[{"bearerAuth":[]}]}},"/v1/compliance/rtw":{"get":{"operationId":"listRightToWork","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List right-to-work checks","tags":["Compliance"],"security":[{"bearerAuth":[]}]},"post":{"operationId":"recordRightToWork","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Record a right-to-work check","tags":["Compliance"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_name":{"type":"string","minLength":1,"maxLength":200},"document_type":{"type":"string","minLength":1,"maxLength":200},"expiry_date":{"type":"string"},"country":{"type":"string","enum":["GB","IE","US","AE","IN","AU"]}},"required":["employee_name","document_type"]}}}}}},"/v1/contracts/generate":{"post":{"operationId":"generateContract","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Generate an employment contract","tags":["Contracts"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","minLength":1,"maxLength":200},"salary_pence":{"type":"integer","minimum":0},"start_date":{"type":"string","minLength":1},"working_hours":{"type":"number","minimum":0,"maximum":168},"country":{"type":"string","enum":["GB","IE","US","AE","IN","AU"]}},"required":["employee_name","role","salary_pence","start_date"]}}}}}},"/v1/employees":{"get":{"operationId":"listEmployees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List employees","tags":["Employees"],"security":[{"bearerAuth":[]}]},"post":{"operationId":"createEmployee","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Create an employee","tags":["Employees"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"date_of_birth":{"type":"string","minLength":1},"job_title":{"type":"string","minLength":1,"maxLength":150},"department":{"type":"string","maxLength":150},"division":{"type":"string","maxLength":150},"start_date":{"type":"string","minLength":1},"salary_pence":{"type":"string","pattern":"^\\d+$"},"employment_type":{"type":"string","enum":["full_time","part_time","contractor"]},"ni_number":{"type":"string","maxLength":20},"line_manager_id":{"type":"string"}},"required":["first_name","last_name","email","date_of_birth","job_title","start_date","employment_type"]}}}}}},"/v1/employees/{employeeId}":{"delete":{"operationId":"deleteEmployee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Soft-delete an employee","tags":["Employees"],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]},"get":{"operationId":"getEmployee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve an employee","tags":["Employees"],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]},"patch":{"operationId":"updateEmployee","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Update an employee","tags":["Employees"],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"first_name":{"type":"string","minLength":1,"maxLength":100},"last_name":{"type":"string","minLength":1,"maxLength":100},"email":{"type":"string","format":"email"},"job_title":{"type":"string","minLength":1,"maxLength":150},"department":{"type":"string","maxLength":150,"nullable":true},"division":{"type":"string","maxLength":150,"nullable":true},"employment_type":{"type":"string","enum":["full_time","part_time","contractor"]},"salary_pence":{"type":"string","pattern":"^\\d+$"},"ni_number":{"type":"string","maxLength":20},"line_manager_id":{"type":"string","nullable":true}}}}}}}},"/v1/employees/{employeeId}/leave":{"get":{"operationId":"listEmployeeLeave","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List an employee's leave requests","tags":["Leave"],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/employees/{employeeId}/payslips":{"get":{"operationId":"listEmployeePayslips","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List an employee's payslips","tags":["Payslips"],"parameters":[{"name":"employeeId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/leave":{"get":{"operationId":"listLeave","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List leave requests","tags":["Leave"],"security":[{"bearerAuth":[]}]},"post":{"operationId":"createLeave","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Create a leave request","tags":["Leave"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_id":{"type":"string","minLength":1},"leave_type":{"type":"string","enum":["annual","sick","maternity","paternity","compassionate","other"]},"start_date":{"type":"string","minLength":1},"end_date":{"type":"string","minLength":1},"notes":{"type":"string","maxLength":2000}},"required":["employee_id","leave_type","start_date","end_date"]}}}}}},"/v1/leave/{leaveId}":{"delete":{"operationId":"deleteLeave","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Cancel a leave request","tags":["Leave"],"parameters":[{"name":"leaveId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]},"get":{"operationId":"getLeave","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve a leave request","tags":["Leave"],"parameters":[{"name":"leaveId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]},"patch":{"operationId":"updateLeave","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Update a leave request","tags":["Leave"],"parameters":[{"name":"leaveId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","enum":["requested","approved","declined","cancelled","taken"]},"notes":{"type":"string","maxLength":2000},"decline_reason":{"type":"string","maxLength":500}}}}}}}},"/v1/onboarding":{"get":{"operationId":"listOnboardings","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List active onboardings","tags":["Onboarding"],"security":[{"bearerAuth":[]}]}},"/v1/onboarding/{onboardingId}/tasks/{taskId}/complete":{"post":{"operationId":"completeOnboardingTask","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Mark an onboarding task as complete","tags":["Onboarding"],"parameters":[{"name":"onboardingId","in":"path","required":true,"schema":{"type":"string"}},{"name":"taskId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"notes":{"type":"string","maxLength":2000}}}}}}}},"/v1/onboarding/start":{"post":{"operationId":"startOnboarding","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Start onboarding for a new starter","tags":["Onboarding"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_name":{"type":"string","minLength":1,"maxLength":200},"role":{"type":"string","minLength":1,"maxLength":200},"department":{"type":"string","maxLength":200},"start_date":{"type":"string","minLength":1},"country":{"type":"string","enum":["GB","IE","US","AE","IN","AU"]}},"required":["employee_name","role"]}}}}}},"/v1/onboarding/templates":{"get":{"operationId":"listOnboardingTemplates","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List onboarding templates","tags":["Onboarding"],"security":[{"bearerAuth":[]}]}},"/v1/organisation":{"get":{"operationId":"getOrganisation","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve the calling organisation","tags":["Organisation"],"security":[{"bearerAuth":[]}]}},"/v1/organisation/departments":{"get":{"operationId":"listDepartments","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List departments","tags":["Organisation"],"security":[{"bearerAuth":[]}]}},"/v1/organisation/locations":{"get":{"operationId":"listLocations","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List organisation locations","tags":["Organisation"],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs":{"get":{"operationId":"listPayRuns","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List pay runs","tags":["Payroll"],"security":[{"bearerAuth":[]}]},"post":{"operationId":"createPayRun","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Create a pay run","tags":["Payroll"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tax_year":{"type":"string","minLength":1,"maxLength":20},"pay_period":{"type":"integer","minimum":1,"maximum":52},"pay_frequency":{"type":"string","enum":["MONTHLY","WEEKLY","FORTNIGHTLY","FOUR_WEEKLY"]},"period_start":{"type":"string","minLength":1},"period_end":{"type":"string","minLength":1},"payment_date":{"type":"string","minLength":1}},"required":["tax_year","pay_period","pay_frequency","period_start","period_end","payment_date"]}}}}}},"/v1/pay-runs/{payRunId}":{"get":{"operationId":"getPayRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve a pay run","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs/{payRunId}/approve":{"post":{"operationId":"approvePayRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Approve a pay run","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs/{payRunId}/bacs":{"get":{"operationId":"getPayRunBacs","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Generate the BACS Standard 18 file for a pay run (UK only)","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs/{payRunId}/calculate":{"post":{"operationId":"calculatePayRun","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Trigger calculation of a pay run","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs/{payRunId}/payslips":{"get":{"operationId":"listPayRunPayslips","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List payslips for a pay run","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs/{payRunId}/rti-status":{"get":{"operationId":"getPayRunRtiStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve RTI submission status for a pay run (UK only)","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/pay-runs/{payRunId}/wps":{"get":{"operationId":"getPayRunWps","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Generate the UAE WPS SIF file for a pay run (UAE only)","tags":["Payroll"],"parameters":[{"name":"payRunId","in":"path","required":true,"schema":{"type":"string"}}],"security":[{"bearerAuth":[]}]}},"/v1/payslips":{"get":{"operationId":"listPayslips","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List payslips","tags":["Payslips"],"security":[{"bearerAuth":[]}]}},"/v1/pensions":{"get":{"operationId":"listPensions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List pension contributions","tags":["Pensions"],"security":[{"bearerAuth":[]}]}},"/v1/performance/objectives":{"get":{"operationId":"listObjectives","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List performance objectives","tags":["Performance"],"security":[{"bearerAuth":[]}]}},"/v1/performance/reviews":{"get":{"operationId":"listReviewCycles","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List performance review cycles","tags":["Performance"],"security":[{"bearerAuth":[]}]}},"/v1/practice":{"get":{"operationId":"getPractice","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve the practice for the authenticated key","tags":["Practice"],"security":[{"bearerAuth":[]}]}},"/v1/practice/clients":{"get":{"operationId":"listPracticeClients","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List the practice clients with stats","tags":["Practice"],"security":[{"bearerAuth":[]}]},"post":{"operationId":"addPracticeClient","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Add a client organisation to the practice","tags":["Practice"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"country_code":{"type":"string","enum":["GB","IE","US","AE","IN","AU"],"default":"GB"},"region_code":{"type":"string","maxLength":20}},"required":["name"]}}}}}},"/v1/practice/compliance":{"get":{"operationId":"getPracticeCompliance","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Compliance overview for every practice client","tags":["Practice"],"security":[{"bearerAuth":[]}]}},"/v1/practice/employees":{"get":{"operationId":"listPracticeEmployees","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List employees across all practice clients","tags":["Practice"],"security":[{"bearerAuth":[]}]}},"/v1/practice/payroll":{"get":{"operationId":"getPracticePayroll","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Payroll status for every practice client","tags":["Practice"],"security":[{"bearerAuth":[]}]}},"/v1/recruitment/applications":{"get":{"operationId":"listApplications","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List applications","tags":["Recruitment"],"security":[{"bearerAuth":[]}]}},"/v1/recruitment/vacancies":{"get":{"operationId":"listVacancies","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List vacancies","tags":["Recruitment"],"security":[{"bearerAuth":[]}]}},"/v1/rti":{"get":{"operationId":"getRtiStatus","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Retrieve RTI submission status","tags":["RTI"],"security":[{"bearerAuth":[]}]}},"/v1/time/clock-in":{"post":{"operationId":"clockIn","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Clock an employee in","tags":["Time"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_id":{"type":"string","minLength":1},"work_type":{"type":"string","enum":["OFFICE","WFH","SITE","TRAVEL"],"default":"OFFICE"},"notes":{"type":"string","maxLength":2000}},"required":["employee_id"]}}}}}},"/v1/time/clock-out":{"post":{"operationId":"clockOut","responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"Clock an employee out","tags":["Time"],"security":[{"bearerAuth":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"employee_id":{"type":"string","minLength":1},"notes":{"type":"string","maxLength":2000},"break_minutes":{"type":"integer","minimum":0,"maximum":1440}},"required":["employee_id"]}}}}}},"/v1/time/timesheets":{"get":{"operationId":"listTimesheets","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{},"pagination":{}},"required":["data"]}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required or failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Authorization failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"summary":"List timesheets","tags":["Time"],"security":[{"bearerAuth":[]}]}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"API key or OAuth access token."}},"schemas":{"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["code","message","details","request_id","documentation_url"],"properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"issue":{"type":"string"}}}},"request_id":{"type":"string"},"documentation_url":{"type":"string","format":"uri"}}}}}}}}