{"openapi":"3.1.0","info":{"title":"Lightning Payroll API","description":"Backend services for the Lightning Payroll web & mobile apps, partner white-label integrations, OAuth-based partner onboarding, and AU/NZ payroll compliance (Superstream, payday filing).","version":"0.1.0"},"paths":{"/api/company/{company_id}":{"delete":{"tags":["Company"],"summary":"Delete Company","description":"Delete a company by its ID. Only accessible to users with permission.","operationId":"delete_company_api_company__company_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Company"],"summary":"Get Company","description":"Get detailed company data (including basic info on all employees) by ID.","operationId":"get_company_api_company__company_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1}],"responses":{"200":{"description":"The company.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Company"],"summary":"Patch Company","description":"Partial **update** – supply only the fields you want to change.\nAn empty body is permitted (no-op).  \nTo clear a value entirely, pass it as `null` (provided the DB column is\nnullable).","operationId":"patch_company_api_company__company_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"Company ID","title":"Company Id"},"description":"Company ID","example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPartialUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/pay-rates":{"get":{"tags":["Company"],"summary":"Get Company Pay Rates","description":"Get company pay rates grouped by award and classification (company pay-rate group). By default this returns all awards, including a no-award bucket where `award_id`/`award_name` are null. Use `award` and/or `classification` query filters to narrow results by id or exact name (case-insensitive). Set `include_employees=true` to include employee summaries for each classification.\n\nEach returned pay rate includes a stable `reference` value in the format `company:{id}`. That reference can be supplied as `hours[].rate_reference` in `/api/company/{company_id}/pays/create` so your integration can map external award-engine outputs to LP company rates without sending a fixed dollar rate.","operationId":"get_company_pay_rates_api_company__company_id__pay_rates_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"award","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional award selector. Match by award id or exact name (case-insensitive). Use `none` or `null` for no-award classifications.","title":"Award"},"description":"Optional award selector. Match by award id or exact name (case-insensitive). Use `none` or `null` for no-award classifications.","example":"Hospitality Award"},{"name":"classification","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional classification selector. Match by company pay-rate group id or exact group name (case-insensitive).","title":"Classification"},"description":"Optional classification selector. Match by company pay-rate group id or exact group name (case-insensitive).","example":"Level 1"},{"name":"include_employees","in":"query","required":false,"schema":{"type":"boolean","description":"Set to `true` to include employees nested under each classification with `id`, `format_name`, and `number`.","default":false,"title":"Include Employees"},"description":"Set to `true` to include employees nested under each classification with `id`, `format_name`, and `number`.","example":false}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyPayRatesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/redirect/company/{company_id}":{"get":{"tags":["Company"],"summary":"Redirect an authenticated user straight to the Pays screen for the given company.","description":"Authenticated helper that mirrors selecting a company then navigating to the Pays screen.\n\nIt validates the user's access to the company, updates the customer's default company,\nand issues a 302 redirect to the front-end route that will open Pays for that company.","operationId":"redirect_to_company_pays_api_redirect_company__company_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"Target company id to open in the UI.","title":"Company Id"},"description":"Target company id to open in the UI."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/allowances":{"get":{"tags":["Company"],"summary":"List Company Allowances","description":"List every allowance defined on a company.\n\nCompany allowances are company-wide templates that can be attached to any number of employees. When a pay is created, each attached allowance with `auto_apply_to_pay` set is copied onto that pay.\n\nThose copies hold no link back to the template, so editing or deleting an allowance never alters a pay that has already been processed.","operationId":"list_company_allowances_api_company__company_id__allowances_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowancesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Company"],"summary":"Create Company Allowance","description":"Create a company allowance.\n\nCompany allowances are company-wide templates that can be attached to any number of employees. When a pay is created, each attached allowance with `auto_apply_to_pay` set is copied onto that pay.\n\nThose copies hold no link back to the template, so editing or deleting an allowance never alters a pay that has already been processed.\n\n`description` and `amount` are required. `description` must not already be used by another allowance in this company, including any employee's own allowances, because that string is the grouping key for YTD and STP reporting.\n\nFor Australian companies `allowance_category` is required and cannot be `Unclassified`, since an unclassified allowance cannot be lodged through STP.","operationId":"create_company_allowance_api_company__company_id__allowances_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceRead"}}}},"404":{"description":"Not found"},"400":{"description":"Invalid allowance data. For example a missing or `Unclassified` `allowance_category` on an Australian company, a description that is blank, too long, or contains characters the ATO rejects for STP, an `amount` of zero or less, an explicit `null`, or an `employee_ids` entry that belongs to another company or has been deleted."},"409":{"description":"An allowance with that description already exists in the same scope: for a company allowance, any other company allowance or any employee's own allowance; for an employee allowance, that employee's other allowances or a company allowance."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/allowances/{allowance_id}":{"get":{"tags":["Company"],"summary":"Get Company Allowance","description":"Get a single company allowance by ID.","operationId":"get_company_allowance_api_company__company_id__allowances__allowance_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceRead"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Company"],"summary":"Patch Company Allowance","description":"Partially update a company allowance. Supply only the fields you want to change; an empty body is a no-op.\n\nRenaming an allowance changes the template only. Pays already processed keep the description they were paid under, so a payslip reprint still matches the one the employee was given.\n\nBe aware that the description is part of the grouping key for YTD and STP reporting, so renaming an allowance part way through a financial year reports it as two separate allowances for the rest of that year. Pass `propagate_description_to_history=true` to carry the new description onto the pays this allowance has already been paid on, which keeps those totals together.\n\nSupplying `employee_ids` replaces the entire set of attached employees. Omit it to leave attachments untouched.","operationId":"patch_company_allowance_api_company__company_id__allowances__allowance_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"propagate_description_to_history","in":"query","required":false,"schema":{"type":"boolean","description":"Set to `true` to also rename this allowance on pays that have already been processed, so YTD and STP totals stay under one description. Only this allowance's own pay lines are touched: other employees keep their own allowances, and no other allowance record is altered.","default":false,"title":"Propagate Description To History"},"description":"Set to `true` to also rename this allowance on pays that have already been processed, so YTD and STP totals stay under one description. Only this allowance's own pay lines are touched: other employees keep their own allowances, and no other allowance record is altered.","example":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceRead"}}}},"404":{"description":"Not found"},"400":{"description":"Invalid allowance data. For example a missing or `Unclassified` `allowance_category` on an Australian company, a description that is blank, too long, or contains characters the ATO rejects for STP, an `amount` of zero or less, an explicit `null`, or an `employee_ids` entry that belongs to another company or has been deleted."},"409":{"description":"An allowance with that description already exists in the same scope: for a company allowance, any other company allowance or any employee's own allowance; for an employee allowance, that employee's other allowances or a company allowance."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Company"],"summary":"Delete Company Allowance","description":"Delete a company allowance.\n\nReturns `409` if the allowance is still attached to any employee, listing their IDs. Repeat the request with `force=true` to detach those employees and delete in one step.\n\nPays already processed are unaffected: they hold their own copy of the allowance and no link back to this record.","operationId":"delete_company_allowance_api_company__company_id__allowances__allowance_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"force","in":"query","required":false,"schema":{"type":"boolean","description":"Set to `true` to detach any attached employees and delete anyway.","default":false,"title":"Force"},"description":"Set to `true` to detach any attached employees and delete anyway.","example":false}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Not found"},"409":{"description":"The allowance is still attached to one or more employees. Retry with `force=true` to detach them and delete."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/create":{"put":{"tags":["Company"],"summary":"Create Company","description":"Create a **new** company record.\n\n* `id` is **ignored** if supplied (it is generated by Lightning Payroll).\n* `employees` may be omitted (you can add them later).","operationId":"create_company_api_company_create_put","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Company"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/company":{"get":{"tags":["Company"],"summary":"Get All Companies","description":"Get detailed list of all accessible companies, including basic employee information.","operationId":"get_all_companies_api_company_get","responses":{"200":{"description":"Every company you can access.","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/Company"},"type":"array","title":"Response 200 Get All Companies Api Company Get"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/company/{company_id}/employees":{"get":{"tags":["Employee"],"summary":"Get Employees","description":"Get detailed info for all employees in a company.\n\nBy default this returns every employee who has not been deleted, which includes terminated employees. Use the `status` filter to narrow that down, or to reach deleted employees, which are otherwise never returned.\n\nEmployees are always ordered by last name, then first name, then middle name.","operationId":"get_employees_api_company__company_id__employees_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["active","terminated","deleted","all"],"type":"string"},{"type":"null"}],"description":"Filter employees by lifecycle state. Omit for the default, which is every employee who has not been deleted.\n\n- `active`: still employed. Neither terminated nor deleted.\n- `terminated`: employment has ended, but the employee has not been deleted. These are also included in the default response.\n- `deleted`: deleted employees only. These are hidden from every other response, but still hold their `number`, so this is how you find the record blocking an `employee_number` you want to reuse. Restore one with `POST /api/employees/{employee_id}/restore`.\n- `all`: every employee regardless of state.\n\n`active` and `terminated` together make up the default response.","title":"Status"},"description":"Filter employees by lifecycle state. Omit for the default, which is every employee who has not been deleted.\n\n- `active`: still employed. Neither terminated nor deleted.\n- `terminated`: employment has ended, but the employee has not been deleted. These are also included in the default response.\n- `deleted`: deleted employees only. These are hidden from every other response, but still hold their `number`, so this is how you find the record blocking an `employee_number` you want to reuse. Restore one with `POST /api/employees/{employee_id}/restore`.\n- `all`: every employee regardless of state.\n\n`active` and `terminated` together make up the default response.","example":"active"}],"responses":{"200":{"description":"Every employee in the company matching the requested status.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/Employee"},"title":"Response 200 Get Employees Api Company  Company Id  Employees Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/address/autocomplete":{"get":{"tags":["Address"],"summary":"Address Autocomplete","description":"Type-ahead address suggestions for AU/NZ. Server-side geocoder proxy (Geoapify when configured, else keyless Photon) so the API key never reaches the browser. Always returns 200; an empty list means the lookup is unavailable and the form falls back to manual entry.","operationId":"address_autocomplete_api_address_autocomplete_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"text","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":200,"description":"Partial address text.","title":"Text"},"description":"Partial address text."},{"name":"country","in":"query","required":false,"schema":{"type":"string","description":"Comma-separated 2-letter country filter.","default":"au,nz","title":"Country"},"description":"Comma-separated 2-letter country filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":10,"minimum":1,"description":"Max suggestions to return.","default":5,"title":"Limit"},"description":"Max suggestions to return."},{"name":"primary","in":"query","required":false,"schema":{"type":"string","maxLength":2,"description":"2-letter country code to rank first (bias only; nothing is excluded).","default":"","title":"Primary"},"description":"2-letter country code to rank first (bias only; nothing is excluded)."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Address Autocomplete Api Address Autocomplete Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/employees/create":{"put":{"tags":["Employee"],"summary":"Create one or more new employees for a company","description":"Accepts a list of EmployeeCreate models, attempts to create each one, and returns a list of EmployeeResult indicating success or per-item errors. Note that required fields have an asterisk (*) in the model definition.","operationId":"create_employees_api_company__company_id__employees_create_put","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique Lightning Payroll–generated ID of the company.","title":"Company Id"},"description":"The unique Lightning Payroll–generated ID of the company.","example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeCreate"},"title":"Employees"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeResult"},"title":"Response Create Employees Api Company  Company Id  Employees Create Put"}}}},"404":{"description":"Company not found.","content":{"application/json":{"example":{"detail":"Company not found"}}}},"400":{"description":"Bad request, e.g., empty employee list.","content":{"application/json":{"example":{"detail":"Employee list cannot be empty."}}}},"422":{"description":"Validation error for one or more employees.","content":{"application/json":{"example":{"status_code":10422,"message":"[{'loc': ('body', 0, 'email'), 'msg': 'Invalid email format.', 'type': 'value_error'}]"}}}},"207":{"description":"Partial success. At least one employee was created and at least one failed inside the per-item loop. Field-level schema problems (a bad TFN checksum, a malformed email) never reach this response: the whole request is rejected with the 422 above before the handler runs. The `errors` object here carries one of `number` (duplicate employee_number), `licence` (employee cap reached mid-batch), `detail` (a jurisdiction rule such as NZ tax code or IRD) or `exception` (an unexpected failure), or the field-keyed errors returned by the employee model itself.","content":{"application/json":{"example":[{"employee":{"id":456,"first_name":"Bob","last_name":"Jones","email_address":"bob.jones@example.com"},"errors":{}},{"errors":{"number":"An employee with employee_number 'EMP001' already exists (employee_id 123). That employee is deleted. Restore them with POST /api/employees/123/restore, or find them by passing status=deleted to the company employee list, rather than creating a duplicate."}}]}}}}}},"/api/company/{company_id}/employees/update":{"patch":{"tags":["Employee"],"summary":"Update Employees","description":"Update one or more existing employees for a company.","operationId":"update_employees_api_company__company_id__employees_update_patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier is used in `employee_ids`:\n- `employee_id`: Use LP-internal database IDs (integers).\n- `employee_number`: Use your own external employee numbers (strings).\n\nDefault is `employee_id`. These identifiers must be unique for each employee across **all** companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier is used in `employee_ids`:\n- `employee_id`: Use LP-internal database IDs (integers).\n- `employee_number`: Use your own external employee numbers (strings).\n\nDefault is `employee_id`. These identifiers must be unique for each employee across **all** companies.","example":"employee_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeUpdate"},"title":"Employees"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeResult"},"title":"Response Update Employees Api Company  Company Id  Employees Update Patch"}}}},"404":{"description":"Not found"},"422":{"description":"Validation error for one or more employees.","content":{"application/json":{"example":{"status_code":10422,"message":"[{'loc': ('body', 0, 'tax_file_number'), 'msg': 'Invalid tax file number (fails ATO checksum).', 'type': 'value_error'}, {'loc': ('body', 1, 'tax_file_number'), 'msg': 'Invalid tax file number (fails ATO checksum).', 'type': 'value_error'}]"}}}},"207":{"description":"Partial success: some employee updates had validation errors. The body is an array with one entry per employee in the request, matching the enforced List[EmployeeResult] response model.","content":{"application/json":{"example":[{"employee":{"tax_file_number":"111111111","first_name":"Harry","last_name":"Stone","date_of_birth":"1990-01-01","pay_method":"DIRECT BANK ENTRY","pay_period":"WEEKLY","standard_hours_per_day":7.6,"standard_days_per_week":5,"stp_employment_status":"F","active_pay_recipient":true,"start_date":"2024-07-01","employment_status":"Full time","tfnd_signed_date":"2024-07-01","has_claimed_tax_free_threshold":true,"super_rate":0.115,"is_super_enabled":true,"is_leave_enabled":true,"accrue_holiday_leave_per_hour":0.076923,"accrue_sick_leave_per_hour":0.038462,"accrue_lsl_per_hour":0.016667,"num_holiday_leave_days_per_year":20,"is_lsl_enabled":true,"lsl_x_years":10,"lsl_accrued_x_years":8,"id":32,"company_id":2,"readable_stp_employment_status":"Full Time","is_australian_resident":true,"income_stream":"SAW","stp_id":32,"tax_treatment_code":"NAXXXX","single_touch_residency_status":"Resident","is_terminated":false},"errors":{}}]}}}}}},"/api/employees/{employee_id}":{"delete":{"tags":["Employee"],"summary":"Delete Employee","description":"Delete an employee.\n\nDeletion is reversible and destroys nothing. The employee record, their pays and their reporting history are all retained; the employee is hidden from the default employee list and from the payroll application's own screens. Call `POST /api/employees/{employee_id}/restore` to bring them back, and pass `status=deleted` to the company employee list to find them in the meantime.\n\nA deleted employee keeps their `number`, so that number cannot be reused on a new employee while the record exists. If you are re-hiring someone, restore or reinstate the original record instead of creating a second one, which keeps their year-to-date figures, leave balances and reporting history intact.\n\nTo record the end of employment, terminate the employee through a termination pay rather than deleting them. Deleting does not terminate, and a deleted employee is not reported as having ceased employment.","operationId":"delete_employee_api_employees__employee_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`."},"403":{"description":"The customer has no active subscription, so data cannot be changed."},"409":{"description":"The employee is already deleted."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Employee"],"summary":"Get Employee","description":"Get employee data by Lightning Payroll ID.","operationId":"get_employee_api_employees__employee_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Employee Api Employees  Employee Id  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/restore":{"post":{"tags":["Employee"],"summary":"Restore Employee","description":"Restore a deleted employee.\n\nReverses `DELETE /api/employees/{employee_id}`, returning the employee to the default employee list with their pays, reporting history and `number` exactly as they were.\n\nThis is the answer to an `employee_number` held by a deleted employee: the number stays on the record rather than being released, so restore the original employee and carry on using them instead of creating a second employee for the same person. Restoring does not make the number available to a different employee.\n\nThis undoes a deletion, not a termination. If the employee was also terminated they come back terminated, and `POST /api/employees/{employee_id}/reinstate` is what clears that.","operationId":"restore_employee_api_employees__employee_id__restore_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"responses":{"200":{"description":"The restored employee.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`."},"403":{"description":"The customer has no active subscription, or restoring this employee would exceed the number of employees their plan allows."},"409":{"description":"The employee is not deleted, so there is nothing to restore."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/reinstate":{"post":{"tags":["Employee"],"summary":"Reinstate Employee","description":"Reinstate a terminated employee, for a re-hire.\n\nClears the termination and sets a new start date, keeping the employee on their existing record. That is what preserves their employee number, year-to-date figures, leave balances and reporting continuity, so prefer this over creating a second employee for the same person.\n\nThis undoes a termination, not a deletion. A deleted employee must be restored first with `POST /api/employees/{employee_id}/restore`.\n\nAnswers `409` while an unprocessed termination pay still exists for this employee. Process that pay run, or remove the termination from the pay, and try again; reinstating first would drop the staged termination while leaving its leave-balance adjustments in place.","operationId":"reinstate_employee_api_employees__employee_id__reinstate_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeReinstate"}}}},"responses":{"200":{"description":"The reinstated employee.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Employee"}}}},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`."},"403":{"description":"The customer has no active subscription, so data cannot be changed."},"409":{"description":"The employee is not terminated, is deleted, or has an unprocessed termination pay."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/terminate":{"post":{"tags":["Employee"],"summary":"Terminate an employee","description":"End an employee's employment.\n\nThis creates the employee's final pay, works out what they are owed for unused leave, calculates the tax on it and processes the pay, which is what marks the employee terminated. Reversing it is `POST /api/employees/{employee_id}/reinstate`.\n\nSend this when the final pay is the termination and nothing else. If the employee still has hours, allowances or leave to be paid, put a `termination` block on the pay instead, with `PUT /api/company/{company_id}/pays/create`, so it all lands on one pay and one payslip.\n\nTerminating is not deleting. Deleting hides the employee and does not report the end of employment; terminating reports it, through Single Touch Payroll in Australia and payday filing in New Zealand, and leaves the employee visible with their history intact.\n\nThe fields differ by country. Australia records a `reason` and an STP `cessation_type_code`, pays out unused annual leave, leave loading, long service leave and optionally sick leave, and taxes lump sums through the employment-termination-payment tables. New Zealand values annual holidays in weeks and alternative holidays in days as at the finish date, adds the 8% holiday pay owing since the employee's last anniversary, pays out neither sick leave nor long service leave, and taxes everything as extra pay. Sending the other country's field is refused rather than ignored, so the response is always what was actually recorded.","operationId":"terminate_employee_api_employees__employee_id__terminate_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeTerminate"},"examples":{"australia":{"summary":"Australian termination","value":{"pay_date":"2026-09-11","termination_date":"2026-09-11","reason":"TERMINATION","cessation_type_code":"V"}},"new_zealand":{"summary":"New Zealand termination","value":{"pay_date":"2026-09-11","termination_date":"2026-09-11","nz_ytd_taxable":"48000.00"}}}}}},"responses":{"200":{"description":"The termination, as Lightning Payroll calculated it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeTermination"}}}},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`, a termination field that does not apply to the company's country, a `termination_date` before the employee's start date, or a termination Lightning Payroll could not calculate."},"403":{"description":"The customer has no active subscription, so data cannot be changed."},"409":{"description":"The employee is deleted, is already terminated, or already has an unprocessed termination pay."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/termination":{"get":{"tags":["Employee"],"summary":"Get an employee's termination","description":"Read back the employee's most recent termination and everything it paid out.\n\n`is_pay_processed` tells you whether the termination pay has been processed. An employee is only terminated once it has been, so a termination staged in Lightning Payroll on a pay that is still waiting to be processed comes back here with `is_employee_terminated` false.\n\nA re-hired employee who was reinstated still has the termination that ended their previous period of employment, and it is returned here with `is_employee_terminated` false. Answers `404` for an employee who has never been terminated.","operationId":"get_employee_termination_api_employees__employee_id__termination_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"responses":{"200":{"description":"The employee's most recent termination.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeTermination"}}}},"404":{"description":"This employee has never been terminated."},"400":{"description":"No employee with the given `employee_id`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employment-types":{"get":{"tags":["Employee"],"summary":"List employment types","description":"List the employment types available when creating or updating an employee. Send either the `id` or the `name` as `employment_type`.\n\nEmployment type is distinct from `employment_status`: it appears on the Pay Rates screen and the payslip and is reported in the SuperStream member registration, while `employment_status` drives STP reporting. Defaults are 'Full-time', 'Part-time' and 'Casual'.\n\nThese options are shared by every company in the account, so the same list applies whichever company an employee belongs to. They are read-only over the API: because they are shared, adding or removing one would change what every other company sees. A customer can manage them in Lightning Payroll under Settings.","operationId":"get_employment_types_api_employment_types_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmploymentLookupResponse"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/employment-tenures":{"get":{"tags":["Employee"],"summary":"List employment tenures","description":"List the employment tenures available when creating or updating an employee. Send either the `id` or the `name` as `employment_tenure`.\n\nTenure records whether the employment is ongoing or time-limited, and is never derived from `employment_status`. New employees are 'Permanent' until you set this, so send it explicitly for a fixed-term or temporary hire. Defaults are 'Permanent' and 'Temporary'.\n\nThese options are shared by every company in the account, so the same list applies whichever company an employee belongs to. They are read-only over the API: because they are shared, adding or removing one would change what every other company sees. A customer can manage them in Lightning Payroll under Settings.","operationId":"get_employment_tenures_api_employment_tenures_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmploymentLookupResponse"}}}},"404":{"description":"Not found"}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/employees/{employee_id}/pay-rates":{"get":{"tags":["Employee"],"summary":"Get Employee Pay Rates","description":"Get all pay-rate options available to a given employee. Returns three categories: system rates, employee-specific rates, and company rates attached to the employee. Each row includes a stable `reference` key for integration mapping.","operationId":"get_employee_pay_rates_api_employees__employee_id__pay_rates_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as LP employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as LP employee_id or employee_number based on identifier_type.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeePayRatesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/allowances":{"get":{"tags":["Employee"],"summary":"List Employee Allowances","description":"List every allowance that applies to an employee, in two buckets:\n\n- `employee`: allowances belonging to this employee alone. Manage them through these endpoints.\n- `company`: company-wide allowances this employee is attached to. Manage the records themselves under `/api/company/{company_id}/allowances`, and attach or detach this employee with `/api/employees/{employee_id}/company-allowances/{allowance_id}`.","operationId":"list_employee_allowances_api_employees__employee_id__allowances_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAllowancesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Employee"],"summary":"Create Employee Allowance","description":"Create an allowance belonging to a single employee.\n\n`description` and `amount` are required. `description` must not already be used by another of this employee's own allowances, or by a company allowance, because that string is the grouping key for YTD and STP reporting. Two employees may each hold an allowance of the same name at their own amount, matching the desktop app.\n\nFor Australian companies `allowance_category` is required and cannot be `Unclassified`, since an unclassified allowance cannot be lodged through STP.\n\nTo give the same allowance to many employees, create a company allowance instead.","operationId":"create_employee_allowance_api_employees__employee_id__allowances_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAllowanceCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAllowanceRead"}}}},"404":{"description":"Not found"},"400":{"description":"Invalid allowance data. For example a missing or `Unclassified` `allowance_category` on an Australian company, a description that is blank, too long, or contains characters the ATO rejects for STP, an `amount` of zero or less, an explicit `null`, or an `employee_ids` entry that belongs to another company or has been deleted."},"409":{"description":"An allowance with that description already exists in the same scope: for a company allowance, any other company allowance or any employee's own allowance; for an employee allowance, that employee's other allowances or a company allowance."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/allowances/{allowance_id}":{"get":{"tags":["Employee"],"summary":"Get Employee Allowance","description":"Get a single employee allowance by ID. This addresses the employee's own allowances only; company-wide allowances are read under `/api/company/{company_id}/allowances/{allowance_id}`.","operationId":"get_employee_allowance_api_employees__employee_id__allowances__allowance_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAllowanceRead"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["Employee"],"summary":"Patch Employee Allowance","description":"Partially update an employee allowance. Supply only the fields you want to change; an empty body is a no-op.\n\nRenaming an allowance changes the template only. Pays already processed keep the description they were paid under, so a payslip reprint still matches the one the employee was given.\n\nBe aware that the description is part of the grouping key for YTD and STP reporting, so renaming an allowance part way through a financial year reports it as two separate allowances for the rest of that year. Pass `propagate_description_to_history=true` to carry the new description onto the pays this allowance has already been paid on, which keeps those totals together.","operationId":"patch_employee_allowance_api_employees__employee_id__allowances__allowance_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"},{"name":"propagate_description_to_history","in":"query","required":false,"schema":{"type":"boolean","description":"Set to `true` to also rename this allowance on pays that have already been processed, so YTD and STP totals stay under one description. Only this allowance's own pay lines are touched: other employees keep their own allowances, and no other allowance record is altered.","default":false,"title":"Propagate Description To History"},"description":"Set to `true` to also rename this allowance on pays that have already been processed, so YTD and STP totals stay under one description. Only this allowance's own pay lines are touched: other employees keep their own allowances, and no other allowance record is altered.","example":false}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAllowanceUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmployeeAllowanceRead"}}}},"404":{"description":"Not found"},"400":{"description":"Invalid allowance data. For example a missing or `Unclassified` `allowance_category` on an Australian company, a description that is blank, too long, or contains characters the ATO rejects for STP, an `amount` of zero or less, an explicit `null`, or an `employee_ids` entry that belongs to another company or has been deleted."},"409":{"description":"An allowance with that description already exists in the same scope: for a company allowance, any other company allowance or any employee's own allowance; for an employee allowance, that employee's other allowances or a company allowance."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Employee"],"summary":"Delete Employee Allowance","description":"Delete an employee allowance.\n\nPays already processed are unaffected: they hold their own copy of the allowance and no link back to this record. Any roster shifts referencing it simply lose the reference.","operationId":"delete_employee_allowance_api_employees__employee_id__allowances__allowance_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/company-allowances/{allowance_id}":{"put":{"tags":["Employee"],"summary":"Attach Company Allowance To Employee","description":"Attach a company-wide allowance to this employee. Idempotent: attaching an allowance the employee already has is a no-op.\n\nThe allowance must belong to the employee's own company.","operationId":"attach_company_allowance_to_employee_api_employees__employee_id__company_allowances__allowance_id__put","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceRead"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Employee"],"summary":"Detach Company Allowance From Employee","description":"Detach a company-wide allowance from this employee. The allowance itself is not deleted and other employees keep it.\n\nReturns `404` if the employee is not currently attached to it.","operationId":"detach_company_allowance_from_employee_api_employees__employee_id__company_allowances__allowance_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"string","description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","title":"Employee Id"},"description":"The employee identifier. Interpreted as employee_id or employee_number based on identifier_type.","example":1},{"name":"allowance_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the allowance.","title":"Allowance Id"},"description":"The unique LP-generated ID of the allowance.","example":1},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CompanyAllowanceRead"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/payroll-number/{employee_number}":{"get":{"tags":["Employee"],"summary":"Get Employee By Payroll Number","description":"Get detailed employee data by their user-controlled payroll number, rather than their unique LP ID.","operationId":"get_employee_by_payroll_number_api_employees_payroll_number__employee_number__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_number","in":"path","required":true,"schema":{"type":"string","description":"The user-controlled payroll number of the employee. Must be unique across all companies.","title":"Employee Number"},"description":"The user-controlled payroll number of the employee. Must be unique across all companies.","example":"12345"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Employee By Payroll Number Api Employees Payroll Number  Employee Number  Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/leave-requests":{"get":{"tags":["Employee"],"summary":"Get Company Leave Requests","description":"Get the leave requests submitted through the employee online portal (or entered by the employer when managing them), with their requested days and notes.\n\nEmployees are identified by the same LP employee ids and payroll numbers the other Employee endpoints use. Leave requests are an Australian employee-portal feature: a New Zealand company, or a company whose employee portal has never been linked, returns an empty list. When `start_date`/`end_date` are given, a request is returned if at least one of its requested days falls inside the window.","operationId":"get_company_leave_requests_api_company__company_id__leave_requests_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Include only requests with at least one requested day on or after this date (YYYY-MM-DD).","title":"Start Date"},"description":"Include only requests with at least one requested day on or after this date (YYYY-MM-DD).","example":"2026-09-01"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Include only requests with at least one requested day on or before this date (YYYY-MM-DD).","title":"End Date"},"description":"Include only requests with at least one requested day on or before this date (YYYY-MM-DD).","example":"2026-09-30"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status: 'Pending', 'Approved', 'Denied' or 'Cancelled' (case-insensitive).","title":"Status"},"description":"Filter by status: 'Pending', 'Approved', 'Denied' or 'Cancelled' (case-insensitive).","example":"Approved"},{"name":"employee_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only return leave requests for this LP employee ID.","title":"Employee Id"},"description":"Only return leave requests for this LP employee ID.","example":1}],"responses":{"200":{"description":"The company's leave requests, earliest start date first.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LeaveRequest"},"title":"Response 200 Get Company Leave Requests Api Company  Company Id  Leave Requests Get"}}}},"404":{"description":"Not found"},"400":{"description":"No company with the given `company_id`, an invalid `status` filter, or an invalid date window."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pay-run/{pay_run_id}":{"get":{"tags":["Pay Runs"],"summary":"Get Pay Run","description":"Get pay run data by ID.","operationId":"get_pay_run_api_pay_run__pay_run_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"pay_run_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the pay run.","title":"Pay Run Id"},"description":"The unique LP-generated ID of the pay run.","example":1}],"responses":{"200":{"description":"The pay run and its totals.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayRunTotals"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pay-run/{pay_run_id}/gl-postings":{"get":{"tags":["Pay Runs"],"summary":"Get Gl Postings For Pay Run","description":"Retrieve detailed General Ledger (GL) postings for a specific pay run.","operationId":"get_gl_postings_for_pay_run_api_pay_run__pay_run_id__gl_postings_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"pay_run_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the pay run.","title":"Pay Run Id"},"description":"The unique LP-generated ID of the pay run.","example":1}],"responses":{"200":{"description":"A list of GL postings for the specified pay run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GLPostingsResponse"},"example":{"pay_run_id":1,"postings":[{"account_id":"00-00-0001","description":"Gross Wages","amount":1500.0,"date":"14/01/2025"},{"account_id":"00-00-0002","description":"Superannuation (incl Super levy and Salary sacrifice)","amount":172.5,"date":"14/01/2025"},{"account_id":"00-00-0004","description":"Bank/Net","amount":-1335.0,"date":"14/01/2025"},{"account_id":"00-00-0005","description":"Group Tax Clearing","amount":-165.0,"date":"14/01/2025"},{"account_id":"00-00-0006","description":"Superannuation Clearing (incl Super levy and Salary sacrifice)","amount":-172.5,"date":"14/01/2025"}]}}}},"404":{"description":"Not found"},"400":{"description":"Bad request due to invalid pay run ID or incomplete data.","content":{"application/json":{"example":{"detail":"No pay run found with the given pay_run_id"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/pay-runs":{"post":{"tags":["Pay Runs"],"summary":"Get Pay Runs","description":"Get pay runs ending between the given dates, or, if `use_processed_date` is true, pay runs processed within the given dates.","operationId":"get_pay_runs_api_company__company_id__pay_runs_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the company.","title":"Company Id"},"description":"The ID of the company.","example":1},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The start date for the pay run search in `YYYY-MM-DD` format. Defaults to today if not provided.","title":"Start Date"},"description":"The start date for the pay run search in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2024-07-01"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end date for the pay run search in `YYYY-MM-DD` format. Defaults to today if not provided.","title":"End Date"},"description":"The end date for the pay run search in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2025-06-30"},{"name":"use_processed_date","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to search for pay runs processed within the given date range. The alternative is to search by pay run end date. Searching by pay run end date can be problematic because ATO records are reported based on the processed date, not the pay run end date.","default":false,"title":"Use Processed Date"},"description":"Set to `True` to search for pay runs processed within the given date range. The alternative is to search by pay run end date. Searching by pay run end date can be problematic because ATO records are reported based on the processed date, not the pay run end date.","example":false}],"responses":{"200":{"description":"Matching pay runs and their totals.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayRunTotals"},"title":"Response 200 Get Pay Runs Api Company  Company Id  Pay Runs Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/pays":{"post":{"tags":["Pays"],"summary":"Get Pays","description":"Get summarised list of all completed pays within a given date range. Pay results can be grouped by pay run or employee, or neither (flat Pay list). Request body is a list of employee IDs to filter. If no employee identifiers are provided, all employees for the company_id are included. The identifier_type query parameter can be used to specify whether the employee_ids are LP IDs (employee_id) or user-controlled payroll numbers (employee_number). If using the employee_number, please be aware that they must be unique across ALL companies.","operationId":"get_pays_api_company__company_id__pays_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The ID of the company.","title":"Company Id"},"description":"The ID of the company.","example":1},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The start date for the pays in `YYYY-MM-DD` format. Defaults to today if not provided.","title":"Start Date"},"description":"The start date for the pays in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2024-07-01"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end date for the pays in `YYYY-MM-DD` format. Defaults to today if not provided.","title":"End Date"},"description":"The end date for the pays in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2025-06-30"},{"name":"group_by_pay_run","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by pay run.","default":false,"title":"Group By Pay Run"},"description":"Set to `True` to group pay results by pay run.","example":false},{"name":"group_by_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by employee.","default":false,"title":"Group By Employee"},"description":"Set to `True` to group pay results by employee.","example":false},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier provided in `employee_ids`:\n- `employee_id`: Use LP-internal database IDs (integers).\n- `employee_number`: Use your own external employee numbers (strings).\n\nDefault is `employee_id`. These identifiers must be unique for each employee across **all** companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier provided in `employee_ids`:\n- `employee_id`: Use LP-internal database IDs (integers).\n- `employee_number`: Use your own external employee numbers (strings).\n\nDefault is `employee_id`. These identifiers must be unique for each employee across **all** companies.","example":"employee_id"}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"integer"},{"type":"string"}]}},{"type":"null"}],"description":"A list of employee identifiers to filter the pays. The type of identifiers is specified by the `identifier_type` parameter.","default":[],"title":"Employee Ids"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/pays/create":{"put":{"tags":["Pays"],"summary":"Create Pays For Date","description":"Create pays for a given date. The identifier_type query parameter can be used to specify whether the employee_ids are LP IDs (employee_id) or user-controlled payroll numbers (employee_number). If using the employee_number, please be aware that they must be unique across ALL companies.","operationId":"create_pays_for_date_api_company__company_id__pays_create_put","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"group_by_pay_run","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by pay run.","default":false,"title":"Group By Pay Run"},"description":"Set to `True` to group pay results by pay run.","example":false},{"name":"group_by_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by employee (using either employee_id or employee_number depending on identifier_type).","default":false,"title":"Group By Employee"},"description":"Set to `True` to group pay results by employee (using either employee_id or employee_number depending on identifier_type).","example":false},{"name":"redistribute_tax_by_gross","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"If True, and this request creates multiple pays for the same employee in the same pay run with different departments, redistribute the combined tax for those new pays in proportion to each pay's gross. Only affects pays created by this call.","default":true,"title":"Redistribute Tax By Gross"},"description":"If True, and this request creates multiple pays for the same employee in the same pay run with different departments, redistribute the combined tax for those new pays in proportion to each pay's gross. Only affects pays created by this call.","example":true},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use in 'workers_comp_pays' and when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use in 'workers_comp_pays' and when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","example":"employee_id"},{"name":"pay_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The date when these pays were processed, in `YYYY-MM-DD` format. Defaults to today if not provided. The pay run chosen will be the one that matches this date.","default":"2026-08-21","title":"Pay Date"},"description":"The date when these pays were processed, in `YYYY-MM-DD` format. Defaults to today if not provided. The pay run chosen will be the one that matches this date.","example":"2026-08-21"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/PayCreate"},"description":"A list of new pay objects to create, which were paid or to be paid on the given pay_date. Provide a single `pay_department` string (unique name or code) per pay to assign a cost centre to all pay items.","title":"Pays"},"example":[{"employee_id":1234,"hours":[{"description":"Ordinary Time","rate":"30.00","units":"hours","is_overtime":false,"value":"37.5"},{"description":"Saturday Overtime","multiplier":"1.5","units":"hours","is_overtime":true,"value":"5.0"},{"description":"Travel Reimbursement","rate":"0.85","units":"kms","is_overtime":false,"value":"120"},{"description":"Piece Work - Sheep Shearing","rate":"3.50","units":"sheep","is_overtime":false,"value":"90"}],"leave":[{"description":"Annual Leave","leave_type":"HOLIDAY","multiplier":"1.0","hours":"7.6","leave_loading_amount":"3.80","date":"2023-08-15"},{"description":"Personal Leave","leave_type":"SICK","rate":"38.00","hours":"4.0","date":"2023-08-15"}],"pay_department":"Engineering","termination":{"termination_date":"2023-08-15","reason":"TERMINATION","cessation_type_code":"V"},"allowances":[{"description":"Tool Allowance","amount":"50.00","allowance_category":"TD"},{"description":"Award Transport Allowance","amount":"200.00","is_taxable":true,"is_itemised":true,"is_included_in_super_calculations":false,"allowance_category":"AD"}],"deductions":[{"description":"Union Fees","amount":"25.00","classification":"Child Support Deduction"},{"description":"Health Insurance","amount":"100.00","classification":"Normal","is_included_in_super_calculations":true}],"bonuses":[{"description":"Performance Bonus","amount":"500.00","tax_method":"NORMAL_EARNINGS"},{"description":"Director's Fee","amount":"1000.00","tax_method":"SPREAD_OVER_SPECIFIC_RANGE","start_date":"2023-01-01","end_date":"2023-01-31","is_included_in_super_calculations":false,"is_directors_fees":true}],"pay_sacrifices":[{"description":"Laptop Salary Sacrifice","amount":"150.00"},{"amount":"300.00","description":"Car Salary Sacrifice","is_included_in_super_calculations":false,"is_super":true}],"back_payments":[{"description":"Back Pay Adjustment","amount":"200.00","stp_category":"DIRECTOR_S_FEES","tax_method":"NORMAL_EARNINGS","start_date":"2023-01-01","end_date":"2023-01-31"},{"description":"Award Increase Adjustment","amount":"120.00","stp_category":"OVERTIME","tax_method":"NORMAL_EARNINGS","start_date":"2023-02-01","end_date":"2023-02-28"}]}]}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EmployeeNumberPays"}},{"type":"array","items":{"$ref":"#/components/schemas/EmployeeIDPays"}},{"type":"array","items":{"$ref":"#/components/schemas/PayRunPays"}},{"type":"array","items":{"$ref":"#/components/schemas/Pay"}}],"title":"Response Create Pays For Date Api Company  Company Id  Pays Create Put"}}}},"404":{"description":"Not found"},"207":{"description":"Partial success. Pays were created for some employees in the batch and not others. Each successful pay is committed, so retry only the identifiers named by `X-LP-Failed-Employees`.","headers":{"X-LP-Failed-Employees":{"description":"Comma-separated identifiers matching `identifier_type` that could not be processed. Present only on a 207.","schema":{"type":"string","example":"2,7"}}},"content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EmployeeNumberPays"}},{"type":"array","items":{"$ref":"#/components/schemas/EmployeeIDPays"}},{"type":"array","items":{"$ref":"#/components/schemas/PayRunPays"}},{"type":"array","items":{"$ref":"#/components/schemas/Pay"}}],"title":"Response 207 Create Pays For Date Api Company  Company Id  Pays Create Put"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/pays/{pay_id}":{"put":{"tags":["Pays"],"summary":"Update Single Pay","description":"Update **one** completed pay (identified by `pay_id`) that belongs to the specified company.\n\nThis is a FULL REBUILD, not a patch. The pay is emptied and rebuilt from the request body, so every hours row, leave row and allowance line the pay should end up with must be present. A collection you leave out ends up empty.\n\nThe tax and superannuation are then recalculated from the rebuilt pay, and the payslip is reissued, so the figures and the payslip PDF stay consistent with what you sent. The pay keeps its original processed date.\n\nA pay that holds data this endpoint cannot carry (deductions, bonuses, salary sacrifices, reimbursements, back payments, standalone RESC or a termination) is refused with `409` rather than having it silently dropped. Correct that pay in Lightning Payroll, or delete it and create it again.\n\nSending a field this endpoint does not accept is rejected, so a pay read back from `GET /api/company/{company_id}/pays/{pay_id}` cannot be posted here unchanged. Send only the collections listed above.","operationId":"update_single_pay_api_company__company_id__pays__pay_id__put","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"pay_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated pay ID you want to update.","title":"Pay Id"},"description":"The unique LP-generated pay ID you want to update.","example":42}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PayUpdate","description":"The updated pay object."}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pay"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["Pays"],"summary":"Get Single Pay","description":"Get **one** pay record (identified by `pay_id`) that belongs to the specified company.","operationId":"get_single_pay_api_company__company_id__pays__pay_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"pay_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated pay ID you want to update.","title":"Pay Id"},"description":"The unique LP-generated pay ID you want to update.","example":42}],"responses":{"200":{"description":"The pay record.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pay"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/pays/{pay_id}/payslip-pdf":{"get":{"tags":["Pays"],"summary":"Get Single Pay Payslip Pdf","description":"Download one employee's payslip for one pay, as a PDF file.\n\nA pay id identifies a single employee's pay, not a whole pay run, so a pay run covering ten employees has ten pay ids and ten payslips. Use `POST /api/company/{company_id}/pays` to list the pay ids for a period.\n\nThe pay must be completed. A pending pay still has provisional figures, so no payslip is produced for it and the pay reads as not found here.\n\nThere is nothing to pass beyond the two ids. The layout, the theme and the notice printed at the foot of the payslip come from the company's own payslip settings, and which leave balances appear comes from each employee's own settings, so a payslip downloaded here is identical to the one Lightning Payroll produces for that pay.\n\nThe response body is the PDF itself, sent as an attachment with a suggested filename. It is not JSON and not base64.\n\n`404` means no completed pay with that id belongs to that company. `409` means the pay exists but Lightning Payroll never took the payslip snapshot that a payslip is printed from, which happens on pays created for a terminated employee or for an employee who is not an active pay recipient. Re-saving the pay in Lightning Payroll generates the snapshot.","operationId":"get_single_pay_payslip_pdf_api_company__company_id__pays__pay_id__payslip_pdf_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"pay_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated pay ID you want the payslip for.","title":"Pay Id"},"description":"The unique LP-generated pay ID you want the payslip for.","example":42}],"responses":{"200":{"description":"The payslip, as a PDF file attachment.","content":{"application/pdf":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"No completed pay with that `pay_id` belongs to that company. A pay that is still pending reads as not found here, the same as it does on `GET /api/company/{company_id}/pays/{pay_id}`."},"409":{"description":"The pay has no payslip snapshot, so no payslip can be produced. Re-save the pay in Lightning Payroll to generate the snapshot, then ask for the payslip again."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/create-workers-comp-pays":{"put":{"tags":["Pays"],"summary":"Create Workers Comp Pays For Date","description":"Create worker's compensation pays for a given date. This route is a custom route for a single client. For full pay creation use the /pays/create endpoint. The identifier_type query parameter can be used to specify whether the employee_ids are LP IDs (employee_id) or user-controlled payroll numbers (employee_number). If using the employee_number, please be aware that they must be unique across ALL companies.","operationId":"create_workers_comp_pays_for_date_api_company__company_id__create_workers_comp_pays_put","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"group_by_pay_run","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by pay run.","default":false,"title":"Group By Pay Run"},"description":"Set to `True` to group pay results by pay run.","example":false},{"name":"group_by_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by employee (using either employee_id or employee_number depending on identifier_type).","default":false,"title":"Group By Employee"},"description":"Set to `True` to group pay results by employee (using either employee_id or employee_number depending on identifier_type).","example":false},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to use in 'workers_comp_pays' and when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to use in 'workers_comp_pays' and when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","example":"employee_id"},{"name":"pay_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The date when these pays were processed, in `YYYY-MM-DD` format. Defaults to today if not provided.","default":"2026-08-21","title":"Pay Date"},"description":"The date when these pays were processed, in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2024-07-01"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NewWorkersCompensationPay"},"description":"A list of workers' compensation pay objects to create, which were paid or to be paid on the given date.","title":"Workers Comp Pays"},"example":[{"employee_id":"1","workers_compensation_amount":100.0,"tax":10.0},{"employee_id":"2","workers_compensation_amount":200.0,"tax":20.0}]}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"$ref":"#/components/schemas/EmployeeNumberPays"}},{"type":"array","items":{"$ref":"#/components/schemas/EmployeeIDPays"}},{"type":"array","items":{"$ref":"#/components/schemas/PayRunPays"}},{"type":"array","items":{"$ref":"#/components/schemas/Pay"}}],"title":"Response Create Workers Comp Pays For Date Api Company  Company Id  Create Workers Comp Pays Put"}}}},"404":{"description":"Not found"},"207":{"description":"Partial success. Pays were created for some employees in the batch and not others. Each pay is committed as it is created, so the ones that succeeded exist and the body returns them; the `X-LP-Failed-Employees` header names the identifiers that failed. **Retry only those**, not the whole batch, or you will duplicate the pays that already succeeded.","headers":{"X-LP-Failed-Employees":{"description":"Comma-separated identifiers (matching `identifier_type`) that could not be processed. Present only on a 207.","schema":{"type":"string","example":"2,7"}}}},"400":{"description":"The whole batch failed: an invalid `pay_date`, both group_by flags set, or no employee in the batch could be processed. Nothing was created."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/update-workers-comp-pay/{pay_id}":{"patch":{"tags":["Pays"],"summary":"Update Workers Comp Pay","description":"Modify the value of a worker's compensation pay for a given date. This route is a custom route for a single client. For full pay creation use the /pays/create endpoint. The identifier_type query parameter can be used to specify whether the employee_ids are LP IDs (employee_id) or user-controlled payroll numbers (employee_number). If using the employee_number, please be aware that they must be unique across ALL companies.","operationId":"update_workers_comp_pay_api_company__company_id__update_workers_comp_pay__pay_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"pay_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the pay object.","title":"Pay Id"},"description":"The unique LP-generated ID of the pay object.","example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewWorkersCompensationPay","description":"A single compensation pay object with values to override and existing pay."},"example":{"employee_id":"1","workers_compensation_amount":100.0,"tax":10.0}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pay"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/pays/{pay_id}":{"delete":{"tags":["Pays"],"summary":"Delete Pay","description":"Delete a pay by ID. This action is irreversible. If the pay has STP history it cannot be deleted.","operationId":"delete_pay_api_pays__pay_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"pay_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the pay.","title":"Pay Id"},"description":"The unique LP-generated ID of the pay.","example":1}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/company/{company_id}/unsubmitted-stp-pays":{"get":{"tags":["Single Touch"],"summary":"Get Unsubmitted Stp Pays","description":"AU only. Get all pays which either have not been STP-submitted or were unsuccessfully submitted to the ATO, within a given date range. Pay results can be grouped by pay run or employee, or neither (flat Pay list).","operationId":"get_unsubmitted_stp_pays_api_company__company_id__unsubmitted_stp_pays_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The start date of the search range in `YYYY-MM-DD` format. Defaults to today if not provided.","default":"2026-08-21","title":"Start Date"},"description":"The start date of the search range in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2024-07-01"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"The end date of the search range in `YYYY-MM-DD` format. Defaults to today if not provided.","default":"2026-08-21","title":"End Date"},"description":"The end date of the search range in `YYYY-MM-DD` format. Defaults to today if not provided.","example":"2025-06-30"},{"name":"group_by_pay_run","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by pay run.","default":false,"title":"Group By Pay Run"},"description":"Set to `True` to group pay results by pay run.","example":false},{"name":"group_by_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by employee.","default":false,"title":"Group By Employee"},"description":"Set to `True` to group pay results by employee.","example":false},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to return when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to return when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","example":"employee_id"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/single-touch/{company_id}/submit-stp-pays":{"post":{"tags":["Single Touch"],"summary":"Submit Stp Pays","description":"AU only. Submit Single Touch for the given pay IDs. They must all share the same pay_run_id and only one pay_id per employee per submission is allowed.","operationId":"submit_stp_pays_api_single_touch__company_id__submit_stp_pays_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"group_by_pay_run","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by pay run.","default":false,"title":"Group By Pay Run"},"description":"Set to `True` to group pay results by pay run.","example":false},{"name":"group_by_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by employee.","default":false,"title":"Group By Employee"},"description":"Set to `True` to group pay results by employee.","example":false},{"name":"is_update_event","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` if this STP submission is an update event and only includes pre-submitted pay IDs.","default":false,"title":"Is Update Event"},"description":"Set to `True` if this STP submission is an update event and only includes pre-submitted pay IDs.","example":false},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to return when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to return when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","example":"employee_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"title":"Pay IDs","description":"A list of pay IDs to submit to the ATO. They must all share the same pay_run_id and only one pay_id per employee per submission is allowed."},"example":[1,2,3]}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"207":{"description":"Partial success. Some employees were withheld from this submission because their company is over its licence's employee limit. Their pays are absent from the returned list and the `X-LP-Licence-Excluded-Employees` header names them, so check for that header rather than assuming a 2xx means everything you sent was lodged.","headers":{"X-LP-Licence-Excluded-Employees":{"description":"Comma-separated Lightning Payroll employee IDs whose pays were withheld from this submission. Present only on a 207.","schema":{"type":"string","example":"1234,1237"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/single-touch/{company_id}/check-stp-responses":{"post":{"tags":["Single Touch"],"summary":"Check Stp Responses","description":"AU only. Force an ATO Single Touch response check for the given company and pay_ids and return pays.\n\nEvery `pay_id` must belong to `company_id`. Any that does not is reported as not found, so this endpoint cannot be used to read another company's pays.","operationId":"check_stp_responses_api_single_touch__company_id__check_stp_responses_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"company_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the company.","title":"Company Id"},"description":"The unique LP-generated ID of the company.","example":1},{"name":"group_by_pay_run","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by pay run.","default":false,"title":"Group By Pay Run"},"description":"Set to `True` to group pay results by pay run.","example":false},{"name":"group_by_employee","in":"query","required":false,"schema":{"anyOf":[{"type":"boolean"},{"type":"null"}],"description":"Set to `True` to group pay results by employee.","default":false,"title":"Group By Employee"},"description":"Set to `True` to group pay results by employee.","example":false},{"name":"identifier_type","in":"query","required":false,"schema":{"type":"string","pattern":"^(employee_id|employee_number)$","description":"Specify which employee identifier to return when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","default":"employee_id","title":"Identifier Type"},"description":"Specify which employee identifier to return when grouping pays by employee:\n- 'employee_id': Use LP-internal database IDs (integers).\n- 'employee_number': Use your own external employee numbers (strings).\nDefault is 'employee_id'. These must be unique for each employee across all companies.","example":"employee_id"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"array","items":{"type":"integer"},"description":"A list of pay IDs to gather STP response information about.","title":"Pay Ids"},"example":[1,2,3]}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"One or more `pay_ids` do not belong to this company. The detail lists them. A pay that does not exist and a pay belonging to another company are reported identically."},"400":{"description":"No company found with the given `company_id`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/init-api-client":{"get":{"tags":["Admin"],"summary":"Init Api Client","description":"Provision an OAuth client for the current customer.\nReturns the client secret only the first time (or when regenerated).","operationId":"init_api_client_api_init_api_client_get","responses":{"200":{"description":"Your OAuth client. `status` says whether it was just created or already existed; `client.clientSecret` is present only on the created branch.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitApiClientResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/update-api-client":{"post":{"tags":["Admin"],"summary":"Update Api Client","description":"Update your OAuth client and white-label branding settings.\n\nEvery key is optional and applied only when present, so a partial payload leaves\neverything it omits untouched. Sending a key with `null` (or an empty string, for the\ntext fields) clears that setting.\n\nOAuth client:\n  - `redirect_uris`: list[str]. Replaces the whole list. Each entry is sanitised, and\n    at most 20 are allowed.\n  - `regenerate_secret`: bool. When true, a new client secret is generated and\n    returned once as `new_secret`. The previous secret stops working immediately.\n  - `timezone`: string. IANA timezone used by the API Management console, e.g. `\"UTC\"`\n    or `\"Australia/Brisbane\"`. An unrecognised zone falls back to UTC.\n\nBranding (written to your ApiAdminBranding row and surfaced on white-labelled\nscreens and emails):\n  - `branding_display_name`: string, max 120 chars.\n  - `branding_subtitle`: string, max 160 chars.\n  - `branding_support_email`: string, a valid email address.\n  - `branding_support_phone`: string.\n  - `homepage_url`: string, http(s) URL.\n  - `support_url`: string, http(s) URL.\n  - `disable_dark_mode`: bool. Forces the light theme for your end customers.\n  - `auth_design`: object. Login-screen design blob, echoed through\n    GET /api/public-branding. `null` resets it to the default.\n\nBranded email:\n  - `from_local_part`: string. Local part of the From address on your sending domain.\n  - `reply_to`: string, a valid email address.\n  - `email_accent_color`: string, hex colour such as `\"#00b1dd\"`.\n  - `email_hide_lp_attribution`: bool.\n\nFarm Focus:\n  - `farm_focus_host_override_url`: string. Overrides the host Farm Focus links point at.","operationId":"update_api_client_api_update_api_client_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"The client was updated. `new_secret` carries a real secret only when `regenerate_secret` was true.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateApiClientResponse"}}}},"404":{"description":"No OAuth client has been provisioned for this account yet. Call GET /api/init-api-client first."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"`redirect_uris` was not a list, exceeded the 20-URI limit, or a branding value failed validation."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/whitelabel-logo":{"get":{"tags":["Admin"],"summary":"Get Api Client Whitelabel Logo","description":"Read the primary white-label logo stored against your API-admin account.","operationId":"get_api_client_whitelabel_logo_api_api_client_whitelabel_logo_get","responses":{"200":{"description":"The current logo, or an empty record when none is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelLogoResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Upload Api Client Whitelabel Logo","description":"Upload the primary white-label logo. Multipart: `file`, plus `overwrite_existing` when replacing one that is already stored.","operationId":"upload_api_client_whitelabel_logo_api_api_client_whitelabel_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_client_whitelabel_logo_api_api_client_whitelabel_logo_post"}}},"required":true},"responses":{"200":{"description":"The logo was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelLogoMutationResponse"}}}},"404":{"description":"Not found"},"400":{"description":"The upload was rejected: the file was empty, larger than 1 MB, or not one of jpg, jpeg, png or gif.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."},"409":{"description":"A logo already exists and `overwrite_existing` was not set. The body carries `requires_overwrite: true` and the existing record. Repeat with `overwrite_existing=true` to replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Admin"],"summary":"Delete Api Client Whitelabel Logo","description":"Delete the primary white-label logo.","operationId":"delete_api_client_whitelabel_logo_api_api_client_whitelabel_logo_delete","responses":{"200":{"description":"The logo was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelLogoMutationResponse"}}}},"404":{"description":"No logo is stored for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/whitelabel-style":{"get":{"tags":["Admin"],"summary":"Get Api Client Whitelabel Style","description":"Read the custom stylesheet stored against your API-admin account.","operationId":"get_api_client_whitelabel_style_api_api_client_whitelabel_style_get","responses":{"200":{"description":"The current stylesheet, or an empty record when none is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelStyleResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Upload Api Client Whitelabel Style","description":"Upload a custom stylesheet. Multipart: `file` (a `.css` file), plus `overwrite_existing` when replacing one that is already stored. The CSS is sanitised before it is saved.","operationId":"upload_api_client_whitelabel_style_api_api_client_whitelabel_style_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_client_whitelabel_style_api_api_client_whitelabel_style_post"}}},"required":true},"responses":{"200":{"description":"The stylesheet was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelStyleMutationResponse"}}}},"404":{"description":"Not found"},"400":{"description":"The upload was rejected: the file was empty, larger than 64 KB, or not one of `.css` files.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."},"409":{"description":"A stylesheet already exists and `overwrite_existing` was not set. The body carries `requires_overwrite: true` and the existing record. Repeat with `overwrite_existing=true` to replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Admin"],"summary":"Delete Api Client Whitelabel Style","description":"Delete the custom stylesheet.","operationId":"delete_api_client_whitelabel_style_api_api_client_whitelabel_style_delete","responses":{"200":{"description":"The stylesheet was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelStyleMutationResponse"}}}},"404":{"description":"No stylesheet is stored for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/whitelabel-dark-logo":{"get":{"tags":["Admin"],"summary":"Get Api Client Whitelabel Dark Logo","description":"Read the dark-mode logo stored against your API-admin account.","operationId":"get_api_client_whitelabel_dark_logo_api_api_client_whitelabel_dark_logo_get","responses":{"200":{"description":"The current dark-mode logo, or an empty record when none is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelDarkLogoResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Upload Api Client Whitelabel Dark Logo","description":"Upload the dark-mode logo. Multipart: `file`, plus `overwrite_existing` when replacing one that is already stored.","operationId":"upload_api_client_whitelabel_dark_logo_api_api_client_whitelabel_dark_logo_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_client_whitelabel_dark_logo_api_api_client_whitelabel_dark_logo_post"}}},"required":true},"responses":{"200":{"description":"The dark-mode logo was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelDarkLogoMutationResponse"}}}},"404":{"description":"Not found"},"400":{"description":"The upload was rejected: the file was empty, larger than 1 MB, or not one of jpg, jpeg, png or gif.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."},"409":{"description":"A dark-mode logo already exists and `overwrite_existing` was not set. The body carries `requires_overwrite: true` and the existing record. Repeat with `overwrite_existing=true` to replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Admin"],"summary":"Delete Api Client Whitelabel Dark Logo","description":"Delete the dark-mode logo.","operationId":"delete_api_client_whitelabel_dark_logo_api_api_client_whitelabel_dark_logo_delete","responses":{"200":{"description":"The dark-mode logo was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelDarkLogoMutationResponse"}}}},"404":{"description":"No dark-mode logo is stored for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/whitelabel-favicon":{"get":{"tags":["Admin"],"summary":"Get Api Client Whitelabel Favicon","description":"Read the favicon stored against your API-admin account.","operationId":"get_api_client_whitelabel_favicon_api_api_client_whitelabel_favicon_get","responses":{"200":{"description":"The current favicon, or an empty record when none is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelFaviconResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Upload Api Client Whitelabel Favicon","description":"Upload the favicon. Multipart: `file`, plus `overwrite_existing` when replacing one that is already stored.","operationId":"upload_api_client_whitelabel_favicon_api_api_client_whitelabel_favicon_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_client_whitelabel_favicon_api_api_client_whitelabel_favicon_post"}}},"required":true},"responses":{"200":{"description":"The favicon was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelFaviconMutationResponse"}}}},"404":{"description":"Not found"},"400":{"description":"The upload was rejected: the file was empty, larger than 1 MB, or not one of ico, png, jpg, jpeg or gif.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."},"409":{"description":"A favicon already exists and `overwrite_existing` was not set. The body carries `requires_overwrite: true` and the existing record. Repeat with `overwrite_existing=true` to replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Admin"],"summary":"Delete Api Client Whitelabel Favicon","description":"Delete the favicon.","operationId":"delete_api_client_whitelabel_favicon_api_api_client_whitelabel_favicon_delete","responses":{"200":{"description":"The favicon was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelFaviconMutationResponse"}}}},"404":{"description":"No favicon is stored for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/whitelabel-banner":{"get":{"tags":["Admin"],"summary":"Get Api Client Whitelabel Banner","description":"Read the banner image stored against your API-admin account.","operationId":"get_api_client_whitelabel_banner_api_api_client_whitelabel_banner_get","responses":{"200":{"description":"The current banner, or an empty record when none is stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelBannerResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Upload Api Client Whitelabel Banner","description":"Upload the banner image. Multipart: `file`, plus `overwrite_existing` when replacing one that is already stored.","operationId":"upload_api_client_whitelabel_banner_api_api_client_whitelabel_banner_post","requestBody":{"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_upload_api_client_whitelabel_banner_api_api_client_whitelabel_banner_post"}}},"required":true},"responses":{"200":{"description":"The banner was stored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelBannerMutationResponse"}}}},"404":{"description":"Not found"},"400":{"description":"The upload was rejected: the file was empty, larger than 2 MB, or not one of jpg, jpeg, png or gif.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."},"409":{"description":"A banner already exists and `overwrite_existing` was not set. The body carries `requires_overwrite: true` and the existing record. Repeat with `overwrite_existing=true` to replace it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Admin"],"summary":"Delete Api Client Whitelabel Banner","description":"Delete the banner image.","operationId":"delete_api_client_whitelabel_banner_api_api_client_whitelabel_banner_delete","responses":{"200":{"description":"The banner was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelBannerMutationResponse"}}}},"404":{"description":"No banner is stored for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/email-domain":{"get":{"tags":["Admin"],"summary":"Get Api Client Email Domain","description":"Read your white-label sending domain, its verification status, and the DNS records you need to publish.","operationId":"get_api_client_email_domain_api_api_client_email_domain_get","responses":{"200":{"description":"The current sending domain.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Set Api Client Email Domain","description":"Configure (or replace) the reseller's whitelabel sending domain. Registers\nit with Mailgun and returns the DNS records the reseller must publish. The\ndomain stays ``pending`` until verified, so sends keep falling back to the\nLightning Payroll sender until then.\n\nAccepted keys in `payload`:\n  - `sending_domain`: string, **required**. The domain branded email is sent from,\n    e.g. `\"mail.example.com\"`. Missing or unusable values answer 422.\n  - `from_local_part`: string, optional. Local part of the From address on that\n    domain, so `\"no-reply\"` gives `no-reply@mail.example.com`. Only applied when the\n    key is present.\n  - `reply_to`: string, optional. A valid email address used as Reply-To. Only\n    applied when the key is present.","operationId":"set_api_client_email_domain_api_api_client_email_domain_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"The domain was registered. Publish the returned `dnsRecords`, then call the verify endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainMutationResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"`sending_domain` was missing, or was not a usable hostname.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"502":{"description":"Our email provider rejected the domain registration.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"503":{"description":"Email sending domains are not available on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"delete":{"tags":["Admin"],"summary":"Delete Api Client Email Domain","description":"Remove your white-label sending domain. Branded email falls back to the Lightning Payroll sender immediately. Removal from the email provider is best-effort and its failure does not fail this call.","operationId":"delete_api_client_email_domain_api_api_client_email_domain_delete","responses":{"200":{"description":"The sending domain was removed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainMutationResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/email-domain/verify":{"post":{"tags":["Admin"],"summary":"Verify Api Client Email Domain","description":"Ask Mailgun to re-check the domain's DNS now and update our status.","operationId":"verify_api_client_email_domain_api_api_client_email_domain_verify_post","responses":{"200":{"description":"The re-check ran. Read `email_domain.status` for the outcome; it stays `pending` until the DNS records resolve.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainResponse"}}}},"404":{"description":"No sending domain is configured for this account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}},"403":{"description":"The authenticated customer is not an API admin."},"503":{"description":"Email sending domains are not available on this deployment.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/email-domain/test":{"post":{"tags":["Admin"],"summary":"Send Api Client Email Domain Test","description":"Send a test email through the verified sending domain to the api-admin's\nown address, so they can confirm branded delivery end-to-end.","operationId":"send_api_client_email_domain_test_api_api_client_email_domain_test_post","responses":{"200":{"description":"A test email was queued to the API admin's own address.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmailDomainTestResponse"}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."},"409":{"description":"The sending domain is not verified yet, so a test cannot be sent through it.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WhitelabelAssetError"}}}}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/webhooks":{"get":{"tags":["Admin"],"summary":"List your webhook endpoints","description":"Return every webhook endpoint registered by the authenticated API admin, together with `availableEvents`, the full catalogue of event types you may subscribe to. That catalogue is generated from the server's own list, so it is always current.\n\nEndpoints are scoped to your own account. You never see another partner's endpoints, and the signing secret is never returned here: `hasSecret` tells you one is set without disclosing it.\n\nRequires an access token belonging to an API admin customer.","operationId":"list_webhooks_api_webhooks_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]},"post":{"tags":["Admin"],"summary":"Register a webhook endpoint","description":"Register a URL that we POST event notifications to.\n\n**Request body**\n\n- `url` (string, required). An absolute `http` or `https` URL. The host must resolve to a publicly routable address: `localhost`, any `.localhost` / `.local` / `.internal` name, loopback, private RFC1918 ranges, link-local and cloud-metadata (169.254.x.x), multicast and other reserved ranges are all rejected, as is a host that does not resolve. Use `https`: the payload carries payroll data. The value is lightly normalised before storage: surrounding whitespace is trimmed and `<` and `>` are stripped. It may be at most 512 characters; anything longer is rejected with a `422` rather than truncated.\n- `events` (array of string, required). A non-empty list drawn from `availableEvents` on `GET /api/webhooks`. There is no wildcard, so name every event you want.\n- `description` (string, optional, at most 255 characters). Free text for your own routing notes. Surrounding whitespace is trimmed; anything longer than 255 characters is rejected with a `422` rather than truncated.\n- `is_active` (boolean, optional, defaults to `true`). An inactive endpoint is never delivered to.\n- `secret` (string, optional, at most 128 characters). Your own signing secret. Omit it and a strong one is generated for you.\n\n**The response is the only place the plaintext secret is ever returned.** Store it when you receive it. There is no endpoint that reads it back; the only remedy for a lost secret is rotating it, which invalidates the old one immediately.","operationId":"create_webhook_api_webhooks_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Payload"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"The body was rejected. Two different shapes are possible at this status. Rejections raised by this endpoint return `{\"detail\": \"<reason>\"}`, where the reason is one of `events must be a non-empty list`, `Unsupported event in events list`, `Signing secret must be at most 128 characters`, `Webhook description must be at most 255 characters`, `Webhook URL is required`, `Webhook URL must be at most 512 characters`, `Webhook URL must be an absolute http or https URL`, `Webhook URL may not target an internal host`, `Webhook URL may not target an internal or private address`, or `Could not resolve the webhook host`. A body that is malformed JSON or is not a JSON object fails earlier, in request validation, and returns `{\"status_code\": 10422, \"message\": ..., \"data\": ...}` with no `detail` key. Read `detail` first and fall back to `message`."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/webhooks/{webhook_id}":{"patch":{"tags":["Admin"],"summary":"Update a webhook endpoint","description":"Partially update one of your own endpoints. Only the keys present in the body are changed, so `{\"is_active\": false}` pauses deliveries and leaves the URL, events and secret untouched.\n\n**Accepted keys**: `url`, `events`, `description`, `is_active`, `regenerate_secret`. `url`, `events` and `description` are validated exactly as they are on create.\n\nSend `\"regenerate_secret\": true` to rotate the signing secret. The new value is returned once, as `webhook.secret` in this response, and never again. Rotation is not zero-downtime: the new value does not exist until this request returns, and it is already live for events that are queued but not yet delivered at that moment, so deploy it to your verifier immediately and let the retry schedule cover the gap. Note `secret` is NOT an accepted key here, so supplying your own value on an update returns 200 and is silently ignored. On any update other than a rotation `webhook.secret` comes back `null`, which means unchanged rather than cleared.","operationId":"update_webhook_api_webhooks__webhook_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Payload"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"No webhook with that id belongs to you."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"`events` was present but empty or contained an unsupported event, or `url` or `description` failed validation. Same `{\"detail\": \"<reason>\"}` shape and reasons as `POST /api/webhooks`."}}},"delete":{"tags":["Admin"],"summary":"Delete a webhook endpoint","description":"Permanently delete one of your own endpoints.\n\nIts entire delivery history is deleted along with it and cannot be recovered, so export anything you still need from `GET /api/webhooks/deliveries` first. To stop deliveries while keeping the history, PATCH the endpoint with `{\"is_active\": false}` instead.","operationId":"delete_webhook_api_webhooks__webhook_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"path","required":true,"schema":{"type":"integer","title":"Webhook Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"No webhook with that id belongs to you."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/webhooks/deliveries":{"get":{"tags":["Admin"],"summary":"List recent webhook delivery attempts","description":"Inspect what we tried to send you and what happened, so you can debug a listener without waiting for the next real event. Newest first, and scoped to your own endpoints.\n\nEach row carries `status`, `attemptCount`, `responseCode`, `lastError` and the exact `payload` we sent, so a failed delivery can be replayed against your own handler by hand.\n\n`status` is one of `pending` (queued, not yet attempted), `sending` (an attempt is in flight), `retry` (failed, will be attempted again at `nextAttemptAt`), `delivered` (we got a 2xx), `failed` (terminal, no further attempts) or `skipped` (the endpoint was deleted or deactivated before the attempt was made).\n\nThere is no `offset` parameter: results are always the newest rows, so narrow with `webhook_id` and `status` rather than trying to page beyond `limit`.","operationId":"list_webhook_deliveries_api_webhooks_deliveries_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"webhook_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Only return deliveries for this endpoint id. Omit for all of your endpoints.","title":"Webhook Id"},"description":"Only return deliveries for this endpoint id. Omit for all of your endpoints.","example":1},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only return deliveries in this state: `pending`, `sending`, `retry`, `delivered`, `failed` or `skipped`. Omit for all states.","title":"Status"},"description":"Only return deliveries in this state: `pending`, `sending`, `retry`, `delivered`, `failed` or `skipped`. Omit for all states.","example":"failed"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum rows to return, newest first.","default":100,"title":"Limit"},"description":"Maximum rows to return, newest first.","example":100}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/faqs":{"get":{"tags":["FAQs"],"summary":"List published FAQs (knowledge base articles)","description":"List active FAQ knowledge-base articles for API-admin clients.\n\nScoped to the requested ``site_mode`` (``au`` or ``nz``). Optionally filter by ``category``\n(case-insensitive exact match) or ``search`` (case-insensitive substring over heading and message).\n\nThe ``format`` parameter controls how the FAQ body HTML is rendered:\n\n- ``raw`` (default) — original HTML returned byte-for-byte; caller is responsible for sanitisation.\n- ``sanitized`` — bleach-cleaned to a safe HTML subset; scripts, event handlers, and ``javascript:``\n  URLs are stripped.\n- ``text`` — all tags stripped; plain text suitable for previews or search indexing.\n\nResults are ordered by ``last_edited`` descending (most recently edited first), with ``id``\ndescending as a stable tiebreak. Use ``limit`` / ``offset`` for pagination; ``total`` in the\nresponse reflects the full unpaginated match count.","operationId":"list_faqs_api_faqs_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"site_mode","in":"query","required":false,"schema":{"enum":["au","nz"],"type":"string","description":"Region scope for FAQs. One of 'au' or 'nz'.","default":"au","title":"Site Mode"},"description":"Region scope for FAQs. One of 'au' or 'nz'.","example":"au"},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Optional exact category filter (case-insensitive).","title":"Category"},"description":"Optional exact category filter (case-insensitive).","example":"Single Touch Payroll"},{"name":"search","in":"query","required":false,"schema":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"description":"Optional case-insensitive substring match against heading and message.","title":"Search"},"description":"Optional case-insensitive substring match against heading and message.","example":"payday filing"},{"name":"format","in":"query","required":false,"schema":{"enum":["raw","text","sanitized"],"type":"string","description":"How to render the FAQ body. 'raw' = original HTML, 'text' = HTML stripped to plain text, 'sanitized' = safe HTML subset.","default":"raw","title":"Format"},"description":"How to render the FAQ body. 'raw' = original HTML, 'text' = HTML stripped to plain text, 'sanitized' = safe HTML subset.","example":"raw"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum FAQs to return.","default":50,"title":"Limit"},"description":"Maximum FAQs to return.","example":50},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of FAQs to skip (for pagination).","default":0,"title":"Offset"},"description":"Number of FAQs to skip (for pagination).","example":0}],"responses":{"200":{"description":"Active FAQs for the requested site mode.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FaqListResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not an API admin."},"422":{"description":"Invalid query parameter value."}}}},"/api/partner-checkout/options":{"get":{"tags":["Admin"],"summary":"List partner checkout product options","description":"Return the currently valid partner-checkout subscription and add-on products for the authenticated\ngroup-9 API-admin customer.\n\nUse this before checkout requests so product IDs, per-employee rules, and add-on availability do\nnot need to be hard-coded by the integrator.","operationId":"get_partner_checkout_options_api_partner_checkout_options_get","responses":{"200":{"description":"Partner checkout options for the authenticated API-admin referrer","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutOptionsResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope"}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/partner-checkout/availability":{"get":{"tags":["Admin"],"summary":"Check partner checkout availability for email, ABN, or IRD","description":"Check whether one or more proposed identifiers are already in use before calling the main\npartner-checkout order endpoint.\n\nYou can supply any combination of `email`, `abn`, and `irdNumber` in one request.","operationId":"get_partner_checkout_availability_api_partner_checkout_availability_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"email","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Customer email to check.","title":"Email"},"description":"Customer email to check.","example":"alice@example.com"},{"name":"abn","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ABN to check.","title":"Abn"},"description":"ABN to check.","example":"10000000000"},{"name":"irdNumber","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Employer IRD number to check.","title":"Irdnumber"},"description":"Employer IRD number to check.","example":"49091850"}],"responses":{"200":{"description":"Availability check results for the provided identifiers","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutAvailabilityResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope"},"422":{"description":"No identifiers were provided"}}}},"/api/partner-checkout/zones":{"get":{"tags":["Admin"],"summary":"List allowed countries and their states/regions for partner checkout","description":"Return the allowed countries and their states/regions for partner checkout billing addresses.\n\nUse the returned `zone_code` values when constructing `billing_address.zone_code` in checkout requests.","operationId":"get_partner_checkout_zones_api_partner_checkout_zones_get","responses":{"200":{"description":"Allowed countries (AU, NZ) with their states/regions","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutZonesResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope"}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/partner-checkout/orders":{"post":{"tags":["Admin"],"summary":"Preview or execute a partner checkout order","description":"Create a new customer, billed-account order, and initial subscription for an authenticated\ngroup-9 API-admin partner.\n\nRecommended sequence:\n1. `GET /api/partner-checkout/options`\n2. `POST /api/partner-checkout/orders` with `dry_run=true`\n3. Repeat the same payload with `dry_run=false` and an `Idempotency-Key` header\n\nTo order for a customer you already provisioned, for example converting a free trial from\n`POST /api/partner-checkout/trials` into a paid subscription, supply `end_customer_id`. No new\ncustomer is created, their billing address is updated in place, any running trial subscription is\nretired so the paid plan's limits take effect, and the password-reset welcome email is not resent.\nIf that customer has already used their free trial month, no additional free month is applied: the\nrequest still succeeds, `free_trial_month_applied` is `false`, and `warnings` explains why. A\ncustomer you provisioned without one still receives it, subject to `add_free_trial_month`.","operationId":"create_partner_checkout_order_api_partner_checkout_orders_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required for non-dry-run requests. Reuse the same key to safely retry the same execution request.","title":"Idempotency-Key"},"description":"Required for non-dry-run requests. Reuse the same key to safely retry the same execution request.","example":"7b2e6b0e-6e0b-4e21-8f8e-6b1a2c3d4e5f"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutRequest"}}}},"responses":{"200":{"description":"Validated preview or completed partner checkout order","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutResponse"}}}},"404":{"description":"Not found"},"400":{"description":"Invalid product combination, missing idempotency key, or other bad request"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope"},"409":{"description":"Duplicate email/ABN/IRD, or reused Idempotency-Key with a different payload"},"429":{"description":"Too many company-claim attempts. Retry after a minute."},"422":{"description":"Payload validation error"}}},"get":{"tags":["Admin"],"summary":"List partner checkout orders you generated","description":"Paginated list of partner-checkout orders generated by this API admin, newest-first.","operationId":"list_partner_checkout_orders_api_partner_checkout_orders_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":0},{"type":"null"}],"description":"Filter by order_status_id (e.g. 5 = completed, 7 = cancelled).","title":"Status"},"description":"Filter by order_status_id (e.g. 5 = completed, 7 = cancelled)."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of results to return.","default":25,"title":"Limit"},"description":"Maximum number of results to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip.","default":0,"title":"Offset"},"description":"Number of results to skip."}],"responses":{"200":{"description":"Paginated list of partner-checkout orders generated by this API admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutOrderListResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-checkout/upgrades":{"post":{"tags":["Admin"],"summary":"Preview or execute a partner-driven subscription upgrade","description":"Upgrade an existing customer subscription that this API admin originally onboarded.\n\nMirrors `payroll_web/catalog/view/theme/payroll/template/checkout/store.tpl`'s three upgrade modes:\n\n- **`order.mode = \"addon\"`** — leave the existing base subscription and its add-ons untouched; bolt\n  on one or more new add-ons priced prorata to the existing subscription's remaining term. No new\n  subscription row is created; new `subscription_add_on` rows are attached to the existing sub.\n\n- **`order.mode = \"base\"`** — replace the existing base subscription with `new_product_id`. The\n  remaining inc-tax value of the existing base + eligible add-ons is applied as a single\n  `upgrade_credit` line on the new order. The existing subscription's `renewal_id` is set to point\n  at the new subscription. Existing add-ons are **not** carried over unless re-listed in\n  `add_on_product_ids`.\n\n- **`order.mode = \"both\"`** — same as `base`, but the partner also picks the full final add-on set\n  for the new subscription.\n\nRecommended sequence:\n1. `GET /api/partner-checkout/options` (browse subscription/add-on products)\n2. `GET /api/partner-checkout/orders/{order_id}` (recover the `subscription_id` of the target sub)\n3. `POST /api/partner-checkout/upgrades` with `dry_run=true` to preview totals\n4. Repeat with `dry_run=false` and an `Idempotency-Key` header\n\nConstraints:\n- Welcome-offer promos are never applied on upgrades (mirrors PHP behavior).\n- Downgrades (where the new order value ≤ existing credit + $0.009 inc-tax) are rejected with 400.\n- Upgrading an already-expired subscription returns 409 — onboard a fresh subscription via\n  `POST /api/partner-checkout/orders` instead.\n- The mandatory training session product is **not** appended on upgrade orders.\n- The 60-day cancel window on the new upgrade order is calculated from the existing customer's\n  original `date_added`, not from the upgrade order's own date.","operationId":"create_partner_checkout_upgrade_api_partner_checkout_upgrades_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required for non-dry-run requests. Reuse the same key to safely retry the same upgrade.","title":"Idempotency-Key"},"description":"Required for non-dry-run requests. Reuse the same key to safely retry the same upgrade.","example":"9c3f7d1a-2b48-4c6d-9e0f-1a2b3c4d5e6f"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutUpgradeRequest"}}}},"responses":{"200":{"description":"Validated preview or completed partner upgrade order.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutUpgradeResponse"}}}},"404":{"description":"Target subscription not found."},"400":{"description":"Invalid mode/field combination, downgrade attempt, or other bad request."},"403":{"description":"Forbidden: caller is not a group-9 API admin, lacks the required scope, or did not onboard the target subscription."},"409":{"description":"Subscription already renewed/upgraded, already expired, or Idempotency-Key reused with different payload."},"422":{"description":"Payload validation error."}}}},"/api/partner-checkout/orders/cancel":{"post":{"tags":["Admin"],"summary":"Cancel a partner checkout order generated by this API admin","description":"Cancel an order that the authenticated group-9 API-admin partner previously generated via\n`POST /api/partner-checkout/orders`.\n\nRequires `partner.checkout.cancel` (preferred) or `partner.checkout.write` and must target\nan order this partner generated.\nOrders are only cancellable within 60 days of the customer being added.\n\nSets `order.order_status_id = 7` and appends an `order_history` note explaining the cancellation.","operationId":"cancel_partner_checkout_order_api_partner_checkout_orders_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutCancelOrderRequest"}}},"required":true},"responses":{"200":{"description":"Order was cancelled. order_status_id is set to 7.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutCancelOrderResponse"}}}},"404":{"description":"Order not found."},"403":{"description":"Forbidden: caller is not a group-9 API admin, lacks the required scope, or did not generate the order."},"409":{"description":"Order is already cancelled, or past the 60-day cancellation window."},"422":{"description":"Payload validation error."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/partner-checkout/orders/{order_id}":{"get":{"tags":["Admin"],"summary":"Look up a partner checkout order you generated","description":"Return the current status, totals, subscription, and order_history for a partner-checkout order\nthis API admin previously generated.","operationId":"get_partner_checkout_order_api_partner_checkout_orders__order_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"The order.order_id to look up.","title":"Order Id"},"description":"The order.order_id to look up.","example":192484}],"responses":{"200":{"description":"Order details including current status, subscription, and history.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutOrderDetailResponse"}}}},"404":{"description":"Order not found."},"403":{"description":"Forbidden: caller is not a group-9 API admin, lacks the required scope, or did not generate the order."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-checkout/orders/{order_id}/resend-onboarding-link":{"post":{"tags":["Admin"],"summary":"Resend a customer's OAuth magic onboarding link","description":"Re-issue and email a fresh single-use OAuth magic onboarding link to the customer created by a\npartner-checkout order this API admin generated.\n\nUse when the original 24-hour link expired before the customer used it. Requires\n`partner.checkout.write`, and that the customer was originally provisioned with `oauth_onboarding`\nand has not yet completed onboarding. Supply the same `oauth_onboarding` block as the original order\n(it is re-validated against your current OAuth client). Any previously issued, unused link is\ninvalidated. The link itself is emailed only to the customer and is never returned.","operationId":"resend_partner_checkout_onboarding_link_api_partner_checkout_orders__order_id__resend_onboarding_link_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"order_id","in":"path","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"description":"The order.order_id whose customer should be re-sent their onboarding link.","title":"Order Id"},"description":"The order.order_id whose customer should be re-sent their onboarding link.","example":192484}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutResendOnboardingRequest"}}}},"responses":{"200":{"description":"A fresh single-use magic onboarding link was emailed to the customer. The link is never returned.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutResendOnboardingResponse"}}}},"404":{"description":"Order or customer not found."},"400":{"description":"oauth_onboarding is missing or no longer valid against your OAuth client."},"403":{"description":"Forbidden: caller is not a group-9 API admin, lacks partner.checkout.write, or did not generate the order."},"409":{"description":"Customer was not OAuth-onboarded, or has already completed onboarding."},"502":{"description":"The onboarding email could not be sent; no new link was issued."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner/session-handoff":{"post":{"tags":["Authentication"],"summary":"Exchange a user's access token for a single-use sign-in link","description":"Turn an access token you already hold for one of your users into a URL that signs that same user\ninto Lightning Payroll and lands them on that company's Pays screen. The token must carry the\n`session.handoff` OAuth scope, and the OAuth client must be enabled for handoff.\n\nCall this from your server with the user's own access token in the `Authorization` header, then\nredirect their browser to the `signin_url` you get back. The link works once and expires in 60\nseconds, so redirect straight away rather than storing or emailing it.\n\nThis grants nothing new. The session it produces is exactly the one that token already stood for,\nwhich is why there is no extra consent step and no second one-time code: both happened when your\nuser completed the OAuth flow. A token issued to the account owner produces an owner session, and a\ntoken issued to a payroll user produces that payroll user's session, with their permissions.\n\nIf you have no valid token for a user, or refreshing theirs fails, send them through\n`/api/oauth/authorize` as normal and use the token that produces.\n\nDo not put the access token in a browser URL yourself as a shortcut. It would be captured by\nbrowser history, the `Referer` header, and every log between you and us. That is the leak this\nendpoint exists to avoid.","operationId":"create_partner_session_handoff_api_partner_session_handoff_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSessionHandoffRequest"}}},"required":true},"responses":{"200":{"description":"A single-use sign-in URL was issued for the token's user.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerSessionHandoffResponse"}}}},"404":{"description":"No company found with the given company_id."},"403":{"description":"Not a partner access token, missing `session.handoff`, client not enabled, or user cannot access the company."},"422":{"description":"`target` is not `pays`, or `company_id` is missing or invalid."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/partner-checkout/trials":{"post":{"tags":["Admin"],"summary":"Create a free trial for an end customer","description":"Create a customer on a free one-month trial, with no order and nothing to pay.\n\nUse this instead of placing an order with `add_free_trial_month` when you want the customer to\nevaluate the product first. A trial writes no order, so it never appears on an invoice and is\nnever renewed. Requires `partner.checkout.write`.\n\nThe customer is emailed a branded link to set their password and start the trial (or a single-use\nmagic OAuth onboarding link if you supply `oauth_onboarding`). You receive no invoice, because\nnothing has been charged.\n\nThe company's ABN or IRD number is claimed at this point, so no other reseller can start a\ncompeting trial for the same entity, and your later order for the same company is accepted.\n\nWhen the trial ends, place the real order with `POST /api/partner-checkout/orders`, passing the\n`customer_id` from this response as `end_customer_id`. That customer has already had their free\nmonth, so no extra free month is added to the order.","operationId":"create_partner_checkout_trial_api_partner_checkout_trials_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Required. Reuse the same key to safely retry the same trial request.","title":"Idempotency-Key"},"description":"Required. Reuse the same key to safely retry the same trial request.","example":"4e8a1c92-5d37-4f0b-8c21-7d9e0f1a2b3c"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutTrialRequest"}}}},"responses":{"200":{"description":"Trial created. The customer has been emailed their access.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutTrialResponse"}}}},"404":{"description":"Not found"},"400":{"description":"Missing Idempotency-Key, invalid company identifier, or misconfigured oauth_onboarding."},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope."},"409":{"description":"Duplicate email, ABN or IRD number, or a reused Idempotency-Key with a different payload."},"429":{"description":"Too many company-claim attempts. Retry after a minute."},"422":{"description":"Payload validation error."}}},"get":{"tags":["Admin"],"summary":"List free trials you created","description":"Paginated list of the free trials you created, newest first.\n\nEach row carries `trial_expiry` and `days_remaining` so you can tell when to convert a customer,\nand `converted` / `converted_order_id` so you can tell which ones you already have.","operationId":"list_partner_checkout_trials_api_partner_checkout_trials_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(active|expired|cancelled)$"},{"type":"null"}],"description":"Filter by trial status: `active`, `expired`, or `cancelled`.","title":"Status"},"description":"Filter by trial status: `active`, `expired`, or `cancelled`."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Maximum number of results to return.","default":25,"title":"Limit"},"description":"Maximum number of results to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip.","default":0,"title":"Offset"},"description":"Number of results to skip."}],"responses":{"200":{"description":"Paginated list of trials created by this API admin.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutTrialListResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-checkout/trials/cancel":{"post":{"tags":["Admin"],"summary":"Cancel a free trial you created","description":"End a trial you created before its expiry date, for example when it was provisioned against the\nwrong entity. Requires `partner.checkout.cancel` (preferred) or `partner.checkout.write`, and must\ntarget a trial you created.\n\nThe trial subscription's expiry is set to yesterday, so the customer's access ends immediately.\nThe customer record and the trial history are kept for audit; nothing is deleted.\n\nNote that cancelling does NOT release the company's claimed ABN or IRD number, because that record\ncan carry live accounting-integration connections. If you need to re-provision the same company\nunder a different email address, contact support.","operationId":"cancel_partner_checkout_trial_api_partner_checkout_trials_cancel_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutTrialCancelRequest"}}},"required":true},"responses":{"200":{"description":"Trial cancelled. Access ended immediately.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutTrialCancelResponse"}}}},"404":{"description":"Trial not found."},"403":{"description":"Forbidden: caller is not a group-9 API admin, lacks the required scope, or did not create the trial."},"409":{"description":"Trial is already cancelled."},"422":{"description":"Payload validation error."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/partner-checkout/customers/{customer_id}":{"get":{"tags":["Admin"],"summary":"Look up a client's identity and subscription state","description":"Who a client is and whether they are currently subscribed. Requires any partner checkout scope.\n\nUse this to resolve the `customerId` you receive on a webhook, or one you stored at onboarding,\ninto a name, an email, and the plans that client holds right now.\n\nYou can look up three kinds of client: those you onboarded through partner checkout, those you\nstarted on a free trial, and those who have authorised your OAuth client. The last case means an\nintegration that only ever connects to customers who already subscribe can still read their state,\neven though it has never placed an order. Any other customer id returns `404`, whether or not it\nexists. Cancelling a trial or an order does not end the relationship.\n\n`has_active_subscription` is the check that decides whether a client's data is writable. When it is\nfalse, reads keep working but writes return `403`, so testing this flag first tells you the\ndifference between a client who has lapsed and a genuine integration fault.\n\n`subscriptions` lists the current term of each subscription, latest expiry first, and is empty for a\nclient who has never subscribed. `status` goes to `lapsed` on the day after `expiry`. Watch\n`is_trial`, since a trial reads as active right up until it ends, and a trial has no order line\nbehind it, so its `product_id`, `product_name`, `quantity` and `is_monthly` are all null.","operationId":"get_partner_checkout_customer_info_api_partner_checkout_customers__customer_id__get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"integer","title":"Customer Id"}}],"responses":{"200":{"description":"The client's contact details and current subscription terms.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutCustomerInfoResponse"}}}},"404":{"description":"No such client, or you have no relationship with them."},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-checkout/renewals":{"get":{"tags":["Admin"],"summary":"List your clients' upcoming renewals","description":"Every client subscription you onboarded that has not yet renewed, oldest expiry first.\n\nEach entry carries the plan the client is on now, whether they renew monthly or annually, whether\nautomatic renewal is switched on, and the upcoming renewal line where one has been prepared.\n\n`pending_renewal` is null until a renewal order exists. Those are prepared 30 days before expiry\nfor annual subscriptions, and same-day as the previous renewal for monthly ones, so a monthly\nclient nearly always has one you can change.","operationId":"list_partner_checkout_renewals_api_partner_checkout_renewals_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"description":"Maximum number of results to return.","default":50,"title":"Limit"},"description":"Maximum number of results to return."},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"description":"Number of results to skip.","default":0,"title":"Offset"},"description":"Number of results to skip."}],"responses":{"200":{"description":"Paginated list of client subscriptions you onboarded, oldest expiry first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutRenewalListResponse"}}}},"404":{"description":"Not found"},"403":{"description":"Forbidden: caller is not a group-9 API admin or lacks the required scope."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/partner-checkout/renewals/{subscription_id}":{"patch":{"tags":["Admin"],"summary":"Change what a client renews onto, or turn auto-renewal on and off","description":"Set the plan a client renews onto, and whether they renew automatically. Requires\n`partner.checkout.write`, and the subscription must be one your account onboarded.\n\nThis is how you move a client down a tier. Mid-term downgrades are rejected at checkout, because a\npart-used higher plan is worth more than the lower plan you would be buying, but the plan a client\nrenews onto is yours to set. Pair it with a monthly billing cycle and a seasonal client can move up\nwhen their headcount rises and back down at the end of the month.\n\nChanging `renewal_product_id` edits the pending renewal order, so it only works while one exists and\nis still pending. Call `GET /api/partner-checkout/renewals` first and check `pending_renewal` is not\nnull. The line is repriced at your negotiated reseller rate. Per-employee quantity is kept as it is,\nunless it sits below the client's per_employee_minimum (default 15), in which case it is raised to\nthat floor.\n\n`auto_renew_on` is stored against the end customer rather than the subscription, so it applies to\nevery subscription that customer holds. The response lists each one it affected.\n\nBy default a short notification is emailed to you whenever the renewal line actually changes. Set\n`send_renewal_notification` to false to suppress it and reconcile from the response instead.","operationId":"update_partner_checkout_renewal_api_partner_checkout_renewals__subscription_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"subscription_id","in":"path","required":true,"schema":{"type":"integer","title":"Subscription Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutRenewalUpdateRequest"}}}},"responses":{"200":{"description":"Renewal settings updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PartnerCheckoutRenewalUpdateResponse"}}}},"404":{"description":"Subscription not found."},"403":{"description":"Forbidden: caller is not a group-9 API admin, lacks the required scope, or did not onboard this subscription."},"409":{"description":"No pending renewal order exists yet, or it is no longer editable, or neither the renewal order's billing country nor your account's billing address resolves to AU or NZ."},"422":{"description":"Payload validation error, or the product is not one you can renew a client onto."}}}},"/api/api-client/overview":{"get":{"tags":["Admin"],"summary":"Get Api Client Overview","description":"Roll-up metrics for your OAuth client: connected customers, tokens issued, and request and error volumes. Request metrics cover the request-log retention window only, so `requestsLast90Days` and its siblings go no further back than that.","operationId":"get_api_client_overview_api_api_client_overview_get","responses":{"200":{"description":"Client metrics.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiClientOverviewResponse"}}}},"404":{"description":"No OAuth client has been provisioned for this account yet. Call GET /api/init-api-client first."},"403":{"description":"The authenticated customer is not an API admin."}},"security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}]}},"/api/api-client/connections":{"get":{"tags":["Admin"],"summary":"List Api Client Connections","description":"List the end customers connected to your OAuth client, with per-customer token and request metrics. Your own customer record is excluded. Results are sorted by last activity, newest first.","operationId":"list_api_client_connections_api_api_client_connections_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"enum":["all","active","inactive"],"type":"string","description":"Filter connections by status.","default":"all","title":"Status"},"description":"Filter connections by status."}],"responses":{"200":{"description":"Connected customers.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiClientConnectionListResponse"}}}},"404":{"description":"No OAuth client has been provisioned for this account yet. Call GET /api/init-api-client first."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-client/connections/{customer_id}":{"delete":{"tags":["Admin"],"summary":"Revoke Api Client Connection","description":"Sever one end customer's connection to your OAuth client.\n\nThis revokes every live refresh token they hold under your client **and** invalidates any authorization code they have been issued but not yet exchanged. That second step matters: an unexchanged code is still redeemable for a fresh token pair, so without it the customer could re-establish the connection you just severed. Historical logs are not deleted.","operationId":"revoke_api_client_connection_api_api_client_connections__customer_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"path","required":true,"schema":{"type":"integer","description":"Customer ID to revoke access for.","title":"Customer Id"},"description":"Customer ID to revoke access for."}],"responses":{"200":{"description":"The connection was revoked.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiClientConnectionRevokeResponse"}}}},"404":{"description":"That customer has no refresh tokens **and** no unused authorization codes for your client, so there is nothing to revoke. A customer who has authorized but not yet exchanged their code still counts as a connection."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-client/activity":{"get":{"tags":["Admin"],"summary":"Get Api Client Activity","description":"Recent authorization-code and refresh-token events for your OAuth client, newest first. `limit` is applied to each event type before the two are merged and trimmed, so a busy client may return fewer than `limit` of either kind.","operationId":"get_api_client_activity_api_api_client_activity_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Optional customer filter.","title":"Customer Id"},"description":"Optional customer filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":250,"minimum":1,"description":"Maximum activity entries to return.","default":50,"title":"Limit"},"description":"Maximum activity entries to return."}],"responses":{"200":{"description":"Recent OAuth activity.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiClientActivityResponse"}}}},"404":{"description":"No OAuth client has been provisioned for this account yet. Call GET /api/init-api-client first."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/api-client/errors":{"get":{"tags":["Admin"],"summary":"Get Api Client Errors","description":"Recent 4xx and 5xx responses your OAuth client received, plus a summary by status code and by endpoint. Covers the request-log retention window only.","operationId":"get_api_client_errors_api_api_client_errors_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"customer_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Optional customer filter.","title":"Customer Id"},"description":"Optional customer filter."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"description":"Maximum error entries to return.","default":100,"title":"Limit"},"description":"Maximum error entries to return."}],"responses":{"200":{"description":"Recent errors and their summary.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiClientErrorsResponse"}}}},"404":{"description":"No OAuth client has been provisioned for this account yet. Call GET /api/init-api-client first."},"403":{"description":"The authenticated customer is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/bank-accounts":{"get":{"tags":["Employee"],"summary":"Get Employee Bank Accounts","description":"Get employee bank accounts by Lightning Payroll Employee ID, default account first then secondaries in rank order.","operationId":"get_employee_bank_accounts_api_employees__employee_id__bank_accounts_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"responses":{"200":{"description":"The employee's bank accounts.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/BankAccount"},"title":"Response 200 Get Employee Bank Accounts Api Employees  Employee Id  Bank Accounts Get"}}}},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["Employee"],"summary":"Create Employee Bank Account","description":"Add a bank account to an employee.\n\nAn employee's bank accounts are one net pay split across up to 10 accounts.\n\nExactly one of them is the default account, marked by a `rank` of `null` or `0`, and it is paid the remainder of the pay. Accounts with `rank` 1 to N are secondary accounts, each paid the fixed `amount` set on it. Secondary ranks are always contiguous, so every write renumbers the employee's other accounts to keep them that way.\n\nA secondary account must be given an `amount` greater than zero. Lightning Payroll skips a ranked account that has no amount when it works out a pay's deposits, so such an account would report as saved and never be paid a cent.\n\n`rank` is not the order the accounts are filled in. Lightning Payroll fills the secondary accounts from the largest amount down, as far as the net pay stretches, and pays whatever is left into the default account.\n\nWhich identity fields are required depends on the company. An Australian company needs `bsb` and `account_number`. A New Zealand company needs all four of `nz_bank_id`, `nz_branch`, `nz_account_base` and `nz_suffix`, and the complete number must pass Inland Revenue's check digit validation. Sending a field from the other country's format is rejected rather than quietly ignored.\n\nBank accounts cannot be changed through the API while the employee portal owns them, which is the case for any employee who is allowed to edit their own bank accounts in the portal. Those writes return `409`, because the next portal sync would overwrite them. Turn portal bank account editing off for that employee first.\n\n`rank` means three separate things:\n\n- Omitted: on a create, the account is appended as the lowest priority secondary account and so needs an `amount`; on an update, the account stays where it is.\n- `null` or `0`: the account becomes the employee's default account, the one paid the remainder of each pay.\n- 1 or more: the account takes that secondary position and the others renumber around it. A rank past the last position simply places it last.\n\nAn employee's first account is always the default, whatever rank is sent, because an employee must always have exactly one account taking the remainder. For the same reason a rank of 1 or more is rejected on the account that is currently the default: promote a different account instead, by sending it a rank of `null`, which demotes the current default in the same request.\n\nPromoting an account to default demotes the previous default to secondary 1. Changing rank never touches a stored `amount`, so promoting an account and then promoting the original one back restores the split exactly as it was. Do note that a default account usually holds no amount, because the remainder account is not paid a fixed one, and a secondary with no amount is paid nothing until you give it an `amount`.\n\n`account_name` is required, along with the identity fields for the company's country. An eleventh account is rejected with `409`, as is an account number another of this employee's accounts already holds.","operationId":"create_employee_bank_account_api_employees__employee_id__bank_accounts_post","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`, or the account data was rejected. For example an account name or number that is not valid for the company's country, an incomplete New Zealand number or one that fails the check digit, a field belonging to the other country's format, a missing or zero `amount` on a secondary account, an `amount` or `alt_transaction_reference` on the default account, or a `rank` of 1 or more on the account that is currently the default."},"409":{"description":"The employee portal owns this employee's bank accounts, the employee already holds the maximum of 10 accounts, or another of their accounts already holds that account number."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/bank-accounts/{bank_account_id}":{"patch":{"tags":["Employee"],"summary":"Patch Employee Bank Account","description":"Partially update one of an employee's bank accounts. Supply only the fields you want to change; an empty body is a no-op.\n\nAn employee's bank accounts are one net pay split across up to 10 accounts.\n\nExactly one of them is the default account, marked by a `rank` of `null` or `0`, and it is paid the remainder of the pay. Accounts with `rank` 1 to N are secondary accounts, each paid the fixed `amount` set on it. Secondary ranks are always contiguous, so every write renumbers the employee's other accounts to keep them that way.\n\nA secondary account must be given an `amount` greater than zero. Lightning Payroll skips a ranked account that has no amount when it works out a pay's deposits, so such an account would report as saved and never be paid a cent.\n\n`rank` is not the order the accounts are filled in. Lightning Payroll fills the secondary accounts from the largest amount down, as far as the net pay stretches, and pays whatever is left into the default account.\n\nWhich identity fields are required depends on the company. An Australian company needs `bsb` and `account_number`. A New Zealand company needs all four of `nz_bank_id`, `nz_branch`, `nz_account_base` and `nz_suffix`, and the complete number must pass Inland Revenue's check digit validation. Sending a field from the other country's format is rejected rather than quietly ignored.\n\nBank accounts cannot be changed through the API while the employee portal owns them, which is the case for any employee who is allowed to edit their own bank accounts in the portal. Those writes return `409`, because the next portal sync would overwrite them. Turn portal bank account editing off for that employee first.\n\n`rank` means three separate things:\n\n- Omitted: on a create, the account is appended as the lowest priority secondary account and so needs an `amount`; on an update, the account stays where it is.\n- `null` or `0`: the account becomes the employee's default account, the one paid the remainder of each pay.\n- 1 or more: the account takes that secondary position and the others renumber around it. A rank past the last position simply places it last.\n\nAn employee's first account is always the default, whatever rank is sent, because an employee must always have exactly one account taking the remainder. For the same reason a rank of 1 or more is rejected on the account that is currently the default: promote a different account instead, by sending it a rank of `null`, which demotes the current default in the same request.\n\nPromoting an account to default demotes the previous default to secondary 1. Changing rank never touches a stored `amount`, so promoting an account and then promoting the original one back restores the split exactly as it was. Do note that a default account usually holds no amount, because the remainder account is not paid a fixed one, and a secondary with no amount is paid nothing until you give it an `amount`.\n\nSending any identity field re-validates the whole account number for the company's country, and re-keying a New Zealand account clears the `bsb` and `account_number` it may have held. Sending none of them leaves the stored number exactly as it is, which is what keeps a name, rank or amount edit working on an account that predates the New Zealand format.","operationId":"patch_employee_bank_account_api_employees__employee_id__bank_accounts__bank_account_id__patch","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1},{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the bank account.","title":"Bank Account Id"},"description":"The unique LP-generated ID of the bank account.","example":123}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccountUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BankAccount"}}}},"404":{"description":"No bank account with the given `bank_account_id` belongs to this employee."},"400":{"description":"No employee with the given `employee_id`, or the account data was rejected. For example an account name or number that is not valid for the company's country, an incomplete New Zealand number or one that fails the check digit, a field belonging to the other country's format, a missing or zero `amount` on a secondary account, an `amount` or `alt_transaction_reference` on the default account, or a `rank` of 1 or more on the account that is currently the default."},"409":{"description":"The employee portal owns this employee's bank accounts, the employee already holds the maximum of 10 accounts, or another of their accounts already holds that account number."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["Employee"],"summary":"Delete Employee Bank Account","description":"Delete a specific bank account for an employee by account ID.\n\nDeleting the default account promotes the first remaining secondary account in its place, and it is then paid the remainder of each pay rather than the fixed amount it held before (that amount is kept on the record, and applies again if the account is ever demoted back to a secondary). The secondaries that remain are renumbered so their ranks stay contiguous. Deleting an employee's last account is allowed.\n\nIf a deduction was paying into this account, the deduction still comes off the employee's net pay, but it stops producing its own line in the payment file. Point that deduction at another account if you still need the separate deposit.\n\nReturns `409` while the employee portal owns this employee's bank accounts, the same as the create and update endpoints.","operationId":"delete_employee_bank_account_api_employees__employee_id__bank_accounts__bank_account_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1},{"name":"bank_account_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the bank account.","title":"Bank Account Id"},"description":"The unique LP-generated ID of the bank account.","example":123}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"No bank account with the given `bank_account_id` belongs to this employee."},"400":{"description":"No employee with the given `employee_id`."},"409":{"description":"The employee portal owns this employee's bank accounts, so they cannot be deleted through the API."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/super-funds":{"get":{"tags":["Employee"],"summary":"Get Employee Super Funds","description":"AU only. Get employee super fund information by Lightning Payroll Employee ID. Soft-deleted funds are omitted.","operationId":"get_employee_super_funds_api_employees__employee_id__super_funds_get","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1}],"responses":{"200":{"description":"The employee's active super funds.","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/EmployeeSuperFund"},"title":"Response 200 Get Employee Super Funds Api Employees  Employee Id  Super Funds Get"}}}},"404":{"description":"Not found"},"400":{"description":"No employee with the given `employee_id`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/employees/{employee_id}/super-funds/{super_fund_id}":{"delete":{"tags":["Employee"],"summary":"Delete Employee Super Fund","description":"AU only. Delete an employee super fund by its ID and associated Lightning Payroll Employee ID.\n\nA fund carrying deposit history, or the employee's default fund, is soft-deleted so its SuperStream contribution history survives; any other fund is removed outright. Either way it stops appearing in GET /employees/{employee_id}/super-funds.","operationId":"delete_employee_super_fund_api_employees__employee_id__super_funds__super_fund_id__delete","security":[{"OAuth2PasswordBearer":[]},{"HTTPBearer":[]}],"parameters":[{"name":"employee_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique LP-generated ID of the employee.","title":"Employee Id"},"description":"The unique LP-generated ID of the employee.","example":1},{"name":"super_fund_id","in":"path","required":true,"schema":{"type":"integer","description":"The unique ID of the employee super fund to be deleted.","title":"Super Fund Id"},"description":"The unique ID of the employee super fund to be deleted.","example":10}],"responses":{"200":{"description":"The super fund was deleted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetailResponse"}}}},"404":{"description":"No super fund with the given `super_fund_id` belongs to this employee."},"400":{"description":"No employee with the given `employee_id`."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public-branding":{"get":{"tags":["Authentication"],"summary":"Fetch public branding for unauthenticated flows","description":"Resolve the branding to render on an unauthenticated page (login, onboarding, password reset) before any customer is known.\n\nPass either `client_id` (your OAuth client, for partner login flows) or `branding_token` (for partner-branded public pages). With neither, or when neither resolves to a branded reseller, the response is the Lightning Payroll default with `branding.source_type` of `public_default`.\n\nNo authentication is required, and only presentation data is returned.","operationId":"public_branding_api_public_branding_get","parameters":[{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"OAuth client ID for partner login flows","title":"Client Id"},"description":"OAuth client ID for partner login flows"},{"name":"branding_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Public branding token for partner-branded public pages","title":"Branding Token"},"description":"Public branding token for partner-branded public pages"}],"responses":{"200":{"description":"The branding to render.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicBrandingResponse"}}}},"404":{"description":"No client matched the supplied `client_id`, or no customer owns the supplied `branding_token`."},"403":{"description":"The supplied `client_id` resolved to a customer that is not an API admin."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/public-branding/logo":{"get":{"tags":["Authentication"],"summary":"Fetch a public branding logo","description":"Fetch a reseller's branding image as raw bytes, for use as an `<img>` src on an unauthenticated page. Identify the reseller with either `client_id` or `branding_token`, exactly as for GET /api/public-branding.\n\n`mode` selects which asset: `dark`, `favicon`, `banner`, or omit it for the primary logo. A reseller who has not uploaded the requested asset falls back to their primary logo rather than 404ing. The response is the image itself, with its own content type, not JSON.","operationId":"public_branding_logo_api_public_branding_logo_get","parameters":[{"name":"client_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Id"}},{"name":"branding_token","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branding Token"}},{"name":"mode","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Set to 'dark' for the dark mode logo, 'favicon' for the favicon, or 'banner' for the email banner","title":"Mode"},"description":"Set to 'dark' for the dark mode logo, 'favicon' for the favicon, or 'banner' for the email banner"}],"responses":{"200":{"description":"The image bytes, cacheable privately for five minutes.","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"The reseller could not be resolved, or has no usable image for this request."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oauth/authorize":{"get":{"tags":["Authentication"],"summary":"Starts the OAuth 2.0 Authorization Code Flow (302 redirect to sign-in/consent screen)","description":"Redirects the user to the front-end login/consent page to initiate the OAuth 2.0 Authorization Code flow.\n\nThis endpoint:\n- Validates the `client_id` and `redirect_uri` (must be URL-encoded per RFC 3986).\n- Ensures the owning customer has API admin privileges.\n- Stores a unique internal `state`.\n- Issues an HTTP 302 redirect to the front-end with OAuth parameters.\n\n**Note:** When redirecting, ensure your application URL-encodes the `redirect_uri` parameter (e.g., `https%3A%2F%2Fyourapp.com%2Foauth%2Fcallback`).\n\nUpon successful interaction, the front-end will obtain a one-time-use `code` (valid for 10 minutes) and return it to your `redirect_uri` as `?code=...&state=...`.","operationId":"oauth_authorize_api_oauth_authorize_get","parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string","description":"Unique client ID issued to the API consumer.","examples":{"client_id":{"summary":"Example Client ID","value":"abc123xyz"}},"title":"Client Id"},"description":"Unique client ID issued to the API consumer."},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string","description":"Callback URI where the authorization code is sent. Must be URL-encoded according to RFC 3986.","examples":{"redirect_uri":{"summary":"Example Redirect URI (URL-encoded)","value":"https%3A%2F%2Fyourapp.com%2Foauth%2Fcallback"}},"title":"Redirect Uri"},"description":"Callback URI where the authorization code is sent. Must be URL-encoded according to RFC 3986."},{"name":"state","in":"query","required":true,"schema":{"type":"string","description":"Opaque value to maintain state between the request and callback. Returned unchanged by the authorization server.","examples":{"state":{"summary":"Example State Value","value":"xyz456customstate"}},"title":"State"},"description":"Opaque value to maintain state between the request and callback. Returned unchanged by the authorization server."},{"name":"scope","in":"query","required":false,"schema":{"type":"string","description":"Space-delimited list of scopes requested by the client. Required: `openid`. Other scopes include `payroll.read`, `payroll.write`, `session.handoff`, and `mcp.read`.","examples":{"openid_only":{"summary":"Default identity scope","value":"openid"},"openid_with_write":{"summary":"Include write access","value":"openid payroll.write"},"mcp":{"summary":"MCP read-only","value":"openid mcp.read"}},"default":"openid","title":"Scope"},"description":"Space-delimited list of scopes requested by the client. Required: `openid`. Other scopes include `payroll.read`, `payroll.write`, `session.handoff`, and `mcp.read`."},{"name":"code_challenge","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PKCE code challenge (RFC 7636). Required for public clients (e.g. Claude MCP).","title":"Code Challenge"},"description":"PKCE code challenge (RFC 7636). Required for public clients (e.g. Claude MCP)."},{"name":"code_challenge_method","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"PKCE method. Only 'S256' is accepted.","title":"Code Challenge Method"},"description":"PKCE method. Only 'S256' is accepted."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"302":{"description":"Redirect to front-end login/consent screen"},"400":{"description":"Invalid `client_id` or `redirect_uri`"},"403":{"description":"Forbidden: Customer lacks API admin privileges"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/oauth/token":{"post":{"tags":["Authentication"],"summary":"OAuth 2.0 token exchange","description":"Exchange an **authorization code** *or* **refresh token** for a fresh pair of tokens.\n\n## Typical workflow\n1. **End-user login** ➡️ you redirect to `/oauth/authorize`.\n2. You receive `?code=…` on your `redirect_uri`.\n3. POST the `code` here with `grant_type=authorization_code` to obtain:\n   * a short-lived **JWT access token** (`access_token`)\n   * a long-lived **opaque refresh token** (`refresh_token`)\n4. When the access token expires, call this endpoint again\n   (`grant_type=refresh_token`) with the stored `refresh_token`.\n\n## Scopes\nThe access token inherits the scope granted during the original\nauthorization request. Request narrower scopes – e.g. `payroll.read` – to\nfollow the principle of least privilege.\n\n## Security recommendations for partners\n* **Always** transmit `client_secret` over TLS (HTTPS).\n* Store **refresh tokens** server-side only; treat them like passwords.\n* Rotate refresh tokens **immediately** after use (this endpoint does it for you).\n* Use the `expires_in` field to schedule token renewal **before** expiry.\n* Treat the access token as a bearer token; do not depend on undocumented JWT claims.\n\n## Error handling\n* `400 Bad Request` – missing params, invalid `grant_type`, code expired, etc.\n* `401 Unauthorized` – bad `client_id`/`client_secret`.\n* `404 Not Found` – customer linked to the token no longer exists.","operationId":"oauth_token_api_oauth_token_post","requestBody":{"content":{"application/x-www-form-urlencoded":{"schema":{"$ref":"#/components/schemas/Body_oauth_token_api_oauth_token_post"}}},"required":true},"responses":{"200":{"description":"Access token + new refresh token issued","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenResponse"}}}},"404":{"description":"Referenced customer not found"},"400":{"description":"Malformed request, missing/invalid parameters"},"401":{"description":"Invalid `client_id` / `client_secret` combination"},"429":{"description":"Rate limit exceeded. Cache the access token for its lifetime rather than exchanging per call."},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/health_check":{"get":{"tags":["Public","API Health"],"summary":"Health Check","description":"Liveness probe. Answers `200` with `{\"message\": \"OK\"}` whenever the API is serving requests. It does not check the database or any downstream service, so a `200` here does not by itself mean a request against your data will succeed.\n\nRate limited to 60 requests per minute per client IP, so poll no faster than once a second. Note the limit is keyed on the address we see, which for a monitoring service behind a shared egress IP is shared with everyone else behind it.","operationId":"health_check_health_check_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessageResponse"}}}},"404":{"description":"Not found"}}}}},"components":{"schemas":{"ApiClientActivityEntry":{"properties":{"id":{"type":"string","title":"Id","description":"Synthetic event ID, `code-{id}` or `refresh-{id}`.","examples":["refresh-8812"],"example":"refresh-8812"},"eventType":{"type":"string","title":"Eventtype","description":"`authorization_code_issued` or `refresh_token_issued`.","examples":["refresh_token_issued"],"example":"refresh_token_issued"},"customerId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customerid","description":"Customer the event belongs to.","examples":[17193],"example":17193},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname","description":"Their company name.","examples":["Example Farms Pty Ltd"],"example":"Example Farms Pty Ltd"},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail","description":"Their account email.","examples":["owner@example.com"],"example":"owner@example.com"},"scope":{"type":"string","title":"Scope","description":"Space-separated scopes on the code or token.","examples":["openid profile"],"example":"openid profile"},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat","description":"ISO 8601 timestamp of the event."},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expiresat","description":"Token expiry. Refresh-token events only."},"revoked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Revoked","description":"Whether the token has been revoked. Refresh-token events only."},"isActive":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Isactive","description":"Whether the token is unrevoked and unexpired. Refresh-token events only."}},"type":"object","required":["id","eventType","scope"],"title":"ApiClientActivityEntry","description":"One authorization-code or refresh-token event."},"ApiClientActivityResponse":{"properties":{"activity":{"items":{"$ref":"#/components/schemas/ApiClientActivityEntry"},"type":"array","title":"Activity","description":"Events, newest first."},"customerId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customerid","description":"Echoes the `customer_id` filter, null when unfiltered."},"count":{"type":"integer","title":"Count","description":"How many events are in `activity`.","examples":[50],"example":50}},"type":"object","required":["activity","count"],"title":"ApiClientActivityResponse"},"ApiClientConnection":{"properties":{"customerId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customerid","description":"The connected customer's ID.","examples":[17193],"example":17193},"companyName":{"type":"string","title":"Companyname","description":"Their company name, or `Customer {id}` when unresolved.","examples":["Example Farms Pty Ltd"],"example":"Example Farms Pty Ltd"},"email":{"type":"string","title":"Email","description":"Their account email, or `\"\"` when unresolved.","examples":["owner@example.com"],"example":"owner@example.com"},"status":{"type":"string","title":"Status","description":"`active` when they hold a live token, otherwise `inactive`.","examples":["active"],"example":"active"},"activeTokens":{"type":"integer","title":"Activetokens","description":"Live, unrevoked, unexpired refresh tokens.","examples":[1],"example":1},"totalTokens":{"type":"integer","title":"Totaltokens","description":"Refresh tokens ever issued to this customer.","examples":[7],"example":7},"revokedTokens":{"type":"integer","title":"Revokedtokens","description":"Refresh tokens that have been revoked.","examples":[5],"example":5},"expiredTokens":{"type":"integer","title":"Expiredtokens","description":"Refresh tokens past their expiry.","examples":[1],"example":1},"firstAuthorizedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Firstauthorizedat","description":"ISO 8601 timestamp of their first authorization."},"lastAuthAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastauthat","description":"ISO 8601 timestamp of their most recent authorization."},"lastTokenIssuedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lasttokenissuedat","description":"ISO 8601 timestamp of the most recent token issue."},"lastActivityAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastactivityat","description":"The later of `lastAuthAt` and `lastTokenIssuedAt`. Connections are sorted by this, newest first."},"tokensLast30Days":{"type":"integer","title":"Tokenslast30Days","description":"Refresh tokens issued to them in the last 30 days.","examples":[4],"example":4},"authsLast30Days":{"type":"integer","title":"Authslast30Days","description":"Authorization codes issued to them in the last 30 days.","examples":[1],"example":1},"requestsLast24Hours":{"type":"integer","title":"Requestslast24Hours","description":"Their API requests in the last 24 hours.","examples":[52],"example":52},"requestsLast7Days":{"type":"integer","title":"Requestslast7Days","description":"Their API requests in the last 7 days.","examples":[310],"example":310},"requestsLast30Days":{"type":"integer","title":"Requestslast30Days","description":"Their API requests in the last 30 days.","examples":[1204],"example":1204},"requestsLast90Days":{"type":"integer","title":"Requestslast90Days","description":"Their API requests across the retention window.","examples":[3380],"example":3380},"errorRateLast90Days":{"type":"number","title":"Errorratelast90Days","description":"Percentage of their requests that errored.","examples":[0.15],"example":0.15},"avgDurationMsLast90Days":{"type":"integer","title":"Avgdurationmslast90Days","description":"Mean response time for their requests, in milliseconds.","examples":[104],"example":104},"lastRequestAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastrequestat","description":"ISO 8601 timestamp of their most recent request."},"scopes":{"items":{"type":"string"},"type":"array","title":"Scopes","description":"Every scope granted across their tokens, sorted.","examples":[["openid","partner.checkout.write"]],"example":["openid","partner.checkout.write"]}},"type":"object","required":["companyName","email","status","activeTokens","totalTokens","revokedTokens","expiredTokens","tokensLast30Days","authsLast30Days","requestsLast24Hours","requestsLast7Days","requestsLast30Days","requestsLast90Days","errorRateLast90Days","avgDurationMsLast90Days","scopes"],"title":"ApiClientConnection","description":"One end customer connected to your client."},"ApiClientConnectionListResponse":{"properties":{"connections":{"items":{"$ref":"#/components/schemas/ApiClientConnection"},"type":"array","title":"Connections","description":"Connected customers, most recently active first. Your own customer record is excluded."}},"type":"object","required":["connections"],"title":"ApiClientConnectionListResponse"},"ApiClientConnectionRevokeResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Confirmation message.","examples":["Connection revoked"],"example":"Connection revoked"},"revokedTokens":{"type":"integer","title":"Revokedtokens","description":"How many live refresh tokens were revoked by this call.","examples":[1],"example":1},"revokedCodes":{"type":"integer","title":"Revokedcodes","description":"How many unused authorization codes were invalidated. An unexchanged code is still redeemable for a fresh token pair, so revoking it is what stops the customer re-establishing the connection.","examples":[0],"example":0}},"type":"object","required":["message","revokedTokens","revokedCodes"],"title":"ApiClientConnectionRevokeResponse"},"ApiClientCredentials":{"properties":{"clientId":{"type":"string","title":"Clientid","description":"Your OAuth client ID.","examples":["lp_demo_app_123"],"example":"lp_demo_app_123"},"redirectUris":{"items":{"type":"string"},"type":"array","title":"Redirecturis","description":"Registered callback URIs. The OAuth flow requires an exact string match.","examples":[["https://partner.example.com/oauth/callback"]],"example":["https://partner.example.com/oauth/callback"]},"hasClientSecret":{"type":"boolean","title":"Hasclientsecret","description":"Whether a client secret is stored.","examples":[true],"example":true},"clientSecret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Clientsecret","description":"The plaintext secret. Returned **only** on the call that created the client. Store it immediately: it is not recoverable afterwards.","examples":["plain-text-secret-shown-once"],"example":"plain-text-secret-shown-once"}},"type":"object","required":["clientId","redirectUris","hasClientSecret"],"title":"ApiClientCredentials"},"ApiClientErrorEndpointCount":{"properties":{"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Request path.","examples":["/api/company/1/pays/create"],"example":"/api/company/1/pays/create"},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"How many errors that path produced.","examples":[18],"example":18},"lastSeenAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastseenat","description":"ISO 8601 timestamp of the most recent one."}},"type":"object","title":"ApiClientErrorEndpointCount"},"ApiClientErrorEntry":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"Request-log row ID.","examples":[99812],"example":99812},"customerId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customerid","description":"Customer that made the request.","examples":[17193],"example":17193},"companyName":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Companyname","description":"Their company name."},"customerEmail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Customeremail","description":"Their account email."},"method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Method","description":"HTTP method.","examples":["POST"],"example":"POST"},"path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Path","description":"Request path.","examples":["/api/company/1/pays/create"],"example":"/api/company/1/pays/create"},"statusCode":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statuscode","description":"Response status code.","examples":[422],"example":422},"durationMs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Durationms","description":"How long the request took, in milliseconds.","examples":[87],"example":87},"responseSizeBytes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Responsesizebytes","description":"Response body size in bytes.","examples":[412],"example":412},"errorCode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errorcode","description":"Machine-readable error code, when one was recorded."},"errorDetail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Errordetail","description":"Error detail text, when one was recorded."},"requestId":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Requestid","description":"Correlation ID, useful when raising a support ticket."},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Createdat","description":"ISO 8601 timestamp of the request."}},"type":"object","title":"ApiClientErrorEntry","description":"One logged 4xx or 5xx response."},"ApiClientErrorStatusCount":{"properties":{"statusCode":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Statuscode","description":"An HTTP status code of 400 or above.","examples":[422],"example":422},"count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Count","description":"How many responses carried it.","examples":[31],"example":31}},"type":"object","title":"ApiClientErrorStatusCount"},"ApiClientErrorSummary":{"properties":{"errorsLast24Hours":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errorslast24Hours","description":"Error responses in the last 24 hours.","examples":[3],"example":3},"errorsLast7Days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errorslast7Days","description":"Error responses in the last 7 days.","examples":[11],"example":11},"errorsLast30Days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errorslast30Days","description":"Error responses in the last 30 days.","examples":[44],"example":44},"errorsLast90Days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Errorslast90Days","description":"Error responses across the retention window.","examples":[77],"example":77},"statusBreakdown":{"items":{"$ref":"#/components/schemas/ApiClientErrorStatusCount"},"type":"array","title":"Statusbreakdown","description":"The ten most common error status codes, most frequent first."},"topEndpoints":{"items":{"$ref":"#/components/schemas/ApiClientErrorEndpointCount"},"type":"array","title":"Topendpoints","description":"The ten paths producing the most errors, most frequent first."}},"type":"object","required":["statusBreakdown","topEndpoints"],"title":"ApiClientErrorSummary"},"ApiClientErrorsResponse":{"properties":{"summary":{"$ref":"#/components/schemas/ApiClientErrorSummary"},"errors":{"items":{"$ref":"#/components/schemas/ApiClientErrorEntry"},"type":"array","title":"Errors","description":"Recent error responses, newest first."},"customerId":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customerid","description":"Echoes the `customer_id` filter, null when unfiltered."},"count":{"type":"integer","title":"Count","description":"How many entries are in `errors`.","examples":[100],"example":100}},"type":"object","required":["summary","errors","count"],"title":"ApiClientErrorsResponse"},"ApiClientOverviewResponse":{"properties":{"clientId":{"type":"string","title":"Clientid","description":"Your OAuth client ID.","examples":["lp_demo_app_123"],"example":"lp_demo_app_123"},"totalConnections":{"type":"integer","title":"Totalconnections","description":"Distinct customers who have ever connected.","examples":[42],"example":42},"activeConnections":{"type":"integer","title":"Activeconnections","description":"Customers holding a live, unrevoked token.","examples":[38],"example":38},"totalTokens":{"type":"integer","title":"Totaltokens","description":"Refresh tokens ever issued.","examples":[311],"example":311},"activeTokens":{"type":"integer","title":"Activetokens","description":"Refresh tokens still live and unrevoked.","examples":[38],"example":38},"authsLast30Days":{"type":"integer","title":"Authslast30Days","description":"Authorization codes issued in the last 30 days.","examples":[12],"example":12},"tokensIssuedLast30Days":{"type":"integer","title":"Tokensissuedlast30Days","description":"Refresh tokens issued in the last 30 days.","examples":[57],"example":57},"lastActivityAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastactivityat","description":"ISO 8601 timestamp of the most recent auth or token issue.","examples":["2026-08-05T23:14:02"],"example":"2026-08-05T23:14:02"},"requestsLast90Days":{"type":"integer","title":"Requestslast90Days","description":"API requests logged in the retention window.","examples":[18422],"example":18422},"errorRateLast90Days":{"type":"number","title":"Errorratelast90Days","description":"Percentage of those requests that answered 4xx or 5xx.","examples":[0.42],"example":0.42},"errorsLast24Hours":{"type":"integer","title":"Errorslast24Hours","description":"Error responses in the last 24 hours.","examples":[3],"example":3},"errorsLast7Days":{"type":"integer","title":"Errorslast7Days","description":"Error responses in the last 7 days.","examples":[11],"example":11},"errorsLast30Days":{"type":"integer","title":"Errorslast30Days","description":"Error responses in the last 30 days.","examples":[44],"example":44},"errorsLast90Days":{"type":"integer","title":"Errorslast90Days","description":"Error responses across the retention window.","examples":[77],"example":77},"avgDurationMsLast90Days":{"type":"integer","title":"Avgdurationmslast90Days","description":"Mean response time in milliseconds.","examples":[118],"example":118},"lastRequestAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Lastrequestat","description":"ISO 8601 timestamp of the most recent logged request.","examples":["2026-08-05T23:59:41"],"example":"2026-08-05T23:59:41"}},"type":"object","required":["clientId","totalConnections","activeConnections","totalTokens","activeTokens","authsLast30Days","tokensIssuedLast30Days","requestsLast90Days","errorRateLast90Days","errorsLast24Hours","errorsLast7Days","errorsLast30Days","errorsLast90Days","avgDurationMsLast90Days"],"title":"ApiClientOverviewResponse","description":"Roll-up metrics for your OAuth client."},"BackPayments-Input":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the back payment. Required when creating a new back payment.","examples":["Back Pay Adjustment"],"example":"Back Pay Adjustment"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Amount","description":"The dollar amount for the back payment. Required when creating a new back payment.","examples":["200.00"],"example":"200.00"},"stp_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stp Category","description":"The back payment category code (use underscores). Codes are required when creating a new back payment. Codes: BONUS_COMMISSION_NON_DIRECTOR_S_FEES, DIRECTOR_S_FEES, GROSS, ITEMISED_ALLOWANCESAD, ITEMISED_ALLOWANCESCD, ITEMISED_ALLOWANCESKN, ITEMISED_ALLOWANCESLD, ITEMISED_ALLOWANCESMD, ITEMISED_ALLOWANCESOD, ITEMISED_ALLOWANCESQN, ITEMISED_ALLOWANCESRD, ITEMISED_ALLOWANCESTD, LEAVEA, LEAVEC, LEAVEO, LEAVEP, LEAVEU, LEAVEW, OVERTIME, UNCLASSIFIED.","examples":["GROSS"],"example":"GROSS"},"tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Method","description":"The tax method applied to the back payment.Required when creating a new back payment.Allowed codes with labels: NORMAL_EARNINGS = As normal earnings; SPREAD_OVER_SPECIFIC_RANGE = Use date range; SPREAD_OVER_FINANCIAL_YEAR = Over this financial year; METHOD_A_WHOLE_YEAR = Method A (Whole Year); METHOD_A_SPECIFIC_RANGE = Method A (Use Date Range); METHOD_B1 = Method B(i)(Use Date Range); METHOD_B2 = Method B(ii)(Whole Year).","examples":["NORMAL_EARNINGS"],"example":"NORMAL_EARNINGS"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The start date for the back payment period.","examples":["2023-01-01"],"example":"2023-01-01"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"The end date for the back payment period.","examples":["2023-01-31"],"example":"2023-01-31"}},"additionalProperties":false,"type":"object","required":["description","amount"],"title":"BackPayments"},"BackPayments-Output":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the back payment. Required when creating a new back payment.","examples":["Back Pay Adjustment"],"example":"Back Pay Adjustment"},"amount":{"type":"number","title":"Amount","description":"The dollar amount for the back payment. Required when creating a new back payment.","examples":[200.0],"example":200.0},"stp_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stp Category","description":"The back payment category code (use underscores). Codes are required when creating a new back payment. Codes: BONUS_COMMISSION_NON_DIRECTOR_S_FEES, DIRECTOR_S_FEES, GROSS, ITEMISED_ALLOWANCESAD, ITEMISED_ALLOWANCESCD, ITEMISED_ALLOWANCESKN, ITEMISED_ALLOWANCESLD, ITEMISED_ALLOWANCESMD, ITEMISED_ALLOWANCESOD, ITEMISED_ALLOWANCESQN, ITEMISED_ALLOWANCESRD, ITEMISED_ALLOWANCESTD, LEAVEA, LEAVEC, LEAVEO, LEAVEP, LEAVEU, LEAVEW, OVERTIME, UNCLASSIFIED.","examples":["GROSS"],"example":"GROSS"},"tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Method","description":"The tax method applied to the back payment.Required when creating a new back payment.Allowed codes with labels: NORMAL_EARNINGS = As normal earnings; SPREAD_OVER_SPECIFIC_RANGE = Use date range; SPREAD_OVER_FINANCIAL_YEAR = Over this financial year; METHOD_A_WHOLE_YEAR = Method A (Whole Year); METHOD_A_SPECIFIC_RANGE = Method A (Use Date Range); METHOD_B1 = Method B(i)(Use Date Range); METHOD_B2 = Method B(ii)(Whole Year).","examples":["NORMAL_EARNINGS"],"example":"NORMAL_EARNINGS"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The start date for the back payment period.","examples":["2023-01-01"],"example":"2023-01-01"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"The end date for the back payment period.","examples":["2023-01-31"],"example":"2023-01-31"}},"additionalProperties":false,"type":"object","required":["description","amount"],"title":"BackPayments"},"BankAccount":{"properties":{"id":{"type":"integer","title":"Id","description":"Unique identifier of this bank account record."},"bsb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bsb","description":"Bank State Branch code (six digits) identifying bank & branch."},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number","description":"Account number as held with the bank (string to allow leading zeros)."},"account_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Name","description":"Name on the account. Falls back to a generated label if not provided."},"rank":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Rank","description":"Which account is paid the remainder of the pay, and how the split accounts are numbered. `null` or `0` marks the employee's default account; `1` and up mark secondary accounts, each paid its fixed `amount`. Secondary ranks are always contiguous, 1 through N, and exactly one account is the default.\n\nrank is not the order the accounts are filled in. Lightning Payroll fills the secondary accounts from the largest `amount` down, skips any secondary with no amount, and pays whatever is left into the default account. rank also decides the reference on the deposit: the default account always carries the pay run's lodgement reference, while a secondary account can override it with `alt_transaction_reference`."},"amount":{"type":"number","title":"Amount","description":"Amount to deposit into this account. Defaults to 0.00 if not explicitly set. Only a secondary account (rank 1 or more) is paid a fixed amount; the default account is paid the remainder of the pay.","examples":[1500.0],"example":1500.0},"alt_transaction_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Alt Transaction Reference","description":"Alternate reference string to include on the bank transaction. For `rank=None` accounts this will render as 'N/A'."},"nz_bank_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Bank Id","description":"NZ accounts only: two digit bank ID (first part of the canonical bank-branch-account-suffix number). Null for AU accounts."},"nz_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Branch","description":"NZ accounts only: four digit branch number. Null for AU accounts."},"nz_account_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Account Base","description":"NZ accounts only: seven or eight digit account number (stored zero-padded to eight digits). Null for AU accounts."},"nz_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Suffix","description":"NZ accounts only: two to four digit account suffix. Null for AU accounts."},"employee_id":{"type":"integer","title":"Employee Id","description":"Foreign key ID of the employee who owns this bank account."},"is_default":{"type":"boolean","title":"Is Default","description":"Whether this is the employee's default account, the one paid the remainder of each pay. Derived from `rank`, which is `null` or `0` on the default account. Exactly one of an employee's accounts is the default.","readOnly":true}},"type":"object","required":["id","amount","employee_id","is_default"],"title":"BankAccount","description":"Schema for exposing BankAccount data via the API.\n\nAttributes map 1:1 to your SQLAlchemy `BankAccount` model:\n- The primary key `id`\n- BSB, account number/name\n- Deposit ranking & amount\n- Alternate transaction reference\n- The owning employee via `employee_id`\n- Related deductions as a list of deduction IDs","example":{"account_name":"David Wallace","account_number":"000123456","alt_transaction_reference":"Child Support","amount":"500.00","bsb":"123-456","employee_id":7,"id":42,"is_default":false,"rank":1}},"BankAccountCreate":{"properties":{"account_name":{"type":"string","maxLength":32,"minLength":0,"title":"Account Name","description":"Name on the account, as it should reach the bank. One to 32 printable ASCII characters.","examples":["David Wallace"],"example":"David Wallace"},"bsb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bsb","description":"Australian companies only. BSB, six digits, sent with or without the hyphen (`123-456` or `123456`) and stored hyphenated. Required together with `account_number` for an Australian company, and rejected for a New Zealand company, which uses the four `nz_*` parts instead.","examples":["123-456"],"example":"123-456"},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number","description":"Australian companies only. Account number, one to nine digits. Required together with `bsb` for an Australian company, and rejected for a New Zealand company. Two of an employee's accounts may not share an account number.","examples":["123456789"],"example":"123456789"},"nz_bank_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Bank Id","description":"New Zealand companies only. Two digit bank ID, the first part of the canonical bank-branch-account-suffix number. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["01"],"example":"01"},"nz_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Branch","description":"New Zealand companies only. Four digit branch number. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["0902"],"example":"0902"},"nz_account_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Account Base","description":"New Zealand companies only. Seven or eight digit account number. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["0068389"],"example":"0068389"},"nz_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Suffix","description":"New Zealand companies only. Two to four digit account suffix. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["00"],"example":"00"},"rank":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rank","description":"Where this account sits in the employee's split.\n\nOmit it to append the account as the lowest priority secondary account, which then requires `amount`. Send `null` or `0` to make this the employee's default account, the one paid the remainder of each pay: the previous default becomes secondary 1 and the other secondaries shift down. Send 1 or more to place the account at that secondary position, renumbering the others so the positions stay contiguous. A rank past the last position simply places the account last.\n\nAn employee's first account is always the default, whatever rank is sent, because an employee must always have exactly one account taking the remainder. For the same reason a rank of 1 or more is rejected on the account that is currently the default: promote another account instead, by patching it with a rank of `null`, which demotes the current default in the same request.","examples":[1],"example":1},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,13}0*$)\\d*\\.\\d*0*$)"},{"type":"null"}],"title":"Amount","description":"Fixed amount in dollars paid into this account each pay, to at most two decimal places.\n\nRequired for a secondary account (rank 1 or more) and must be greater than zero. Lightning Payroll skips a ranked account that has no amount when it works out a pay's deposits, so a zero amount would create an account that reports as saved and is never paid.\n\nNot accepted on the default account, which is paid the remainder of the pay rather than a fixed amount. Zero is accepted and ignored there, so an account read back and sent whole can be repositioned without stripping fields.","examples":["500.00"],"example":"500.00"},"alt_transaction_reference":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Alt Transaction Reference","description":"Lodgement reference to put on this account's deposit instead of the pay run's own reference. Up to 18 printable ASCII characters. Secondary accounts only: the default account's deposit always carries the pay run's reference.","examples":["Child Support"],"example":"Child Support"}},"additionalProperties":false,"type":"object","required":["account_name"],"title":"BankAccountCreate","description":"A new bank account for an employee.\n\n`account_name` is always required. The identity fields required with it\ndepend on the company: `bsb` and `account_number` for an Australian\ncompany, all four `nz_*` parts for a New Zealand one. An employee may hold\nat most 10 bank accounts, and an eleventh is rejected with 409."},"BankAccountUpdate":{"properties":{"account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Account Name","description":"Name on the account, as it should reach the bank. One to 32 printable ASCII characters.","examples":["David Wallace"],"example":"David Wallace"},"bsb":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bsb","description":"Australian companies only. BSB, six digits, sent with or without the hyphen (`123-456` or `123456`) and stored hyphenated. Required together with `account_number` for an Australian company, and rejected for a New Zealand company, which uses the four `nz_*` parts instead.","examples":["123-456"],"example":"123-456"},"account_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Account Number","description":"Australian companies only. Account number, one to nine digits. Required together with `bsb` for an Australian company, and rejected for a New Zealand company. Two of an employee's accounts may not share an account number.","examples":["123456789"],"example":"123456789"},"nz_bank_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Bank Id","description":"New Zealand companies only. Two digit bank ID, the first part of the canonical bank-branch-account-suffix number. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["01"],"example":"01"},"nz_branch":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Branch","description":"New Zealand companies only. Four digit branch number. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["0902"],"example":"0902"},"nz_account_base":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Account Base","description":"New Zealand companies only. Seven or eight digit account number. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["0068389"],"example":"0068389"},"nz_suffix":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Suffix","description":"New Zealand companies only. Two to four digit account suffix. All four `nz_*` parts are required together for a New Zealand company, and are rejected for an Australian company. The complete number must pass Inland Revenue's check digit validation. Leading zeros do not change which account a number identifies, so padding variants of one account count as the same account.","examples":["00"],"example":"00"},"rank":{"anyOf":[{"type":"integer","minimum":0.0},{"type":"null"}],"title":"Rank","description":"Where this account sits in the employee's split.\n\nOmit it to append the account as the lowest priority secondary account, which then requires `amount`. Send `null` or `0` to make this the employee's default account, the one paid the remainder of each pay: the previous default becomes secondary 1 and the other secondaries shift down. Send 1 or more to place the account at that secondary position, renumbering the others so the positions stay contiguous. A rank past the last position simply places the account last.\n\nAn employee's first account is always the default, whatever rank is sent, because an employee must always have exactly one account taking the remainder. For the same reason a rank of 1 or more is rejected on the account that is currently the default: promote another account instead, by patching it with a rank of `null`, which demotes the current default in the same request.","examples":[1],"example":1},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,12}|(?=[\\d.]{1,13}0*$)\\d*\\.\\d*0*$)"},{"type":"null"}],"title":"Amount","description":"Fixed amount in dollars paid into this account each pay, to at most two decimal places.\n\nRequired for a secondary account (rank 1 or more) and must be greater than zero. Lightning Payroll skips a ranked account that has no amount when it works out a pay's deposits, so a zero amount would create an account that reports as saved and is never paid.\n\nNot accepted on the default account, which is paid the remainder of the pay rather than a fixed amount. Zero is accepted and ignored there, so an account read back and sent whole can be repositioned without stripping fields.","examples":["500.00"],"example":"500.00"},"alt_transaction_reference":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Alt Transaction Reference","description":"Lodgement reference to put on this account's deposit instead of the pay run's own reference. Up to 18 printable ASCII characters. Secondary accounts only: the default account's deposit always carries the pay run's reference.","examples":["Child Support"],"example":"Child Support"}},"additionalProperties":false,"type":"object","title":"BankAccountUpdate","description":"Partial update. Supply only the fields you want to change.\n\nSending any identity field re-validates the whole identity for the\ncompany's jurisdiction, and re-keying a New Zealand account clears the\nAustralian `bsb` / `account_number` it may have held. Sending none of them\nleaves the stored identity untouched, so rank, amount and name edits keep\nworking on accounts that predate the New Zealand format."},"Body_oauth_token_api_oauth_token_post":{"properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"],"title":"Grant Type","description":"OAuth 2.0 grant type to use. `authorization_code` ▶ exchange an auth-code; `refresh_token` ▶ rotate an existing refresh token."},"code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code","description":"Authorization **code** obtained from `/oauth/authorize`. Required when `grant_type=authorization_code`."},"refresh_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Refresh Token","description":"Existing refresh token. Required when `grant_type=refresh_token`."},"client_id":{"type":"string","title":"Client Id","description":"Public identifier for your integration, supplied during app registration."},"client_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Client Secret","description":"Confidential secret linked to `client_id`. **Transmitted in the request body** – never log or expose this value. Omit for public PKCE clients (Claude MCP)."},"redirect_uri":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Redirect Uri","description":"Must exactly match the `redirect_uri` used when the authorization code was issued. Required for `grant_type=authorization_code`. HTTPS required in production."},"code_verifier":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Code Verifier","description":"PKCE verifier (RFC 7636). Required when the `code` was issued with a `code_challenge`."}},"type":"object","required":["grant_type","client_id"],"title":"Body_oauth_token_api_oauth_token_post"},"Body_upload_api_client_whitelabel_banner_api_api_client_whitelabel_banner_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"overwrite_existing":{"type":"boolean","title":"Overwrite Existing","default":false}},"type":"object","required":["file"],"title":"Body_upload_api_client_whitelabel_banner_api_api_client_whitelabel_banner_post"},"Body_upload_api_client_whitelabel_dark_logo_api_api_client_whitelabel_dark_logo_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"overwrite_existing":{"type":"boolean","title":"Overwrite Existing","default":false}},"type":"object","required":["file"],"title":"Body_upload_api_client_whitelabel_dark_logo_api_api_client_whitelabel_dark_logo_post"},"Body_upload_api_client_whitelabel_favicon_api_api_client_whitelabel_favicon_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"overwrite_existing":{"type":"boolean","title":"Overwrite Existing","default":false}},"type":"object","required":["file"],"title":"Body_upload_api_client_whitelabel_favicon_api_api_client_whitelabel_favicon_post"},"Body_upload_api_client_whitelabel_logo_api_api_client_whitelabel_logo_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"overwrite_existing":{"type":"boolean","title":"Overwrite Existing","default":false}},"type":"object","required":["file"],"title":"Body_upload_api_client_whitelabel_logo_api_api_client_whitelabel_logo_post"},"Body_upload_api_client_whitelabel_style_api_api_client_whitelabel_style_post":{"properties":{"file":{"type":"string","format":"binary","title":"File"},"overwrite_existing":{"type":"boolean","title":"Overwrite Existing","default":false}},"type":"object","required":["file"],"title":"Body_upload_api_client_whitelabel_style_api_api_client_whitelabel_style_post"},"Company":{"properties":{"name":{"type":"string","title":"Name","examples":["Tech Solutions Pty Ltd"],"example":"Tech Solutions Pty Ltd"},"address1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address1","examples":["456 Business Road"],"example":"456 Business Road"},"address2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address2","examples":["Suite 12"],"example":"Suite 12"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","examples":["Melbourne"],"example":"Melbourne"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","examples":["VIC"],"example":"VIC"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode","examples":["3000"],"example":"3000"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country code. Must be `AU` or `NZ` (case-insensitive; `AUS` and `NZL` are also accepted and normalised to `AU` and `NZ`). Any other value is rejected.","examples":["AU"],"example":"AU"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction","description":"Payroll jurisdiction code. Must be `AU` or `NZ` (case-insensitive; `AUS` and `NZL` are also accepted and normalised to `AU` and `NZ`). Any other value is rejected.","examples":["AU"],"example":"AU"},"phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone","examples":["03 1234 5678"],"example":"03 1234 5678"},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","examples":["contact@techsolutions.com.au"],"example":"contact@techsolutions.com.au"},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number. AU only.","examples":["10 000 000 000"],"example":"10 000 000 000"},"employer_ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Ird Number","description":"Employer IRD number. NZ only.","examples":["49091850"],"example":"49091850"},"location_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Location Id","examples":[1],"example":1},"contact_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact First Name","examples":["Alice"],"example":"Alice"},"contact_middle_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Middle Name","examples":["Marie"],"example":"Marie"},"contact_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contact Last Name","examples":["Smith"],"example":"Smith"},"employees":{"anyOf":[{"items":{"$ref":"#/components/schemas/EmployeeBasic"},"type":"array"},{"type":"null"}],"title":"Employees","description":"Optional list of employees; each item is `EmployeeBasic`."},"id":{"type":"integer","title":"Id","description":"Unique company identifier.","examples":[1],"example":1}},"type":"object","required":["name","id"],"title":"Company","example":{"abn":"10000000000","address1":"123 Business Road","address2":"Suite 234234","city":"Perth","contact_first_name":"billy","contact_last_name":"bob","country":"AU","email":"billy@techsolutions.com.au","id":2,"jurisdiction":"AU","location_id":1,"name":"Techy town Solutions Pty Ltd","phone":"03 1234 1111","postcode":"6000","state":"WA"}},"CompanyAllowanceCreate":{"properties":{"description":{"type":"string","title":"Description","description":"Allowance description, and the grouping key used for YTD and STP reporting, so it has to be unique. A company allowance may not clash with another company allowance or with any employee's own allowance. An employee allowance may not clash with that employee's other allowances or with a company allowance, but two employees may each hold an allowance of the same name at their own amount. This matches the desktop app.\n\nMust be 40 characters or fewer. For Australian companies it may also not contain characters the ATO rejects for STP submission (notably `<` and `>`).","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,14}|(?=[\\d.]{1,15}0*$)\\d*\\.\\d*0*$)"}],"title":"Amount","description":"Per-pay amount, copied verbatim onto each pay the allowance applies to. Stored exactly as supplied, to at most 5 decimal places.\n\nMust be greater than zero once rounded to cents. Lightning Payroll skips any allowance of zero or less when it builds a pay, so a zero, negative or sub-cent amount would create an allowance that silently never pays.","examples":["15.00"],"example":"15.00"},"is_taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Taxable","description":"Include this allowance in the pay's tax calculations.","examples":[true],"example":true},"is_itemised":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Itemised","description":"Report this allowance as its own STP line rather than folding it into a summarised allowances total. Not used for New Zealand companies.","examples":[true],"example":true},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Include this allowance in the earnings base used for superannuation (Australia) or KiwiSaver (New Zealand).","examples":[true],"example":true},"auto_apply_to_pay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Apply To Pay","description":"Copy this allowance onto every new pay automatically.","examples":[true],"example":true},"allowance_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowance Category","description":"ATO Single Touch Payroll (Phase 2) allowance category code.\n\nRequired on create for Australian companies, and rejected if set to `Unclassified`, because an unclassified allowance blocks the customer's STP lodgement. Optional for New Zealand companies, which have no STP equivalent: it defaults to `Unclassified` there and plays no part in payday filing.\n\n- `CD` - Cents per KM\n- `AD` - Award Transport\n- `LD` - Laundry\n- `MD` - Overtime Meals\n- `RD` - Domestic & Overseas Travel/Accommodation\n- `TD` - Tools\n- `KN` - Tasks\n- `QN` - Qualifications/Certificates\n- `OD` - Other","examples":["TD"],"example":"TD"},"employee_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Employee Ids","description":"LP employee IDs this company allowance applies to. Supplying this replaces the entire set of attached employees; omit it to leave the existing attachments untouched. Every ID must belong to this company.","examples":[[12,34]],"example":[12,34]}},"additionalProperties":false,"type":"object","required":["description","amount"],"title":"CompanyAllowanceCreate"},"CompanyAllowanceRead":{"properties":{"id":{"type":"integer","title":"Id","description":"LP identifier for this allowance row.","examples":[42],"example":42},"description":{"type":"string","title":"Description","description":"Allowance description, and the grouping key used for YTD and STP reporting.","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"type":"number","title":"Amount","description":"Per-pay amount, copied verbatim onto each pay the allowance applies to.","examples":[15.0],"example":15.0},"is_taxable":{"type":"boolean","title":"Is Taxable","description":"Whether this allowance is included in the pay's tax calculations.","examples":[true],"example":true},"is_itemised":{"type":"boolean","title":"Is Itemised","description":"Whether this allowance is reported as its own STP line rather than folded into a summarised allowances total. Not used for New Zealand companies.","examples":[true],"example":true},"is_included_in_super_calculations":{"type":"boolean","title":"Is Included In Super Calculations","description":"Whether this allowance is included in the earnings base used for superannuation (Australia) or KiwiSaver (New Zealand).","examples":[false],"example":false},"auto_apply_to_pay":{"type":"boolean","title":"Auto Apply To Pay","description":"Whether this allowance is copied onto every new pay automatically.","examples":[true],"example":true},"allowance_category":{"type":"string","title":"Allowance Category","description":"STP allowance category code, or `Unclassified` when the allowance has not been categorised.","examples":["TD"],"example":"TD"},"company_id":{"type":"integer","title":"Company Id","description":"LP company this allowance belongs to.","examples":[1],"example":1},"employee_ids":{"items":{"type":"integer"},"type":"array","title":"Employee Ids","description":"LP employee IDs this company allowance is attached to.","examples":[[12,34]],"example":[12,34]}},"type":"object","required":["id","description","amount","is_taxable","is_itemised","is_included_in_super_calculations","auto_apply_to_pay","allowance_category","company_id"],"title":"CompanyAllowanceRead"},"CompanyAllowanceUpdate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Allowance description, and the grouping key used for YTD and STP reporting, so it has to be unique. A company allowance may not clash with another company allowance or with any employee's own allowance. An employee allowance may not clash with that employee's other allowances or with a company allowance, but two employees may each hold an allowance of the same name at their own amount. This matches the desktop app.\n\nMust be 40 characters or fewer. For Australian companies it may also not contain characters the ATO rejects for STP submission (notably `<` and `>`).","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,14}|(?=[\\d.]{1,15}0*$)\\d*\\.\\d*0*$)"},{"type":"null"}],"title":"Amount","description":"Per-pay amount, copied verbatim onto each pay the allowance applies to. Stored exactly as supplied, to at most 5 decimal places.\n\nMust be greater than zero once rounded to cents. Lightning Payroll skips any allowance of zero or less when it builds a pay, so a zero, negative or sub-cent amount would create an allowance that silently never pays.","examples":["15.00"],"example":"15.00"},"is_taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Taxable","description":"Include this allowance in the pay's tax calculations.","examples":[true],"example":true},"is_itemised":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Itemised","description":"Report this allowance as its own STP line rather than folding it into a summarised allowances total. Not used for New Zealand companies.","examples":[true],"example":true},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Include this allowance in the earnings base used for superannuation (Australia) or KiwiSaver (New Zealand).","examples":[true],"example":true},"auto_apply_to_pay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Apply To Pay","description":"Copy this allowance onto every new pay automatically.","examples":[true],"example":true},"allowance_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowance Category","description":"ATO Single Touch Payroll (Phase 2) allowance category code.\n\nRequired on create for Australian companies, and rejected if set to `Unclassified`, because an unclassified allowance blocks the customer's STP lodgement. Optional for New Zealand companies, which have no STP equivalent: it defaults to `Unclassified` there and plays no part in payday filing.\n\n- `CD` - Cents per KM\n- `AD` - Award Transport\n- `LD` - Laundry\n- `MD` - Overtime Meals\n- `RD` - Domestic & Overseas Travel/Accommodation\n- `TD` - Tools\n- `KN` - Tasks\n- `QN` - Qualifications/Certificates\n- `OD` - Other","examples":["TD"],"example":"TD"},"employee_ids":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"Employee Ids","description":"LP employee IDs this company allowance applies to. Supplying this replaces the entire set of attached employees; omit it to leave the existing attachments untouched. Every ID must belong to this company.","examples":[[12,34]],"example":[12,34]}},"additionalProperties":false,"type":"object","title":"CompanyAllowanceUpdate","description":"Partial update. Supply only the fields you want to change."},"CompanyAllowancesResponse":{"properties":{"company_id":{"type":"integer","title":"Company Id"},"allowances":{"items":{"$ref":"#/components/schemas/CompanyAllowanceRead"},"type":"array","title":"Allowances"}},"type":"object","required":["company_id"],"title":"CompanyAllowancesResponse"},"CompanyCreate":{"properties":{"name":{"type":"string","maxLength":60,"minLength":1,"title":"Name"},"address1":{"type":"string","maxLength":100,"minLength":1,"title":"Address1"},"address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address2"},"city":{"type":"string","maxLength":60,"minLength":1,"title":"City"},"state":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"State","description":"State or region. Optional for NZ companies.","examples":["WA"],"example":"WA"},"postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Postcode","description":"Postal code.","examples":["6000"],"example":"6000"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Defaults from the request host when omitted.","examples":["AU"],"example":"AU"},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction","description":"Defaults from the request host when omitted.","examples":["AU"],"example":"AU"},"phone":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone"},"email":{"type":"string","format":"email","title":"Email"},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Required for AU companies, optional for NZ companies."},"employer_ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Ird Number","description":"NZ only.","examples":["49091850"],"example":"49091850"},"location_id":{"type":"integer","title":"Location Id"},"contact_first_name":{"type":"string","maxLength":60,"minLength":1,"title":"Contact First Name"},"contact_last_name":{"type":"string","maxLength":60,"minLength":1,"title":"Contact Last Name"},"contact_middle_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Contact Middle Name"}},"additionalProperties":false,"type":"object","required":["name","address1","city","email","location_id","contact_first_name","contact_last_name"],"title":"CompanyCreate","example":{"abn":"10000000000","address1":"123 Business Road","address2":"Level 3","city":"Perth","contact_first_name":"billy","contact_last_name":"bob","country":"AU","email":"billy@techsolutions.com.au","jurisdiction":"AU","location_id":1,"name":"Techy town Solutions Pty Ltd","phone":"03 1234 1111","postcode":"6000","state":"WA"}},"CompanyPartialUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Name","description":"The registered name of the company."},"address1":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Address1","description":"The main street address of the company."},"address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address2","description":"Optional second line of the address."},"city":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"City","description":"The suburb or city of the company's address."},"state":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"State","description":"State or region. Optional for NZ companies."},"postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Postcode","description":"Postal code."},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"Country code. Must be `AU` or `NZ` (case-insensitive; `AUS` and `NZL` are also accepted and normalised to `AU` and `NZ`). Any other value is rejected."},"jurisdiction":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Jurisdiction","description":"Payroll jurisdiction code. Must be `AU` or `NZ` (case-insensitive; `AUS` and `NZL` are also accepted and normalised to `AU` and `NZ`). Any other value is rejected."},"phone":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone","description":"Optional company contact phone number."},"email":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email","description":"Contact email address for the company."},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number. AU only."},"employer_ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Ird Number","description":"Employer IRD number. NZ only."},"location_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Location Id","description":"Internal location identifier."},"contact_first_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Contact First Name","description":"Primary contact first name."},"contact_middle_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Contact Middle Name","description":"Primary contact middle name."},"contact_last_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":1},{"type":"null"}],"title":"Contact Last Name","description":"Primary contact last name."}},"additionalProperties":false,"type":"object","title":"CompanyPartialUpdate","example":{"email":"billybro@techsolutions.com.au","jurisdiction":"AU","name":"Techy Bros Solutions Pty Ltd"}},"CompanyPayRateAwardGroup":{"properties":{"award_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Award Id"},"award_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Award Name"},"classifications":{"items":{"$ref":"#/components/schemas/CompanyPayRateClassificationGroup"},"type":"array","title":"Classifications"}},"type":"object","required":["classifications"],"title":"CompanyPayRateAwardGroup"},"CompanyPayRateClassificationGroup":{"properties":{"classification_id":{"type":"integer","title":"Classification Id"},"classification_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification Name"},"pay_rates":{"items":{"$ref":"#/components/schemas/CompanyPayRateOption"},"type":"array","title":"Pay Rates"},"employees":{"anyOf":[{"items":{"$ref":"#/components/schemas/CompanyPayRateEmployeeSummary"},"type":"array"},{"type":"null"}],"title":"Employees"}},"type":"object","required":["classification_id","pay_rates"],"title":"CompanyPayRateClassificationGroup"},"CompanyPayRateEmployeeSummary":{"properties":{"id":{"type":"integer","title":"Id"},"format_name":{"type":"string","title":"Format Name"},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number"}},"type":"object","required":["id","format_name"],"title":"CompanyPayRateEmployeeSummary"},"CompanyPayRateOption":{"properties":{"reference":{"type":"string","title":"Reference"},"id":{"type":"integer","title":"Id"},"description":{"type":"string","title":"Description"},"rate_type":{"type":"string","title":"Rate Type"},"multiplier":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Multiplier"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate"},"units":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Units"},"is_hours":{"type":"boolean","title":"Is Hours"},"is_overtime":{"type":"boolean","title":"Is Overtime"}},"type":"object","required":["reference","id","description","rate_type","is_hours","is_overtime"],"title":"CompanyPayRateOption"},"CompanyPayRatesResponse":{"properties":{"company_id":{"type":"integer","title":"Company Id"},"awards":{"items":{"$ref":"#/components/schemas/CompanyPayRateAwardGroup"},"type":"array","title":"Awards"}},"type":"object","required":["company_id","awards"],"title":"CompanyPayRatesResponse"},"ConfiguredBranding":{"properties":{"displayName":{"type":"string","title":"Displayname","description":"Brand name, or `\"\"` when unset.","examples":["Farm Focus"],"example":"Farm Focus"},"subtitle":{"type":"string","title":"Subtitle","description":"Secondary line, or `\"\"`.","examples":["Powered by Lightning Payroll"],"example":"Powered by Lightning Payroll"},"supportEmail":{"type":"string","title":"Supportemail","description":"Support email, or `\"\"`.","examples":["support@example.com"],"example":"support@example.com"},"supportPhone":{"type":"string","title":"Supportphone","description":"Support phone, or `\"\"`.","examples":["1300 000 111"],"example":"1300 000 111"},"homepageUrl":{"type":"string","title":"Homepageurl","description":"Homepage URL, or `\"\"`.","examples":["https://partner.example.com"],"example":"https://partner.example.com"},"supportUrl":{"type":"string","title":"Supporturl","description":"Support URL, or `\"\"`.","examples":["https://partner.example.com/support"],"example":"https://partner.example.com/support"},"disableDarkMode":{"type":"boolean","title":"Disabledarkmode","description":"Whether dark mode is suppressed for your customers.","examples":[false],"example":false},"publicBrandingToken":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Publicbrandingtoken","description":"Token for addressing your branding on the public endpoints.","examples":["public-branding-token"],"example":"public-branding-token"},"authDesign":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Authdesign","description":"Login-screen design blob, null when unset."}},"type":"object","required":["displayName","subtitle","supportEmail","supportPhone","homepageUrl","supportUrl","disableDarkMode"],"title":"ConfiguredBranding","description":"Your own configured branding, as stored (not the resolved effective branding)."},"DetailResponse":{"properties":{"detail":{"type":"string","title":"Detail","description":"Human-readable confirmation that the operation succeeded.","examples":["Super fund deleted successfully"],"example":"Super fund deleted successfully"}},"type":"object","required":["detail"],"title":"DetailResponse","description":"A bare confirmation body keyed on `detail`, matching FastAPI's own error shape."},"EffectiveBranding":{"properties":{"source_type":{"type":"string","title":"Source Type","description":"Where the branding came from: `none`, `self`, `add_on` or `oauth_client`.","examples":["self"],"example":"self"},"source_customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Customer Id","description":"Customer whose branding won.","examples":[12345],"example":12345},"source_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Client Id","description":"OAuth client the branding was resolved through."},"branding_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branding Token","description":"That owner's public branding token."},"add_on_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Add On Key","description":"Add-on that supplied the branding, on the `add_on` branch."},"add_on_label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Add On Label","description":"Human-readable name for that add-on."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Brand name to render."},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle","description":"Secondary line to render."},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name","description":"Owning company name, or the Lightning Payroll default."},"support_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Email","description":"Support email to render."},"support_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Phone","description":"Support phone to render."},"homepage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage Url","description":"Homepage URL to render."},"support_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Url","description":"Support URL to render."},"has_logo":{"type":"boolean","title":"Has Logo","description":"Whether a logo is available.","examples":[true],"example":true},"has_dark_logo":{"type":"boolean","title":"Has Dark Logo","description":"Whether a dark-mode logo is available.","examples":[true],"example":true},"has_favicon":{"type":"boolean","title":"Has Favicon","description":"Whether a favicon is available.","examples":[true],"example":true},"has_style":{"type":"boolean","title":"Has Style","description":"Whether a custom stylesheet is available.","examples":[true],"example":true},"disable_dark_mode":{"type":"boolean","title":"Disable Dark Mode","description":"Whether dark mode should be suppressed.","examples":[false],"example":false},"uses_standalone_shell":{"type":"boolean","title":"Uses Standalone Shell","description":"True only on the `add_on` branch, meaning render the standalone shell.","examples":[false],"example":false}},"type":"object","required":["source_type","has_logo","has_dark_logo","has_favicon","has_style","disable_dark_mode","uses_standalone_shell"],"title":"EffectiveBranding","description":"The branding that actually applies, after add-on and OAuth-client resolution."},"EmailDomain":{"properties":{"sendingDomain":{"type":"string","title":"Sendingdomain","description":"The configured sending domain, or `\"\"` when none is set.","examples":["mail.example.com"],"example":"mail.example.com"},"status":{"type":"string","title":"Status","description":"`unconfigured`, `pending` (awaiting DNS) or `verified`. Sends fall back to the Lightning Payroll sender until verified.","examples":["verified"],"example":"verified"},"verifiedAt":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Verifiedat","description":"ISO 8601 timestamp of verification, null while unverified.","examples":["2026-05-02T04:11:07"],"example":"2026-05-02T04:11:07"},"fromLocalPart":{"type":"string","title":"Fromlocalpart","description":"Local part of the From address, or `\"\"` to use `no-reply`.","examples":["no-reply"],"example":"no-reply"},"replyTo":{"type":"string","title":"Replyto","description":"Reply-To address, or `\"\"`.","examples":["support@example.com"],"example":"support@example.com"},"fromEmail":{"type":"string","title":"Fromemail","description":"The composed From address, or `\"\"` when no domain is configured.","examples":["no-reply@mail.example.com"],"example":"no-reply@mail.example.com"},"emailAccentColor":{"type":"string","title":"Emailaccentcolor","description":"Hex accent colour used in branded email, or `\"\"` for the default.","examples":["#00b1dd"],"example":"#00b1dd"},"emailHideLpAttribution":{"type":"boolean","title":"Emailhidelpattribution","description":"Whether the Lightning Payroll attribution line is suppressed.","examples":[false],"example":false},"mailgunConfigured":{"type":"boolean","title":"Mailgunconfigured","description":"Whether this deployment can talk to Mailgun at all. False means the domain endpoints answer 503.","examples":[true],"example":true},"dnsRecords":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Dnsrecords","description":"The DNS records you must publish for the domain. Present only on the endpoints that read live Mailgun state (GET, POST, verify), and only once a domain is set."},"mailgunState":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mailgunstate","description":"Mailgun's own state for the domain. Accompanies `dnsRecords`.","examples":["active"],"example":"active"}},"additionalProperties":true,"type":"object","required":["sendingDomain","status","fromLocalPart","replyTo","fromEmail","emailAccentColor","emailHideLpAttribution","mailgunConfigured"],"title":"EmailDomain","description":"The reseller's whitelabel sending domain and its Mailgun state."},"EmailDomainMutationResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation message.","examples":["Sending domain configured"],"example":"Sending domain configured"},"email_domain":{"$ref":"#/components/schemas/EmailDomain"}},"type":"object","required":["success","email_domain"],"title":"EmailDomainMutationResponse"},"EmailDomainResponse":{"properties":{"email_domain":{"$ref":"#/components/schemas/EmailDomain"}},"type":"object","required":["email_domain"],"title":"EmailDomainResponse"},"EmailDomainTestResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation that a test email was queued.","examples":["Test email queued to you@example.com"],"example":"Test email queued to you@example.com"}},"type":"object","required":["success"],"title":"EmailDomainTestResponse"},"Employee":{"properties":{"is_super_only_contractor":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Only Contractor","description":"Australia only. Whether the employee is a contractor paid super only (no TFN, excluded from STP, PAYG and payment summaries).","examples":[false],"example":false},"tax_file_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax File Number","examples":["123456782"],"example":"123456782"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number","description":"IRD number. NZ only.","examples":["49091850"],"example":"49091850"},"nz_tax_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Tax Code","description":"NZ tax code. NZ only.","examples":["M"],"example":"M"},"first_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"First Name","examples":["John"],"example":"John"},"middle_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Middle Name","examples":["Richard"],"example":"Richard"},"last_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Last Name","examples":["Smith"],"example":"Smith"},"date_of_birth":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Date Of Birth","examples":["1985-07-15"],"example":"1985-07-15"},"address1":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address1","examples":["123 Elm St"],"example":"123 Elm St"},"address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address2","examples":["123 Elm St"],"example":"123 Elm St"},"city":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"City","examples":["Sydney"],"example":"Sydney"},"state":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"State","examples":["NSW"],"example":"NSW"},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country","examples":["AU"],"example":"AU"},"postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Postcode","examples":["2000"],"example":"2000"},"email_address":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Address","description":"Email address of the employee.","examples":["tonytiger@gmail.com"],"example":"tonytiger@gmail.com"},"phone_home":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Home","description":"Home phone number of the employee.","examples":["02 1234 5678"],"example":"02 1234 5678"},"phone_mobile":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Mobile","description":"Mobile phone number of the employee.","examples":["0412 345 678"],"example":"0412 345 678"},"phone_medical":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Medical","description":"Medical contact phone number of the employee.","examples":["02 8765 4321"],"example":"02 8765 4321"},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE","INDETERMINATE","UNKNOWN"]},{"type":"null"}],"title":"Gender","description":"Gender of the employee. Must be one of MALE, FEMALE, INDETERMINATE, or UNKNOWN.","examples":["MALE"],"example":"MALE"},"kin_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin Name","description":"Name of the next of kin.","examples":["Jane Smith"],"example":"Jane Smith"},"kin_relationship":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin Relationship","description":"Relationship of the next of kin to the employee.","examples":["Sister"],"example":"Sister"},"kin_address1":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Kin Address1","description":"Address line 1 of the next of kin.","examples":["456 Oak St"],"example":"456 Oak St"},"kin_address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Kin Address2","description":"Address line 2 of the next of kin.","examples":["Apt 5B"],"example":"Apt 5B"},"kin_city":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin City","description":"City of the next of kin.","examples":["Melbourne"],"example":"Melbourne"},"kin_state":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Kin State","description":"State of the next of kin.","examples":["VIC"],"example":"VIC"},"kin_postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Kin Postcode","description":"Postcode of the next of kin.","examples":["3000"],"example":"3000"},"kin_phone_home":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Home","description":"Home phone number of the next of kin.","examples":["03 1234 5678"],"example":"03 1234 5678"},"kin_phone_work":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Work","description":"Work phone number of the next of kin.","examples":["03 8765 4321"],"example":"03 8765 4321"},"kin_phone_mobile":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Mobile","description":"Mobile phone number of the next of kin.","examples":["0412 345 678"],"example":"0412 345 678"},"kin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kin Notes","description":"Additional notes about the next of kin.","examples":["Emergency contact"],"example":"Emergency contact"},"pay_method":{"anyOf":[{"type":"string","enum":["CASH","DIRECT BANK ENTRY","OTHER"]},{"type":"null"}],"title":"Pay Method","description":"The method of payment for the employee.","default":"DIRECT BANK ENTRY","examples":["CASH"],"example":"CASH"},"pay_period":{"type":"string","enum":["WEEKLY","FORTNIGHTLY","MONTHLY"],"title":"Pay Period","description":"The pay period frequency for the employee. Valid values: WEEKLY, FORTNIGHTLY, MONTHLY","default":"WEEKLY","examples":["WEEKLY"],"example":"WEEKLY"},"pay_rate_per_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pay Rate Per Hour","description":"Hourly pay rate for the employee. This is used to calculate the employee's gross pay based on hours worked.","examples":[25.0],"example":25.0},"standard_hours_per_day":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standard Hours Per Day","examples":[7.6],"example":7.6},"standard_days_per_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Standard Days Per Week","description":"Number of standard working days per week for the employee. This is used to calculate leave accruals and RDOs.","examples":[5],"example":5},"stp_employment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stp Employment Status","description":"Employment status for STP reporting. On reads, unexpected values are passed through unchanged.","examples":["F"],"example":"F"},"active_pay_recipient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active Pay Recipient","description":"Whether the employee is an active pay recipient. If False, the employee will not have pending pays generated for them, but they will still count towards licence limits and be included in reports. This is useful for employees who are on leave or not currently receiving pay but are not terminated.","examples":[true],"example":true},"start_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start Date","examples":["2025-06-04"],"example":"2025-06-04"},"employment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employment Status","description":"Employment status derived from the employee's employment type. Usually 'Full time', 'Part time', 'Casual', or 'Contractor', and empty when no employment type is set. Read-only, and not guaranteed to round-trip the value sent on create/update: it reflects `employment_type`, so it is empty for a labour-hire employee, who has no matching employment type. For the authoritative status use stp_employment_status / readable_stp_employment_status, which are always populated.","examples":["Full time"],"example":"Full time"},"employment_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employment Type","description":"Employment type name, empty when none is set. Send either the id or the name on create/update.","examples":["Part-time"],"example":"Part-time"},"employment_tenure":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employment Tenure","description":"Employment tenure name, empty when none is set. Send either the id or the name on create/update.","examples":["Permanent"],"example":"Permanent"},"tfnd_signed_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Tfnd Signed Date","description":"Date the employee signed the TFN declaration.","examples":["2025-06-04"],"example":"2025-06-04"},"is_foreign_resident":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Foreign Resident"},"has_claimed_tax_free_threshold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Claimed Tax Free Threshold"},"has_stsl_liability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Stsl Liability"},"has_student_loan":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Student Loan","description":"Whether the employee has an NZ student loan. NZ only.","examples":[false],"example":false},"no_declaration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Declaration","description":"Whether the employee is using NZ non-declaration handling. NZ only.","examples":[false],"example":false},"include_email_and_phone_in_stp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Email And Phone In Stp","description":"Whether to include the employee's email address and phone number in STP reports sent to the ATO. Defaults to False if not set.","examples":[false],"example":false},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number (ABN) of the employee, if applicable. Required for non-standard employees who bill as contractors.","examples":["10000000000"],"example":"10000000000"},"is_closely_held":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closely Held","description":"Whether the employee is a closely held employee. Closely held employees are typically family members of the business owner or directors of the company.","examples":[false],"example":false},"working_holiday_tax_scale_applies":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Working Holiday Tax Scale Applies","description":"Whether the employee is subject to the Working Holiday Maker tax scale. If True, the employee's tax calculations will use the WHM tax scale instead of the standard tax scale.","examples":[false],"example":false},"leave_loading_percentage":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leave Loading Percentage","description":"Leave loading percentage, e.g. 0.175 for 17.5%","examples":[0.175],"example":0.175},"position":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Position","description":"Position or job title of the employee.","examples":["Manager"],"example":"Manager"},"employee_portal_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Employee Portal Active","description":"Whether the employee has access to the online portal.","examples":[false],"example":false},"allow_edit_timesheet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Timesheet","description":"Whether the employee is allowed to edit their own timesheets in the online portal.","examples":[false],"example":false},"allow_edit_timeclock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Timeclock","description":"Whether the employee is allowed to use the timeclock in the online portal.","examples":[false],"example":false},"allow_edit_account_details":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Account Details","description":"Whether the employee is allowed to edit their own personal details in the online portal.","examples":[false],"example":false},"allow_edit_tax_settings":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Tax Settings","description":"Whether the employee is allowed to edit their tax settings in the online portal.","examples":[false],"example":false},"allow_edit_bank_accounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Bank Accounts","description":"Whether the employee is allowed to edit their own bank account details in the online portal.","examples":[false],"example":false},"allow_edit_super_details":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Super Details","description":"Whether the employee is allowed to edit their super details in the online portal.","examples":[false],"example":false},"allow_edit_leave_requests":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Leave Requests","description":"Whether the employee is allowed to make leave requests through the online portal.","examples":[false],"example":false},"allow_edit_leave_requests_when_negative":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Leave Requests When Negative","description":"Whether the employee is allowed to make leave requests even when they have, or will reach, a negative leave balance.","examples":[false],"example":false},"allow_view_holiday_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Holiday Leave Balance","description":"Whether the employee is allowed to view their holiday leave balance in the online portal.","examples":[false],"example":false},"allow_view_sick_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Sick Leave Balance","description":"Whether the employee is allowed to view their sick leave balance in the online portal.","examples":[false],"example":false},"allow_view_long_service_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Long Service Leave Balance","description":"Whether the employee is allowed to view their long service leave balance in the online portal.","examples":[false],"example":false},"allow_view_payslips":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Payslips","description":"Whether the employee is allowed to view their payslips in the online portal.","examples":[false],"example":false},"department":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Department","examples":["Human Resources"],"example":"Human Resources"},"number":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Number","description":"User-controlled unique employee payroll number/code. This is not the same as the internal database ID.","examples":["EMP001"],"example":"EMP001"},"honorific":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Honorific","description":"Honorific title for the employee (e.g., Mr, Ms, Dr).","examples":["Mr"],"example":"Mr"},"show_roster_summary_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Roster Summary On Payslip","description":"Whether to show the roster summary on the payslip.","examples":[false],"example":false},"show_position_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Position On Payslip","description":"Whether to show the employee's position on the payslip.","examples":[false],"example":false},"show_department_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Department On Payslip","description":"Whether to show the employee's department on the payslip.","examples":[false],"example":false},"payslip_show_holiday_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Holiday Leave Balance","description":"Whether to show the employee's holiday leave balance on the payslip.","examples":[false],"example":false},"payslip_show_sick_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Sick Leave Balance","description":"Whether to show the employee's sick leave balance on the payslip.","examples":[false],"example":false},"payslip_show_lsl_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Lsl Balance","description":"Whether to show the employee's long service leave balance on the payslip.","examples":[false],"example":false},"payslip_show_negative_leave_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Negative Leave Balances","description":"Whether to show negative leave balances on the payslip.","examples":[false],"example":false},"payslip_show_custom_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Custom Balances","description":"Whether to show custom leave balances on the payslip.","examples":[false],"example":false},"payslip_leave_units":{"anyOf":[{"type":"string","enum":["HOURS","DAYS"]},{"type":"null"}],"title":"Payslip Leave Units","description":"The unit of measurement for leave balances shown on the payslip. Valid values: HOURS, DAYS","examples":["HOURS"],"example":"HOURS"},"payslip_show_hours_and_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Hours And Rate","description":"Whether to show hours worked and pay rate on the payslip.","examples":[false],"example":false},"payslip_show_allowance_units":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Allowance Units","description":"Whether to show allowance units on the payslip.","examples":[false],"example":false},"payslip_show_base_ordinary_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Base Ordinary Rate","description":"Whether to show the base ordinary rate on the payslip.","examples":[false],"example":false},"payslip_show_super_ytd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Super Ytd","description":"Whether to show the year-to-date superannuation contributions on the payslip.","examples":[false],"example":false},"payslip_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payslip Note","description":"An added note to be displayed on each upcoming payslip for this employee.","examples":["Thank you for your hard work!"],"example":"Thank you for your hard work!"},"payslip_show_ytd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Ytd","description":"Whether to show year-to-date totals on the payslip.","examples":[false],"example":false},"payslip_show_zero_dollar_leave":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Zero Dollar Leave","description":"Whether to show zero dollar leave balances on the payslip.","examples":[false],"example":false},"payslip_time_non_decimal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Time Non Decimal","description":"Whether to show time in non-decimal format (e.g., 1:30 instead of 1.5 hours) on the payslip.","examples":[false],"example":false},"primary_bank_bsb":{"anyOf":[{"type":"string","pattern":"^$|^\\d{3}-?\\d{3}$"},{"type":"null"}],"title":"Primary Bank Bsb","examples":["987-654"],"example":"987-654"},"primary_bank_account_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Primary Bank Account Number","examples":["87654321"],"example":"87654321"},"primary_bank_account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Primary Bank Account Name","examples":["John Smith"],"example":"John Smith"},"secondary_bank_bsb":{"anyOf":[{"type":"string","pattern":"^$|^\\d{3}-?\\d{3}$"},{"type":"null"}],"title":"Secondary Bank Bsb","examples":["123-456"],"example":"123-456"},"secondary_bank_account_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Secondary Bank Account Number","examples":["12345678"],"example":"12345678"},"secondary_bank_account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Secondary Bank Account Name","examples":["John Smith"],"example":"John Smith"},"secondary_bank_reference":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Secondary Bank Reference","examples":["Child Support"],"example":"Child Support"},"secondary_bank_amount_per_period":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Secondary Bank Amount Per Period","description":"Amount to be paid to the secondary bank account per pay period. Remaining pay will be paid to the primary bank account.","examples":[100.0],"example":100.0},"default_employee_fund_member_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Employee Fund Member Number","examples":["12345678"],"example":"12345678"},"default_employee_fund_usi":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Employee Fund Usi","examples":["STA0100AU"],"example":"STA0100AU"},"super_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Super Rate","description":"Total superannuation rate used on the employee's upcoming pays, expressed as a decimal (e.g., 0.115 for 11.5%). This is the rate applied to the employee's ordinary time earnings for superannuation contributions. Any excess above the compulsory_super_rate is categorised as RESC (Reportable Employer Super Contributions).","examples":[0.115],"example":0.115},"compulsory_super_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Compulsory Super Rate","description":"Compulsory superannuation rate used on the employee's upcoming pays, expressed as a decimal (e.g., 0.105 for 10.5%). This is the minimum rate required by law for superannuation contributions.","examples":[0.105],"example":0.105},"is_super_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Enabled","description":"Whether superannuation contributions are enabled for this employee. If False, no super calculations will be performed for this employee, regardless of the super_rate or compulsory_super_rate settings.","examples":[true],"example":true},"is_super_age_threshold_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Age Threshold Enabled","description":"Whether the superannuation age threshold is enabled for this employee. If True, the employee's age will be considered when calculating super contributions. If False, the employee's age will not affect super calculations.","examples":[true],"example":true},"super_based_on":{"anyOf":[{"type":"string","enum":["OTE","GROSS"]},{"type":"null"}],"title":"Super Based On","description":"The basis for superannuation calculations for this employee. Valid values: OTE (Ordinary Time Earnings, recommended) or GROSS (Gross Pay). If OTE, super is calculated based on the employee's ordinary time earnings. If GROSS, super is calculated based on the employee's gross pay.","examples":["OTE"],"example":"OTE"},"kiwisaver_employee_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Employee Rate","description":"Employee KiwiSaver contribution rate, as a fraction (e.g., 0.03 for 3%). NZ only.","examples":[0.03],"example":0.03},"kiwisaver_employer_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Employer Rate","description":"Employer KiwiSaver contribution rate, as a fraction (e.g., 0.03 for 3%). NZ only.","examples":[0.03],"example":0.03},"kiwisaver_status_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Status Code","description":"KiwiSaver status code. NZ only.","examples":["KS"],"example":"KS"},"kiwisaver_existing_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Existing Action","description":"KiwiSaver existing member action. NZ only.","examples":["EXISTING_MEMBER"],"example":"EXISTING_MEMBER"},"esct_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Esct Rate","description":"Employer superannuation contribution tax rate, as a fraction (e.g., 0.105 for 10.5%). NZ only.","examples":[0.105],"example":0.105},"employer_contrib_tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Contrib Tax Method","description":"NZ employer contribution tax method.","examples":["ESCT"],"example":"ESCT"},"employer_contrib_paye_fraction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Employer Contrib Paye Fraction","description":"NZ employer contribution PAYE fraction.","examples":[0.0],"example":0.0},"kiwisaver_cec_obligation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Cec Obligation","description":"KiwiSaver CEC obligation. NZ only.","examples":["NONE"],"example":"NONE"},"is_leave_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Leave Enabled","description":"Whether leave calculations are enabled for this employee. If False, no leave accruals will be calculated for this employee.","examples":[true],"example":true},"include_leave_loading_in_super":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Leave Loading In Super","description":"Whether to include leave loading in superannuation calculations for this employee. If True, leave loading will be included in the superannuation contributions. If False, leave loading will not be included in super calculations.","examples":[false],"example":false},"accrue_leave_on_hours_worked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accrue Leave On Hours Worked","description":"Whether to accrue leave based on hours worked (pro rata). If True, leave will be accrued based on the number of hours worked by the employee. If False, leave will be accrued by the pay period.","examples":[true],"example":true},"accrue_leave_on_overtime_hours":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accrue Leave On Overtime Hours","description":"Whether to accrue leave based on overtime hours worked. If True, leave will be accrued based on the number of overtime hours worked by the employee. If False, overtime hours will not contribute to leave accruals.","examples":[false],"example":false},"accrue_holiday_leave_per_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accrue Holiday Leave Per Hour","description":"Holiday leave accrual rate per hour worked, expressed as a decimal (e.g., 0.076923 for 20 days per year). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of holiday leave hours accrued by the employee based on their hours worked.","examples":[0.076923],"example":0.076923},"accrue_sick_leave_per_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accrue Sick Leave Per Hour","description":"Sick leave accrual rate per hour worked, expressed as a decimal (e.g., 0.038462 for 10 days per year). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of sick leave hours accrued by the employee based on their hours worked.","examples":[0.038462],"example":0.038462},"accrue_lsl_per_hour":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Accrue Lsl Per Hour","description":"Long Service Leave (LSL) accrual rate per hour worked, expressed as a decimal (e.g., 0.016667 for 8.6667 weeks per 10 years; 0.025 for SA/NT's 13 weeks). The per-state default is derived from the lump entitlement (weeks/years/52). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of LSL hours accrued by the employee based on their hours worked.","examples":[0.016667],"example":0.016667},"num_sick_leave_days_per_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Sick Leave Days Per Year","description":"Number of personal/sick days per year for the employee. This is used to calculate the number of personal leave hours accrued by the employee based on their hours worked.","examples":[10],"example":10},"num_holiday_leave_days_per_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Holiday Leave Days Per Year","description":"Number of annual/holiday days per year for the employee. This is used to calculate the number of holiday leave hours accrued by the employee based on their hours worked.","examples":[20],"example":20},"is_lsl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Lsl Enabled","description":"Whether Long Service Leave (LSL) calculations are enabled for this employee. If False, no LSL accruals will be calculated for this employee.","examples":[true],"example":true},"lsl_x_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lsl X Years","description":"Number of years of service required to qualify for Long Service Leave (LSL). This is used to determine when the employee is eligible for LSL based on their length of service.","examples":[10],"example":10},"lsl_accrued_x_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lsl Accrued X Years","description":"Number of weeks LSL accrued for every lsl_x_years years of service. This is used to calculate the number of LSL hours accrued by the employee based on their length of service.","examples":[10],"example":10},"hourly_amount_for_workers_comp_leave":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Amount For Workers Comp Leave","examples":[25.5],"example":25.5},"hourly_amount_for_paid_parental_leave":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Amount For Paid Parental Leave","examples":[30.75],"example":30.75},"rdo_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rdo Hours","description":"Total hours of Rostered Days Off (RDOs) accrued by the employee as at their most recent pay.","examples":[55.42],"example":55.42},"toil_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Toil Hours","description":"Total hours of Time Off In Lieu (TOIL) accrued by the employee as at their most recent pay.","examples":[20.0],"example":20.0},"id":{"type":"integer","title":"Id"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id"},"readable_stp_employment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Readable Stp Employment Status","description":"Human-readable employment status for Single Touch Payroll (STP) reporting. This is derived from the stp_employment_status field and is used for display purposes in reports and the online portal.","examples":["Full time"],"example":"Full time"},"is_australian_resident":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Australian Resident","description":"Whether the employee is an Australian resident for tax purposes. This is used to determine the employee's tax treatment and reporting in Single Touch Payroll (STP). To control this value, use the is_foreign_resident field. If is_foreign_resident is True, this field will be set to False automatically.","examples":[true],"example":true},"income_stream":{"anyOf":[{"type":"string","enum":["SAW","CHP","WHM","VOL"]},{"type":"null"}],"title":"Income Stream","description":"Income stream type for the employee. Valid values: SAW (Salary and Wages), CHP (Closely held), WHM (Working Holiday Maker), VOL (Voluntary).","examples":["SAW"],"example":"SAW"},"stp_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Stp Id","description":"Unique identifier for the employee in the Single Touch Payroll (STP) system. This is used to identify the employee in STP reports sent to the ATO.","examples":[1],"example":1},"has_leave_loading":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Leave Loading","description":"Whether the employee is set to receive annual leave loading.","examples":[true],"example":true},"username":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Username","description":"Username for the employee, used for online portal login purposes.","examples":["smithjohnjames"],"example":"smithjohnjames"},"standard_hours_per_week":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Standard Hours Per Week","description":"Standard hours worked by the employee per week. This is calculated as standard_hours_per_day * standard_days_per_week.","examples":[38],"example":38},"rdo_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rdo Days","description":"Number of Rostered Days Off (RDOs) accrued by the employee as at their most recent pay. This is calculated based on the employee's rdo_hours / standard_hours_per_day.","examples":[12],"example":12},"toil_days":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Toil Days","description":"Number of Time Off In Lieu (TOIL) days accrued by the employee as at their most recent pay. This is calculated based on the employee's toil_hours / standard_hours_per_day.","examples":[5],"example":5},"holiday_leave_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Holiday Leave Hours","description":"Total hours of Annual Leave accrued by the employee as at their most recent pay.","examples":[120],"example":120},"sick_leave_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Sick Leave Hours","description":"Total hours of Personal Leave accrued by the employee as at their most recent pay.","examples":[80],"example":80},"lsl_leave_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lsl Leave Hours","description":"Total hours of Long Service Leave (LSL) accrued by the employee as at their most recent pay.","examples":[30],"example":30},"pay_period_gross":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Pay Period Gross","description":"Typical gross pay for the employee, based on their current pay settings.","examples":[5000.0],"example":5000.0},"annual_gross":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Annual Gross","description":"Estimated annual gross pay for the employee, based on their current pay settings. This is calculated as pay_period_gross * (52 weeks / pay_period frequency).","examples":[130000.0],"example":130000.0},"current_ytd_gross":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Current Ytd Gross","description":"Year-to-date gross pay for the employee, based on the YTD of their most recent completed pay.","examples":[50000.0],"example":50000.0},"last_pay_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Last Pay Date","description":"Pay run end date of the employee's most recent completed pay. This is used to determine the employee's last pay date and is important for leave calculations and reporting.","examples":["2023-06-30"],"example":"2023-06-30"},"last_pay_processed_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Last Pay Processed Date","description":"Processed date of the employee's most recent completed pay. This is used to determine when the employee's last pay was processed and is important for leave calculations and reporting.","examples":["2023-07-01"],"example":"2023-07-01"},"format_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Name","description":"Formatted name of the employee, typically in 'Last, First Middle' format. This is used for display purposes in reports and the online portal.","examples":["Smith, John James"],"example":"Smith, John James"},"format_name_shorter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Name Shorter","description":"Shortened formatted name of the employee, typically in 'Last, First Initials' format. This is used for display purposes in some reports and the online portal.","examples":["Smith, John J."],"example":"Smith, John J."},"default_employee_fund_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Default Employee Fund Name","description":"Name of the default superannuation fund for the employee. This is used for superannuation contributions and reporting.","examples":["Super Fund Pty Ltd"],"example":"Super Fund Pty Ltd"},"lsl_eligible_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Lsl Eligible Date","description":"Date when the employee becomes eligible for Long Service Leave (LSL). This is calculated based on the employee's start date and lsl_x_years setting. If the employee has not yet reached the required years of service, this will be None.","examples":["2025-06-04"],"example":"2025-06-04"},"default_lsl_over_ten_years":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Default Lsl Over Ten Years","description":"Recommended number of weeks of Long Service Leave (LSL) accrued for every 10 years of service, based on the company's state/territory regulations. This is used to calculate the number of LSL hours accrued by the employee based on their length of service. ","examples":[8.6667],"example":8.6667},"tax_treatment_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Treatment Code","description":"Tax treatment code for the employee, used for Single Touch Payroll (STP) reporting. This is used to describe how the employee's earnings are taxed and reported to the ATO.","examples":["RTSXXX"],"example":"RTSXXX"},"single_touch_residency_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Single Touch Residency Status","description":"Residency status of the employee for Single Touch Payroll (STP) reporting. This is used to describe if the employee is a resident, non-resident or working holiday maker for tax purposes.","examples":["RESIDENT"],"example":"RESIDENT"},"income_stream_country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Income Stream Country Code","description":"Income stream country code. NZ only.","examples":["NZ"],"example":"NZ"},"period_student_loan_cir":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Period Student Loan Cir","description":"Period student loan CIR amount. NZ only.","examples":[0.0],"example":0.0},"period_student_loan_bor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Period Student Loan Bor","description":"Period student loan BOR amount. NZ only.","examples":[0.0],"example":0.0},"opted_out":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Opted Out","description":"Whether the employee opted out of KiwiSaver. NZ only.","examples":[false],"example":false},"opted_out_signature_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Opted Out Signature Date","description":"Date the employee signed a KiwiSaver opt-out. NZ only.","examples":["2025-06-04"],"example":"2025-06-04"},"late_opt_out_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Late Opt Out Reason","description":"Late KiwiSaver opt-out reason. NZ only.","examples":["NEW_EMPLOYMENT"],"example":"NEW_EMPLOYMENT"},"other_late_opt_out_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Other Late Opt Out Reason","description":"Free-text late KiwiSaver opt-out reason. NZ only.","examples":["Employer correction"],"example":"Employer correction"},"is_terminated":{"type":"boolean","title":"Is Terminated","default":false,"examples":[false],"example":false},"termination_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Termination Date","examples":["2023-06-30"],"example":"2023-06-30"},"is_deleted":{"type":"boolean","title":"Is Deleted","description":"Whether the employee has been deleted. Deletion is reversible: the record, its pays and its reporting history are all retained, and the employee is simply hidden from the default employee list. Deleted employees are only returned when you pass `status=deleted` or `status=all` to the company employee list.\n\nA deleted employee still holds their `number`, so creating a new employee with that number is rejected. Use `POST /api/employees/{employee_id}/restore` to bring the record back rather than creating a duplicate. This is distinct from `is_terminated`, which records the end of employment and does not hide the employee.","default":false,"examples":[false],"example":false},"cessation_type_code":{"anyOf":[{"enum":[null,"","V","I","R","F","C"]},{"type":"null"}],"title":"Cessation Type Code","description":"Cessation type code for the employee's termination.","examples":["V"],"example":"V"}},"additionalProperties":false,"type":"object","required":["id"],"title":"Employee","description":"Full employee record returned by the API, used in get requests."},"EmployeeAllowanceCreate":{"properties":{"description":{"type":"string","title":"Description","description":"Allowance description, and the grouping key used for YTD and STP reporting, so it has to be unique. A company allowance may not clash with another company allowance or with any employee's own allowance. An employee allowance may not clash with that employee's other allowances or with a company allowance, but two employees may each hold an allowance of the same name at their own amount. This matches the desktop app.\n\nMust be 40 characters or fewer. For Australian companies it may also not contain characters the ATO rejects for STP submission (notably `<` and `>`).","examples":["Laundry Allowance"],"example":"Laundry Allowance"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,14}|(?=[\\d.]{1,15}0*$)\\d*\\.\\d*0*$)"}],"title":"Amount","description":"Per-pay amount, copied verbatim onto each pay the allowance applies to. Stored exactly as supplied, to at most 5 decimal places.\n\nMust be greater than zero once rounded to cents. Lightning Payroll skips any allowance of zero or less when it builds a pay, so a zero, negative or sub-cent amount would create an allowance that silently never pays.","examples":["8.50"],"example":"8.50"},"is_taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Taxable","description":"Include this allowance in the pay's tax calculations.","examples":[true],"example":true},"is_itemised":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Itemised","description":"Report this allowance as its own STP line rather than folding it into a summarised allowances total. Not used for New Zealand companies.","examples":[true],"example":true},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Include this allowance in the earnings base used for superannuation (Australia) or KiwiSaver (New Zealand).","examples":[true],"example":true},"auto_apply_to_pay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Apply To Pay","description":"Copy this allowance onto every new pay automatically.","examples":[true],"example":true},"allowance_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowance Category","description":"ATO Single Touch Payroll (Phase 2) allowance category code.\n\nRequired on create for Australian companies, and rejected if set to `Unclassified`, because an unclassified allowance blocks the customer's STP lodgement. Optional for New Zealand companies, which have no STP equivalent: it defaults to `Unclassified` there and plays no part in payday filing.\n\n- `CD` - Cents per KM\n- `AD` - Award Transport\n- `LD` - Laundry\n- `MD` - Overtime Meals\n- `RD` - Domestic & Overseas Travel/Accommodation\n- `TD` - Tools\n- `KN` - Tasks\n- `QN` - Qualifications/Certificates\n- `OD` - Other","examples":["TD"],"example":"TD"}},"additionalProperties":false,"type":"object","required":["description","amount"],"title":"EmployeeAllowanceCreate"},"EmployeeAllowanceRead":{"properties":{"id":{"type":"integer","title":"Id","description":"LP identifier for this allowance row.","examples":[42],"example":42},"description":{"type":"string","title":"Description","description":"Allowance description, and the grouping key used for YTD and STP reporting.","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"type":"number","title":"Amount","description":"Per-pay amount, copied verbatim onto each pay the allowance applies to.","examples":[15.0],"example":15.0},"is_taxable":{"type":"boolean","title":"Is Taxable","description":"Whether this allowance is included in the pay's tax calculations.","examples":[true],"example":true},"is_itemised":{"type":"boolean","title":"Is Itemised","description":"Whether this allowance is reported as its own STP line rather than folded into a summarised allowances total. Not used for New Zealand companies.","examples":[true],"example":true},"is_included_in_super_calculations":{"type":"boolean","title":"Is Included In Super Calculations","description":"Whether this allowance is included in the earnings base used for superannuation (Australia) or KiwiSaver (New Zealand).","examples":[false],"example":false},"auto_apply_to_pay":{"type":"boolean","title":"Auto Apply To Pay","description":"Whether this allowance is copied onto every new pay automatically.","examples":[true],"example":true},"allowance_category":{"type":"string","title":"Allowance Category","description":"STP allowance category code, or `Unclassified` when the allowance has not been categorised.","examples":["TD"],"example":"TD"},"employee_id":{"type":"integer","title":"Employee Id","description":"LP employee this allowance belongs to.","examples":[12],"example":12}},"type":"object","required":["id","description","amount","is_taxable","is_itemised","is_included_in_super_calculations","auto_apply_to_pay","allowance_category","employee_id"],"title":"EmployeeAllowanceRead"},"EmployeeAllowanceSet":{"properties":{"employee":{"items":{"$ref":"#/components/schemas/EmployeeAllowanceRead"},"type":"array","title":"Employee","description":"Allowances belonging to this employee alone."},"company":{"items":{"$ref":"#/components/schemas/CompanyAllowanceRead"},"type":"array","title":"Company","description":"Company-wide allowances this employee is attached to. Manage these under `/api/company/{company_id}/allowances`."}},"type":"object","title":"EmployeeAllowanceSet"},"EmployeeAllowanceUpdate":{"properties":{"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Allowance description, and the grouping key used for YTD and STP reporting, so it has to be unique. A company allowance may not clash with another company allowance or with any employee's own allowance. An employee allowance may not clash with that employee's other allowances or with a company allowance, but two employees may each hold an allowance of the same name at their own amount. This matches the desktop app.\n\nMust be 40 characters or fewer. For Australian companies it may also not contain characters the ATO rejects for STP submission (notably `<` and `>`).","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*(?:\\d{0,14}|(?=[\\d.]{1,15}0*$)\\d*\\.\\d*0*$)"},{"type":"null"}],"title":"Amount","description":"Per-pay amount, copied verbatim onto each pay the allowance applies to. Stored exactly as supplied, to at most 5 decimal places.\n\nMust be greater than zero once rounded to cents. Lightning Payroll skips any allowance of zero or less when it builds a pay, so a zero, negative or sub-cent amount would create an allowance that silently never pays.","examples":["15.00"],"example":"15.00"},"is_taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Taxable","description":"Include this allowance in the pay's tax calculations.","examples":[true],"example":true},"is_itemised":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Itemised","description":"Report this allowance as its own STP line rather than folding it into a summarised allowances total. Not used for New Zealand companies.","examples":[true],"example":true},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Include this allowance in the earnings base used for superannuation (Australia) or KiwiSaver (New Zealand).","examples":[true],"example":true},"auto_apply_to_pay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Apply To Pay","description":"Copy this allowance onto every new pay automatically.","examples":[true],"example":true},"allowance_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowance Category","description":"ATO Single Touch Payroll (Phase 2) allowance category code.\n\nRequired on create for Australian companies, and rejected if set to `Unclassified`, because an unclassified allowance blocks the customer's STP lodgement. Optional for New Zealand companies, which have no STP equivalent: it defaults to `Unclassified` there and plays no part in payday filing.\n\n- `CD` - Cents per KM\n- `AD` - Award Transport\n- `LD` - Laundry\n- `MD` - Overtime Meals\n- `RD` - Domestic & Overseas Travel/Accommodation\n- `TD` - Tools\n- `KN` - Tasks\n- `QN` - Qualifications/Certificates\n- `OD` - Other","examples":["TD"],"example":"TD"}},"additionalProperties":false,"type":"object","title":"EmployeeAllowanceUpdate","description":"Partial update. Supply only the fields you want to change."},"EmployeeAllowancesResponse":{"properties":{"employee_id":{"type":"integer","title":"Employee Id"},"allowances":{"$ref":"#/components/schemas/EmployeeAllowanceSet"}},"type":"object","required":["employee_id","allowances"],"title":"EmployeeAllowancesResponse"},"EmployeeBasic":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"The unique identifier of the employee.","examples":[1234],"example":1234},"number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Number","description":"The external unique employee number.","examples":["EMP001"],"example":"EMP001"},"company_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Company Id","description":"The unique identifier of the company the employee belongs to.","examples":[5678],"example":5678},"first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"First Name","description":"The first name of the employee.","examples":["John"],"example":"John"},"last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Last Name","description":"The last name of the employee.","examples":["Doe"],"example":"Doe"},"date_of_birth":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date Of Birth","description":"The date of birth of the employee.","examples":["1990-01-01"],"example":"1990-01-01"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The date the employee started working.","examples":["2020-01-15"],"example":"2020-01-15"},"is_terminated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Terminated","description":"Indicates whether the employee has been terminated.","examples":[false],"example":false},"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date","description":"The date the employee was terminated, if applicable.","examples":["2021-12-31"],"example":"2021-12-31"},"address1":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address1","description":"The first line of the employee's address.","examples":["123 Main Street"],"example":"123 Main Street"},"address2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address2","description":"The second line of the employee's address.","examples":["Apt 4B"],"example":"Apt 4B"},"city":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"City","description":"The city where the employee resides.","examples":["Sydney"],"example":"Sydney"},"state":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"State","description":"The state or province where the employee resides.","examples":["NSW"],"example":"NSW"},"postcode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Postcode","description":"The postal code of the employee's address.","examples":["2000"],"example":"2000"},"country":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country","description":"The country where the employee resides.","examples":["Australia"],"example":"Australia"},"tax_file_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax File Number","description":"The tax file number of the employee.","examples":["123456782"],"example":"123456782"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number","description":"The IRD number of the employee. NZ only.","examples":["49091850"],"example":"49091850"},"nz_tax_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Tax Code","description":"The NZ tax code of the employee. NZ only.","examples":["M"],"example":"M"},"has_student_loan":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Student Loan","description":"Indicates whether the employee has an NZ student loan. NZ only.","examples":[false],"example":false},"no_declaration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Declaration","description":"Indicates whether the employee is on NZ non-declaration settings. NZ only.","examples":[false],"example":false},"has_claimed_tax_free_threshold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Claimed Tax Free Threshold","description":"Indicates whether the employee has claimed the tax-free threshold.","examples":[true],"example":true},"is_australian_resident":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Australian Resident","description":"Read only. Whether the employee is an Australian resident for tax purposes. To control this value, use the `is_foreign_resident` field on create/update. If `is_foreign_resident` is True, this field will be set to False automatically.","examples":[true],"example":true},"has_stsl_liability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Stsl Liability","description":"Whether the employee has an STSL (Study and Training Support Loans) liability, which covers HELP, VSL, SFSS, SSL, ABSTUDY SSL and TSL. This is the field name to send on create/update.","examples":[false],"example":false},"has_help_liability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Help Liability","description":"Read only, and deprecated in favour of `has_stsl_liability`. This is the stored HELP (Higher Education Loan Program) column on its own; it is not accepted on create or update, where sending it is rejected as an unknown field. Send `has_stsl_liability` instead.","examples":[false],"example":false},"stp_employment_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stp Employment Status","description":"The Single Touch Payroll (STP) employment status of the employee, as the single-letter code stored against the employee: `F` (full time), `P` (part time) or `C` (casual). Matches `Employee.stp_employment_status`.","examples":["F"],"example":"F"},"hourly_amount_for_workers_comp_leave":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hourly Amount For Workers Comp Leave","description":"The hourly amount for workers' compensation leave.","examples":[25.5],"example":25.5}},"type":"object","title":"EmployeeBasic"},"EmployeeCreate":{"properties":{"is_super_only_contractor":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Only Contractor"},"tax_file_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax File Number","description":"Tax File Number (TFN) of the employee. Required for AU companies, not used for NZ companies.","examples":["123456782"],"example":"123456782"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number","description":"IRD number. NZ only.","examples":["49091850"],"example":"49091850"},"nz_tax_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Tax Code","description":"NZ tax code. NZ only.","examples":["M"],"example":"M"},"first_name":{"type":"string","maxLength":60,"minLength":1,"title":"First Name","examples":["John"],"example":"John"},"middle_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Middle Name","examples":["Richard"],"example":"Richard"},"last_name":{"type":"string","maxLength":60,"minLength":1,"title":"Last Name","examples":["Smith"],"example":"Smith"},"date_of_birth":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Date Of Birth","examples":["1985-07-15"],"example":"1985-07-15"},"address1":{"type":"string","maxLength":100,"minLength":1,"title":"Address1","examples":["123 Elm St"],"example":"123 Elm St"},"address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address2","examples":["123 Elm St"],"example":"123 Elm St"},"city":{"type":"string","maxLength":60,"minLength":1,"title":"City","examples":["Sydney"],"example":"Sydney"},"state":{"type":"string","maxLength":3,"minLength":2,"title":"State","examples":["NSW"],"example":"NSW"},"country":{"type":"string","maxLength":2,"title":"Country","examples":["AU"],"example":"AU"},"postcode":{"type":"string","pattern":"^\\d{4}$","title":"Postcode","examples":["2000"],"example":"2000"},"email_address":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Address","description":"Email address of the employee.","examples":["tonytiger@gmail.com"],"example":"tonytiger@gmail.com"},"phone_home":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Home","description":"Home phone number of the employee.","examples":["02 1234 5678"],"example":"02 1234 5678"},"phone_mobile":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Mobile","description":"Mobile phone number of the employee.","examples":["0412 345 678"],"example":"0412 345 678"},"phone_medical":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Medical","description":"Medical contact phone number of the employee.","examples":["02 8765 4321"],"example":"02 8765 4321"},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE","INDETERMINATE","UNKNOWN"]},{"type":"null"}],"title":"Gender","description":"Gender of the employee. Must be one of MALE, FEMALE, INDETERMINATE, or UNKNOWN.","examples":["MALE"],"example":"MALE"},"kin_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin Name","description":"Name of the next of kin.","examples":["Jane Smith"],"example":"Jane Smith"},"kin_relationship":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin Relationship","description":"Relationship of the next of kin to the employee.","examples":["Sister"],"example":"Sister"},"kin_address1":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Kin Address1","description":"Address line 1 of the next of kin.","examples":["456 Oak St"],"example":"456 Oak St"},"kin_address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Kin Address2","description":"Address line 2 of the next of kin.","examples":["Apt 5B"],"example":"Apt 5B"},"kin_city":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin City","description":"City of the next of kin.","examples":["Melbourne"],"example":"Melbourne"},"kin_state":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Kin State","description":"State of the next of kin.","examples":["VIC"],"example":"VIC"},"kin_postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Kin Postcode","description":"Postcode of the next of kin.","examples":["3000"],"example":"3000"},"kin_phone_home":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Home","description":"Home phone number of the next of kin.","examples":["03 1234 5678"],"example":"03 1234 5678"},"kin_phone_work":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Work","description":"Work phone number of the next of kin.","examples":["03 8765 4321"],"example":"03 8765 4321"},"kin_phone_mobile":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Mobile","description":"Mobile phone number of the next of kin.","examples":["0412 345 678"],"example":"0412 345 678"},"kin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kin Notes","description":"Additional notes about the next of kin.","examples":["Emergency contact"],"example":"Emergency contact"},"pay_method":{"anyOf":[{"type":"string","enum":["CASH","DIRECT BANK ENTRY","OTHER"]},{"type":"null"}],"title":"Pay Method","description":"The method of payment for the employee.","default":"DIRECT BANK ENTRY","examples":["CASH"],"example":"CASH"},"pay_period":{"type":"string","enum":["WEEKLY","FORTNIGHTLY","MONTHLY"],"title":"Pay Period","description":"The pay period frequency for the employee. Valid values: WEEKLY, FORTNIGHTLY, MONTHLY","default":"WEEKLY","examples":["WEEKLY"],"example":"WEEKLY"},"pay_rate_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Pay Rate Per Hour","description":"Hourly pay rate for the employee. This is used to calculate the employee's gross pay based on hours worked.","examples":["25.00"],"example":"25.00"},"standard_hours_per_day":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Standard Hours Per Day","examples":["7.6"],"example":"7.6"},"standard_days_per_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Standard Days Per Week","description":"Number of standard working days per week for the employee. This is used to calculate leave accruals and RDOs.","examples":[5],"example":5},"stp_employment_status":{"anyOf":[{"type":"string","enum":["C","P","F"]},{"type":"null"}],"title":"Stp Employment Status","description":"The employment status of the employee for Single Touch Payroll (STP) reporting. Valid values: C, P, F. This is used to determine how the employee's earnings are reported to the ATO.","default":"F","examples":["F"],"example":"F"},"active_pay_recipient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active Pay Recipient","description":"Whether the employee is an active pay recipient. If False, the employee will not have pending pays generated for them, but they will still count towards licence limits and be included in reports. This is useful for employees who are on leave or not currently receiving pay but are not terminated.","examples":[true],"example":true},"start_date":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","title":"Start Date","examples":["2025-06-04"],"example":"2025-06-04"},"employment_status":{"type":"string","pattern":"(?i)^(full[-\\s]?time|part[-\\s]?time|casual|labour[\\s-]?hire)$","title":"Employment Status","description":"Employment status. One of 'Full-time', 'Part-time', 'Casual', or 'Labour Hire' (matched case-insensitively; hyphen/space tolerant). Sets the employee's STP employment status and the default leave / long-service-leave accrual configuration.","examples":["Full-time"],"example":"Full-time"},"employment_type":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Employment Type","description":"Employment type, as either the id or the exact name of an option from `GET /api/employment-types` (matched case-insensitively; hyphen/space tolerant). Defaults are 'Full-time', 'Part-time' and 'Casual', and a customer may have added their own.\n\nDistinct from `employment_status`, which drives STP reporting. When you omit this on create it is derived from `employment_status`, except for 'Labour Hire', which has no matching employment type and so leaves this unset.\n\nThis value is shown on the payslip and reported in the SuperStream member registration, so it should describe the employee accurately.","examples":["Part-time"],"example":"Part-time"},"employment_tenure":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Employment Tenure","description":"Employment tenure, as either the id or the exact name of an option from `GET /api/employment-tenures` (matched case-insensitively). Defaults are 'Permanent' and 'Temporary', and a customer may have added their own.\n\nNot derived from `employment_status`, because permanent versus temporary is not implied by full-time, part-time or casual. New employees are 'Permanent' until you set this, so send it explicitly for a fixed-term or temporary hire. Shown on the payslip.","examples":["Permanent"],"example":"Permanent"},"tfnd_signed_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Tfnd Signed Date","description":"Date the employee signed the TFN declaration.","examples":["2025-06-04"],"example":"2025-06-04"},"is_foreign_resident":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Foreign Resident"},"has_claimed_tax_free_threshold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Claimed Tax Free Threshold"},"has_stsl_liability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Stsl Liability"},"has_student_loan":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Student Loan","description":"Whether the employee has an NZ student loan. NZ only.","examples":[false],"example":false},"no_declaration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Declaration","description":"Whether the employee is using NZ non-declaration handling. NZ only.","examples":[false],"example":false},"include_email_and_phone_in_stp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Email And Phone In Stp","description":"Whether to include the employee's email address and phone number in STP reports sent to the ATO. Defaults to False if not set.","examples":[false],"example":false},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number (ABN) of the employee, if applicable. Required for non-standard employees who bill as contractors.","examples":["10000000000"],"example":"10000000000"},"is_closely_held":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closely Held"},"working_holiday_tax_scale_applies":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Working Holiday Tax Scale Applies","description":"Whether the employee is subject to the Working Holiday Maker tax scale. If True, the employee's tax calculations will use the WHM tax scale instead of the standard tax scale.","examples":[false],"example":false},"leave_loading_percentage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Leave Loading Percentage","description":"Leave loading percentage, e.g. 0.175 for 17.5%","examples":["0.175"],"example":"0.175"},"position":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Position","description":"Position or job title of the employee.","examples":["Manager"],"example":"Manager"},"employee_portal_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Employee Portal Active","description":"Whether the employee has access to the online portal.","examples":[false],"example":false},"allow_edit_timesheet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Timesheet","description":"Whether the employee is allowed to edit their own timesheets in the online portal.","examples":[false],"example":false},"allow_edit_timeclock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Timeclock","description":"Whether the employee is allowed to use the timeclock in the online portal.","examples":[false],"example":false},"allow_edit_account_details":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Account Details","description":"Whether the employee is allowed to edit their own personal details in the online portal.","examples":[false],"example":false},"allow_edit_tax_settings":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Tax Settings","description":"Whether the employee is allowed to edit their tax settings in the online portal.","examples":[false],"example":false},"allow_edit_bank_accounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Bank Accounts","description":"Whether the employee is allowed to edit their own bank account details in the online portal.","examples":[false],"example":false},"allow_edit_super_details":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Super Details","description":"Whether the employee is allowed to edit their super details in the online portal.","examples":[false],"example":false},"allow_edit_leave_requests":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Leave Requests","description":"Whether the employee is allowed to make leave requests through the online portal.","examples":[false],"example":false},"allow_edit_leave_requests_when_negative":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Leave Requests When Negative","description":"Whether the employee is allowed to make leave requests even when they have, or will reach, a negative leave balance.","examples":[false],"example":false},"allow_view_holiday_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Holiday Leave Balance","description":"Whether the employee is allowed to view their holiday leave balance in the online portal.","examples":[false],"example":false},"allow_view_sick_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Sick Leave Balance","description":"Whether the employee is allowed to view their sick leave balance in the online portal.","examples":[false],"example":false},"allow_view_long_service_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Long Service Leave Balance","description":"Whether the employee is allowed to view their long service leave balance in the online portal.","examples":[false],"example":false},"allow_view_payslips":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Payslips","description":"Whether the employee is allowed to view their payslips in the online portal.","examples":[false],"example":false},"department":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Department","examples":["Human Resources"],"example":"Human Resources"},"number":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Number","description":"User-controlled unique employee payroll number/code. This is not the same as the internal database ID.","examples":["EMP001"],"example":"EMP001"},"honorific":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Honorific","description":"Honorific title for the employee (e.g., Mr, Ms, Dr).","examples":["Mr"],"example":"Mr"},"show_roster_summary_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Roster Summary On Payslip","description":"Whether to show the roster summary on the payslip.","examples":[false],"example":false},"show_position_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Position On Payslip","description":"Whether to show the employee's position on the payslip.","examples":[false],"example":false},"show_department_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Department On Payslip","description":"Whether to show the employee's department on the payslip.","examples":[false],"example":false},"payslip_show_holiday_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Holiday Leave Balance","description":"Whether to show the employee's holiday leave balance on the payslip.","examples":[false],"example":false},"payslip_show_sick_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Sick Leave Balance","description":"Whether to show the employee's sick leave balance on the payslip.","examples":[false],"example":false},"payslip_show_lsl_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Lsl Balance","description":"Whether to show the employee's long service leave balance on the payslip.","examples":[false],"example":false},"payslip_show_negative_leave_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Negative Leave Balances","description":"Whether to show negative leave balances on the payslip.","examples":[false],"example":false},"payslip_show_custom_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Custom Balances","description":"Whether to show custom leave balances on the payslip.","examples":[false],"example":false},"payslip_leave_units":{"anyOf":[{"type":"string","enum":["HOURS","DAYS"]},{"type":"null"}],"title":"Payslip Leave Units","description":"The unit of measurement for leave balances shown on the payslip. Valid values: HOURS, DAYS","examples":["HOURS"],"example":"HOURS"},"payslip_show_hours_and_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Hours And Rate","description":"Whether to show hours worked and pay rate on the payslip.","examples":[false],"example":false},"payslip_show_allowance_units":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Allowance Units","description":"Whether to show allowance units on the payslip.","examples":[false],"example":false},"payslip_show_base_ordinary_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Base Ordinary Rate","description":"Whether to show the base ordinary rate on the payslip.","examples":[false],"example":false},"payslip_show_super_ytd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Super Ytd","description":"Whether to show the year-to-date superannuation contributions on the payslip.","examples":[false],"example":false},"payslip_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payslip Note","description":"An added note to be displayed on each upcoming payslip for this employee.","examples":["Thank you for your hard work!"],"example":"Thank you for your hard work!"},"payslip_show_ytd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Ytd","description":"Whether to show year-to-date totals on the payslip.","examples":[false],"example":false},"payslip_show_zero_dollar_leave":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Zero Dollar Leave","description":"Whether to show zero dollar leave balances on the payslip.","examples":[false],"example":false},"payslip_time_non_decimal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Time Non Decimal","description":"Whether to show time in non-decimal format (e.g., 1:30 instead of 1.5 hours) on the payslip.","examples":[false],"example":false},"primary_bank_bsb":{"anyOf":[{"type":"string","pattern":"^$|^\\d{3}-?\\d{3}$"},{"type":"null"}],"title":"Primary Bank Bsb","examples":["987-654"],"example":"987-654"},"primary_bank_account_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Primary Bank Account Number","examples":["87654321"],"example":"87654321"},"primary_bank_account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Primary Bank Account Name","examples":["John Smith"],"example":"John Smith"},"secondary_bank_bsb":{"anyOf":[{"type":"string","pattern":"^$|^\\d{3}-?\\d{3}$"},{"type":"null"}],"title":"Secondary Bank Bsb","examples":["123-456"],"example":"123-456"},"secondary_bank_account_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Secondary Bank Account Number","examples":["12345678"],"example":"12345678"},"secondary_bank_account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Secondary Bank Account Name","examples":["John Smith"],"example":"John Smith"},"secondary_bank_reference":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Secondary Bank Reference","examples":["Child Support"],"example":"Child Support"},"secondary_bank_amount_per_period":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Secondary Bank Amount Per Period","description":"Amount to be paid to the secondary bank account per pay period. Remaining pay will be paid to the primary bank account.","examples":["100.00"],"example":"100.00"},"default_employee_fund_member_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Employee Fund Member Number","examples":["12345678"],"example":"12345678"},"default_employee_fund_usi":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Employee Fund Usi","examples":["STA0100AU"],"example":"STA0100AU"},"super_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Super Rate","description":"Total superannuation rate used on the employee's upcoming pays, expressed as a decimal (e.g., 0.115 for 11.5%). This is the rate applied to the employee's ordinary time earnings for superannuation contributions. Any excess above the compulsory_super_rate is categorised as RESC (Reportable Employer Super Contributions).","examples":["0.115"],"example":"0.115"},"compulsory_super_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Compulsory Super Rate","description":"Compulsory superannuation rate used on the employee's upcoming pays, expressed as a decimal (e.g., 0.105 for 10.5%). This is the minimum rate required by law for superannuation contributions.","examples":["0.105"],"example":"0.105"},"is_super_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Enabled","description":"Whether superannuation contributions are enabled for this employee. If False, no super calculations will be performed for this employee, regardless of the super_rate or compulsory_super_rate settings.","examples":[true],"example":true},"is_super_age_threshold_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Age Threshold Enabled","description":"Whether the superannuation age threshold is enabled for this employee. If True, the employee's age will be considered when calculating super contributions. If False, the employee's age will not affect super calculations.","examples":[true],"example":true},"super_based_on":{"anyOf":[{"type":"string","enum":["OTE","GROSS"]},{"type":"null"}],"title":"Super Based On","description":"The basis for superannuation calculations for this employee. Valid values: OTE (Ordinary Time Earnings, recommended) or GROSS (Gross Pay). If OTE, super is calculated based on the employee's ordinary time earnings. If GROSS, super is calculated based on the employee's gross pay.","examples":["OTE"],"example":"OTE"},"kiwisaver_employee_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Kiwisaver Employee Rate","description":"Employee KiwiSaver contribution rate, as a fraction (e.g., 0.03 for 3%). NZ only.","examples":["0.03"],"example":"0.03"},"kiwisaver_employer_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Kiwisaver Employer Rate","description":"Employer KiwiSaver contribution rate, as a fraction (e.g., 0.03 for 3%). NZ only.","examples":["0.03"],"example":"0.03"},"kiwisaver_status_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Status Code","description":"KiwiSaver status code. NZ only.","examples":["KS"],"example":"KS"},"kiwisaver_existing_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Existing Action","description":"KiwiSaver existing member action. NZ only.","examples":["EXISTING_MEMBER"],"example":"EXISTING_MEMBER"},"esct_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Esct Rate","description":"Employer superannuation contribution tax rate, as a fraction (e.g., 0.105 for 10.5%). NZ only.","examples":["0.105"],"example":"0.105"},"employer_contrib_tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Contrib Tax Method","description":"NZ employer contribution tax method.","examples":["ESCT"],"example":"ESCT"},"employer_contrib_paye_fraction":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Employer Contrib Paye Fraction","description":"NZ employer contribution PAYE fraction.","examples":["0.0"],"example":"0.0"},"kiwisaver_cec_obligation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Cec Obligation","description":"KiwiSaver CEC obligation. NZ only.","examples":["NONE"],"example":"NONE"},"is_leave_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Leave Enabled","description":"Whether leave calculations are enabled for this employee. If False, no leave accruals will be calculated for this employee.","examples":[true],"example":true},"include_leave_loading_in_super":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Leave Loading In Super","description":"Whether to include leave loading in superannuation calculations for this employee. If True, leave loading will be included in the superannuation contributions. If False, leave loading will not be included in super calculations.","examples":[false],"example":false},"accrue_leave_on_hours_worked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accrue Leave On Hours Worked","description":"Whether to accrue leave based on hours worked (pro rata). If True, leave will be accrued based on the number of hours worked by the employee. If False, leave will be accrued by the pay period.","examples":[true],"example":true},"accrue_leave_on_overtime_hours":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accrue Leave On Overtime Hours","description":"Whether to accrue leave based on overtime hours worked. If True, leave will be accrued based on the number of overtime hours worked by the employee. If False, overtime hours will not contribute to leave accruals.","examples":[false],"example":false},"accrue_holiday_leave_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Accrue Holiday Leave Per Hour","description":"Holiday leave accrual rate per hour worked, expressed as a decimal (e.g., 0.076923 for 20 days per year). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of holiday leave hours accrued by the employee based on their hours worked.","examples":["0.076923"],"example":"0.076923"},"accrue_sick_leave_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Accrue Sick Leave Per Hour","description":"Sick leave accrual rate per hour worked, expressed as a decimal (e.g., 0.038462 for 10 days per year). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of sick leave hours accrued by the employee based on their hours worked.","examples":["0.038462"],"example":"0.038462"},"accrue_lsl_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Accrue Lsl Per Hour","description":"Long Service Leave (LSL) accrual rate per hour worked, expressed as a decimal (e.g., 0.016667 for 8.6667 weeks per 10 years; 0.025 for SA/NT's 13 weeks). The per-state default is derived from the lump entitlement (weeks/years/52). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of LSL hours accrued by the employee based on their hours worked.","examples":["0.016667"],"example":"0.016667"},"num_sick_leave_days_per_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Sick Leave Days Per Year","description":"Number of personal/sick days per year for the employee. This is used to calculate the number of personal leave hours accrued by the employee based on their hours worked.","examples":[10],"example":10},"num_holiday_leave_days_per_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Holiday Leave Days Per Year","description":"Number of annual/holiday days per year for the employee. This is used to calculate the number of holiday leave hours accrued by the employee based on their hours worked.","examples":[20],"example":20},"is_lsl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Lsl Enabled","description":"Whether Long Service Leave (LSL) calculations are enabled for this employee. If False, no LSL accruals will be calculated for this employee.","examples":[true],"example":true},"lsl_x_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lsl X Years","description":"Number of years of service required to qualify for Long Service Leave (LSL). This is used to determine when the employee is eligible for LSL based on their length of service.","examples":[10],"example":10},"lsl_accrued_x_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lsl Accrued X Years","description":"Number of weeks LSL accrued for every lsl_x_years years of service. This is used to calculate the number of LSL hours accrued by the employee based on their length of service.","examples":[10],"example":10},"hourly_amount_for_workers_comp_leave":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Hourly Amount For Workers Comp Leave","examples":["25.50"],"example":"25.50"},"hourly_amount_for_paid_parental_leave":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Hourly Amount For Paid Parental Leave","examples":["30.75"],"example":"30.75"},"rdo_hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rdo Hours","description":"Total hours of Rostered Days Off (RDOs) accrued by the employee as at their most recent pay.","examples":["55.42"],"example":"55.42"},"toil_hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Toil Hours","description":"Total hours of Time Off In Lieu (TOIL) accrued by the employee as at their most recent pay.","examples":["20.00"],"example":"20.00"}},"additionalProperties":false,"type":"object","required":["first_name","last_name","date_of_birth","address1","city","state","country","postcode","start_date","employment_status"],"title":"EmployeeCreate","description":"Payload required when *creating* an employee.","example":{"address1":"123 Example Street","city":"Sydney","country":"AU","date_of_birth":"1990-01-01","employment_status":"Full time","first_name":"Alice","has_claimed_tax_free_threshold":true,"has_stsl_liability":false,"is_closely_held":false,"is_foreign_resident":false,"is_super_only_contractor":false,"last_name":"Smith","postcode":"2000","start_date":"2024-07-01","state":"NSW","tax_file_number":"111111111"}},"EmployeeIDPays":{"properties":{"employee_id":{"type":"integer","title":"Employee Id"},"pays":{"items":{"$ref":"#/components/schemas/Pay"},"type":"array","minItems":0,"title":"Pays"}},"type":"object","required":["employee_id","pays"],"title":"EmployeeIDPays"},"EmployeeNumberPays":{"properties":{"employee_number":{"type":"string","title":"Employee Number"},"pays":{"items":{"$ref":"#/components/schemas/Pay"},"type":"array","minItems":0,"title":"Pays"}},"type":"object","required":["employee_number","pays"],"title":"EmployeeNumberPays"},"EmployeePayRateCategorySet":{"properties":{"system":{"items":{"$ref":"#/components/schemas/EmployeePayRateOption"},"type":"array","title":"System","description":"System-generated rates based on employee pay_rate_per_hour.","examples":[[{"description":"Ordinary Time","display_label":"Ordinary Time ($30.00000)","is_overtime":false,"rate":30.0,"reference":"system:ordinary_time","source":"system","units":"Hours"}]],"example":[{"description":"Ordinary Time","display_label":"Ordinary Time ($30.00000)","is_overtime":false,"rate":30.0,"reference":"system:ordinary_time","source":"system","units":"Hours"}]},"employee":{"items":{"$ref":"#/components/schemas/EmployeePayRateOption"},"type":"array","title":"Employee","description":"Employee-specific pay rates.","examples":[[{"description":"Saturday Rate","display_label":"Saturday Rate ($45.00000)","id":42,"is_overtime":true,"rate":45.0,"reference":"employee:42","source":"employee","units":"Hours"}]],"example":[{"description":"Saturday Rate","display_label":"Saturday Rate ($45.00000)","id":42,"is_overtime":true,"rate":45.0,"reference":"employee:42","source":"employee","units":"Hours"}]},"company":{"items":{"$ref":"#/components/schemas/EmployeePayRateOption"},"type":"array","title":"Company","description":"Company pay rates linked to this employee.","examples":[[{"description":"Site Rate","display_label":"Site Rate ($38.50000)","id":456,"is_overtime":false,"rate":38.5,"reference":"company:456","source":"company","units":"Hours"}]],"example":[{"description":"Site Rate","display_label":"Site Rate ($38.50000)","id":456,"is_overtime":false,"rate":38.5,"reference":"company:456","source":"company","units":"Hours"}]}},"type":"object","title":"EmployeePayRateCategorySet"},"EmployeePayRateOption":{"properties":{"reference":{"type":"string","title":"Reference","description":"Stable identifier for this rate option. Format examples: 'system:ordinary_time', 'employee:123', 'company:456'.","examples":["employee:42"],"example":"employee:42"},"source":{"type":"string","enum":["system","employee","company"],"title":"Source","description":"The category this rate belongs to.","examples":["employee"],"example":"employee"},"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"Database id for employee/company rates. Null for system rates.","examples":[42],"example":42},"description":{"type":"string","title":"Description","description":"Rate description shown to users.","examples":["Ordinary Time"],"example":"Ordinary Time"},"rate":{"type":"number","title":"Rate","description":"Resolved decimal rate value for the employee.","examples":[30.0],"example":30.0},"units":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Units","description":"Units for this rate (for example Hours, kms, sheep).","examples":["Hours"],"example":"Hours"},"is_overtime":{"type":"boolean","title":"Is Overtime","description":"Whether this rate is treated as overtime.","default":false,"examples":[false],"example":false},"display_label":{"type":"string","title":"Display Label","description":"Convenience label in the UI-friendly format 'Description ($rate)'.","examples":["Ordinary Time ($30.00000)"],"example":"Ordinary Time ($30.00000)"}},"type":"object","required":["reference","source","description","rate","display_label"],"title":"EmployeePayRateOption"},"EmployeePayRatesResponse":{"properties":{"employee_id":{"type":"integer","title":"Employee Id","description":"The LP employee id this rate list was generated for.","examples":[1234],"example":1234},"rates":{"$ref":"#/components/schemas/EmployeePayRateCategorySet","description":"Rates grouped by category."},"all":{"items":{"$ref":"#/components/schemas/EmployeePayRateOption"},"type":"array","title":"All","description":"Flat list of all rate options (system + employee + company).","examples":[[{"description":"Ordinary Time","display_label":"Ordinary Time ($30.00000)","is_overtime":false,"rate":30.0,"reference":"system:ordinary_time","source":"system","units":"Hours"},{"description":"Saturday Rate","display_label":"Saturday Rate ($45.00000)","id":42,"is_overtime":true,"rate":45.0,"reference":"employee:42","source":"employee","units":"Hours"},{"description":"Site Rate","display_label":"Site Rate ($38.50000)","id":456,"is_overtime":false,"rate":38.5,"reference":"company:456","source":"company","units":"Hours"}]],"example":[{"description":"Ordinary Time","display_label":"Ordinary Time ($30.00000)","is_overtime":false,"rate":30.0,"reference":"system:ordinary_time","source":"system","units":"Hours"},{"description":"Saturday Rate","display_label":"Saturday Rate ($45.00000)","id":42,"is_overtime":true,"rate":45.0,"reference":"employee:42","source":"employee","units":"Hours"},{"description":"Site Rate","display_label":"Site Rate ($38.50000)","id":456,"is_overtime":false,"rate":38.5,"reference":"company:456","source":"company","units":"Hours"}]},"duplicate_descriptions":{"items":{"type":"string"},"type":"array","title":"Duplicate Descriptions","description":"Descriptions that appear more than once (case-insensitive) across categories. If non-empty, API consumers should prefer 'reference' over description matching."}},"type":"object","required":["employee_id","rates"],"title":"EmployeePayRatesResponse"},"EmployeeReinstate":{"properties":{"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The date the employee returns to work. Must be on or after their termination date. Defaults to today when omitted.","examples":["2026-08-13"],"example":"2026-08-13"}},"additionalProperties":false,"type":"object","title":"EmployeeReinstate","description":"Request body for reinstating a terminated employee after a re-hire."},"EmployeeResult":{"properties":{"employee":{"anyOf":[{"$ref":"#/components/schemas/Employee"},{"type":"null"}],"description":"The employee object if creation succeeded.","examples":[{"email_address":"alice@example.com","first_name":"Alice","id":123,"last_name":"Smith"}],"example":{"email_address":"alice@example.com","first_name":"Alice","id":123,"last_name":"Smith"}},"errors":{"additionalProperties":{"type":"string"},"type":"object","title":"Errors","description":"Field-level validation or creation errors, if any.","examples":[{"email_address":"Invalid email address","tax_file_number":"Duplicate TFN"}],"example":{"email_address":"Invalid email address","tax_file_number":"Duplicate TFN"}}},"type":"object","title":"EmployeeResult"},"EmployeeSuperFund":{"properties":{"id":{"type":"integer","title":"Id","description":"Unique identifier of this employee-super-fund link."},"member_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Member Number","description":"Member number assigned by the super fund provider. May be omitted if the employee hasn’t yet provided it.","examples":["S123456789"],"example":"S123456789"},"is_default":{"type":"boolean","title":"Is Default","description":"Indicates if this super fund link is the employee’s default for contributions. Only one link per employee should have this set.","default":false},"employee_id":{"type":"integer","title":"Employee Id","description":"Foreign key ID of the employee who owns this super fund link."},"super_fund_provider_id":{"type":"integer","title":"Super Fund Provider Id","description":"Foreign key ID of the chosen super fund provider."},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"ABN of the super fund provider. This is used for compliance and reporting purposes, especially in Single Touch Payroll (STP).","examples":["10 000 000 000"],"example":"10 000 000 000"},"usi":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Usi","description":"Unique Superannuation Identifier (USI) for the super fund. This is used to identify the fund in superannuation transactions.","examples":["SF-998877"],"example":"SF-998877"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name","description":"Name of the super fund, typically in 'Fund Name (USI)' format. This is used for display purposes in reports and the online portal.","examples":["Australian Super"],"example":"Australian Super"}},"type":"object","required":["id","employee_id","super_fund_provider_id"],"title":"EmployeeSuperFund","description":"Schema for exposing EmployeeSuperFund data via the API.\n\nMirrors the SQLAlchemy `EmployeeSuperFund`","example":{"abn":"10000000000","employee_id":7,"id":17,"is_default":true,"member_number":"123998877","name":"Australian Super","super_fund_provider_id":3,"usi":"STA0100AU"}},"EmployeeTerminate":{"properties":{"termination_date":{"type":"string","format":"date","title":"Termination Date","description":"The last day of employment, `YYYY-MM-DD`. Must be on or after the employee's `start_date`. In New Zealand this is the employment finish date, and every leave balance is valued as at this date.","examples":["2026-09-11"],"example":"2026-09-11"},"is_manual_leave_amounts":{"type":"boolean","title":"Is Manual Leave Amounts","description":"Set to `true` to supply the unused-leave payout amounts yourself instead of having Lightning Payroll work them out from the employee's balances. This is the API equivalent of 'Show Advanced Settings' in the Australian termination wizard and 'Enter leave amounts manually' on the New Zealand employment finish screen.\n\nLeave it `false` and Lightning Payroll calculates the payouts, which is almost always what you want. The fields listed as manual only are refused while this is `false`, because they would be recalculated over the top before the pay was written.","default":false,"examples":[false],"example":false},"reason":{"type":"string","enum":["TERMINATION","INVALIDITY","DEATH_DEPENDENT","DEATH_NON_DEPENDENT","DEATH_ESTATE","REDUNDANCY"],"title":"Reason","description":"Why employment ended, for tax purposes. Australia only.\n\n`TERMINATION` an ordinary termination; `INVALIDITY` the employee can no longer work through ill health; `DEATH_DEPENDENT`, `DEATH_NON_DEPENDENT`, `DEATH_ESTATE` death of the employee with benefits paid to a dependant, a non-dependant or the estate; `REDUNDANCY` a genuine redundancy or early retirement scheme.\n\nThis drives the ETP tax treatment and the Lump Sum A type, and it sets the STP cessation type for every reason except `TERMINATION`.","default":"TERMINATION","examples":["TERMINATION"],"example":"TERMINATION"},"cessation_type_code":{"anyOf":[{"type":"string","enum":["V","F","C","T"]},{"type":"null"}],"title":"Cessation Type Code","description":"STP cessation type. Australia only, and only accepted when `reason` is `TERMINATION` -- every other reason determines the code itself (`I` ill health, `D` deceased, `R` redundancy), and sending one alongside it is refused rather than ignored.\n\n`V` voluntary cessation (resignation or retirement by the employee), `F` dismissal, `C` contract cessation, `T` transfer to another business, employer or payroll system. Defaults to `V`.","examples":["V"],"example":"V"},"is_payment_in_lieu_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payment In Lieu Paid","description":"Whether payment in lieu of notice is being paid.","examples":[false],"example":false},"payment_in_lieu_type":{"anyOf":[{"type":"string","enum":["NOTICE_HOURS","NOTICE_LUMP_SUM"]},{"type":"null"}],"title":"Payment In Lieu Type","description":"How the payment in lieu of notice is quantified. Australia only, and required when `is_payment_in_lieu_paid` is `true`.\n\n`NOTICE_HOURS` pays `notice_hours` at the employee's hourly rate; `NOTICE_LUMP_SUM` pays `notice_lump_sum` as entered.","examples":["NOTICE_HOURS"],"example":"NOTICE_HOURS"},"notice_hours":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Notice Hours","description":"Hours of notice being paid out, as a decimal number of hours. Australia only; required when `payment_in_lieu_type` is `NOTICE_HOURS`.","examples":["38.0"],"example":"38.0"},"notice_lump_sum":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Notice Lump Sum","description":"Payment in lieu of notice as a lump sum. Australia only; required when `payment_in_lieu_type` is `NOTICE_LUMP_SUM`.","examples":["2500.00"],"example":"2500.00"},"payment_in_lieu_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Payment In Lieu Amount","description":"Payment in lieu of notice. New Zealand only, where the amount is entered directly. In Australia this is calculated from `payment_in_lieu_type` and returned on the response.","examples":["2500.00"],"example":"2500.00"},"is_unused_holiday_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Holiday Paid","description":"Pay out unused annual/holiday leave. Australia only.\n\nOmit it and Lightning Payroll decides exactly as the wizard does: on for an employee who is not a casual and has a leave balance remaining, off otherwise.","examples":[true],"example":true},"is_unused_leave_loading_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Leave Loading Paid","description":"Pay out unused leave loading. Australia only. Omit it and Lightning Payroll turns it on when holiday leave is being paid out and the employee has a leave loading percentage.","examples":[true],"example":true},"is_unused_lsl_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Lsl Paid","description":"Pay out unused long service leave. Australia only. Omit it and Lightning Payroll decides from the employee's length of service and the long service leave rules of the company's state.","examples":[false],"example":false},"is_unused_sick_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Sick Paid","description":"Pay out unused sick/personal leave. Australia only, and off by default: unused sick leave is not ordinarily payable on termination. New Zealand never pays unused sick leave out.","examples":[false],"example":false},"redundancy_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Redundancy Amount","description":"Genuine redundancy or early retirement scheme payment. In New Zealand this is a redundancy payment, which is taxed as extra pay and is not liable for the ACC earners' levy or KiwiSaver.","examples":["0.00"],"example":"0.00"},"redundancy_tax_free_pilon_component":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Redundancy Tax Free Pilon Component","description":"The part of the payment in lieu of notice that forms part of the tax-free redundancy amount. Australia only, and only accepted when `reason` is `REDUNDANCY`. It changes the tax treatment rather than adding to the payout, and it may not exceed the payment in lieu of notice itself.","examples":["0.00"],"example":"0.00"},"non_etp_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Non Etp Amount","description":"In Australia, another payout amount that is not an employment termination payment.\n\nIn New Zealand this is the 'additional termination amount', and it is only accepted with `is_manual_leave_amounts` set: otherwise Lightning Payroll uses this field to hold the statutory 8% holiday pay owing since the employee's last anniversary and would overwrite whatever you sent.","examples":["0.00"],"example":"0.00"},"etp_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Etp Amount","description":"Another payout amount that IS an employment termination payment, such as an ex-gratia payment or golden handshake. Australia only.","examples":["0.00"],"example":"0.00"},"unused_holiday_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Holiday Amount","description":"Unused annual/holiday leave payout. Manual only. In New Zealand this is the annual holidays payout, which Lightning Payroll otherwise values in weeks at the greater of average weekly earnings and ordinary weekly pay. A negative value is accepted only in New Zealand, where it represents leave taken in advance.","examples":["3800.00"],"example":"3800.00"},"unused_leave_loading_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Leave Loading Amount","description":"Unused leave loading payout. Australia only. Manual only.","examples":["665.00"],"example":"665.00"},"unused_alt_holiday_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Alt Holiday Amount","description":"Unused alternative holidays payout (Holidays Act 2003 s.61). New Zealand only. Manual only. Lightning Payroll otherwise values the balance in days at relevant daily pay.","examples":["480.00"],"example":"480.00"},"unused_sick_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Sick Amount","description":"Unused sick/personal leave payout. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"unused_lsl_pre_august_1978":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Lsl Pre August 1978","description":"Unused long service leave accrued before August 1978, which is taxed differently. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"unused_lsl_august_1978_to_august_1993":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Lsl August 1978 To August 1993","description":"Unused long service leave accrued between August 1978 and August 1993. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"unused_lsl_post_august_1993":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Lsl Post August 1993","description":"Unused long service leave accrued after August 1993. This is where Lightning Payroll puts the whole balance unless you split it. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"normal_earnings":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Normal Earnings","description":"The employee's normal earnings for one pay period, used to work out the whole-of-income cap on an ETP. Australia only. Manual only; Lightning Payroll otherwise takes it from the employee.","examples":["1900.00"],"example":"1900.00"},"tax_summaries":{"anyOf":[{"items":{"$ref":"#/components/schemas/TerminationTaxSummary-Input"},"type":"array"},{"type":"null"}],"title":"Tax Summaries","description":"Hand-entered ETP tax summaries, replacing the ones Lightning Payroll would calculate. Australia only. Manual only. Sending this replaces the whole set, so include every row you want kept.","examples":[[{"etp_code":"O","lump_sum_d":"0.00","tax_free_component":"0.00","tax_withheld":"1500.00","taxable_component":"5000.00"}]],"example":[{"etp_code":"O","lump_sum_d":"0.00","tax_free_component":"0.00","tax_withheld":"1500.00","taxable_component":"5000.00"}]},"nz_ytd_taxable":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Nz Ytd Taxable","description":"Taxable earnings for this employee year to date at the finish date, used to apply the annual ACC earners' levy cap to the extra pay. New Zealand only. Omit it if Lightning Payroll holds the whole year; supply it when earnings were part-year in another system. Zero is read as 'not supplied'.","examples":["48000.00"],"example":"48000.00"},"pay_date":{"type":"string","format":"date","title":"Pay Date","description":"The date the final pay is paid, `YYYY-MM-DD`. It selects the pay run the final pay is created on, and it is the date the termination is reported against for Single Touch Payroll or payday filing. Usually the same as `termination_date`.","examples":["2026-09-11"],"example":"2026-09-11"}},"additionalProperties":false,"type":"object","required":["termination_date","pay_date"],"title":"EmployeeTerminate","description":"Terminate an employee, creating their final pay in the same call.","example":{"cessation_type_code":"V","pay_date":"2026-09-11","reason":"TERMINATION","termination_date":"2026-09-11"}},"EmployeeTermination":{"properties":{"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date","description":"The last day of employment.","examples":["2026-09-11"],"example":"2026-09-11"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why employment ended, for tax purposes. Australia only.","examples":["TERMINATION"],"example":"TERMINATION"},"cessation_type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cessation Type Code","description":"STP cessation type, derived from `reason` unless you set it. Australia only.","examples":["V"],"example":"V"},"is_manual_leave_amounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Manual Leave Amounts","description":"Whether the unused-leave amounts were supplied rather than calculated.","examples":[false],"example":false},"is_payment_in_lieu_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payment In Lieu Paid","description":"Whether payment in lieu of notice was paid.","examples":[false],"example":false},"payment_in_lieu_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment In Lieu Type","description":"How the payment in lieu of notice was quantified. Australia only.","examples":["NOTICE_HOURS"],"example":"NOTICE_HOURS"},"notice_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notice Hours","description":"Hours of notice paid out. Australia only.","examples":[38.0],"example":38.0},"notice_lump_sum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notice Lump Sum","description":"Notice paid as a lump sum. Australia only.","examples":[0.0],"example":0.0},"payment_in_lieu_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Payment In Lieu Amount","description":"Payment in lieu of notice actually paid.","examples":[0.0],"example":0.0},"is_unused_holiday_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Holiday Paid","description":"Whether unused annual/holiday leave was paid out.","examples":[true],"example":true},"is_unused_leave_loading_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Leave Loading Paid","description":"Whether unused leave loading was paid out. Australia only.","examples":[true],"example":true},"is_unused_lsl_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Lsl Paid","description":"Whether unused long service leave was paid out. Australia only.","examples":[false],"example":false},"is_unused_sick_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Sick Paid","description":"Whether unused sick/personal leave was paid out. Australia only.","examples":[false],"example":false},"unused_holiday_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Holiday Amount","description":"Unused annual/holiday leave paid out. In New Zealand, the annual holidays payout, valued in weeks.","examples":[3800.0],"example":3800.0},"unused_leave_loading_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Leave Loading Amount","description":"Unused leave loading paid out. Australia only.","examples":[665.0],"example":665.0},"unused_alt_holiday_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Alt Holiday Amount","description":"Unused alternative holidays paid out, valued in days. New Zealand only.","examples":[480.0],"example":480.0},"unused_sick_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Sick Amount","description":"Unused sick/personal leave paid out. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_pre_august_1978":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Pre August 1978","description":"Unused long service leave accrued before August 1978. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_august_1978_to_august_1993":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl August 1978 To August 1993","description":"Unused long service leave accrued Aug 1978 - Aug 1993. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_post_august_1993":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Post August 1993","description":"Unused long service leave accrued after August 1993. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Amount","description":"Total unused long service leave paid out. Australia only.","examples":[0.0],"example":0.0},"non_etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Non Etp Amount","description":"Other non-ETP payout. In New Zealand, the additional termination amount, which includes the statutory 8% holiday pay owing since the employee's last anniversary unless you entered the amounts manually.","examples":[0.0],"example":0.0},"etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Amount","description":"Other ETP payout. Australia only.","examples":[0.0],"example":0.0},"redundancy_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Redundancy Amount","description":"Genuine redundancy or early retirement payment.","examples":[0.0],"example":0.0},"redundancy_tax_free_pilon_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Redundancy Tax Free Pilon Component","description":"Payment in lieu of notice treated as part of the tax-free redundancy. Australia only.","examples":[0.0],"example":0.0},"normal_earnings":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normal Earnings","description":"Normal earnings for one pay period. Australia only.","examples":[1900.0],"example":1900.0},"total_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Amount","description":"Everything paid because of the termination. Included in the pay's `gross`.","examples":[4465.0],"example":4465.0},"total_etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Etp Amount","description":"Total of the ETP components. Australia only.","examples":[0.0],"example":0.0},"total_non_etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Non Etp Amount","description":"Total of the non-ETP components. Australia only.","examples":[4465.0],"example":4465.0},"tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Amount","description":"Total tax on the termination amounts. In New Zealand this is the extra pay tax across every termination component.","examples":[1428.0],"example":1428.0},"unused_lsl_tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Tax Amount","description":"Tax on the unused long service leave payout. Australia only.","examples":[0.0],"example":0.0},"unused_holiday_and_loading_tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Holiday And Loading Tax Amount","description":"Tax on the unused holiday leave and leave loading payouts.","examples":[1428.0],"example":1428.0},"lump_sum_a":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum A","description":"Lump Sum A as reported for STP. Australia only.","examples":[0.0],"example":0.0},"lump_sum_b":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum B","description":"Lump Sum B as reported for STP. Australia only.","examples":[0.0],"example":0.0},"lump_sum_d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum D","description":"Lump Sum D: the tax-free part of a genuine redundancy. Australia only.","examples":[0.0],"example":0.0},"etp_tax_withheld":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Tax Withheld","description":"Total tax withheld across the ETP tax summaries. Australia only.","examples":[0.0],"example":0.0},"etp_taxable_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Taxable Component","description":"Total taxable component across the ETP tax summaries. Australia only.","examples":[0.0],"example":0.0},"etp_tax_free_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Tax Free Component","description":"Total tax-free component across the ETP tax summaries. Australia only.","examples":[0.0],"example":0.0},"tax_summaries":{"anyOf":[{"items":{"$ref":"#/components/schemas/TerminationTaxSummary-Output"},"type":"array"},{"type":"null"}],"title":"Tax Summaries","description":"The ETP tax summaries for this termination. Australia only."},"nz_ytd_taxable":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nz Ytd Taxable","description":"Year-to-date taxable earnings supplied for the ACC earners' levy cap. New Zealand only.","examples":[48000.0],"example":48000.0},"nz_extra_pay_tax_breakdown":{"anyOf":[{"$ref":"#/components/schemas/NZExtraPayTaxBreakdown"},{"type":"null"}],"description":"How the extra pay tax was worked out, per termination component (`unused_holiday`, `alt_holiday`, `redundancy`, `other`), plus `total_tax` and `taxed_at_low_rate`. `taxed_at_low_rate` is what sets the lump sum indicator on the Employment Information return. New Zealand only."},"pay_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Id","description":"The pay carrying this termination.","examples":[2001],"example":2001},"pay_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Pay Date","description":"The date of that pay.","examples":["2026-09-11"],"example":"2026-09-11"},"is_pay_processed":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Pay Processed","description":"Whether the termination pay has been processed. An employee is only terminated once it has been.","examples":[true],"example":true},"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employee Id","description":"The internal Lightning Payroll ID of the employee.","examples":[1234],"example":1234},"employee_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Number","description":"The employee's payroll number.","examples":["EMP001"],"example":"EMP001"},"is_employee_terminated":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Employee Terminated","description":"Whether the employee is now flagged as terminated. This is `false` while a termination is staged on an unprocessed pay.","examples":[true],"example":true}},"type":"object","title":"EmployeeTermination","description":"A termination, with the pay and employee it belongs to."},"EmployeeUpdate":{"properties":{"is_super_only_contractor":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Only Contractor","description":"Australia only. Whether the employee is a contractor paid super only (no TFN, excluded from STP, PAYG and payment summaries).","examples":[false],"example":false},"tax_file_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax File Number","examples":["123456782"],"example":"123456782"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number","description":"IRD number. NZ only.","examples":["49091850"],"example":"49091850"},"nz_tax_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Nz Tax Code","description":"NZ tax code. NZ only.","examples":["M"],"example":"M"},"first_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"First Name","examples":["John"],"example":"John"},"middle_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Middle Name","examples":["Richard"],"example":"Richard"},"last_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Last Name","examples":["Smith"],"example":"Smith"},"date_of_birth":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Date Of Birth","examples":["1985-07-15"],"example":"1985-07-15"},"address1":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address1","examples":["123 Elm St"],"example":"123 Elm St"},"address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Address2","examples":["123 Elm St"],"example":"123 Elm St"},"city":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"City","examples":["Sydney"],"example":"Sydney"},"state":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"State","examples":["NSW"],"example":"NSW"},"country":{"anyOf":[{"type":"string","maxLength":2},{"type":"null"}],"title":"Country","examples":["AU"],"example":"AU"},"postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Postcode","examples":["2000"],"example":"2000"},"email_address":{"anyOf":[{"type":"string","format":"email"},{"type":"null"}],"title":"Email Address","description":"Email address of the employee.","examples":["tonytiger@gmail.com"],"example":"tonytiger@gmail.com"},"phone_home":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Home","description":"Home phone number of the employee.","examples":["02 1234 5678"],"example":"02 1234 5678"},"phone_mobile":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Mobile","description":"Mobile phone number of the employee.","examples":["0412 345 678"],"example":"0412 345 678"},"phone_medical":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Phone Medical","description":"Medical contact phone number of the employee.","examples":["02 8765 4321"],"example":"02 8765 4321"},"gender":{"anyOf":[{"type":"string","enum":["MALE","FEMALE","INDETERMINATE","UNKNOWN"]},{"type":"null"}],"title":"Gender","description":"Gender of the employee. Must be one of MALE, FEMALE, INDETERMINATE, or UNKNOWN.","examples":["MALE"],"example":"MALE"},"kin_name":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin Name","description":"Name of the next of kin.","examples":["Jane Smith"],"example":"Jane Smith"},"kin_relationship":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin Relationship","description":"Relationship of the next of kin to the employee.","examples":["Sister"],"example":"Sister"},"kin_address1":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Kin Address1","description":"Address line 1 of the next of kin.","examples":["456 Oak St"],"example":"456 Oak St"},"kin_address2":{"anyOf":[{"type":"string","maxLength":100,"minLength":0},{"type":"null"}],"title":"Kin Address2","description":"Address line 2 of the next of kin.","examples":["Apt 5B"],"example":"Apt 5B"},"kin_city":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Kin City","description":"City of the next of kin.","examples":["Melbourne"],"example":"Melbourne"},"kin_state":{"anyOf":[{"type":"string","maxLength":3,"minLength":2},{"type":"null"}],"title":"Kin State","description":"State of the next of kin.","examples":["VIC"],"example":"VIC"},"kin_postcode":{"anyOf":[{"type":"string","pattern":"^\\d{4}$"},{"type":"null"}],"title":"Kin Postcode","description":"Postcode of the next of kin.","examples":["3000"],"example":"3000"},"kin_phone_home":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Home","description":"Home phone number of the next of kin.","examples":["03 1234 5678"],"example":"03 1234 5678"},"kin_phone_work":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Work","description":"Work phone number of the next of kin.","examples":["03 8765 4321"],"example":"03 8765 4321"},"kin_phone_mobile":{"anyOf":[{"type":"string","pattern":"^$|^[0-9 +()-]{8,15}$"},{"type":"null"}],"title":"Kin Phone Mobile","description":"Mobile phone number of the next of kin.","examples":["0412 345 678"],"example":"0412 345 678"},"kin_notes":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kin Notes","description":"Additional notes about the next of kin.","examples":["Emergency contact"],"example":"Emergency contact"},"pay_method":{"anyOf":[{"type":"string","enum":["CASH","DIRECT BANK ENTRY","OTHER"]},{"type":"null"}],"title":"Pay Method","description":"The method of payment for the employee.","default":"DIRECT BANK ENTRY","examples":["CASH"],"example":"CASH"},"pay_period":{"type":"string","enum":["WEEKLY","FORTNIGHTLY","MONTHLY"],"title":"Pay Period","description":"The pay period frequency for the employee. Valid values: WEEKLY, FORTNIGHTLY, MONTHLY","default":"WEEKLY","examples":["WEEKLY"],"example":"WEEKLY"},"pay_rate_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Pay Rate Per Hour","description":"Hourly pay rate for the employee. This is used to calculate the employee's gross pay based on hours worked.","examples":["25.00"],"example":"25.00"},"standard_hours_per_day":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Standard Hours Per Day","examples":["7.6"],"example":"7.6"},"standard_days_per_week":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Standard Days Per Week","description":"Number of standard working days per week for the employee. This is used to calculate leave accruals and RDOs.","examples":[5],"example":5},"stp_employment_status":{"anyOf":[{"type":"string","enum":["C","P","F"]},{"type":"null"}],"title":"Stp Employment Status","description":"The employment status of the employee for Single Touch Payroll (STP) reporting. Valid values: C, P, F. This is used to determine how the employee's earnings are reported to the ATO.","default":"F","examples":["F"],"example":"F"},"active_pay_recipient":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Active Pay Recipient","description":"Whether the employee is an active pay recipient. If False, the employee will not have pending pays generated for them, but they will still count towards licence limits and be included in reports. This is useful for employees who are on leave or not currently receiving pay but are not terminated.","examples":[true],"example":true},"start_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Start Date","examples":["2025-06-04"],"example":"2025-06-04"},"employment_status":{"anyOf":[{"type":"string","pattern":"(?i)^(full[-\\s]?time|part[-\\s]?time|casual|labour[\\s-]?hire)$"},{"type":"null"}],"title":"Employment Status","description":"Employment status. One of 'Full-time', 'Part-time', 'Casual', or 'Labour Hire' (matched case-insensitively; hyphen/space tolerant). Sets the employee's STP employment status and the default leave / long-service-leave accrual configuration.","examples":["Full-time"],"example":"Full-time"},"employment_type":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Employment Type","description":"Employment type, as either the id or the exact name of an option from `GET /api/employment-types` (matched case-insensitively; hyphen/space tolerant). Defaults are 'Full-time', 'Part-time' and 'Casual', and a customer may have added their own.\n\nDistinct from `employment_status`, which drives STP reporting. When you omit this on create it is derived from `employment_status`, except for 'Labour Hire', which has no matching employment type and so leaves this unset.\n\nThis value is shown on the payslip and reported in the SuperStream member registration, so it should describe the employee accurately.","examples":["Part-time"],"example":"Part-time"},"employment_tenure":{"anyOf":[{"type":"integer"},{"type":"string"},{"type":"null"}],"title":"Employment Tenure","description":"Employment tenure, as either the id or the exact name of an option from `GET /api/employment-tenures` (matched case-insensitively). Defaults are 'Permanent' and 'Temporary', and a customer may have added their own.\n\nNot derived from `employment_status`, because permanent versus temporary is not implied by full-time, part-time or casual. New employees are 'Permanent' until you set this, so send it explicitly for a fixed-term or temporary hire. Shown on the payslip.","examples":["Permanent"],"example":"Permanent"},"tfnd_signed_date":{"anyOf":[{"type":"string","pattern":"^$|^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}],"title":"Tfnd Signed Date","description":"Date the employee signed the TFN declaration.","examples":["2025-06-04"],"example":"2025-06-04"},"is_foreign_resident":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Foreign Resident"},"has_claimed_tax_free_threshold":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Claimed Tax Free Threshold"},"has_stsl_liability":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Stsl Liability"},"has_student_loan":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has Student Loan","description":"Whether the employee has an NZ student loan. NZ only.","examples":[false],"example":false},"no_declaration":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"No Declaration","description":"Whether the employee is using NZ non-declaration handling. NZ only.","examples":[false],"example":false},"include_email_and_phone_in_stp":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Email And Phone In Stp","description":"Whether to include the employee's email address and phone number in STP reports sent to the ATO. Defaults to False if not set.","examples":[false],"example":false},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number (ABN) of the employee, if applicable. Required for non-standard employees who bill as contractors.","examples":["10000000000"],"example":"10000000000"},"is_closely_held":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Closely Held","description":"Whether the employee is a closely held employee. Closely held employees are typically family members of the business owner or directors of the company.","examples":[false],"example":false},"working_holiday_tax_scale_applies":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Working Holiday Tax Scale Applies","description":"Whether the employee is subject to the Working Holiday Maker tax scale. If True, the employee's tax calculations will use the WHM tax scale instead of the standard tax scale.","examples":[false],"example":false},"leave_loading_percentage":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Leave Loading Percentage","description":"Leave loading percentage, e.g. 0.175 for 17.5%","examples":["0.175"],"example":"0.175"},"position":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Position","description":"Position or job title of the employee.","examples":["Manager"],"example":"Manager"},"employee_portal_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Employee Portal Active","description":"Whether the employee has access to the online portal.","examples":[false],"example":false},"allow_edit_timesheet":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Timesheet","description":"Whether the employee is allowed to edit their own timesheets in the online portal.","examples":[false],"example":false},"allow_edit_timeclock":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Timeclock","description":"Whether the employee is allowed to use the timeclock in the online portal.","examples":[false],"example":false},"allow_edit_account_details":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Account Details","description":"Whether the employee is allowed to edit their own personal details in the online portal.","examples":[false],"example":false},"allow_edit_tax_settings":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Tax Settings","description":"Whether the employee is allowed to edit their tax settings in the online portal.","examples":[false],"example":false},"allow_edit_bank_accounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Bank Accounts","description":"Whether the employee is allowed to edit their own bank account details in the online portal.","examples":[false],"example":false},"allow_edit_super_details":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Super Details","description":"Whether the employee is allowed to edit their super details in the online portal.","examples":[false],"example":false},"allow_edit_leave_requests":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Leave Requests","description":"Whether the employee is allowed to make leave requests through the online portal.","examples":[false],"example":false},"allow_edit_leave_requests_when_negative":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow Edit Leave Requests When Negative","description":"Whether the employee is allowed to make leave requests even when they have, or will reach, a negative leave balance.","examples":[false],"example":false},"allow_view_holiday_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Holiday Leave Balance","description":"Whether the employee is allowed to view their holiday leave balance in the online portal.","examples":[false],"example":false},"allow_view_sick_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Sick Leave Balance","description":"Whether the employee is allowed to view their sick leave balance in the online portal.","examples":[false],"example":false},"allow_view_long_service_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Long Service Leave Balance","description":"Whether the employee is allowed to view their long service leave balance in the online portal.","examples":[false],"example":false},"allow_view_payslips":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Allow View Payslips","description":"Whether the employee is allowed to view their payslips in the online portal.","examples":[false],"example":false},"department":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Department","examples":["Human Resources"],"example":"Human Resources"},"number":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Number","description":"User-controlled unique employee payroll number/code. This is not the same as the internal database ID.","examples":["EMP001"],"example":"EMP001"},"honorific":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Honorific","description":"Honorific title for the employee (e.g., Mr, Ms, Dr).","examples":["Mr"],"example":"Mr"},"show_roster_summary_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Roster Summary On Payslip","description":"Whether to show the roster summary on the payslip.","examples":[false],"example":false},"show_position_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Position On Payslip","description":"Whether to show the employee's position on the payslip.","examples":[false],"example":false},"show_department_on_payslip":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Show Department On Payslip","description":"Whether to show the employee's department on the payslip.","examples":[false],"example":false},"payslip_show_holiday_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Holiday Leave Balance","description":"Whether to show the employee's holiday leave balance on the payslip.","examples":[false],"example":false},"payslip_show_sick_leave_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Sick Leave Balance","description":"Whether to show the employee's sick leave balance on the payslip.","examples":[false],"example":false},"payslip_show_lsl_balance":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Lsl Balance","description":"Whether to show the employee's long service leave balance on the payslip.","examples":[false],"example":false},"payslip_show_negative_leave_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Negative Leave Balances","description":"Whether to show negative leave balances on the payslip.","examples":[false],"example":false},"payslip_show_custom_balances":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Custom Balances","description":"Whether to show custom leave balances on the payslip.","examples":[false],"example":false},"payslip_leave_units":{"anyOf":[{"type":"string","enum":["HOURS","DAYS"]},{"type":"null"}],"title":"Payslip Leave Units","description":"The unit of measurement for leave balances shown on the payslip. Valid values: HOURS, DAYS","examples":["HOURS"],"example":"HOURS"},"payslip_show_hours_and_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Hours And Rate","description":"Whether to show hours worked and pay rate on the payslip.","examples":[false],"example":false},"payslip_show_allowance_units":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Allowance Units","description":"Whether to show allowance units on the payslip.","examples":[false],"example":false},"payslip_show_base_ordinary_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Base Ordinary Rate","description":"Whether to show the base ordinary rate on the payslip.","examples":[false],"example":false},"payslip_show_super_ytd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Super Ytd","description":"Whether to show the year-to-date superannuation contributions on the payslip.","examples":[false],"example":false},"payslip_note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payslip Note","description":"An added note to be displayed on each upcoming payslip for this employee.","examples":["Thank you for your hard work!"],"example":"Thank you for your hard work!"},"payslip_show_ytd":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Ytd","description":"Whether to show year-to-date totals on the payslip.","examples":[false],"example":false},"payslip_show_zero_dollar_leave":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Show Zero Dollar Leave","description":"Whether to show zero dollar leave balances on the payslip.","examples":[false],"example":false},"payslip_time_non_decimal":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Payslip Time Non Decimal","description":"Whether to show time in non-decimal format (e.g., 1:30 instead of 1.5 hours) on the payslip.","examples":[false],"example":false},"primary_bank_bsb":{"anyOf":[{"type":"string","pattern":"^$|^\\d{3}-?\\d{3}$"},{"type":"null"}],"title":"Primary Bank Bsb","examples":["987-654"],"example":"987-654"},"primary_bank_account_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Primary Bank Account Number","examples":["87654321"],"example":"87654321"},"primary_bank_account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Primary Bank Account Name","examples":["John Smith"],"example":"John Smith"},"secondary_bank_bsb":{"anyOf":[{"type":"string","pattern":"^$|^\\d{3}-?\\d{3}$"},{"type":"null"}],"title":"Secondary Bank Bsb","examples":["123-456"],"example":"123-456"},"secondary_bank_account_number":{"anyOf":[{"type":"string","maxLength":12},{"type":"null"}],"title":"Secondary Bank Account Number","examples":["12345678"],"example":"12345678"},"secondary_bank_account_name":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Secondary Bank Account Name","examples":["John Smith"],"example":"John Smith"},"secondary_bank_reference":{"anyOf":[{"type":"string","maxLength":18,"minLength":0},{"type":"null"}],"title":"Secondary Bank Reference","examples":["Child Support"],"example":"Child Support"},"secondary_bank_amount_per_period":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Secondary Bank Amount Per Period","description":"Amount to be paid to the secondary bank account per pay period. Remaining pay will be paid to the primary bank account.","examples":["100.00"],"example":"100.00"},"default_employee_fund_member_number":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Employee Fund Member Number","examples":["12345678"],"example":"12345678"},"default_employee_fund_usi":{"anyOf":[{"type":"string","maxLength":20},{"type":"null"}],"title":"Default Employee Fund Usi","examples":["STA0100AU"],"example":"STA0100AU"},"super_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Super Rate","description":"Total superannuation rate used on the employee's upcoming pays, expressed as a decimal (e.g., 0.115 for 11.5%). This is the rate applied to the employee's ordinary time earnings for superannuation contributions. Any excess above the compulsory_super_rate is categorised as RESC (Reportable Employer Super Contributions).","examples":["0.115"],"example":"0.115"},"compulsory_super_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Compulsory Super Rate","description":"Compulsory superannuation rate used on the employee's upcoming pays, expressed as a decimal (e.g., 0.105 for 10.5%). This is the minimum rate required by law for superannuation contributions.","examples":["0.105"],"example":"0.105"},"is_super_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Enabled","description":"Whether superannuation contributions are enabled for this employee. If False, no super calculations will be performed for this employee, regardless of the super_rate or compulsory_super_rate settings.","examples":[true],"example":true},"is_super_age_threshold_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super Age Threshold Enabled","description":"Whether the superannuation age threshold is enabled for this employee. If True, the employee's age will be considered when calculating super contributions. If False, the employee's age will not affect super calculations.","examples":[true],"example":true},"super_based_on":{"anyOf":[{"type":"string","enum":["OTE","GROSS"]},{"type":"null"}],"title":"Super Based On","description":"The basis for superannuation calculations for this employee. Valid values: OTE (Ordinary Time Earnings, recommended) or GROSS (Gross Pay). If OTE, super is calculated based on the employee's ordinary time earnings. If GROSS, super is calculated based on the employee's gross pay.","examples":["OTE"],"example":"OTE"},"kiwisaver_employee_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Kiwisaver Employee Rate","description":"Employee KiwiSaver contribution rate, as a fraction (e.g., 0.03 for 3%). NZ only.","examples":["0.03"],"example":"0.03"},"kiwisaver_employer_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Kiwisaver Employer Rate","description":"Employer KiwiSaver contribution rate, as a fraction (e.g., 0.03 for 3%). NZ only.","examples":["0.03"],"example":"0.03"},"kiwisaver_status_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Status Code","description":"KiwiSaver status code. NZ only.","examples":["KS"],"example":"KS"},"kiwisaver_existing_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Existing Action","description":"KiwiSaver existing member action. NZ only.","examples":["EXISTING_MEMBER"],"example":"EXISTING_MEMBER"},"esct_rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Esct Rate","description":"Employer superannuation contribution tax rate, as a fraction (e.g., 0.105 for 10.5%). NZ only.","examples":["0.105"],"example":"0.105"},"employer_contrib_tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employer Contrib Tax Method","description":"NZ employer contribution tax method.","examples":["ESCT"],"example":"ESCT"},"employer_contrib_paye_fraction":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Employer Contrib Paye Fraction","description":"NZ employer contribution PAYE fraction.","examples":["0.0"],"example":"0.0"},"kiwisaver_cec_obligation":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Kiwisaver Cec Obligation","description":"KiwiSaver CEC obligation. NZ only.","examples":["NONE"],"example":"NONE"},"is_leave_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Leave Enabled","description":"Whether leave calculations are enabled for this employee. If False, no leave accruals will be calculated for this employee.","examples":[true],"example":true},"include_leave_loading_in_super":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Include Leave Loading In Super","description":"Whether to include leave loading in superannuation calculations for this employee. If True, leave loading will be included in the superannuation contributions. If False, leave loading will not be included in super calculations.","examples":[false],"example":false},"accrue_leave_on_hours_worked":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accrue Leave On Hours Worked","description":"Whether to accrue leave based on hours worked (pro rata). If True, leave will be accrued based on the number of hours worked by the employee. If False, leave will be accrued by the pay period.","examples":[true],"example":true},"accrue_leave_on_overtime_hours":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Accrue Leave On Overtime Hours","description":"Whether to accrue leave based on overtime hours worked. If True, leave will be accrued based on the number of overtime hours worked by the employee. If False, overtime hours will not contribute to leave accruals.","examples":[false],"example":false},"accrue_holiday_leave_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Accrue Holiday Leave Per Hour","description":"Holiday leave accrual rate per hour worked, expressed as a decimal (e.g., 0.076923 for 20 days per year). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of holiday leave hours accrued by the employee based on their hours worked.","examples":["0.076923"],"example":"0.076923"},"accrue_sick_leave_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Accrue Sick Leave Per Hour","description":"Sick leave accrual rate per hour worked, expressed as a decimal (e.g., 0.038462 for 10 days per year). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of sick leave hours accrued by the employee based on their hours worked.","examples":["0.038462"],"example":"0.038462"},"accrue_lsl_per_hour":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Accrue Lsl Per Hour","description":"Long Service Leave (LSL) accrual rate per hour worked, expressed as a decimal (e.g., 0.016667 for 8.6667 weeks per 10 years; 0.025 for SA/NT's 13 weeks). The per-state default is derived from the lump entitlement (weeks/years/52). Used when both accrue_leave_on_hours_worked and is_leave_enabled are enabled. This is used to calculate the number of LSL hours accrued by the employee based on their hours worked.","examples":["0.016667"],"example":"0.016667"},"num_sick_leave_days_per_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Sick Leave Days Per Year","description":"Number of personal/sick days per year for the employee. This is used to calculate the number of personal leave hours accrued by the employee based on their hours worked.","examples":[10],"example":10},"num_holiday_leave_days_per_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Holiday Leave Days Per Year","description":"Number of annual/holiday days per year for the employee. This is used to calculate the number of holiday leave hours accrued by the employee based on their hours worked.","examples":[20],"example":20},"is_lsl_enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Lsl Enabled","description":"Whether Long Service Leave (LSL) calculations are enabled for this employee. If False, no LSL accruals will be calculated for this employee.","examples":[true],"example":true},"lsl_x_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lsl X Years","description":"Number of years of service required to qualify for Long Service Leave (LSL). This is used to determine when the employee is eligible for LSL based on their length of service.","examples":[10],"example":10},"lsl_accrued_x_years":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Lsl Accrued X Years","description":"Number of weeks LSL accrued for every lsl_x_years years of service. This is used to calculate the number of LSL hours accrued by the employee based on their length of service.","examples":[10],"example":10},"hourly_amount_for_workers_comp_leave":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Hourly Amount For Workers Comp Leave","examples":["25.50"],"example":"25.50"},"hourly_amount_for_paid_parental_leave":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Hourly Amount For Paid Parental Leave","examples":["30.75"],"example":"30.75"},"rdo_hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rdo Hours","description":"Total hours of Rostered Days Off (RDOs) accrued by the employee as at their most recent pay.","examples":["55.42"],"example":"55.42"},"toil_hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Toil Hours","description":"Total hours of Time Off In Lieu (TOIL) accrued by the employee as at their most recent pay.","examples":["20.00"],"example":"20.00"},"id":{"type":"integer","title":"Id","description":"Internal Lightning Payroll employee id"},"delete_non_rdo_and_toil_leave_items":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Delete Non Rdo And Toil Leave Items","description":"If True, all non-RDO and non-TOIL leave items will be deleted from the employee's leave balances. This is useful for resetting leave balances when an employee's leave settings have been potentially misconfigured.","examples":[false],"example":false}},"additionalProperties":false,"type":"object","required":["id"],"title":"EmployeeUpdate","description":"Payload for *partial* updates (PATCH). Only id is mandatory."},"EmploymentLookupItem":{"properties":{"id":{"type":"integer","title":"Id","description":"Send this as `employment_type` or `employment_tenure` on an employee.","examples":[1],"example":1},"name":{"type":"string","title":"Name","description":"The option's name, which is also accepted in place of the id.","examples":["Part-time"],"example":"Part-time"}},"type":"object","required":["id","name"],"title":"EmploymentLookupItem","description":"One employment type or tenure option."},"EmploymentLookupResponse":{"properties":{"options":{"items":{"$ref":"#/components/schemas/EmploymentLookupItem"},"type":"array","title":"Options","description":"Every available option, ordered by name."}},"type":"object","required":["options"],"title":"EmploymentLookupResponse"},"FaqItem":{"properties":{"id":{"type":"integer","title":"Id","description":"Stable FAQ identifier.","examples":[123],"example":123},"category":{"type":"string","title":"Category","description":"FAQ category/grouping.","examples":["Single Touch Payroll"],"example":"Single Touch Payroll"},"heading":{"type":"string","title":"Heading","description":"FAQ title.","examples":["How do I lodge STP?"],"example":"How do I lodge STP?"},"message":{"type":"string","title":"Message","description":"FAQ body. Basic HTML by default; see the request 'format' arg.","examples":["<p>Open the STP screen and ...</p>"],"example":"<p>Open the STP screen and ...</p>"},"tags":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tags","description":"Comma/space separated tags, if any.","examples":["stp,reporting"],"example":"stp,reporting"},"site_mode":{"type":"string","title":"Site Mode","description":"Region this FAQ belongs to ('au' or 'nz').","examples":["au"],"example":"au"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the FAQ was first created (UTC server time)."},"last_edited":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Edited","description":"When the FAQ was last edited."}},"type":"object","required":["id","category","heading","message","site_mode"],"title":"FaqItem"},"FaqListResponse":{"properties":{"site_mode":{"type":"string","title":"Site Mode","description":"Echo of the requested site mode.","examples":["au"],"example":"au"},"format":{"type":"string","title":"Format","description":"Echo of the requested body format ('raw'|'text'|'sanitized').","examples":["raw"],"example":"raw"},"count":{"type":"integer","title":"Count","description":"Number of FAQ items returned in this page.","examples":[12],"example":12},"total":{"type":"integer","title":"Total","description":"Total active FAQs matching the filters (ignoring limit/offset).","examples":[37],"example":37},"limit":{"type":"integer","title":"Limit","description":"The limit applied.","examples":[50],"example":50},"offset":{"type":"integer","title":"Offset","description":"The offset applied.","examples":[0],"example":0},"faqs":{"items":{"$ref":"#/components/schemas/FaqItem"},"type":"array","title":"Faqs","description":"The FAQ items for this page, newest first."}},"type":"object","required":["site_mode","format","count","total","limit","offset","faqs"],"title":"FaqListResponse"},"FarmFocusHostOverride":{"properties":{"canManage":{"type":"boolean","title":"Canmanage","description":"Whether your account is allowed to set a Farm Focus host override.","examples":[true],"example":true},"overrideUrl":{"type":"string","title":"Overrideurl","description":"The configured override, or `\"\"` when unset or when you may not manage it.","examples":["https://farmfocus.example.com"],"example":"https://farmfocus.example.com"}},"type":"object","required":["canManage","overrideUrl"],"title":"FarmFocusHostOverride"},"GLPosting":{"properties":{"account_id":{"anyOf":[{"type":"string"},{"type":"integer"}],"title":"Account Id","description":"The account identifier associated with the GL posting.","examples":["00-00-0001"],"example":"00-00-0001"},"description":{"type":"string","title":"Description","description":"A brief description of the GL posting.","examples":["Gross Wages"],"example":"Gross Wages"},"amount":{"type":"number","title":"Amount","description":"The monetary amount for the GL posting. Positive for debits, negative for credits.","examples":[1500.0],"example":1500.0},"date":{"type":"string","title":"Date","description":"The date of the GL posting, formatted **DD/MM/YYYY**. Note this is the one date in the pay API that is not ISO 8601: it is passed through verbatim from the GL postings report, so parse it as DD/MM/YYYY rather than with a generic date parser.","examples":["14/01/2025"],"example":"14/01/2025"}},"type":"object","required":["account_id","description","amount","date"],"title":"GLPosting"},"GLPostingsResponse":{"properties":{"pay_run_id":{"type":"integer","title":"Pay Run Id","description":"The unique LP-generated ID of the pay run.","examples":[1],"example":1},"postings":{"items":{"$ref":"#/components/schemas/GLPosting"},"type":"array","title":"Postings","description":"A list of GL postings associated with the specified pay run."}},"type":"object","required":["pay_run_id","postings"],"title":"GLPostingsResponse"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HoursOut":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","examples":["Ordinary Time"],"example":"Ordinary Time"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this hours row. Provide either `rate` or `multiplier`.","examples":[30.0],"example":30.0},"units":{"type":"string","maxLength":32,"minLength":0,"title":"Units","examples":["hours"],"example":"hours"},"is_overtime":{"type":"boolean","title":"Is Overtime","default":false,"examples":[false],"example":false},"value":{"type":"number","title":"Value","examples":[37.5],"example":37.5},"id":{"type":"integer","title":"Id"},"pay_amount":{"type":"number","title":"Pay Amount","description":"The total amount for this pay hours row, calculated as rate * value.","examples":[1125.0],"example":1125.0}},"type":"object","required":["description","units","value","id","pay_amount"],"title":"HoursOut"},"InitApiClientResponse":{"properties":{"status":{"type":"string","title":"Status","description":"`Client created` or `Client already exists`.","examples":["Client already exists"],"example":"Client already exists"},"timezone":{"type":"string","title":"Timezone","description":"Console timezone. Falls back to `UTC` if the stored value is not a valid IANA zone.","examples":["Australia/Brisbane"],"example":"Australia/Brisbane"},"configured_branding":{"$ref":"#/components/schemas/ConfiguredBranding"},"email_domain":{"anyOf":[{"$ref":"#/components/schemas/EmailDomain"},{"type":"null"}],"description":"Your sending domain. Present on the `Client already exists` branch only; a freshly created client has none yet, so treat this key as optional."},"farm_focus_host_override":{"$ref":"#/components/schemas/FarmFocusHostOverride"},"effective_branding":{"$ref":"#/components/schemas/EffectiveBranding"},"client":{"$ref":"#/components/schemas/ApiClientCredentials"}},"additionalProperties":true,"type":"object","required":["status","timezone","configured_branding","farm_focus_host_override","effective_branding","client"],"title":"InitApiClientResponse","description":"Answer from GET /api/init-api-client, for both the created and existing branches."},"Leave":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the leave.","examples":["Annual Leave"],"example":"Annual Leave"},"leave_type":{"type":"string","title":"Leave Type","description":"A short identifier for the type of leave. Provide the code with underscores (e.g., ALT_HOLIDAY, ANCILLARY, ANNUAL_HOLIDAYS, COMPASSIONATE, EMPLOYER_FUNDED_PAID_PARENTAL, HOLIDAY, LONG_SERVICE, NZ_BEREAVEMENT, NZ_DEFENCE_FORCE, NZ_EMPLOYMENT_RELATIONS_EDUCATION, NZ_FAMILY_VIOLENCE, NZ_JURY_SERVICE, NZ_TIME_OFF_TO_VOTE, OTHER, PAID_PARENTAL, PAID_PUBLIC_HOLIDAY, SICK, UNPAID, WORKERS_COMP).","examples":["HOLIDAY"],"example":"HOLIDAY"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this leave (e.g., hourly rate). Optional if using `multiplier` or to default to the employee's pay_rate_per_hour.","examples":["38.00"],"example":"38.00"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Multiplier","description":"Alternative to `rate`. Multiplies the employee's pay_rate_per_hour (e.g., 1.0 for base rate, 1.5 for time-and-a-half). Mutually exclusive with `rate` - supply one or the other, never both."},"date":{"type":"string","title":"Date","description":"The date of the leave.","examples":["2023-01-01"],"example":"2023-01-01"},"hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Hours","description":"The number of hours leave taken.","examples":["7.6"],"example":"7.6"},"leave_loading_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Leave Loading Amount","description":"The dollar amount of leave loading, if applicable.","examples":["3.80"],"example":"3.80"}},"additionalProperties":false,"type":"object","required":["description","leave_type","date","hours"],"title":"Leave"},"LeaveBalanceRow-Input":{"properties":{"leave_type":{"type":"string","title":"Leave Type","description":"Short code or internal key for the leave type.","examples":["HOLIDAY"],"example":"HOLIDAY"},"name":{"type":"string","title":"Name","description":"User-facing name of the leave type.","examples":["Annual Leave"],"example":"Annual Leave"},"hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Hours","description":"Decimal quantity of leave hours remaining.","examples":["32.0"],"example":"32.0"}},"type":"object","required":["leave_type","name"],"title":"LeaveBalanceRow","description":"Return schema for leave balance objects exposed via the API."},"LeaveBalanceRow-Output":{"properties":{"leave_type":{"type":"string","title":"Leave Type","description":"Short code or internal key for the leave type.","examples":["HOLIDAY"],"example":"HOLIDAY"},"name":{"type":"string","title":"Name","description":"User-facing name of the leave type.","examples":["Annual Leave"],"example":"Annual Leave"},"hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Hours","description":"Decimal quantity of leave hours remaining.","examples":[32.0],"example":32.0}},"type":"object","required":["leave_type","name"],"title":"LeaveBalanceRow","description":"Return schema for leave balance objects exposed via the API."},"LeaveBase":{"properties":{"name":{"type":"string","title":"Name","examples":["Annual Leave"],"example":"Annual Leave"},"leave_type":{"type":"string","title":"Leave Type","examples":["annual"],"example":"annual"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this leave (e.g., hourly rate). Optional if using `multiplier` or to default to the employee's pay_rate_per_hour.","examples":["38.00"],"example":"38.00"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Multiplier","description":"Alternative to `rate`. Multiplies the employee's pay_rate_per_hour (e.g., 1.0 for base rate, 1.5 for time-and-a-half). Mutually exclusive with `rate` - supply one or the other, never both."},"hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Hours","examples":["7.6"],"example":"7.6"},"value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Value","description":"Legacy alias for `hours`, echoed back on responses. On a REQUEST body `hours` is required and `value` is not a substitute for it: the aliasing is applied by `LeaveOut` (the read schema) only, so a leave row sending `value` alone is rejected with a 422.","examples":["7.6"],"example":"7.6"},"leave_loading_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Leave Loading Amount","description":"Extra dollar loading applied to the leave (if any).","examples":["3.80"],"example":"3.80"}},"type":"object","required":["name","leave_type","hours"],"title":"LeaveBase","description":"Core attributes that describe a single leave line or entitlement."},"LeaveOut":{"properties":{"name":{"type":"string","title":"Name","examples":["Annual Leave"],"example":"Annual Leave"},"leave_type":{"type":"string","title":"Leave Type","examples":["annual"],"example":"annual"},"rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this leave (e.g., hourly rate). Optional if using `multiplier` or to default to the employee's pay_rate_per_hour.","examples":[38.0],"example":38.0},"hours":{"type":"number","title":"Hours","examples":[7.6],"example":7.6},"value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Value","description":"Legacy alias for `hours`, echoed back on responses. On a REQUEST body `hours` is required and `value` is not a substitute for it: the aliasing is applied by `LeaveOut` (the read schema) only, so a leave row sending `value` alone is rejected with a 422.","examples":[7.6],"example":7.6},"leave_loading_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Leave Loading Amount","description":"Extra dollar loading applied to the leave (if any).","examples":[3.8],"example":3.8},"id":{"type":"integer","title":"Id"},"amount":{"type":"number","title":"Amount","description":"The total amount for this leave row, calculated as rate * time_taken.","examples":[288.8],"example":288.8}},"type":"object","required":["name","leave_type","hours","id","amount"],"title":"LeaveOut","description":"What the API returns after create / read."},"LeaveRequest":{"properties":{"id":{"type":"integer","title":"Id","description":"Unique identifier of this leave request."},"employee_id":{"type":"integer","title":"Employee Id","description":"The unique LP-generated ID of the employee the request belongs to.","examples":[1],"example":1},"employee_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Number","description":"The user-controlled payroll number of the employee.","examples":["12345"],"example":"12345"},"employee_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Name","description":"The employee's formatted name.","examples":["SMITH, John"],"example":"SMITH, John"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status","description":"Status of the request: 'Pending', 'Approved', 'Denied' or 'Cancelled'.","examples":["Approved"],"example":"Approved"},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the request was submitted."},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"Earliest requested day of leave.","examples":["2026-09-14"],"example":"2026-09-14"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"Latest requested day of leave.","examples":["2026-09-18"],"example":"2026-09-18"},"total_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Hours","description":"Total requested duration across all days, in decimal hours.","examples":[38.0],"example":38.0},"days":{"items":{"$ref":"#/components/schemas/LeaveRequestDay"},"type":"array","title":"Days","description":"The individual days of leave requested, earliest first."},"notes":{"items":{"$ref":"#/components/schemas/LeaveRequestNote"},"type":"array","title":"Notes","description":"Notes attached to the request, oldest first."}},"type":"object","required":["id","employee_id"],"title":"LeaveRequest","description":"An employee leave request submitted through the employee online portal."},"LeaveRequestDay":{"properties":{"id":{"type":"integer","title":"Id","description":"Unique identifier of this leave request day."},"date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Date","description":"The calendar day of leave being requested.","examples":["2026-09-14"],"example":"2026-09-14"},"leave_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leave Type","description":"Lightning Payroll leave type code for this day, e.g. 'HOLIDAY', 'SICK', 'LONG SERVICE', 'OTHER', 'PAID PARENTAL', 'EMPLOYER FUNDED PAID PARENTAL', 'WORKERS COMP', 'COMPASSIONATE', 'ANCILLARY', 'PAID PUBLIC HOLIDAY' or 'UNPAID'.","examples":["HOLIDAY"],"example":"HOLIDAY"},"leave_type_display":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Leave Type Display","description":"Human-readable label for `leave_type`.","examples":["Holiday"],"example":"Holiday"},"duration_minutes":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Duration Minutes","description":"Requested duration of leave for this day, in minutes.","examples":[456],"example":456},"duration_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Duration Hours","description":"Requested duration of leave for this day, in decimal hours.","examples":[7.6],"example":7.6}},"type":"object","required":["id"],"title":"LeaveRequestDay","description":"A single requested day of leave within a leave request."},"LeaveRequestNote":{"properties":{"id":{"type":"integer","title":"Id","description":"Unique identifier of this note."},"created":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Created","description":"When the note was created."},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By","description":"Who wrote the note: 'Employee', 'Approver', 'Manager' or 'Program'.","examples":["Employee"],"example":"Employee"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message","description":"The note text.","examples":["Family holiday."],"example":"Family holiday."}},"type":"object","required":["id"],"title":"LeaveRequestNote","description":"A note attached to a leave request."},"LeaveUpdate":{"properties":{"name":{"type":"string","title":"Name","examples":["Annual Leave"],"example":"Annual Leave"},"leave_type":{"type":"string","title":"Leave Type","examples":["annual"],"example":"annual"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this leave (e.g., hourly rate). Optional if using `multiplier` or to default to the employee's pay_rate_per_hour.","examples":["38.00"],"example":"38.00"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Multiplier","description":"Alternative to `rate`. Multiplies the employee's pay_rate_per_hour (e.g., 1.0 for base rate, 1.5 for time-and-a-half). Mutually exclusive with `rate` - supply one or the other, never both."},"hours":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Hours","examples":["7.6"],"example":"7.6"},"value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Value","description":"Legacy alias for `hours`, echoed back on responses. On a REQUEST body `hours` is required and `value` is not a substitute for it: the aliasing is applied by `LeaveOut` (the read schema) only, so a leave row sending `value` alone is rejected with a 422.","examples":["7.6"],"example":"7.6"},"leave_loading_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Leave Loading Amount","description":"Extra dollar loading applied to the leave (if any).","examples":["3.80"],"example":"3.80"},"id":{"type":"integer","title":"Id","examples":[42],"example":42}},"type":"object","required":["name","leave_type","hours","id"],"title":"LeaveUpdate","description":"Full payload for a PATCH/PUT – requires the primary-key `id`."},"MessageResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Human-readable confirmation that the operation succeeded.","examples":["Allowance successfully deleted."],"example":"Allowance successfully deleted."}},"type":"object","required":["message"],"title":"MessageResponse","description":"A bare confirmation body: the shape several DELETE endpoints answer with."},"NZExtraPayTaxBreakdown":{"properties":{"unused_holiday":{"anyOf":[{"$ref":"#/components/schemas/NZExtraPayTaxComponent"},{"type":"null"}]},"alt_holiday":{"anyOf":[{"$ref":"#/components/schemas/NZExtraPayTaxComponent"},{"type":"null"}]},"redundancy":{"anyOf":[{"$ref":"#/components/schemas/NZExtraPayTaxComponent"},{"type":"null"}]},"other":{"anyOf":[{"$ref":"#/components/schemas/NZExtraPayTaxComponent"},{"type":"null"}]},"total_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Tax","description":"Total termination extra-pay tax.","examples":[330.0],"example":330.0},"taxed_at_low_rate":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Taxed At Low Rate","description":"Whether any component used the low personal extra-pay rate.","examples":[false],"example":false}},"additionalProperties":true,"type":"object","title":"NZExtraPayTaxBreakdown","description":"Per-component New Zealand extra-pay tax calculation."},"NZExtraPayTaxComponent":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"The component amount taxed as extra pay.","examples":[1000.0],"example":1000.0},"tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax","description":"PAYE withheld from this component.","examples":[330.0],"example":330.0},"components":{"additionalProperties":{"type":"number"},"type":"object","title":"Components","description":"The calculator's named tax and levy components.","examples":[{"PAYE":300.0}],"example":{"PAYE":300.0}},"applied_personal_rate":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Applied Personal Rate","description":"The personal extra-pay rate applied to this component.","examples":["0.33"],"example":"0.33"}},"additionalProperties":true,"type":"object","title":"NZExtraPayTaxComponent","description":"Tax calculated for one New Zealand termination payout component."},"NewWorkersCompensationPay":{"properties":{"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employee Id","description":"The internal unique identifier for the employee.","examples":[1234],"example":1234},"employee_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Number","description":"The external unique identifier (employee number) for the employee.","examples":["EMP001"],"example":"EMP001"},"workers_compensation_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Workers Compensation Amount","description":"The amount of workers' compensation to be paid.","examples":["1500.00"],"example":"1500.00"},"tax":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Tax","description":"The tax amount associated with the workers' compensation payment.","examples":["300.00"],"example":"300.00"}},"type":"object","required":["workers_compensation_amount","tax"],"title":"NewWorkersCompensationPay"},"PartnerCheckoutAvailabilityItem":{"properties":{"provided":{"type":"boolean","title":"Provided","description":"Whether this identifier was included in the availability request."},"normalized":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Normalized","description":"Normalized identifier used by the API for validation and lookup."},"valid_format":{"type":"boolean","title":"Valid Format","description":"Whether the identifier passed format validation."},"exists":{"type":"boolean","title":"Exists","description":"Whether a matching existing customer or company record was found."},"available":{"type":"boolean","title":"Available","description":"True only when the identifier was provided, valid, and not already in use."},"message":{"type":"string","title":"Message","description":"Developer-facing availability summary."},"required_owned_add_ons":{"items":{"$ref":"#/components/schemas/RequiredOwnedAddOn"},"type":"array","title":"Required Owned Add Ons","description":"If an existing customer was matched, shows whether they already have the reseller's required branded add-ons."},"has_all_required_owned_add_ons":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Has All Required Owned Add Ons","description":"Summary flag for `required_owned_add_ons`. Null when the check does not apply."}},"additionalProperties":false,"type":"object","required":["provided","valid_format","exists","available","message"],"title":"PartnerCheckoutAvailabilityItem"},"PartnerCheckoutAvailabilityResponse":{"properties":{"email":{"$ref":"#/components/schemas/PartnerCheckoutAvailabilityItem","description":"Availability result for the supplied email, or a placeholder result when no email was supplied."},"abn":{"$ref":"#/components/schemas/PartnerCheckoutAvailabilityItem","description":"Availability result for the supplied ABN, or a placeholder result when no ABN was supplied."},"ird_number":{"$ref":"#/components/schemas/PartnerCheckoutAvailabilityItem","description":"Availability result for the supplied NZ employer IRD number, or a placeholder result when none was supplied."}},"additionalProperties":false,"type":"object","required":["email","abn","ird_number"],"title":"PartnerCheckoutAvailabilityResponse"},"PartnerCheckoutBillingAddress":{"properties":{"address_1":{"type":"string","maxLength":128,"minLength":3,"title":"Address 1","examples":["1 Eagle Street"],"example":"1 Eagle Street"},"address_2":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}],"title":"Address 2","examples":["Level 12"],"example":"Level 12"},"city":{"type":"string","maxLength":128,"minLength":2,"title":"City","examples":["Brisbane"],"example":"Brisbane"},"postcode":{"type":"string","maxLength":10,"minLength":2,"title":"Postcode","examples":["4000"],"example":"4000"},"zone_code":{"type":"string","maxLength":32,"minLength":1,"title":"Zone Code","description":"State or region code. Use GET /api/partner-checkout/zones to list valid codes.","examples":["QLD"],"example":"QLD"}},"additionalProperties":false,"type":"object","required":["address_1","city","postcode","zone_code"],"title":"PartnerCheckoutBillingAddress"},"PartnerCheckoutCancelOrderRequest":{"properties":{"order_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Order Id","description":"The order.order_id to cancel.","examples":[192484],"example":192484},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason","description":"Optional free-text reason stored on the order_history note.","examples":["Customer requested cancellation - signed up in error."],"example":"Customer requested cancellation - signed up in error."}},"additionalProperties":false,"type":"object","required":["order_id"],"title":"PartnerCheckoutCancelOrderRequest"},"PartnerCheckoutCancelOrderResponse":{"properties":{"order_id":{"type":"integer","title":"Order Id","description":"Cancelled order ID."},"previous_order_status_id":{"type":"integer","title":"Previous Order Status Id","description":"Order status before cancellation."},"order_status_id":{"type":"integer","title":"Order Status Id","description":"New order status after cancellation. Expected value is 7."},"order_history_id":{"type":"integer","title":"Order History Id","description":"Order-history record created for the cancellation event."},"comment":{"type":"string","title":"Comment","description":"Cancellation comment stored in order history."}},"additionalProperties":false,"type":"object","required":["order_id","previous_order_status_id","order_status_id","order_history_id","comment"],"title":"PartnerCheckoutCancelOrderResponse"},"PartnerCheckoutCompanyCreate":{"properties":{"legal_name":{"type":"string","maxLength":128,"minLength":1,"title":"Legal Name","examples":["Sunrise Hospitality Pty Ltd"],"example":"Sunrise Hospitality Pty Ltd"},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Australian Business Number (AU customers). Mutually exclusive with ird_number.","examples":["10000000000"],"example":"10000000000"},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number","description":"Employer IRD number (NZ customers), e.g. `49091850`. Mutually exclusive with abn."}},"additionalProperties":false,"type":"object","required":["legal_name"],"title":"PartnerCheckoutCompanyCreate"},"PartnerCheckoutCountryItem":{"properties":{"country_id":{"type":"integer","title":"Country Id","description":"Internal country ID."},"iso_code_2":{"type":"string","title":"Iso Code 2","description":"ISO 3166-1 alpha-2 country code."},"name":{"type":"string","title":"Name","description":"Human-readable country name."},"zones":{"items":{"$ref":"#/components/schemas/PartnerCheckoutZoneItem"},"type":"array","title":"Zones","description":"Allowed active zones for this country."}},"additionalProperties":false,"type":"object","required":["country_id","iso_code_2","name","zones"],"title":"PartnerCheckoutCountryItem"},"PartnerCheckoutCountryPricing":{"properties":{"country_code":{"type":"string","title":"Country Code","description":"Country this pricing row applies to."},"currency_code":{"type":"string","title":"Currency Code","description":"Currency for this pricing row."},"tax_rate":{"type":"number","title":"Tax Rate","description":"Tax rate applied for this country."},"unit_price_ex_tax":{"type":"number","title":"Unit Price Ex Tax","description":"Partner unit price excluding tax."},"unit_tax":{"type":"number","title":"Unit Tax","description":"Tax component for one unit at partner pricing."},"unit_price_inc_tax":{"type":"number","title":"Unit Price Inc Tax","description":"Partner unit price including tax."},"rrp_unit_price_ex_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rrp Unit Price Ex Tax","description":"Mapped retail recommended unit price excluding tax when a retail counterpart exists."},"rrp_unit_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rrp Unit Tax","description":"Mapped retail tax amount per unit when a retail counterpart exists."},"rrp_unit_price_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rrp Unit Price Inc Tax","description":"Mapped retail recommended unit price including tax when a retail counterpart exists."}},"additionalProperties":false,"type":"object","required":["country_code","currency_code","tax_rate","unit_price_ex_tax","unit_tax","unit_price_inc_tax"],"title":"PartnerCheckoutCountryPricing"},"PartnerCheckoutCustomerCreate":{"properties":{"first_name":{"type":"string","maxLength":32,"minLength":1,"title":"First Name","examples":["Alice"],"example":"Alice"},"last_name":{"type":"string","maxLength":32,"minLength":1,"title":"Last Name","examples":["Nguyen"],"example":"Nguyen"},"email":{"type":"string","format":"email","title":"Email","examples":["alice@example.com"],"example":"alice@example.com"},"phone":{"type":"string","maxLength":32,"minLength":3,"title":"Phone","examples":["+61 7 3000 0000"],"example":"+61 7 3000 0000"}},"additionalProperties":false,"type":"object","required":["first_name","last_name","email","phone"],"title":"PartnerCheckoutCustomerCreate"},"PartnerCheckoutCustomerInfoResponse":{"properties":{"customer_id":{"type":"integer","title":"Customer Id","description":"The client's customer identifier. Matches customerId on webhook payloads."},"customer_name":{"type":"string","title":"Customer Name","description":"The client's contact name."},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name","description":"The client's company name, where recorded."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"The client's account email."},"has_active_subscription":{"type":"boolean","title":"Has Active Subscription","description":"True when the client holds at least one unexpired subscription. This is the same check that gates writes, so when it is false the client's data is read-only and write calls return 403."},"subscriptions":{"items":{"$ref":"#/components/schemas/PartnerCheckoutCustomerSubscription"},"type":"array","title":"Subscriptions","description":"The client's current subscription terms, latest expiry first. Empty when they have never subscribed."}},"additionalProperties":false,"type":"object","required":["customer_id","customer_name","has_active_subscription","subscriptions"],"title":"PartnerCheckoutCustomerInfoResponse","description":"A client's identity and current subscription state.\n\nReturned for clients you onboarded through partner checkout and for clients\nwho have authorised your OAuth client, so an integration built purely on the\nOAuth flow can still see whether its user is subscribed."},"PartnerCheckoutCustomerSubscription":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id","description":"Subscription identifier."},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id","description":"Product the subscription is on for the current term. Null on a trial."},"product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Name","description":"Display name of that product. Null on a trial."},"expiry":{"type":"string","format":"date","title":"Expiry","description":"Date this term ends."},"status":{"type":"string","enum":["active","lapsed"],"title":"Status","description":"'active' while the expiry date has not passed, 'lapsed' once it has."},"is_monthly":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Monthly","description":"True for a monthly billing cycle, false for annual. Null on a trial, which is not billed."},"is_trial":{"type":"boolean","title":"Is Trial","description":"True for a free trial rather than a paid subscription."},"auto_renew_on":{"type":"boolean","title":"Auto Renew On","description":"Whether this client's subscriptions renew automatically. Set per customer, not per subscription."},"quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Quantity","description":"Quantity on the current term's line. Always 1 except on per-employee products. Null on a trial."}},"additionalProperties":false,"type":"object","required":["subscription_id","expiry","status","is_trial","auto_renew_on"],"title":"PartnerCheckoutCustomerSubscription","description":"One current subscription term held by a client.\n\nA trial is not sold, so it has no order line behind it. On a trial\n``product_id``, ``product_name``, ``quantity`` and ``is_monthly`` are all\nnull, because there is no product and nothing is billed. ``is_trial`` tells\nyou why they are null."},"PartnerCheckoutLineItem":{"properties":{"line_type":{"type":"string","enum":["subscription","add_on","training_session","upgrade_credit"],"title":"Line Type","description":"Type of line produced by partner checkout. `upgrade_credit` is a negative line representing the remaining value of the customer's existing subscription (and add-ons) credited against a base/both upgrade order."},"product_id":{"type":"integer","title":"Product Id","description":"Product ID used for this priced line."},"name":{"type":"string","title":"Name","description":"Product display name at the time of checkout."},"model":{"type":"string","title":"Model","description":"Product model code."},"quantity":{"type":"integer","title":"Quantity","description":"Final quantity priced for this line."},"unit_price_ex_tax":{"type":"number","title":"Unit Price Ex Tax","description":"Per-unit partner price excluding tax."},"unit_price_inc_tax":{"type":"number","title":"Unit Price Inc Tax","description":"Per-unit partner price including tax (AU: ex_tax + 10% GST; NZ: equal to ex_tax — GST-Free Export)."},"line_subtotal_ex_tax":{"type":"number","title":"Line Subtotal Ex Tax","description":"Line subtotal excluding tax before promo discount."},"line_tax":{"type":"number","title":"Line Tax","description":"Tax amount for this line."},"line_total_inc_tax":{"type":"number","title":"Line Total Inc Tax","description":"Line total including tax before promo discount."},"tax_rate":{"type":"number","title":"Tax Rate","description":"Effective tax rate applied to this line. 0.1000 for AU GST; 0.0000 for NZ (GST-Free Export — no NZ GST line)."},"currency_code":{"type":"string","title":"Currency Code","description":"Currency this line is priced in (AUD or NZD)."},"rrp_unit_price_ex_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rrp Unit Price Ex Tax","description":"Retail recommended per-unit price excluding tax. Prorated when subscription_end_date is set. Null when no retail counterpart exists (e.g. Figtree, per-employee REF SKUs)."},"rrp_unit_price_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rrp Unit Price Inc Tax","description":"Retail recommended per-unit price including tax. Same GST rules as unit_price_inc_tax."},"rrp_line_total_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Rrp Line Total Inc Tax","description":"Retail recommended line total including tax (rrp_unit_price_inc_tax × quantity)."},"notes":{"items":{"type":"string"},"type":"array","title":"Notes","description":"Informational notes about how this line was derived."}},"additionalProperties":false,"type":"object","required":["line_type","product_id","name","model","quantity","unit_price_ex_tax","unit_price_inc_tax","line_subtotal_ex_tax","line_tax","line_total_inc_tax","tax_rate","currency_code"],"title":"PartnerCheckoutLineItem"},"PartnerCheckoutMandatoryRequirements":{"properties":{"requires_training_session":{"type":"boolean","title":"Requires Training Session","description":"Whether every partner checkout order must include the mandatory training session product.","default":true},"training_session_product_id":{"type":"integer","title":"Training Session Product Id","description":"Product ID expected for the mandatory training session line."},"training_session_product_available":{"type":"boolean","title":"Training Session Product Available","description":"Whether the training session product is currently configured and available."},"training_session_product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Training Session Product Name","description":"Display name of the mandatory training session product, when configured."},"training_session_prices":{"items":{"$ref":"#/components/schemas/PartnerCheckoutCountryPricing"},"type":"array","title":"Training Session Prices","description":"Per-country retail pricing for the mandatory training session line. Matches the one-off training_session line in preview/execute: full retail price, no partner discount, RRP equal to its own price."},"has_owned_add_on_requirements":{"type":"boolean","title":"Has Owned Add On Requirements","description":"Whether this reseller has branded add-on requirements that affect signup."},"required_owned_add_on_keys":{"items":{"type":"string"},"type":"array","title":"Required Owned Add On Keys","description":"Branding add-on keys that this reseller must provision for new client connections."}},"additionalProperties":false,"type":"object","required":["training_session_product_id","training_session_product_available","has_owned_add_on_requirements"],"title":"PartnerCheckoutMandatoryRequirements"},"PartnerCheckoutOAuthOnboarding":{"properties":{"redirect_uri":{"type":"string","maxLength":2048,"minLength":1,"title":"Redirect Uri","description":"Your OAuth callback URI. Must EXACTLY match one of the redirect URIs registered on your OAuth client. After the customer opens the emailed magic link, signs in, and grants consent, their browser is redirected here with `?code=...&state=...`. Exchange the code at POST /api/oauth/token for a `payroll.write` access token, then create their company with PUT /api/company/create — no second login required.","examples":["https://partner.example.com/oauth/callback"],"example":"https://partner.example.com/oauth/callback"},"scope":{"type":"string","maxLength":512,"title":"Scope","description":"Space-delimited OAuth scopes to request. `openid` (legacy `openapi` also accepted) is required, and `payroll.write` is required so you can create the customer's payroll company after consent. Defaults to `openid payroll.write`.","default":"openid payroll.write","examples":["openid payroll.write"],"example":"openid payroll.write"},"state":{"anyOf":[{"type":"string","maxLength":512},{"type":"null"}],"title":"State","description":"Opaque value echoed back unchanged to your `redirect_uri` for CSRF/correlation. If omitted, the API generates one.","examples":["partner-corr-abc123"],"example":"partner-corr-abc123"}},"additionalProperties":false,"type":"object","required":["redirect_uri"],"title":"PartnerCheckoutOAuthOnboarding"},"PartnerCheckoutOptionsResponse":{"properties":{"customer_group_id":{"type":"integer","title":"Customer Group Id","description":"Required reseller customer group for partner checkout."},"requires_api_admin":{"type":"boolean","title":"Requires Api Admin","description":"Always true for this feature; caller must be an API admin."},"show_per_employee_pricing":{"type":"boolean","title":"Show Per Employee Pricing","description":"Whether this reseller account may use per-employee base products."},"per_employee_minimum":{"type":"integer","title":"Per Employee Minimum","description":"Minimum employee quantity required for per-employee products."},"allowed_countries":{"items":{"type":"string"},"type":"array","title":"Allowed Countries","description":"Country codes currently supported by partner checkout."},"required_scopes":{"additionalProperties":{"type":"string"},"type":"object","title":"Required Scopes","description":"Helpful scope mapping for discovery, preview, and execute flows."},"mandatory_requirements":{"$ref":"#/components/schemas/PartnerCheckoutMandatoryRequirements","description":"Reseller-specific mandatory signup requirements."},"subscription_products":{"items":{"$ref":"#/components/schemas/PartnerCheckoutProductOption"},"type":"array","title":"Subscription Products","description":"Base subscription products that can be used as `order.product_id`."},"add_on_products":{"items":{"$ref":"#/components/schemas/PartnerCheckoutProductOption"},"type":"array","title":"Add On Products","description":"Available add-ons for partner checkout."}},"additionalProperties":false,"type":"object","required":["customer_group_id","requires_api_admin","show_per_employee_pricing","per_employee_minimum","allowed_countries","required_scopes","mandatory_requirements","subscription_products","add_on_products"],"title":"PartnerCheckoutOptionsResponse"},"PartnerCheckoutOrder":{"properties":{"product_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Product Id","description":"Subscription product ID from GET /api/partner-checkout/options.","examples":[243],"example":243},"add_on_product_ids":{"items":{"type":"integer"},"type":"array","maxItems":50,"title":"Add On Product Ids","description":"Optional add-on product IDs. Must match the base product billing cycle.","examples":[[300]],"example":[300]},"extra_company_qty":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":0.0},{"type":"null"}],"title":"Extra Company Qty","description":"Extra company slots to add to the subscription.","examples":[2],"example":2},"per_employee_qty":{"anyOf":[{"type":"integer","maximum":50000.0,"minimum":1.0},{"type":"null"}],"title":"Per Employee Qty","description":"Required for per-employee products. Must meet the partner minimum.","examples":[25],"example":25},"add_free_trial_month":{"type":"boolean","title":"Add Free Trial Month","description":"When true (default), add an extra free trial month to the subscription expiry so monthly signups get 2 months and annual signups get 13 months. The free month is granted ONCE per end customer: if that customer has already had a free trial (for example via POST /api/partner-checkout/trials, or a previous order carrying a free month), it is not granted again. In that case the request still succeeds, `free_trial_month_applied` is false, and an explanatory note is added to `warnings`. This only applies when you supply `end_customer_id`; a brand-new customer has no prior trial and always receives the free month.","default":true},"subscription_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Subscription End Date","description":"Optional aligned subscription expiry date. When supplied, the base subscription and any recurring add-ons are prorated to this date; the mandatory training session is still charged at full price. Must be strictly after today and within +365 days (annual products) or +30 days (monthly products). When add_free_trial_month is also true, 30 days are deducted from the prorated paid period to account for the free month; if that leaves no paid days the line is charged $0.","examples":["2026-08-21"],"example":"2026-08-21"},"client_reference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Reference","description":"Your internal reference for this order.","examples":["crm-12345"],"example":"crm-12345"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Arbitrary key-value data stored in the order comment for auditability.","examples":[{"sales_rep":"jsmith","source":"partner-crm"}],"example":{"sales_rep":"jsmith","source":"partner-crm"}}},"additionalProperties":false,"type":"object","required":["product_id"],"title":"PartnerCheckoutOrder"},"PartnerCheckoutOrderDetailResponse":{"properties":{"order_id":{"type":"integer","title":"Order Id","description":"Order ID."},"order_status_id":{"type":"integer","title":"Order Status Id","description":"Current order status."},"invoice_prefix":{"type":"string","title":"Invoice Prefix","description":"Invoice prefix used for the order."},"total":{"type":"number","title":"Total","description":"Current order total."},"currency_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Code","description":"Order currency code."},"date_added":{"type":"string","format":"date-time","title":"Date Added","description":"When the order was created."},"date_modified":{"type":"string","format":"date-time","title":"Date Modified","description":"When the order was last modified."},"customer_id":{"type":"integer","title":"Customer Id","description":"Customer created for the order."},"customer_email":{"type":"string","format":"email","title":"Customer Email","description":"Customer email associated with the order."},"customer_date_added":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Customer Date Added","description":"Customer creation timestamp used for the 60-day cancellation window."},"company_name":{"type":"string","title":"Company Name","description":"Company name attached to the order."},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id","description":"Subscription created from the order, when present."},"subscription_expiry":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Subscription Expiry","description":"Subscription expiry date, when present."},"cancel_window_closes":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancel Window Closes","description":"Timestamp when the partner cancellation window closes."},"cancellable":{"type":"boolean","title":"Cancellable","description":"Whether the order is currently eligible for partner cancellation."},"history":{"items":{"$ref":"#/components/schemas/PartnerCheckoutOrderHistoryEntry"},"type":"array","title":"History","description":"Order history entries in ascending order."},"subtotal_ex_tax":{"type":"number","title":"Subtotal Ex Tax","description":"Order subtotal excluding tax, summed across the persisted order_product rows. Pre-promo: does not reflect any welcome-offer discount."},"tax":{"type":"number","title":"Tax","description":"Order tax total, summed across the persisted order_product rows. Pre-promo: does not reflect any welcome-offer discount."},"total_inc_tax":{"type":"number","title":"Total Inc Tax","description":"Order total including tax (subtotal_ex_tax + tax). Pre-promo: does not reflect any welcome-offer discount. When a promo applied, partners should bill the lower `total_after_promo_inc_tax` (or the legacy `total` field)."},"tax_rate":{"type":"number","title":"Tax Rate","description":"Current country-level tax rate (10% for AU GST, 0% for NZ GST-Free Exports)."},"order_lines":{"items":{"$ref":"#/components/schemas/PartnerCheckoutLineItem"},"type":"array","title":"Order Lines","description":"Order lines reconstructed from the persisted order_product rows. Line amounts are pre-promo."},"billing_address":{"$ref":"#/components/schemas/PartnerCheckoutResolvedAddress","description":"Billing address rebuilt from the order's payment_* columns."},"supplier":{"$ref":"#/components/schemas/PartnerCheckoutSupplier","description":"Supplier (Intellitron / Lightning Payroll) details for partner-issued tax invoices."},"promo_discount":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutPromoDiscount"},{"type":"null"}],"description":"Welcome-offer promo discount applied to this order, reconstructed from the persisted promo assignment. Null when no promo applied."},"total_after_promo_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total After Promo Inc Tax","description":"Final billed total including tax after promo discount. Null when no promo applied. Mirrors the legacy `total` field for promo orders."}},"additionalProperties":false,"type":"object","required":["order_id","order_status_id","invoice_prefix","total","date_added","date_modified","customer_id","customer_email","company_name","cancellable","subtotal_ex_tax","tax","total_inc_tax","tax_rate","billing_address","supplier"],"title":"PartnerCheckoutOrderDetailResponse"},"PartnerCheckoutOrderHistoryEntry":{"properties":{"order_history_id":{"type":"integer","title":"Order History Id","description":"Order-history record ID."},"order_status_id":{"type":"integer","title":"Order Status Id","description":"Order status recorded at this history entry."},"notify":{"type":"boolean","title":"Notify","description":"Whether the original workflow marked this history entry for notification."},"comment":{"type":"string","title":"Comment","description":"History comment text."},"date_added":{"type":"string","format":"date-time","title":"Date Added","description":"Timestamp when this history entry was created."}},"additionalProperties":false,"type":"object","required":["order_history_id","order_status_id","notify","comment","date_added"],"title":"PartnerCheckoutOrderHistoryEntry"},"PartnerCheckoutOrderListItem":{"properties":{"order_id":{"type":"integer","title":"Order Id","description":"Order ID."},"order_status_id":{"type":"integer","title":"Order Status Id","description":"Current order status."},"total":{"type":"number","title":"Total","description":"Current order total."},"currency_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency Code","description":"Order currency code."},"date_added":{"type":"string","format":"date-time","title":"Date Added","description":"Order creation timestamp."},"customer_id":{"type":"integer","title":"Customer Id","description":"Customer ID created by the order."},"customer_email":{"type":"string","format":"email","title":"Customer Email","description":"Customer email."},"company_name":{"type":"string","title":"Company Name","description":"Company name for the order."},"cancellable":{"type":"boolean","title":"Cancellable","description":"Whether this order is still within the reseller cancellation window."}},"additionalProperties":false,"type":"object","required":["order_id","order_status_id","total","date_added","customer_id","customer_email","company_name","cancellable"],"title":"PartnerCheckoutOrderListItem"},"PartnerCheckoutOrderListResponse":{"properties":{"orders":{"items":{"$ref":"#/components/schemas/PartnerCheckoutOrderListItem"},"type":"array","title":"Orders","description":"Orders created by the authenticated reseller, newest first."},"limit":{"type":"integer","title":"Limit","description":"Applied page size."},"offset":{"type":"integer","title":"Offset","description":"Applied result offset."},"total_count":{"type":"integer","title":"Total Count","description":"Total matching orders before pagination."}},"additionalProperties":false,"type":"object","required":["orders","limit","offset","total_count"],"title":"PartnerCheckoutOrderListResponse"},"PartnerCheckoutProductOption":{"properties":{"product_id":{"type":"integer","title":"Product Id","description":"Product ID to use in partner checkout requests."},"name":{"type":"string","title":"Name","description":"Product display name."},"model":{"type":"string","title":"Model","description":"Internal model code useful for stable partner-side mapping."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Product description."},"meta_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Meta Description","description":"Additional catalog description text."},"billing_cycle":{"type":"string","enum":["annual","monthly","other"],"title":"Billing Cycle","description":"Billing cycle for the product. Add-ons must match the selected base product cycle."},"product_kind":{"type":"string","enum":["subscription","add_on"],"title":"Product Kind","description":"Whether this product is a base subscription or an add-on."},"product_type_id":{"type":"integer","title":"Product Type Id","description":"Underlying product type ID from the catalog."},"product_class_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Class Id","description":"Underlying product class ID where available."},"is_per_employee":{"type":"boolean","title":"Is Per Employee","description":"Whether quantity is based on employees rather than a single subscription unit.","default":false},"supports_extra_company_qty":{"type":"boolean","title":"Supports Extra Company Qty","description":"Whether `order.extra_company_qty` can be used with this product.","default":false},"min_quantity":{"type":"integer","title":"Min Quantity","description":"Minimum quantity accepted for this option.","default":1},"max_employees":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Employees","description":"Maximum supported employees, when defined by product attributes."},"max_companies":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Companies","description":"Maximum supported companies, when defined by product attributes."},"seats":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Seats","description":"Seat count, when defined by product attributes."},"duration_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Duration Text","description":"Human-readable subscription duration text such as `12 months`."},"compatible_add_on_product_ids":{"items":{"type":"integer"},"type":"array","title":"Compatible Add On Product Ids","description":"Add-on product IDs that are valid alongside this subscription product."},"is_required_for_signup":{"type":"boolean","title":"Is Required For Signup","description":"True when the reseller owns a branded add-on integration that requires this add-on family on signup.","default":false},"prices":{"items":{"$ref":"#/components/schemas/PartnerCheckoutCountryPricing"},"type":"array","title":"Prices","description":"Partner pricing rows for supported countries."}},"additionalProperties":false,"type":"object","required":["product_id","name","model","billing_cycle","product_kind","product_type_id","prices"],"title":"PartnerCheckoutProductOption"},"PartnerCheckoutPromoDiscount":{"properties":{"promo_name":{"type":"string","title":"Promo Name","description":"Rendered promo name shown to the reseller."},"discount_percent":{"type":"number","title":"Discount Percent","description":"Promo percentage applied to the eligible base subscription amount."},"duration_months":{"type":"integer","title":"Duration Months","description":"Promo duration in months."},"discount_ex_tax":{"type":"number","title":"Discount Ex Tax","description":"Discount amount excluding tax."},"discount_tax":{"type":"number","title":"Discount Tax","description":"Tax component removed by the promo."},"discount_inc_tax":{"type":"number","title":"Discount Inc Tax","description":"Total discount including tax."}},"additionalProperties":false,"type":"object","required":["promo_name","discount_percent","duration_months","discount_ex_tax","discount_tax","discount_inc_tax"],"title":"PartnerCheckoutPromoDiscount"},"PartnerCheckoutRenewalItem":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id","description":"Subscription identifier. Use this in the update call."},"customer_id":{"type":"integer","title":"Customer Id","description":"The end customer holding this subscription."},"customer_name":{"type":"string","title":"Customer Name","description":"End customer's name."},"company":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company","description":"End customer's company name, where recorded."},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email","description":"End customer's account email."},"expiry":{"type":"string","format":"date","title":"Expiry","description":"Date the current subscription term ends."},"auto_renew_on":{"type":"boolean","title":"Auto Renew On","description":"Whether this customer's subscriptions renew automatically. Set per customer, not per subscription."},"is_monthly":{"type":"boolean","title":"Is Monthly","description":"True for a monthly billing cycle, false for annual."},"current_product_id":{"type":"integer","title":"Current Product Id","description":"Product the subscription is on for the current term."},"current_product_name":{"type":"string","title":"Current Product Name","description":"Display name of the current product."},"current_quantity":{"type":"integer","title":"Current Quantity","description":"Quantity on the current term's line."},"pending_renewal":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutRenewalPendingLine"},{"type":"null"}],"description":"The upcoming renewal line, or null when no renewal order has been prepared yet."}},"additionalProperties":false,"type":"object","required":["subscription_id","customer_id","customer_name","expiry","auto_renew_on","is_monthly","current_product_id","current_product_name","current_quantity"],"title":"PartnerCheckoutRenewalItem","description":"One of your client subscriptions and its upcoming renewal, if prepared."},"PartnerCheckoutRenewalListResponse":{"properties":{"renewals":{"items":{"$ref":"#/components/schemas/PartnerCheckoutRenewalItem"},"type":"array","title":"Renewals","description":"Client subscriptions you onboarded, oldest expiry first."},"total":{"type":"integer","title":"Total","description":"Total matching subscriptions across all pages."},"limit":{"type":"integer","title":"Limit","description":"Page size applied to this response."},"offset":{"type":"integer","title":"Offset","description":"Offset applied to this response."}},"additionalProperties":false,"type":"object","required":["renewals","total","limit","offset"],"title":"PartnerCheckoutRenewalListResponse"},"PartnerCheckoutRenewalPendingLine":{"properties":{"renewal_order_id":{"type":"integer","title":"Renewal Order Id","description":"The upcoming renewal order this line belongs to."},"order_status_id":{"type":"integer","title":"Order Status Id","description":"Status of the renewal order. Only status 1 (pending) can be edited."},"editable":{"type":"boolean","title":"Editable","description":"True when this line can still be changed. False once the renewal order has moved past pending."},"product_id":{"type":"integer","title":"Product Id","description":"Product the subscription is currently set to renew onto."},"product_name":{"type":"string","title":"Product Name","description":"Display name of that product."},"model":{"type":"string","title":"Model","description":"Product model code, e.g. REFTOTAL-005-Monthly."},"quantity":{"type":"integer","title":"Quantity","description":"Line quantity. Always 1 except on per-employee products."},"unit_price_ex_tax":{"type":"number","title":"Unit Price Ex Tax","description":"Ex-tax unit price, at your negotiated reseller rate."},"total_inc_tax":{"type":"number","title":"Total Inc Tax","description":"Line total including tax. Tax is zero for NZ."}},"additionalProperties":false,"type":"object","required":["renewal_order_id","order_status_id","editable","product_id","product_name","model","quantity","unit_price_ex_tax","total_inc_tax"],"title":"PartnerCheckoutRenewalPendingLine","description":"The main subscription line on an upcoming renewal order.\n\nA renewal order is prepared ahead of expiry: 30 days out for annual\nsubscriptions, and same-day as the previous renewal for monthly ones. Until\nthen no renewal order exists and this object is null, which means the\nrenewal product cannot be changed yet."},"PartnerCheckoutRenewalUpdateRequest":{"properties":{"renewal_product_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Renewal Product Id","description":"Product the subscription should renew onto. Must be one of the subscription products available to your account. Add-on and ad-hoc products are rejected. Omit to leave the renewal product unchanged.","examples":[280],"example":280},"auto_renew_on":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Auto Renew On","description":"Turn automatic renewal on or off. This is stored against the end customer, so it applies to every subscription they hold, not only this one. The response lists each affected subscription. Omit to leave it unchanged.","examples":[true],"example":true},"send_renewal_notification":{"type":"boolean","title":"Send Renewal Notification","description":"Whether to email you a short notification when the renewal line actually changes. Defaults to true so you hear about it. Set false for high-volume or customer-driven changes where you would rather reconcile from this response.","default":true}},"additionalProperties":false,"type":"object","title":"PartnerCheckoutRenewalUpdateRequest","description":"Change what a client renews onto, and whether they renew at all.\n\nSupply at least one of ``renewal_product_id`` or ``auto_renew_on``.\n\nChanging ``renewal_product_id`` edits the pending renewal order, so it only\nsucceeds while one exists and is still pending. This is the supported way to\nmove a client down a tier: mid-term downgrades are rejected at checkout, but\nthe tier a client renews onto is yours to set. On a monthly subscription a\nrenewal order is nearly always pending, so the change takes effect at the end\nof the current month."},"PartnerCheckoutRenewalUpdateResponse":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id","description":"Subscription that was updated."},"customer_id":{"type":"integer","title":"Customer Id","description":"End customer that holds it."},"auto_renew_on":{"type":"boolean","title":"Auto Renew On","description":"Automatic renewal state after this call."},"auto_renew_affects_subscription_ids":{"items":{"type":"integer"},"type":"array","title":"Auto Renew Affects Subscription Ids","description":"Every subscription of this customer that the auto_renew_on value applies to, because the setting is stored per customer. Includes the subscription you passed."},"renewal_order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Order Id","description":"The pending renewal order, when one exists."},"previous_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Previous Product Id","description":"Renewal product before this call."},"renewal_product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Product Id","description":"Renewal product after this call."},"renewal_product_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Renewal Product Name","description":"Display name of the renewal product."},"renewal_quantity":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Renewal Quantity","description":"Quantity on the renewal line."},"unit_price_ex_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unit Price Ex Tax","description":"Ex-tax unit price written to the line, at your negotiated rate."},"total_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Inc Tax","description":"Line total including tax."},"reseller_discount_percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Reseller Discount Percent","description":"Negotiated discount applied when pricing the line, if any."},"pending_order_changed":{"type":"boolean","title":"Pending Order Changed","description":"True when the renewal line actually differed and was rewritten."},"renewal_notification_sent":{"type":"boolean","title":"Renewal Notification Sent","description":"True when a renewal-change notification was emailed to you."}},"additionalProperties":false,"type":"object","required":["subscription_id","customer_id","auto_renew_on","auto_renew_affects_subscription_ids","pending_order_changed","renewal_notification_sent"],"title":"PartnerCheckoutRenewalUpdateResponse"},"PartnerCheckoutRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"`true` validates and prices only. `false` creates records."},"send_customer_welcome_email":{"type":"boolean","title":"Send Customer Welcome Email","description":"When true (the default), send the new customer a branded onboarding email with a password reset link. Set false to suppress it if you send your own invite — but note the customer's password is a random secret, so without this email (or your own) they cannot sign in. Ignored when `oauth_onboarding` is supplied (the magic onboarding email is sent instead).","default":true},"oauth_onboarding":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutOAuthOnboarding"},{"type":"null"}],"description":"Optional single-flow OAuth onboarding. When supplied on an execute (non-dry-run) request, the new customer is emailed a single-use, time-limited magic link that signs them in WITHOUT a password and drops them straight into your OAuth consent screen, so they authorise your integration in one flow. This REPLACES the default password-reset welcome email. The magic link is emailed only to the customer's verified address and is never returned in the API response. On a dry-run the block is validated (OAuth client, redirect_uri, scope) but no email is sent. Omit entirely for the default behaviour."},"end_customer_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"End Customer Id","description":"Optional. Order on behalf of an END CUSTOMER YOU ALREADY PROVISIONED, rather than creating a new one. Supply the `customer_id` returned by POST /api/partner-checkout/trials (or by an earlier order) to convert that customer's free trial into a paid subscription. The `customer` block is still required and its `email` must match the existing customer's email, which guards against binding an order to the wrong account. No new customer record is created; the existing billing address is updated in place. If this customer has already used their free trial month (via POST /api/partner-checkout/trials or an earlier order carrying one), no additional free month is applied on this order and a note is added to `warnings`; if they have not, `add_free_trial_month` behaves exactly as it does for a new customer - see that field. Omit for the normal new-customer flow.","examples":[91234],"example":91234},"customer":{"$ref":"#/components/schemas/PartnerCheckoutCustomerCreate"},"company":{"$ref":"#/components/schemas/PartnerCheckoutCompanyCreate"},"billing_address":{"$ref":"#/components/schemas/PartnerCheckoutBillingAddress"},"order":{"$ref":"#/components/schemas/PartnerCheckoutOrder"}},"additionalProperties":false,"type":"object","required":["dry_run","customer","company","billing_address","order"],"title":"PartnerCheckoutRequest","examples":[{"billing_address":{"address_1":"1 Eagle Street","address_2":"Level 12","city":"Brisbane","postcode":"4000","zone_code":"QLD"},"company":{"abn":"10000000000","legal_name":"Sunrise Hospitality Pty Ltd"},"customer":{"email":"alice@example.com","first_name":"Alice","last_name":"Nguyen","phone":"+61 7 3000 0000"},"dry_run":true,"order":{"client_reference":"crm-12345","extra_company_qty":2,"metadata":{"sales_rep":"jsmith","source":"partner-crm"},"product_id":243}},{"billing_address":{"address_1":"23 Customs Street East","city":"Auckland","postcode":"1010","zone_code":"AUK"},"company":{"ird_number":"49091850","legal_name":"Kiwi Payroll Ltd"},"customer":{"email":"aroha@example.co.nz","first_name":"Aroha","last_name":"Williams","phone":"+64 9 123 4567"},"dry_run":false,"order":{"client_reference":"nz-onboard-001","metadata":{"source":"partner-portal"},"product_id":243}}],"example":{"billing_address":{"address_1":"1 Eagle Street","address_2":"Level 12","city":"Brisbane","postcode":"4000","zone_code":"QLD"},"company":{"abn":"10000000000","legal_name":"Sunrise Hospitality Pty Ltd"},"customer":{"email":"alice@example.com","first_name":"Alice","last_name":"Nguyen","phone":"+61 7 3000 0000"},"dry_run":true,"order":{"client_reference":"crm-12345","extra_company_qty":2,"metadata":{"sales_rep":"jsmith","source":"partner-crm"},"product_id":243}}},"PartnerCheckoutResendOnboardingRequest":{"properties":{"oauth_onboarding":{"$ref":"#/components/schemas/PartnerCheckoutOAuthOnboarding","description":"The OAuth onboarding context used to rebuild the magic link. The original redirect_uri/scope/state are never stored, so they must be supplied again here — and are re-validated against your CURRENT OAuth client, so a deleted client or changed redirect URI fails fast rather than minting a dead link. Mirrors the `oauth_onboarding` block of POST /api/partner-checkout/orders."}},"additionalProperties":false,"type":"object","required":["oauth_onboarding"],"title":"PartnerCheckoutResendOnboardingRequest"},"PartnerCheckoutResendOnboardingResponse":{"properties":{"customer_id":{"type":"integer","title":"Customer Id","description":"The end customer the onboarding link was re-issued for."},"order_id":{"type":"integer","title":"Order Id","description":"The order the resend was requested against."},"email_sent":{"type":"boolean","title":"Email Sent","description":"Whether the onboarding email was queued. Always true on a 200 response (a send failure returns 502 and issues no new link)."},"expires_in_hours":{"type":"integer","title":"Expires In Hours","description":"Hours until the newly issued single-use magic link expires (24). Any previously issued, unused link is invalidated."},"scope_used":{"type":"string","title":"Scope Used","description":"The partner-checkout OAuth scope used to authorise this call."}},"additionalProperties":false,"type":"object","required":["customer_id","order_id","email_sent","expires_in_hours","scope_used"],"title":"PartnerCheckoutResendOnboardingResponse"},"PartnerCheckoutResolvedAddress":{"properties":{"company":{"type":"string","title":"Company","description":"Company name written onto the billing and shipping address records."},"address_1":{"type":"string","title":"Address 1","description":"Resolved billing address line 1."},"address_2":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Address 2","description":"Resolved billing address line 2."},"city":{"type":"string","title":"City","description":"Resolved billing city or locality."},"postcode":{"type":"string","title":"Postcode","description":"Resolved billing postcode."},"country_code":{"type":"string","title":"Country Code","description":"Inferred ISO country code. Derived from ABN vs IRD."},"country_id":{"type":"integer","title":"Country Id","description":"Internal country ID resolved by the API."},"country_name":{"type":"string","title":"Country Name","description":"Human-readable country name."},"zone_code":{"type":"string","title":"Zone Code","description":"Resolved state or region code."},"zone_id":{"type":"integer","title":"Zone Id","description":"Internal zone ID resolved by the API."},"zone_name":{"type":"string","title":"Zone Name","description":"Human-readable state or region name."}},"additionalProperties":false,"type":"object","required":["company","address_1","city","postcode","country_code","country_id","country_name","zone_code","zone_id","zone_name"],"title":"PartnerCheckoutResolvedAddress"},"PartnerCheckoutResolvedCompany":{"properties":{"legal_name":{"type":"string","title":"Legal Name","description":"Resolved legal company name."},"abn":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Abn","description":"Normalized ABN for AU signups."},"ird_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Ird Number","description":"Normalized employer IRD number for NZ signups."},"country_code":{"type":"string","title":"Country Code","description":"Inferred ISO country code from ABN vs IRD."},"currency_code":{"type":"string","title":"Currency Code","description":"Inferred currency for the country."}},"additionalProperties":false,"type":"object","required":["legal_name","country_code","currency_code"],"title":"PartnerCheckoutResolvedCompany"},"PartnerCheckoutResolvedCustomer":{"properties":{"first_name":{"type":"string","title":"First Name","description":"Resolved customer first name that will be used or was created."},"last_name":{"type":"string","title":"Last Name","description":"Resolved customer last name that will be used or was created."},"email":{"type":"string","format":"email","title":"Email","description":"Resolved customer email address after normalization."},"phone":{"type":"string","title":"Phone","description":"Resolved customer phone number."}},"additionalProperties":false,"type":"object","required":["first_name","last_name","email","phone"],"title":"PartnerCheckoutResolvedCustomer"},"PartnerCheckoutResponse":{"properties":{"mode":{"type":"string","enum":["preview","execute"],"title":"Mode","description":"`preview` for dry-run responses, `execute` for committed order creation."},"validated":{"type":"boolean","title":"Validated","description":"True when validation completed successfully."},"dry_run":{"type":"boolean","title":"Dry Run","description":"Echoes the request mode."},"scope_used":{"type":"string","title":"Scope Used","description":"Partner checkout scope accepted for this request."},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Non-fatal validation or pricing notes the integration should surface or log."},"customer":{"$ref":"#/components/schemas/PartnerCheckoutResolvedCustomer","description":"Resolved customer payload."},"company":{"$ref":"#/components/schemas/PartnerCheckoutResolvedCompany","description":"Resolved company payload."},"billing_address":{"$ref":"#/components/schemas/PartnerCheckoutResolvedAddress","description":"Resolved billing address, country, and zone information."},"order_lines":{"items":{"$ref":"#/components/schemas/PartnerCheckoutLineItem"},"type":"array","title":"Order Lines","description":"Final line items used for pricing and, on execute, order creation."},"totals":{"$ref":"#/components/schemas/PartnerCheckoutTotals","description":"Final totals for the checkout request."},"supplier":{"$ref":"#/components/schemas/PartnerCheckoutSupplier","description":"Supplier (Intellitron / Lightning Payroll) details for partner-issued tax invoices."},"customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Customer Id","description":"Created customer ID on execute. Null on preview."},"address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Address Id","description":"Created address ID on execute. Null on preview."},"order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Id","description":"Created order ID on execute. Null on preview."},"subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Subscription Id","description":"Created subscription ID on execute. Null on preview."},"order_status_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Status Id","description":"Final order status after execute. Typically null on preview."},"emails_sent":{"type":"boolean","title":"Emails Sent","description":"True when all checkout emails queued successfully. Order creation can still succeed when false.","default":false},"idempotency_replayed":{"type":"boolean","title":"Idempotency Replayed","description":"True when a previous execute response was returned because the same Idempotency-Key and payload were reused.","default":false},"free_trial_month_applied":{"type":"boolean","title":"Free Trial Month Applied","description":"True when a free trial month was granted on this order. False when you opted out with `add_free_trial_month: false`, or when the customer had already used their free trial month, in which case `warnings` explains it. Check this rather than assuming, so you never quote a customer 13 months and deliver 12.","default":false},"subscription_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Subscription End Date","description":"Aligned subscription expiry date when the partner requested term alignment. Null when the request used the default full-term subscription."},"prorata_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prorata Factor","description":"Pricing prorata multiplier applied to the base subscription and recurring add-ons when subscription_end_date is set. 0 means the aligned window was non-positive after the trial-month deduction and prorated lines were charged $0. Null when no term alignment was requested."}},"additionalProperties":false,"type":"object","required":["mode","validated","dry_run","scope_used","customer","company","billing_address","order_lines","totals","supplier"],"title":"PartnerCheckoutResponse"},"PartnerCheckoutSupplier":{"properties":{"name":{"type":"string","title":"Name","description":"Supplier legal name as it should appear on partner-issued invoices."},"abn":{"type":"string","title":"Abn","description":"Supplier ABN (Australian Business Number)."},"address":{"type":"string","title":"Address","description":"Supplier address as a single multi-line string."},"email":{"type":"string","title":"Email","description":"Supplier contact email."},"phone":{"type":"string","title":"Phone","description":"Supplier contact phone."}},"additionalProperties":false,"type":"object","required":["name","abn","address","email","phone"],"title":"PartnerCheckoutSupplier"},"PartnerCheckoutTotals":{"properties":{"subtotal_ex_tax":{"type":"number","title":"Subtotal Ex Tax","description":"Subtotal across all lines before tax and before promo discount."},"tax":{"type":"number","title":"Tax","description":"Total tax across all lines before promo discount."},"total_inc_tax":{"type":"number","title":"Total Inc Tax","description":"Total including tax before promo discount."},"promo_discount":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutPromoDiscount"},{"type":"null"}],"description":"Active welcome-offer promo details, if any."},"total_after_promo_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total After Promo Inc Tax","description":"Final total including tax after promo discount. Null when no promo applies."},"currency_code":{"type":"string","title":"Currency Code","description":"Currency code for the priced order, derived from the inferred country.","examples":["AUD"],"example":"AUD"},"tax_rate":{"type":"number","title":"Tax Rate","description":"Effective tax rate applied at the country level."}},"additionalProperties":false,"type":"object","required":["subtotal_ex_tax","tax","total_inc_tax","currency_code","tax_rate"],"title":"PartnerCheckoutTotals"},"PartnerCheckoutTrialCancelRequest":{"properties":{"subscription_trial_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Subscription Trial Id","description":"The subscription_trial_id to cancel.","examples":[26411],"example":26411},"reason":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Reason","description":"Optional free-text reason, stored against the trial for audit.","examples":["Provisioned against the wrong entity."],"example":"Provisioned against the wrong entity."}},"additionalProperties":false,"type":"object","required":["subscription_trial_id"],"title":"PartnerCheckoutTrialCancelRequest"},"PartnerCheckoutTrialCancelResponse":{"properties":{"subscription_trial_id":{"type":"integer","title":"Subscription Trial Id","description":"Cancelled trial record ID."},"subscription_id":{"type":"integer","title":"Subscription Id","description":"Trial subscription that was expired."},"customer_id":{"type":"integer","title":"Customer Id","description":"End-customer whose trial was cancelled."},"previous_trial_expiry":{"type":"string","format":"date","title":"Previous Trial Expiry","description":"Trial expiry before cancellation."},"trial_expiry":{"type":"string","format":"date","title":"Trial Expiry","description":"Trial expiry after cancellation. Set to yesterday so access ends immediately."},"cancelled_at":{"type":"string","format":"date-time","title":"Cancelled At","description":"When the cancellation was recorded."},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"The reason you supplied, if any."}},"additionalProperties":false,"type":"object","required":["subscription_trial_id","subscription_id","customer_id","previous_trial_expiry","trial_expiry","cancelled_at"],"title":"PartnerCheckoutTrialCancelResponse"},"PartnerCheckoutTrialListItem":{"properties":{"subscription_trial_id":{"type":"integer","title":"Subscription Trial Id","description":"Trial record ID."},"subscription_id":{"type":"integer","title":"Subscription Id","description":"Trial subscription ID."},"customer_id":{"type":"integer","title":"Customer Id","description":"End-customer ID. Pass as `end_customer_id` when converting to a paid order."},"customer_email":{"type":"string","format":"email","title":"Customer Email","description":"End-customer email."},"company_name":{"type":"string","title":"Company Name","description":"Company name captured when the trial was created."},"status":{"type":"string","enum":["active","expired","cancelled"],"title":"Status","description":"`active` while the trial runs, `cancelled` if you ended it early, `expired` once it lapsed on its own."},"trial_start_date":{"type":"string","format":"date","title":"Trial Start Date","description":"Date the trial began."},"trial_expiry":{"type":"string","format":"date","title":"Trial Expiry","description":"Last date the trial is active."},"days_remaining":{"type":"integer","title":"Days Remaining","description":"Whole days until expiry. Zero or negative once the trial has ended."},"cancelled_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Cancelled At","description":"When you cancelled the trial. Null unless status is `cancelled`."},"converted":{"type":"boolean","title":"Converted","description":"True once you have placed a paid order for this customer."},"converted_order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Converted Order Id","description":"The paid order that converted this trial, if any."}},"additionalProperties":false,"type":"object","required":["subscription_trial_id","subscription_id","customer_id","customer_email","company_name","status","trial_start_date","trial_expiry","days_remaining","converted"],"title":"PartnerCheckoutTrialListItem"},"PartnerCheckoutTrialListResponse":{"properties":{"trials":{"items":{"$ref":"#/components/schemas/PartnerCheckoutTrialListItem"},"type":"array","title":"Trials","description":"Trials you created, newest first."},"limit":{"type":"integer","title":"Limit","description":"Applied page size."},"offset":{"type":"integer","title":"Offset","description":"Applied result offset."},"total_count":{"type":"integer","title":"Total Count","description":"Total matching trials before pagination."}},"additionalProperties":false,"type":"object","required":["trials","limit","offset","total_count"],"title":"PartnerCheckoutTrialListResponse"},"PartnerCheckoutTrialRequest":{"properties":{"customer":{"$ref":"#/components/schemas/PartnerCheckoutCustomerCreate"},"company":{"$ref":"#/components/schemas/PartnerCheckoutCompanyCreate"},"billing_address":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutBillingAddress"},{"type":"null"}],"description":"Optional for a trial, since nothing is billed. Supply it to record the customer's address now; omit it and no address record is created until you place their first order."},"send_customer_welcome_email":{"type":"boolean","title":"Send Customer Welcome Email","description":"When true (the default), send the customer a branded onboarding email with a password reset link so they can sign in and start their trial. Set false only if you send your own invite - the customer's password is a random secret, so without an email they cannot sign in. Ignored when `oauth_onboarding` is supplied (the magic onboarding email is sent instead).","default":true},"oauth_onboarding":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutOAuthOnboarding"},{"type":"null"}],"description":"Optional single-flow OAuth onboarding, identical in behaviour to the order endpoint. The customer is emailed a single-use, time-limited magic link that signs them in WITHOUT a password and drops them into your OAuth consent screen. This REPLACES the password-reset welcome email. The link is emailed only to the customer's verified address and is never returned in the API response."}},"additionalProperties":false,"type":"object","required":["customer","company"],"title":"PartnerCheckoutTrialRequest","description":"Provision a free trial for an end customer. No order, no invoice, no charge.","examples":[{"company":{"abn":"10000000000","legal_name":"Sunrise Hospitality Pty Ltd"},"customer":{"email":"alice@example.com","first_name":"Alice","last_name":"Nguyen","phone":"+61 7 3000 0000"}},{"company":{"ird_number":"49091850","legal_name":"Kiwi Payroll Ltd"},"customer":{"email":"aroha@example.co.nz","first_name":"Aroha","last_name":"Williams","phone":"+64 9 123 4567"},"oauth_onboarding":{"redirect_uri":"https://partner.example.com/oauth/callback","scope":"openid payroll.write"}}],"example":{"company":{"abn":"10000000000","legal_name":"Sunrise Hospitality Pty Ltd"},"customer":{"email":"alice@example.com","first_name":"Alice","last_name":"Nguyen","phone":"+61 7 3000 0000"}}},"PartnerCheckoutTrialResponse":{"properties":{"scope_used":{"type":"string","title":"Scope Used","description":"Partner checkout scope accepted for this request."},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Non-fatal notes the integration should surface or log."},"customer_id":{"type":"integer","title":"Customer Id","description":"Created end-customer ID. Pass this back as `end_customer_id` on POST /api/partner-checkout/orders to convert the trial into a paid subscription."},"address_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Address Id","description":"Created address ID. Null when no billing_address was supplied."},"subscription_id":{"type":"integer","title":"Subscription Id","description":"Created trial subscription ID."},"subscription_trial_id":{"type":"integer","title":"Subscription Trial Id","description":"Created trial record ID. Use this to cancel the trial."},"customer_email":{"type":"string","format":"email","title":"Customer Email","description":"Normalized end-customer email."},"company":{"$ref":"#/components/schemas/PartnerCheckoutResolvedCompany","description":"Resolved company payload, including the inferred country."},"trial_start_date":{"type":"string","format":"date","title":"Trial Start Date","description":"Date the trial began."},"trial_expiry":{"type":"string","format":"date","title":"Trial Expiry","description":"Last date the trial is active. One calendar month after the start date."},"days_remaining":{"type":"integer","title":"Days Remaining","description":"Whole days until the trial expires."},"site_mode":{"type":"string","title":"Site Mode","description":"`au` or `nz`. Determines which app the customer signs in to."},"emails_sent":{"type":"boolean","title":"Emails Sent","description":"True when the onboarding email queued successfully. Trial creation can still succeed when false.","default":false},"idempotency_replayed":{"type":"boolean","title":"Idempotency Replayed","description":"True when a previous response was returned because the same Idempotency-Key and payload were reused.","default":false}},"additionalProperties":false,"type":"object","required":["scope_used","customer_id","subscription_id","subscription_trial_id","customer_email","company","trial_start_date","trial_expiry","days_remaining","site_mode"],"title":"PartnerCheckoutTrialResponse"},"PartnerCheckoutUpgradeCreditBreakdown":{"properties":{"base_credit_inc_tax":{"type":"number","title":"Base Credit Inc Tax","description":"Inc-tax credit derived from the existing base subscription's remaining value."},"add_ons_credit_inc_tax":{"type":"number","title":"Add Ons Credit Inc Tax","description":"Inc-tax credit derived from the existing eligible add-ons' remaining value."},"total_credit_inc_tax":{"type":"number","title":"Total Credit Inc Tax","description":"Sum of base + add-ons credit, before being applied to the upgrade order."},"days_remaining":{"type":"integer","title":"Days Remaining","description":"Days remaining used in the credit math (`today.diff(expiry).days + 2`, matching PHP `get_subscription_discount_days_left`)."},"billing_cycle_days":{"type":"integer","title":"Billing Cycle Days","description":"Billing cycle length in days used to compute the per-day credit rate."}},"additionalProperties":false,"type":"object","required":["base_credit_inc_tax","add_ons_credit_inc_tax","total_credit_inc_tax","days_remaining","billing_cycle_days"],"title":"PartnerCheckoutUpgradeCreditBreakdown"},"PartnerCheckoutUpgradeOrder":{"properties":{"mode":{"type":"string","enum":["base","addon","both"],"title":"Mode","description":"Upgrade mode mirroring payroll_web's store.tpl checkout UI:\n- `addon`: leave the existing base subscription and its add-ons untouched; bolt on one or more new add-ons priced prorata to the existing subscription's remaining term.\n- `base`: replace the existing base subscription with a new one. The remaining value of the existing base + existing add-ons is applied as an `upgrade_credit` discount line. Existing add-ons are NOT carried over to the new subscription unless re-listed in `add_on_product_ids`.\n- `both`: same as `base`, but the partner also chooses the final add-on set for the new subscription.","examples":["base"],"example":"base"},"new_product_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"New Product Id","description":"Subscription product ID for the new base subscription. Required for `base` and `both` modes. Must be omitted (or null) for `addon` mode.","examples":[243],"example":243},"add_on_product_ids":{"items":{"type":"integer"},"type":"array","maxItems":50,"title":"Add On Product Ids","description":"Add-on product IDs.\n- `addon` mode: the NEW add-ons to bolt onto the existing subscription. At least one required.\n- `base`/`both` mode: the FULL final add-on list for the new subscription. Existing add-ons that aren't re-listed will not be carried over to the new sub (their remaining value still contributes to the upgrade credit).","examples":[[300]],"example":[300]},"extra_company_qty":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":0.0},{"type":"null"}],"title":"Extra Company Qty","description":"Extra company slots to add to the new subscription. Valid for `base` and `both` modes only. Must be omitted (or zero) for `addon` mode.","examples":[2],"example":2},"per_employee_qty":{"anyOf":[{"type":"integer","maximum":50000.0,"minimum":1.0},{"type":"null"}],"title":"Per Employee Qty","description":"Per-employee quantity for per-employee subscription products. Required when the new product is a per-employee SKU. Must meet the partner's minimum. Valid for `base` and `both` modes only.","examples":[25],"example":25},"subscription_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Subscription End Date","description":"Optional aligned subscription expiry date for the NEW subscription (base/both modes only). Same semantics as the signup endpoint: must be strictly after today and within +365 days (annual) or +30 days (monthly). Not supported in `addon` mode (add-ons are always priced to the existing subscription's expiry).","examples":["2026-08-21"],"example":"2026-08-21"},"client_reference":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Client Reference","description":"Your internal reference for this upgrade order.","examples":["crm-upgrade-12345"],"example":"crm-upgrade-12345"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata","description":"Arbitrary key-value data stored in the order comment for auditability.","examples":[{"sales_rep":"jsmith","source":"partner-crm"}],"example":{"sales_rep":"jsmith","source":"partner-crm"}}},"additionalProperties":false,"type":"object","required":["mode"],"title":"PartnerCheckoutUpgradeOrder"},"PartnerCheckoutUpgradePreviousSubscription":{"properties":{"subscription_id":{"type":"integer","title":"Subscription Id","description":"The subscription that was the target of this upgrade."},"product_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Product Id","description":"The base product ID of the previous subscription."},"product_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Product Model","description":"The base product model code of the previous subscription."},"expiry":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Expiry","description":"Expiry date of the previous subscription at the time of the upgrade."},"days_remaining_at_upgrade":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Days Remaining At Upgrade","description":"Days remaining on the previous subscription at the time of the upgrade. Mirrors the PHP `interval.days + 2` calculation used for credit math (base/both modes), or `ceil(seconds/86400)` for addon-mode prorata."},"billing_cycle":{"anyOf":[{"type":"string","enum":["annual","monthly","other"]},{"type":"null"}],"title":"Billing Cycle","description":"Billing cycle of the previous subscription's base product."},"original_base_value_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Base Value Inc Tax","description":"Original inc-tax line total of the base subscription. Used as the denominator for the prorata credit."},"original_add_ons_value_inc_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Original Add Ons Value Inc Tax","description":"Sum of original inc-tax line totals of the existing eligible add-ons. Used for the credit denominator."}},"additionalProperties":false,"type":"object","required":["subscription_id"],"title":"PartnerCheckoutUpgradePreviousSubscription"},"PartnerCheckoutUpgradeRequest":{"properties":{"dry_run":{"type":"boolean","title":"Dry Run","description":"`true` validates and prices only. `false` creates records."},"subscription_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Subscription Id","description":"The Lightning Payroll subscription_id to upgrade. The calling partner must have originally onboarded this subscription (i.e. the source order's `other_customer_id` must equal the partner's customer_id). Look up candidate subscription_ids via GET /api/partner-checkout/orders or the order-detail endpoint.","examples":[98321],"example":98321},"order":{"$ref":"#/components/schemas/PartnerCheckoutUpgradeOrder"}},"additionalProperties":false,"type":"object","required":["dry_run","subscription_id","order"],"title":"PartnerCheckoutUpgradeRequest","examples":[{"dry_run":true,"order":{"client_reference":"crm-upgrade-12345","mode":"base","new_product_id":243},"subscription_id":98321},{"dry_run":false,"order":{"add_on_product_ids":[301],"client_reference":"crm-upgrade-12346","mode":"addon"},"subscription_id":98321},{"dry_run":true,"order":{"add_on_product_ids":[300,301],"extra_company_qty":2,"mode":"both","new_product_id":243},"subscription_id":98321}],"example":{"dry_run":true,"order":{"client_reference":"crm-upgrade-12345","mode":"base","new_product_id":243},"subscription_id":98321}},"PartnerCheckoutUpgradeResponse":{"properties":{"mode":{"type":"string","enum":["preview","execute"],"title":"Mode","description":"`preview` for dry-run responses, `execute` for committed order creation."},"upgrade_mode":{"type":"string","enum":["base","addon","both"],"title":"Upgrade Mode","description":"Echoes the request `order.mode`."},"validated":{"type":"boolean","title":"Validated","description":"True when validation completed successfully."},"dry_run":{"type":"boolean","title":"Dry Run","description":"Echoes the request mode."},"scope_used":{"type":"string","title":"Scope Used","description":"Partner checkout scope accepted for this request."},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings","description":"Non-fatal validation or pricing notes the integration should surface or log."},"customer":{"$ref":"#/components/schemas/PartnerCheckoutResolvedCustomer","description":"Resolved (existing) customer payload looked up from the target subscription."},"company":{"$ref":"#/components/schemas/PartnerCheckoutResolvedCompany","description":"Resolved (existing) company payload looked up from the target subscription."},"billing_address":{"$ref":"#/components/schemas/PartnerCheckoutResolvedAddress","description":"Resolved billing address from the existing customer's stored address."},"previous_subscription":{"$ref":"#/components/schemas/PartnerCheckoutUpgradePreviousSubscription","description":"Summary of the subscription that was upgraded."},"upgrade_credit":{"anyOf":[{"$ref":"#/components/schemas/PartnerCheckoutUpgradeCreditBreakdown"},{"type":"null"}],"description":"Credit breakdown applied to the upgrade order. Null for `addon` mode (no credit applies since the base subscription and its add-ons remain in force)."},"order_lines":{"items":{"$ref":"#/components/schemas/PartnerCheckoutLineItem"},"type":"array","title":"Order Lines","description":"Final line items used for pricing and, on execute, order creation. For addon mode, only prorated add-on lines. For base/both, the new subscription line + new add-on lines + an `upgrade_credit` negative line."},"totals":{"$ref":"#/components/schemas/PartnerCheckoutTotals","description":"Final totals for the upgrade request. Promo discounts are NEVER applied on upgrades (mirrors PHP behavior)."},"supplier":{"$ref":"#/components/schemas/PartnerCheckoutSupplier","description":"Supplier (Intellitron / Lightning Payroll) details for partner-issued tax invoices."},"order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Id","description":"Created order ID on execute. Null on preview."},"new_subscription_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"New Subscription Id","description":"ID of the newly created subscription for `base`/`both` mode. Null for `addon` mode (no new subscription row is created — only new subscription_add_on rows pointing at the existing sub)."},"new_subscription_expiry":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"New Subscription Expiry","description":"Expiry date of the new subscription for base/both mode, or the unchanged existing expiry for addon mode."},"order_status_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Order Status Id","description":"Final order status after execute. Typically null on preview."},"emails_sent":{"type":"boolean","title":"Emails Sent","description":"True when all upgrade emails queued successfully. Order creation can still succeed when false.","default":false},"idempotency_replayed":{"type":"boolean","title":"Idempotency Replayed","description":"True when a previous execute response was returned because the same Idempotency-Key and payload were reused.","default":false},"subscription_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Subscription End Date","description":"Aligned subscription expiry date when term alignment was requested (base/both modes only). Null when the request used the default full-term subscription or for addon mode."},"prorata_factor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Prorata Factor","description":"Pricing prorata multiplier applied to the new base + recurring add-ons when subscription_end_date is set. Null for addon mode and for base/both without term alignment."}},"additionalProperties":false,"type":"object","required":["mode","upgrade_mode","validated","dry_run","scope_used","customer","company","billing_address","previous_subscription","order_lines","totals","supplier"],"title":"PartnerCheckoutUpgradeResponse"},"PartnerCheckoutZoneItem":{"properties":{"zone_id":{"type":"integer","title":"Zone Id","description":"Internal zone ID."},"code":{"type":"string","title":"Code","description":"Zone code to send as `billing_address.zone_code`."},"name":{"type":"string","title":"Name","description":"Human-readable zone or state name."}},"additionalProperties":false,"type":"object","required":["zone_id","code","name"],"title":"PartnerCheckoutZoneItem"},"PartnerCheckoutZonesResponse":{"properties":{"countries":{"items":{"$ref":"#/components/schemas/PartnerCheckoutCountryItem"},"type":"array","title":"Countries","description":"Supported countries and valid zone codes for partner checkout billing addresses."}},"additionalProperties":false,"type":"object","required":["countries"],"title":"PartnerCheckoutZonesResponse"},"PartnerSessionHandoffRequest":{"properties":{"target":{"type":"string","const":"pays","title":"Target","description":"Which screen to land the user on. The release contract supports `pays`.","default":"pays"},"company_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Company Id","description":"Lightning Payroll company to open. Must be a company the token's user is allowed to access, otherwise the call is refused rather than producing a link that fails on arrival.","examples":[123],"example":123}},"type":"object","required":["company_id"],"title":"PartnerSessionHandoffRequest"},"PartnerSessionHandoffResponse":{"properties":{"signin_url":{"type":"string","title":"Signin Url","description":"Send the user's browser here as a top-level navigation. Single use, and valid for `expires_in` seconds, so redirect immediately rather than storing it or emailing it. The ticket rides in a URL fragment (`#ticket=`), never a query string, so it is not written to server access logs.","examples":["https://app.lightningpayroll.com.au/auth/partner-signin#ticket=eyJhbGciOi..."],"example":"https://app.lightningpayroll.com.au/auth/partner-signin#ticket=eyJhbGciOi..."},"expires_in":{"type":"integer","title":"Expires In","description":"Seconds until the link expires. Also dies on first use, whichever comes first.","examples":[60],"example":60},"target_path":{"type":"string","title":"Target Path","description":"The in-app path the user will land on once signed in.","examples":["/admin/pays/company/123"],"example":"/admin/pays/company/123"}},"type":"object","required":["signin_url","expires_in","target_path"],"title":"PartnerSessionHandoffResponse"},"Pay":{"properties":{"id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Id","description":"The unique identifier of the pay.","examples":[2001],"example":2001},"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employee Id","description":"The internal unique database identifier of the employee.","examples":[1234],"example":1234},"employee_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Number","description":"The user-controlled unique employee payroll number/code.","examples":["EMP001"],"example":"EMP001"},"pay_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Pay Run Id","description":"The unique identifier of the pay run associated with this pay.","examples":[1001],"example":1001},"processed_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Processed Date","description":"The date when the pay was processed.","examples":["2023-01-31"],"example":"2023-01-31"},"pay_run_end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Pay Run End Date","description":"The end date of the pay run period.","examples":["2023-01-31"],"example":"2023-01-31"},"employee_format_name_shorter":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Format Name Shorter","description":"The formatted short name of the employee (e.g., 'J. Doe').","examples":["J. Doe"],"example":"J. Doe"},"employee_last_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Last Name","description":"The last name of the employee.","examples":["Doe"],"example":"Doe"},"employee_first_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee First Name","description":"The first name of the employee.","examples":["John"],"example":"John"},"employee_email_address":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Employee Email Address","description":"The email address of the employee.","examples":["john.doe@example.com"],"example":"john.doe@example.com"},"status":{"type":"string","title":"Status","description":"The status of the pay (e.g., 'processed', 'pending').","examples":["processed"],"example":"processed"},"gross":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Gross","description":"The gross amount of the pay.","examples":[5000.0],"example":5000.0},"tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax","description":"The tax amount deducted from the pay.","examples":[1000.0],"example":1000.0},"net":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Net","description":"The net amount of the pay: `gross` minus `tax` minus any post-tax deductions.","examples":[3975.0],"example":3975.0},"super":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Super","description":"The superannuation amount associated with the pay.","examples":[500.0],"example":500.0},"total_workers_compensation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Workers Compensation","description":"The total workers' compensation amount.","examples":[200.0],"example":200.0},"resc_super_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Resc Super Amount","description":"The Reportable Employer Super Contributions (RESC) amount.","examples":[150.0],"example":150.0},"compulsory_super_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Compulsory Super Amount","description":"The compulsory superannuation amount.","examples":[350.0],"example":350.0},"nz_student_loan":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nz Student Loan","description":"NZ student loan amount for the pay. NZ only.","examples":[45.0],"example":45.0},"period_student_loan_cir":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Period Student Loan Cir","description":"NZ student loan CIR amount for the pay. NZ only.","examples":[0.0],"example":0.0},"period_student_loan_bor":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Period Student Loan Bor","description":"NZ student loan BOR amount for the pay. NZ only.","examples":[0.0],"example":0.0},"format_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Format Name","description":"The formatted full name of the employee (e.g., 'John Doe').","examples":["John Doe"],"example":"John Doe"},"is_complete":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Complete","description":"Indicates whether the pay process is complete.","examples":[true],"example":true},"stp_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stp Status","description":"The Single Touch Payroll (STP) status.","examples":["submitted"],"example":"submitted"},"stp_service_action":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stp Service Action","description":"The STP service action taken.","examples":["lodged"],"example":"lodged"},"stp_timestamp":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Stp Timestamp","description":"The timestamp when the STP action was performed.","examples":["2023-01-31"],"example":"2023-01-31"},"kiwisaver_employee_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Employee Amount","description":"Employee KiwiSaver deduction for the pay. NZ only.","examples":[75.0],"example":75.0},"kiwisaver_employer_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Employer Amount","description":"Employer KiwiSaver contribution for the pay. NZ only.","examples":[75.0],"example":75.0},"kiwisaver_esct_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Esct Amount","description":"Employer KiwiSaver ESCT amount for the pay. NZ only.","examples":[7.5],"example":7.5},"kiwisaver_paye_gross_uplift":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Paye Gross Uplift","description":"PAYE gross-up used for KiwiSaver calculations. NZ only.","examples":[0.0],"example":0.0},"kiwisaver_employee_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Employee Rate","description":"Employee KiwiSaver rate used for the pay. NZ only.","examples":[0.03],"example":0.03},"kiwisaver_employer_rate":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Kiwisaver Employer Rate","description":"Employer KiwiSaver rate used for the pay. NZ only.","examples":[0.03],"example":0.03},"total_kiwi_saver":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Kiwi Saver","description":"Combined employee and employer KiwiSaver amount for the pay. NZ only.","examples":[150.0],"example":150.0},"tax_plus_student_loan":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Plus Student Loan","description":"Combined PAYE tax and NZ student loan amount for the pay. NZ only.","examples":[1045.0],"example":1045.0},"hours":{"items":{"$ref":"#/components/schemas/HoursOut"},"type":"array","title":"Hours","description":"A list of pay hours associated with this pay, including description, rate, units, overtime status, and value.","examples":[[{"description":"Ordinary Time","id":1,"is_overtime":false,"pay_amount":"1125.00","rate":"30.00","units":"hours","value":"37.5"},{"description":"Saturday Overtime","id":2,"is_overtime":true,"pay_amount":"225.00","rate":"45.00","units":"hours","value":"5.0"}]],"example":[{"description":"Ordinary Time","id":1,"is_overtime":false,"pay_amount":"1125.00","rate":"30.00","units":"hours","value":"37.5"},{"description":"Saturday Overtime","id":2,"is_overtime":true,"pay_amount":"225.00","rate":"45.00","units":"hours","value":"5.0"}]},"leave":{"items":{"$ref":"#/components/schemas/LeaveOut"},"type":"array","title":"Leave","description":"A list of leave hours associated with this pay, including description, leave type, rate, value, and optional leave loading amount. Leave types can include: HOLIDAY, SICK, LONG SERVICE, PAID PARENTAL, EMPLOYER FUNDED PAID PARENTAL, WORKERS COMP, COMPASSIONATE, ANCILLARY, PAID PUBLIC HOLIDAY, UNPAID, OTHER.","examples":[[{"amount":"288.80","hours":"7.6","id":10,"leave_loading_amount":"3.80","leave_type":"HOLIDAY","name":"Annual Leave","rate":"38.00"}]],"example":[{"amount":"288.80","hours":"7.6","id":10,"leave_loading_amount":"3.80","leave_type":"HOLIDAY","name":"Annual Leave","rate":"38.00"}]},"leave_balance_rows":{"items":{"$ref":"#/components/schemas/LeaveBalanceRow-Output"},"type":"array","title":"Leave Balance Rows","description":"A list of leave balance rows associated with this pay, showing the employee's leave balances.","examples":[[{"hours":"120.00","leave_type":"annual","name":"Annual Leave"},{"hours":"80.00","leave_type":"sick","name":"Personal Leave"}]],"example":[{"hours":"120.00","leave_type":"annual","name":"Annual Leave"},{"hours":"80.00","leave_type":"sick","name":"Personal Leave"}]},"allowances":{"items":{"$ref":"#/components/schemas/PayAllowance-Output"},"type":"array","title":"Allowances","description":"A list of allowances included in this pay. `amount` is the per-unit rate, `units` is the quantity, and `total_amount` is the resulting line total rounded to 2 decimal places.","examples":[[{"allowance_category":"TD","amount":"50.00","description":"Tool Allowance","is_included_in_super_calculations":true,"is_itemised":false,"is_taxable":true,"total_amount":"50.00","units":"1"},{"allowance_category":"LD","amount":"5.00","description":"Laundry Allowance","is_included_in_super_calculations":true,"is_itemised":false,"is_taxable":true,"total_amount":"15.00","units":"3"}]],"example":[{"allowance_category":"TD","amount":"50.00","description":"Tool Allowance","is_included_in_super_calculations":true,"is_itemised":false,"is_taxable":true,"total_amount":"50.00","units":"1"},{"allowance_category":"LD","amount":"5.00","description":"Laundry Allowance","is_included_in_super_calculations":true,"is_itemised":false,"is_taxable":true,"total_amount":"15.00","units":"3"}]},"deductions":{"items":{"$ref":"#/components/schemas/PayDeduction-Output"},"type":"array","title":"Deductions","description":"A list of deductions applied to this pay, each with a description and amount.","examples":[[{"amount":"25.00","description":"Union Fees","is_included_in_super_calculations":false}]],"example":[{"amount":"25.00","description":"Union Fees","is_included_in_super_calculations":false}]},"bonuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayBonus-Output"},"type":"array"},{"type":"null"}],"title":"Bonuses","description":"A list of bonuses included in this pay, each with a description and amount.","examples":[[{"amount":"500.00","description":"Performance Bonus","end_date":"2023-01-31","is_directors_fees":false,"is_included_in_super_calculations":true,"is_return_to_work":false,"start_date":"2023-01-01","tax_method":"NORMAL_EARNINGS"}]],"example":[{"amount":"500.00","description":"Performance Bonus","end_date":"2023-01-31","is_directors_fees":false,"is_included_in_super_calculations":true,"is_return_to_work":false,"start_date":"2023-01-01","tax_method":"NORMAL_EARNINGS"}]},"pay_sacrifices":{"anyOf":[{"items":{"$ref":"#/components/schemas/PaySacrifice-Output"},"type":"array"},{"type":"null"}],"title":"Pay Sacrifices","description":"A list of salary sacrifices associated with this pay, each with an amount.","examples":[[{"amount":"150.00","description":"Car Salary Sacrifice","is_included_in_super_calculations":true,"is_super":true}]],"example":[{"amount":"150.00","description":"Car Salary Sacrifice","is_included_in_super_calculations":true,"is_super":true}]},"pay_department":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Pay Department","description":"Single department name applied to this pay and all of its items. Send it back when updating a pay that has one, or the update is refused rather than dropping the department.","examples":["Engineering"],"example":"Engineering"},"back_payments":{"anyOf":[{"items":{"$ref":"#/components/schemas/BackPayments-Output"},"type":"array"},{"type":"null"}],"title":"Back Payments","description":"A list of back payments associated with this pay.","examples":[[{"amount":"200.00","description":"Back Pay Adjustment","end_date":"2023-01-31","start_date":"2023-01-01","stp_category":"GROSS","tax_method":"NORMAL_EARNINGS"}]],"example":[{"amount":"200.00","description":"Back Pay Adjustment","end_date":"2023-01-31","start_date":"2023-01-01","stp_category":"GROSS","tax_method":"NORMAL_EARNINGS"}]},"termination":{"anyOf":[{"$ref":"#/components/schemas/Termination"},{"type":"null"}],"description":"The termination recorded on this pay, if it is the employee's final pay. Every amount is Lightning Payroll's calculated result. `total_amount` is already included in this pay's `gross`."}},"type":"object","required":["status","hours","leave","leave_balance_rows","allowances","deductions"],"title":"Pay"},"PayAllowance-Input":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the allowance.\nRequired when creating or matching an allowance.","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"The dollar amount for ONE unit of the allowance (shown as 'Amount p/unit' in Lightning Payroll).\nWith `units` omitted or set to 1 this is simply the total for the line.\nRequired when creating a new allowance (or if no allowance matches the description). May be omitted when reusing an existing allowance matched by description.","examples":["5.00"],"example":"5.00"},"units":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Units","description":"How many units of the allowance to pay. Defaults to 1 when omitted, and must be greater than 0.\nThis is a NUMERIC QUANTITY, not a unit-of-measure label: do not confuse it with the `units` field on an hours row, which is text such as 'hours'.\nThree laundry allowances at $5.00 each is `amount` 5.00 with `units` 3, for a `total_amount` of 15.00. A flat $15.00 is `amount` 15.00 with `units` omitted.\nQuantities below 1 do not scale the amount down; Lightning Payroll only multiplies when `units` is greater than 1.","default":1.0,"examples":["3"],"example":"3"},"total_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Total Amount","description":"READ-ONLY. The line total (`amount` * `units`), rounded to 2 decimal places. Returned on pay responses and ignored if you send it.\nEach line is rounded on its own, so with a per-unit rate carrying more than 2 decimal places these line totals can differ by a cent from the pay's own allowance total, which Lightning Payroll sums first and rounds once.","examples":["15.00"],"example":"15.00"},"allowance_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowance Category","description":"Required allowance category code (e.g. 'TD' for Tools). Only codes are accepted. Codes are required when creating a new allowance; you may omit this when reusing an existing allowance that already has a code. Codes: AD, CD, KN, LD, MD, OD, QN, RD, TD. (Labels for reference: Cents per KM, Award Transport, Laundry, Overtime Meals, Domestic & Overseas Travel/Accommodation, Tools, Tasks, Qualifications/Certificates, Other)","examples":["TD"],"example":"TD"},"is_taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Taxable","description":"Whether the allowance is taxable.\n- Defaults to True when creating a new employee allowance.\n","examples":[true],"example":true},"is_itemised":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Itemised","description":"Whether the allowance is itemised on the pay.\n- Defaults to False when creating a new employee allowance.\n","examples":[false],"example":false},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this allowance is included in superannuation calculations.\n- Defaults to True when creating a new employee allowance.\n","examples":[true],"example":true}},"additionalProperties":false,"type":"object","required":["description"],"title":"PayAllowance"},"PayAllowance-Output":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the allowance.\nRequired when creating or matching an allowance.","examples":["Tool Allowance"],"example":"Tool Allowance"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"The dollar amount for ONE unit of the allowance (shown as 'Amount p/unit' in Lightning Payroll).\nWith `units` omitted or set to 1 this is simply the total for the line.\nRequired when creating a new allowance (or if no allowance matches the description). May be omitted when reusing an existing allowance matched by description.","examples":[5.0],"example":5.0},"units":{"type":"number","title":"Units","description":"How many units of the allowance to pay. Defaults to 1 when omitted, and must be greater than 0.\nThis is a NUMERIC QUANTITY, not a unit-of-measure label: do not confuse it with the `units` field on an hours row, which is text such as 'hours'.\nThree laundry allowances at $5.00 each is `amount` 5.00 with `units` 3, for a `total_amount` of 15.00. A flat $15.00 is `amount` 15.00 with `units` omitted.\nQuantities below 1 do not scale the amount down; Lightning Payroll only multiplies when `units` is greater than 1.","default":1.0,"examples":[3],"example":3},"total_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Amount","description":"READ-ONLY. The line total (`amount` * `units`), rounded to 2 decimal places. Returned on pay responses and ignored if you send it.\nEach line is rounded on its own, so with a per-unit rate carrying more than 2 decimal places these line totals can differ by a cent from the pay's own allowance total, which Lightning Payroll sums first and rounds once.","examples":[15.0],"example":15.0},"allowance_category":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Allowance Category","description":"Required allowance category code (e.g. 'TD' for Tools). Only codes are accepted. Codes are required when creating a new allowance; you may omit this when reusing an existing allowance that already has a code. Codes: AD, CD, KN, LD, MD, OD, QN, RD, TD. (Labels for reference: Cents per KM, Award Transport, Laundry, Overtime Meals, Domestic & Overseas Travel/Accommodation, Tools, Tasks, Qualifications/Certificates, Other)","examples":["TD"],"example":"TD"},"is_taxable":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Taxable","description":"Whether the allowance is taxable.\n- Defaults to True when creating a new employee allowance.\n","examples":[true],"example":true},"is_itemised":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Itemised","description":"Whether the allowance is itemised on the pay.\n- Defaults to False when creating a new employee allowance.\n","examples":[false],"example":false},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this allowance is included in superannuation calculations.\n- Defaults to True when creating a new employee allowance.\n","examples":[true],"example":true}},"additionalProperties":false,"type":"object","required":["description"],"title":"PayAllowance"},"PayBonus-Input":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"The dollar amount for the bonus.\nRequired when creating a new bonus (or if no bonus matches the description). May be omitted when reusing an existing bonus matched by description.","examples":["100.00"],"example":"100.00"},"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the bonus.\nRequired when creating or matching a bonus.","examples":["Performance Bonus"],"example":"Performance Bonus"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The start date for the bonus period. Required when tax_method uses a specific date range.","examples":["2023-01-01"],"example":"2023-01-01"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"The end date for the bonus period. Required when tax_method uses a specific date range.","examples":["2023-01-31"],"example":"2023-01-31"},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this bonus is included in superannuation calculations.\n- Defaults to True when creating a new employee bonus.\n","examples":[true],"example":true},"is_directors_fees":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Directors Fees","description":"Indicates if the bonus is for director's fees.","examples":[false],"example":false},"is_return_to_work":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Return To Work","description":"Indicates if the bonus is a return to work bonus.","examples":[false],"example":false},"is_nz_ess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Nz Ess","description":"Whether this bonus is an NZ employee share scheme amount. NZ only.","examples":[false],"example":false},"is_nz_ess_cash_settled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Nz Ess Cash Settled","description":"Whether the NZ ESS amount is cash settled. NZ only.","examples":[false],"example":false},"withhold_paye":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Withhold Paye","description":"Whether PAYE should be withheld for this NZ bonus. NZ only.","examples":[true],"example":true},"tax_as_nz_extra_pay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tax As Nz Extra Pay","description":"Whether to tax this bonus as NZ extra pay. NZ only.","examples":[false],"example":false},"is_nz_discretionary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Nz Discretionary","description":"Whether this NZ bonus is discretionary and excluded from holiday pay gross earnings. NZ only.","examples":[false],"example":false},"tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Method","description":"The tax calculation method for the bonus. Provide the *code* (e.g. 'NORMAL_EARNINGS'); docs display the readable labels. Allowed codes with labels: NORMAL_EARNINGS = As normal earnings; SPREAD_OVER_SPECIFIC_RANGE = Use date range; SPREAD_OVER_FINANCIAL_YEAR = Over this financial year; METHOD_A_WHOLE_YEAR = Method A (Whole Year); METHOD_A_SPECIFIC_RANGE = Method A (Use Date Range); METHOD_B1 = Method B(i)(Use Date Range); METHOD_B2 = Method B(ii)(Whole Year).","examples":["NORMAL_EARNINGS"],"example":"NORMAL_EARNINGS"}},"additionalProperties":false,"type":"object","required":["description"],"title":"PayBonus"},"PayBonus-Output":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"The dollar amount for the bonus.\nRequired when creating a new bonus (or if no bonus matches the description). May be omitted when reusing an existing bonus matched by description.","examples":[100.0],"example":100.0},"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the bonus.\nRequired when creating or matching a bonus.","examples":["Performance Bonus"],"example":"Performance Bonus"},"start_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Start Date","description":"The start date for the bonus period. Required when tax_method uses a specific date range.","examples":["2023-01-01"],"example":"2023-01-01"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date","description":"The end date for the bonus period. Required when tax_method uses a specific date range.","examples":["2023-01-31"],"example":"2023-01-31"},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this bonus is included in superannuation calculations.\n- Defaults to True when creating a new employee bonus.\n","examples":[true],"example":true},"is_directors_fees":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Directors Fees","description":"Indicates if the bonus is for director's fees.","examples":[false],"example":false},"is_return_to_work":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Return To Work","description":"Indicates if the bonus is a return to work bonus.","examples":[false],"example":false},"is_nz_ess":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Nz Ess","description":"Whether this bonus is an NZ employee share scheme amount. NZ only.","examples":[false],"example":false},"is_nz_ess_cash_settled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Nz Ess Cash Settled","description":"Whether the NZ ESS amount is cash settled. NZ only.","examples":[false],"example":false},"withhold_paye":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Withhold Paye","description":"Whether PAYE should be withheld for this NZ bonus. NZ only.","examples":[true],"example":true},"tax_as_nz_extra_pay":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Tax As Nz Extra Pay","description":"Whether to tax this bonus as NZ extra pay. NZ only.","examples":[false],"example":false},"is_nz_discretionary":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Nz Discretionary","description":"Whether this NZ bonus is discretionary and excluded from holiday pay gross earnings. NZ only.","examples":[false],"example":false},"tax_method":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tax Method","description":"The tax calculation method for the bonus. Provide the *code* (e.g. 'NORMAL_EARNINGS'); docs display the readable labels. Allowed codes with labels: NORMAL_EARNINGS = As normal earnings; SPREAD_OVER_SPECIFIC_RANGE = Use date range; SPREAD_OVER_FINANCIAL_YEAR = Over this financial year; METHOD_A_WHOLE_YEAR = Method A (Whole Year); METHOD_A_SPECIFIC_RANGE = Method A (Use Date Range); METHOD_B1 = Method B(i)(Use Date Range); METHOD_B2 = Method B(ii)(Whole Year).","examples":["NORMAL_EARNINGS"],"example":"NORMAL_EARNINGS"}},"additionalProperties":false,"type":"object","required":["description"],"title":"PayBonus"},"PayCreate":{"properties":{"employee_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Employee Id","description":"The internal Lightning Payroll (LP) unique ID for the employee. Use this if `identifier_type=employee_id`.","examples":[1234],"example":1234},"employee_number":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Employee Number","description":"The external user-controlled employee number. Required only if `identifier_type=employee_number`. Must be unique across ALL companies.","examples":["EMP001"],"example":"EMP001"},"hours":{"items":{"$ref":"#/components/schemas/PayHours"},"type":"array","title":"Hours","description":"Optional list of pay hour items (may be empty), including description, rate, multiplier, or pay-rate mapping keys (`rate_reference` / `rate_description`), units, overtime status, and value.","examples":[[{"description":"Ordinary Time","is_overtime":false,"rate":"30.00","units":"hours","value":"37.5"},{"description":"Saturday Overtime","is_overtime":true,"multiplier":"1.5","units":"hours","value":"5.0"},{"description":"Ordinary Time","rate_reference":"system:ordinary_time","units":"hours","value":"7.6"}]],"example":[{"description":"Ordinary Time","is_overtime":false,"rate":"30.00","units":"hours","value":"37.5"},{"description":"Saturday Overtime","is_overtime":true,"multiplier":"1.5","units":"hours","value":"5.0"},{"description":"Ordinary Time","rate_reference":"system:ordinary_time","units":"hours","value":"7.6"}]},"leave":{"items":{"$ref":"#/components/schemas/Leave"},"type":"array","title":"Leave","description":"Optional list of leave items (may be empty), including description, leave type, rate/multiplier, hours, date, and optional leave loading amount. `rate` is optional; when omitted the employee's pay_rate_per_hour is used.","examples":[[{"date":"2023-01-01","description":"Annual Leave","hours":"7.6","leave_loading_amount":"3.80","leave_type":"HOLIDAY","multiplier":"1.0"}]],"example":[{"date":"2023-01-01","description":"Annual Leave","hours":"7.6","leave_loading_amount":"3.80","leave_type":"HOLIDAY","multiplier":"1.0"}]},"pay_department":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Pay Department","description":"Department/Cost-centre name or code to be applied to all items in this entire pay. ","examples":["Engineering"],"example":"Engineering"},"allowances":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayAllowance-Input"},"type":"array"},{"type":"null"}],"title":"Allowances","description":"A list of allowances to be included in the pay.\n\nUsage rules:\n- IDs are not accepted; providing an `id` will raise a 400 Bad Request because it's a forbidden field. Match allowances by `description` instead.\n- The API will attempt to find an existing allowance for the employee with the same `description`.\n  - If a match is found, that allowance will be reused and creation-only required fields can be omitted (e.g. `amount`, `allowance_category`—existing values are reused).\n  - If no match is found, a NEW allowance will be created for this employee. In this case, `description`, `amount` and `allowance_category` (code) are REQUIRED.\n    • `allowance_category` must be one of the codes: AD, CD, KN, LD, MD, OD, QN, RD, TD (labels for reference: Cents per KM, Award Transport, Laundry, Overtime Meals, Domestic & Overseas Travel/Accommodation, Tools, Tasks, Qualifications/Certificates, Other). Only codes are accepted for new allowances.     • `is_taxable` defaults to True if not supplied.\n    • `is_itemised` defaults to False if not supplied.\n    • `is_included_in_super_calculations` defaults to True if not supplied.\n- `amount` is the PER-UNIT rate and `units` is the quantity (default 1). Three laundry allowances at $5.00 each is `amount` 5.00 with `units` 3, giving a 15.00 line total; a flat $15.00 is `amount` 15.00 with `units` omitted.\n- `total_amount` is read-only. It is returned on pay responses and ignored if you send it.","examples":[[{"allowance_category":"TD","amount":"50.00","description":"Tool Allowance"},{"allowance_category":"LD","amount":"5.00","description":"Laundry Allowance","units":"3"},{"allowance_category":"RD","amount":"200.00","description":"Car Allowance","is_included_in_super_calculations":false,"is_itemised":true,"is_taxable":true}]],"example":[{"allowance_category":"TD","amount":"50.00","description":"Tool Allowance"},{"allowance_category":"LD","amount":"5.00","description":"Laundry Allowance","units":"3"},{"allowance_category":"RD","amount":"200.00","description":"Car Allowance","is_included_in_super_calculations":false,"is_itemised":true,"is_taxable":true}]},"deductions":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayDeduction-Input"},"type":"array"},{"type":"null"}],"title":"Deductions","description":"A list of deductions to be included in the pay.\n\nUsage rules:\n- IDs are not accepted; providing an `id` will raise a 400 Bad Request because it's a forbidden field. Match deductions by `description` instead.\n- The API will attempt to find an existing deduction for the employee with the same `description`.\n  - If a match is found, that deduction will be reused and creation-only required fields can be omitted (e.g. `amount`, `classification`—existing values are reused).\n  - If no match is found, a NEW deduction will be created for this employee. In this case, `description`, `amount`, and `classification` (code) are REQUIRED.\n    • `classification` must be one of: CHARITY, CHILD_SUPPORT_DEDUCTION, CHILD_SUPPORT_GARNISHEE, NORMAL, UNION_FEES. Only codes are accepted for new deductions.\n    • `is_included_in_super_calculations` defaults to True if not supplied.\n- OMIT this field and the employee's standing deductions are applied for you, exactly as they are when Lightning Payroll creates the pay: every deduction the customer set to auto apply, priced off this pay's gross or net where the deduction is a percentage, and capped by any limit set on it. That is how union fees and child support keep coming out of a pay created here.\n- SEND a list to own this pay's deductions instead, and nothing is copied. Send `[]` for a pay that is to have no deductions at all.","examples":[[{"amount":"25.00","classification":"UNION_FEES","description":"Union Fees"},{"amount":"100.00","classification":"NORMAL","description":"Health Insurance","is_included_in_super_calculations":false}]],"example":[{"amount":"25.00","classification":"UNION_FEES","description":"Union Fees"},{"amount":"100.00","classification":"NORMAL","description":"Health Insurance","is_included_in_super_calculations":false}]},"bonuses":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayBonus-Input"},"type":"array"},{"type":"null"}],"title":"Bonuses","description":"A list of bonuses to be included in the pay.\n\nUsage rules:\n- IDs are not accepted; providing an `id` will raise a 400 Bad Request because it's a forbidden field. Match bonuses by `description` instead.\n- The API will attempt to find an existing bonus for the employee with the same `description`.\n  - If a match is found, that bonus will be reused and creation-only required fields can be omitted (e.g. `amount`, `tax_method`, and any range dates—existing values are reused).\n  - If no match is found, a NEW bonus will be created for this employee. In this case, `description`, `amount`, and `tax_method` are REQUIRED.\n    • `tax_method` must be one of: NORMAL_EARNINGS = As normal earnings; SPREAD_OVER_SPECIFIC_RANGE = Use date range; SPREAD_OVER_FINANCIAL_YEAR = Over this financial year; METHOD_A_WHOLE_YEAR = Method A (Whole Year); METHOD_A_SPECIFIC_RANGE = Method A (Use Date Range); METHOD_B1 = Method B(i)(Use Date Range); METHOD_B2 = Method B(ii)(Whole Year) (send the *code*, docs show the labels). Defaults to 'NORMAL_EARNINGS' if not supplied.\n    • If `tax_method` is a date-range method, `start_date` and `end_date` are REQUIRED.\n    • `is_included_in_super_calculations` defaults to True if not supplied.\n    • `is_directors_fees` defaults to False if not supplied.\n    • `is_return_to_work` defaults to False if not supplied.","examples":[[{"amount":"500.00","description":"Performance Bonus","tax_method":"NORMAL_EARNINGS"},{"amount":"1000.00","description":"Director's Fee","end_date":"2023-01-31","is_directors_fees":true,"is_included_in_super_calculations":false,"is_return_to_work":false,"start_date":"2023-01-01","tax_method":"SPREAD_OVER_SPECIFIC_RANGE"}]],"example":[{"amount":"500.00","description":"Performance Bonus","tax_method":"NORMAL_EARNINGS"},{"amount":"1000.00","description":"Director's Fee","end_date":"2023-01-31","is_directors_fees":true,"is_included_in_super_calculations":false,"is_return_to_work":false,"start_date":"2023-01-01","tax_method":"SPREAD_OVER_SPECIFIC_RANGE"}]},"pay_sacrifices":{"anyOf":[{"items":{"$ref":"#/components/schemas/PaySacrifice-Input"},"type":"array"},{"type":"null"}],"title":"Pay Sacrifices","description":"A list of pay sacrifices to be included in the pay.\n\nUsage rules:\n- IDs are not accepted; providing an `id` will raise a 400 Bad Request because it's a forbidden field. Match pay sacrifices by `description` instead.\n- The API will attempt to find an existing pay sacrifice for the employee with the same `description`.\n  - If a match is found, that pay sacrifice will be reused and creation-only required fields can be omitted (e.g. `amount`—existing values are reused).\n  - If no match is found, a NEW pay sacrifice will be created for this employee. In this case,    `description` and `amount` are REQUIRED.\n    • `is_included_in_super_calculations` defaults to True if not supplied.\n    • `is_super` defaults to True if not supplied.\n- OMIT this field and the employee's standing salary sacrifices are applied for you, exactly as they are when Lightning Payroll creates the pay, priced off this pay's gross where the sacrifice is a percentage, and they reduce the taxable gross and feed RESC as usual.\n- SEND a list to own this pay's salary sacrifices instead, and nothing is copied. Send `[]` for a pay that is to have none.","examples":[[{"description":"Laptop Salary Sacrifice"},{"amount":"300.00","description":"Car Salary Sacrifice","is_included_in_super_calculations":false,"is_super":true}]],"example":[{"description":"Laptop Salary Sacrifice"},{"amount":"300.00","description":"Car Salary Sacrifice","is_included_in_super_calculations":false,"is_super":true}]},"back_payments":{"anyOf":[{"items":{"$ref":"#/components/schemas/BackPayments-Input"},"type":"array"},{"type":"null"}],"title":"Back Payments","description":"A list of back payments to be included in the pay.\n\nUsage rules:\n- IDs are not accepted; providing an `id` will raise a 400 Bad Request because it's a forbidden field. Match back payments by `description` and `amount` instead.\n- The API will attempt to find an existing back payment for the employee with the same `description` and `amount`.\n  - If a match is found, that back payment will be reused.\n  - If no match is found, a NEW back payment will be created for this employee. In this case, `description`, `amount`, and `stp_category` (code, underscored) are REQUIRED.\n    • `stp_category` must be one of: BONUS_COMMISSION_NON_DIRECTOR_S_FEES, DIRECTOR_S_FEES, GROSS, ITEMISED_ALLOWANCESAD, ITEMISED_ALLOWANCESCD, ITEMISED_ALLOWANCESKN, ITEMISED_ALLOWANCESLD, ITEMISED_ALLOWANCESMD, ITEMISED_ALLOWANCESOD, ITEMISED_ALLOWANCESQN, ITEMISED_ALLOWANCESRD, ITEMISED_ALLOWANCESTD, LEAVEA, LEAVEC, LEAVEO, LEAVEP, LEAVEU, LEAVEW, OVERTIME, UNCLASSIFIED. Only codes are accepted for new back payments.\n    • `tax_method`, `start_date`, and `end_date` are optional.","examples":[[{"amount":"200.00","description":"Back Pay Adjustment","end_date":"2023-01-31","start_date":"2023-01-01","stp_category":"GROSS","tax_method":"NORMAL_EARNINGS"}]],"example":[{"amount":"200.00","description":"Back Pay Adjustment","end_date":"2023-01-31","start_date":"2023-01-01","stp_category":"GROSS","tax_method":"NORMAL_EARNINGS"}]},"termination":{"anyOf":[{"$ref":"#/components/schemas/TerminationCreate"},{"type":"null"}],"description":"Include this to make the pay the employee's final pay and end their employment.\n\nLightning Payroll adds the unused leave payouts and their tax on top of whatever else the pay carries, and the employee is terminated when the pay is created, since pays created here are processed straight away. Read the calculated result back from `termination` on the response, or from `GET /api/employees/{employee_id}/termination`.\n\nThe fields differ by country: send the Australian ones for an Australian company and the New Zealand ones for a New Zealand company. Sending the wrong country's field is refused rather than ignored.\n\nUse `POST /api/employees/{employee_id}/terminate` instead when there is nothing else on the final pay.","examples":[{"cessation_type_code":"V","reason":"TERMINATION","termination_date":"2026-09-11"}],"example":{"cessation_type_code":"V","reason":"TERMINATION","termination_date":"2026-09-11"}}},"type":"object","title":"PayCreate"},"PayDeduction-Input":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the deduction.\nRequired when creating or matching a deduction.","examples":["Union Fees"],"example":"Union Fees"},"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"The dollar amount for the deduction.\nRequired when creating a new deduction (or if no deduction matches the description). May be omitted when reusing an existing deduction matched by description.","examples":["25.00"],"example":"25.00"},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"Deduction classification code (use underscores). Codes are required when creating a new deduction; you may omit when reusing an existing deduction. Codes: CHARITY, CHILD_SUPPORT_DEDUCTION, CHILD_SUPPORT_GARNISHEE, NORMAL, UNION_FEES.","examples":["UNION_FEES"],"example":"UNION_FEES"},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this deduction affects superannuation calculations.\n- Defaults to True when creating a new deduction.\n","examples":[false],"example":false}},"additionalProperties":false,"type":"object","required":["description"],"title":"PayDeduction"},"PayDeduction-Output":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the deduction.\nRequired when creating or matching a deduction.","examples":["Union Fees"],"example":"Union Fees"},"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"The dollar amount for the deduction.\nRequired when creating a new deduction (or if no deduction matches the description). May be omitted when reusing an existing deduction matched by description.","examples":[25.0],"example":25.0},"classification":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Classification","description":"Deduction classification code (use underscores). Codes are required when creating a new deduction; you may omit when reusing an existing deduction. Codes: CHARITY, CHILD_SUPPORT_DEDUCTION, CHILD_SUPPORT_GARNISHEE, NORMAL, UNION_FEES.","examples":["UNION_FEES"],"example":"UNION_FEES"},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this deduction affects superannuation calculations.\n- Defaults to True when creating a new deduction.\n","examples":[false],"example":false}},"additionalProperties":false,"type":"object","required":["description"],"title":"PayDeduction"},"PayHours":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the pay hours.","examples":["Regular Hours, KMs, Overtime, Saturday, etc."],"example":"Regular Hours, KMs, Overtime, Saturday, etc."},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for the pay hours row, such as hourly rate, per kilometre rate, etc. Provide either `rate` or `multiplier`.","examples":["30.00"],"example":"30.00"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Multiplier","description":"Alternative to `rate`. Multiplies the employee's pay_rate_per_hour (e.g., 1.5 for time-and-a-half, 2.0 for double time). Mutually exclusive with `rate` - supply one or the other, never both."},"rate_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Reference","description":"Optional stable pay-rate reference from `GET /api/employees/{employee_id}/pay-rates` (for example `system:ordinary_time`, `employee:42`, `company:73`). Use as an alternative to sending a raw `rate`.","examples":["company:73"],"example":"company:73"},"rate_description":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Rate Description","description":"Optional pay-rate description to resolve a rate by description for this employee. Use when you do not send `rate`. If multiple rates share the same description, the API will return a validation error and require `rate_reference`.","examples":["Ordinary Time"],"example":"Ordinary Time"},"units":{"type":"string","maxLength":32,"minLength":0,"title":"Units","description":"The type of units for the pay hours row, such as hours, kilometres, buckets, etc.","examples":["hours"],"example":"hours"},"is_overtime":{"type":"boolean","title":"Is Overtime","description":"Indicates whether the hours are overtime hours, which affects super guarantee calculations.","default":false,"examples":[false],"example":false},"value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Value","description":"The number of units for the pay hours row, such as hours worked, kilometres driven, etc.","examples":["37.5"],"example":"37.5"}},"type":"object","required":["description","units","value"],"title":"PayHours"},"PayHoursBase":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","examples":["Ordinary Time"],"example":"Ordinary Time"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this hours row. Provide either `rate` or `multiplier`.","examples":["30.00"],"example":"30.00"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Multiplier","description":"Alternative to `rate`. Multiplies the employee's pay_rate_per_hour (e.g., 1.5 for time-and-a-half, 2.0 for double time). Mutually exclusive with `rate` - supply one or the other, never both."},"rate_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Reference","description":"Optional stable pay-rate reference from `GET /api/employees/{employee_id}/pay-rates` (for example `system:ordinary_time`, `employee:42`, `company:73`). Use as an alternative to sending a raw `rate`.","examples":["employee:42"],"example":"employee:42"},"rate_description":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Rate Description","description":"Optional pay-rate description to resolve a rate by description for this employee. Use when you do not send `rate`. If multiple rates share the same description, the API will return a validation error and require `rate_reference`.","examples":["Ordinary Time"],"example":"Ordinary Time"},"units":{"type":"string","maxLength":32,"minLength":0,"title":"Units","examples":["hours"],"example":"hours"},"is_overtime":{"type":"boolean","title":"Is Overtime","default":false,"examples":[false],"example":false},"value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Value","examples":["37.5"],"example":"37.5"}},"type":"object","required":["description","units","value"],"title":"PayHoursBase"},"PayHoursUpdate":{"properties":{"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","examples":["Ordinary Time"],"example":"Ordinary Time"},"rate":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Rate","description":"The dollar amount per unit for this hours row. Provide either `rate` or `multiplier`.","examples":["30.00"],"example":"30.00"},"multiplier":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Multiplier","description":"Alternative to `rate`. Multiplies the employee's pay_rate_per_hour (e.g., 1.5 for time-and-a-half, 2.0 for double time). Mutually exclusive with `rate` - supply one or the other, never both."},"rate_reference":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rate Reference","description":"Optional stable pay-rate reference from `GET /api/employees/{employee_id}/pay-rates` (for example `system:ordinary_time`, `employee:42`, `company:73`). Use as an alternative to sending a raw `rate`.","examples":["employee:42"],"example":"employee:42"},"rate_description":{"anyOf":[{"type":"string","maxLength":60,"minLength":0},{"type":"null"}],"title":"Rate Description","description":"Optional pay-rate description to resolve a rate by description for this employee. Use when you do not send `rate`. If multiple rates share the same description, the API will return a validation error and require `rate_reference`.","examples":["Ordinary Time"],"example":"Ordinary Time"},"units":{"type":"string","maxLength":32,"minLength":0,"title":"Units","examples":["hours"],"example":"hours"},"is_overtime":{"type":"boolean","title":"Is Overtime","default":false,"examples":[false],"example":false},"value":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"}],"title":"Value","examples":["37.5"],"example":"37.5"},"id":{"type":"integer","title":"Id"}},"type":"object","required":["description","units","value","id"],"title":"PayHoursUpdate"},"PayRunPays":{"properties":{"pay_run_id":{"type":"integer","title":"Pay Run Id","description":"The unique identifier of the pay run.","examples":[1001],"example":1001},"pay_run_end_date":{"type":"string","format":"date","title":"Pay Run End Date","description":"The end date of the pay run period.","examples":["2023-01-31"],"example":"2023-01-31"},"pay_period":{"type":"string","title":"Pay Period","description":"The pay period frequency associated with the pay run (WEEKLY, FORTNIGHTLY, MONTHLY).","examples":["WEEKLY"],"example":"WEEKLY"},"pays":{"items":{"$ref":"#/components/schemas/Pay"},"type":"array","minItems":0,"title":"Pays","description":"A list of basic pay information associated with the pay run."}},"type":"object","required":["pay_run_id","pay_run_end_date","pay_period","pays"],"title":"PayRunPays"},"PayRunTotals":{"properties":{"id":{"type":"integer","title":"Id","description":"The unique identifier of the pay run.","examples":[1001],"example":1001},"start_date":{"type":"string","format":"date","title":"Start Date","description":"The start date of the pay run period.","examples":["2023-01-01"],"example":"2023-01-01"},"end_date":{"type":"string","format":"date","title":"End Date","description":"The end date of the pay run period.","examples":["2023-01-31"],"example":"2023-01-31"},"pay_period":{"type":"string","title":"Pay Period","description":"The pay period frequency associated with the pay run (WEEKLY, FORTNIGHTLY, MONTHLY).","examples":["WEEKLY"],"example":"WEEKLY"},"total_pre_sacrifice_gross":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Pre Sacrifice Gross","description":"Total pre-sacrifice gross pay for the pay run.","examples":[60000.0],"example":60000.0},"total_sacrifice":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Sacrifice","description":"Total salary sacrifice for the pay run.","examples":[10000.0],"example":10000.0},"total_gross":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Gross","description":"Total gross pay for the pay run.","examples":[50000.0],"example":50000.0},"total_tax":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Tax","description":"Total tax deducted for the pay run.","examples":[10000.0],"example":10000.0},"total_net":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Net","description":"Total net pay for the pay run: the sum of each completed pay's net, i.e. gross minus tax, minus post-tax superannuation, minus post-tax deductions.","examples":[38300.0],"example":38300.0},"total_super":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Super","description":"Total superannuation for the pay run.","examples":[5000.0],"example":5000.0},"total_workers_compensation":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Workers Compensation","description":"Total workers' compensation for the pay run.","examples":[500.0],"example":500.0},"total_resc_super_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Resc Super Amount","description":"Total Reportable Employer Superannuation Contributions (RESC) for the pay run.","examples":[1000.0],"example":1000.0},"total_compulsory_super_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Compulsory Super Amount","description":"Total compulsory superannuation for the pay run.","examples":[4000.0],"example":4000.0},"total_post_tax_super":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Post Tax Super","description":"Total post-tax superannuation for the pay run.","examples":[500.0],"example":500.0},"total_nz_student_loan":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Nz Student Loan","description":"Total NZ student loan withheld for the pay run. NZ only.","examples":[450.0],"example":450.0},"total_tax_plus_student_loan":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Tax Plus Student Loan","description":"Total tax plus NZ student loan for the pay run. NZ only.","examples":[10450.0],"example":10450.0},"total_kiwi_saver":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Kiwi Saver","description":"Total KiwiSaver contributions for the pay run. NZ only.","examples":[1500.0],"example":1500.0},"total_kiwisaver_employee_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Kiwisaver Employee Amount","description":"Total employee KiwiSaver deductions for the pay run. NZ only.","examples":[750.0],"example":750.0},"total_kiwisaver_employer_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Kiwisaver Employer Amount","description":"Total employer KiwiSaver contributions for the pay run. NZ only.","examples":[750.0],"example":750.0},"total_deduction":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Deduction","description":"Total post-tax deductions for the pay run.","examples":[1200.0],"example":1200.0},"num_completed_pays_in_run":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Num Completed Pays In Run","description":"The number of completed pays for the pay run.","examples":[10],"example":10}},"type":"object","required":["id","start_date","end_date","pay_period"],"title":"PayRunTotals","example":{"end_date":"2023-01-31","id":1001,"pay_period":"MONTHLY","start_date":"2023-01-01","total_compulsory_super_amount":4000.0,"total_deduction":1200.0,"total_gross":50000.0,"total_kiwi_saver":1500.0,"total_kiwisaver_employee_amount":750.0,"total_kiwisaver_employer_amount":750.0,"total_net":38300.0,"total_nz_student_loan":450.0,"total_post_tax_super":500.0,"total_pre_sacrifice_gross":60000.0,"total_resc_super_amount":1000.0,"total_sacrifice":10000.0,"total_super":5000.0,"total_tax":10000.0,"total_tax_plus_student_loan":10450.0,"total_workers_compensation":500.0}},"PaySacrifice-Input":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Amount","description":"The dollar amount for the pay sacrifice.\nRequired when creating a new pay sacrifice (or if no pay sacrifice matches the description). May be omitted when reusing an existing pay sacrifice matched by description.","examples":["150.00"],"example":"150.00"},"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the pay sacrifice.\nRequired when creating or matching a pay sacrifice.","examples":["Salary Sacrifice for Car"],"example":"Salary Sacrifice for Car"},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this pay sacrifice is included in superannuation calculations.\n- Defaults to True when creating a new employee pay sacrifice.\n","examples":[true],"example":true},"is_super":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super","description":"Indicates if the pay sacrifice is for superannuation.","examples":[true],"example":true}},"additionalProperties":false,"type":"object","required":["description"],"title":"PaySacrifice"},"PaySacrifice-Output":{"properties":{"amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Amount","description":"The dollar amount for the pay sacrifice.\nRequired when creating a new pay sacrifice (or if no pay sacrifice matches the description). May be omitted when reusing an existing pay sacrifice matched by description.","examples":[150.0],"example":150.0},"description":{"type":"string","maxLength":60,"minLength":1,"title":"Description","description":"A brief description of the pay sacrifice.\nRequired when creating or matching a pay sacrifice.","examples":["Salary Sacrifice for Car"],"example":"Salary Sacrifice for Car"},"is_included_in_super_calculations":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Included In Super Calculations","description":"Whether this pay sacrifice is included in superannuation calculations.\n- Defaults to True when creating a new employee pay sacrifice.\n","examples":[true],"example":true},"is_super":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Super","description":"Indicates if the pay sacrifice is for superannuation.","examples":[true],"example":true}},"additionalProperties":false,"type":"object","required":["description"],"title":"PaySacrifice"},"PayUpdate":{"properties":{"hours":{"items":{"anyOf":[{"$ref":"#/components/schemas/PayHoursUpdate"},{"$ref":"#/components/schemas/PayHoursBase"}]},"type":"array","title":"Hours"},"leave":{"items":{"anyOf":[{"$ref":"#/components/schemas/LeaveUpdate"},{"$ref":"#/components/schemas/LeaveBase"}]},"type":"array","title":"Leave"},"leave_balance_rows":{"items":{"$ref":"#/components/schemas/LeaveBalanceRow-Input"},"type":"array","title":"Leave Balance Rows"},"allowances":{"anyOf":[{"items":{"$ref":"#/components/schemas/PayAllowance-Input"},"type":"array"},{"type":"null"}],"title":"Allowances","description":"The allowance lines this pay should end up with, matched to the employee's existing allowances by `description` (IDs are not accepted).\n\nUsage rules:\n- This is a FULL REPLACEMENT, not a patch. Updating a pay rebuilds it from the request body, so every allowance line you want to keep must be present. Sending `[]`, or omitting the field entirely, leaves the pay with no allowances.\n- Use it to correct a quantity or a per-unit rate: send `amount` as the per-unit rate and `units` as the quantity (for example `amount` 5.00 with `units` 3 for three $5.00 laundry allowances, totalling 15.00).\n- If no allowance matches the `description`, a NEW allowance is created for the employee, and `description`, `amount` and `allowance_category` (code) are then all REQUIRED.\n- `total_amount` is read-only and ignored if supplied.","examples":[[{"allowance_category":"LD","amount":"5.00","description":"Laundry Allowance","units":"3"}]],"example":[{"allowance_category":"LD","amount":"5.00","description":"Laundry Allowance","units":"3"}]},"pay_department":{"anyOf":[{"type":"string","maxLength":32,"minLength":0},{"type":"null"}],"title":"Pay Department","description":"Department/Cost-centre name or code to be applied to all items in this entire pay.\nSend it to keep a department on a pay that already has one. A pay that carries a department and is updated without this field is refused with 409, because rebuilding the pay would drop it.","examples":["Engineering"],"example":"Engineering"}},"additionalProperties":false,"type":"object","required":["hours","leave","leave_balance_rows"],"title":"PayUpdate"},"PublicBranding":{"properties":{"source_type":{"type":"string","title":"Source Type","description":"`public_api_admin` when a reseller was resolved, `public_default` for the Lightning Payroll default.","examples":["public_api_admin"],"example":"public_api_admin"},"source_customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Customer Id","description":"The resolved reseller's customer ID.","examples":[12345],"example":12345},"source_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Client Id","description":"The `client_id` the branding was resolved through, when that was the lookup used."},"branding_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Branding Token","description":"The reseller's public branding token."},"display_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Display Name","description":"Brand name to show.","examples":["Farm Focus"],"example":"Farm Focus"},"subtitle":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Subtitle","description":"Secondary line to show.","examples":["Powered by Lightning Payroll"],"example":"Powered by Lightning Payroll"},"company_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Company Name","description":"The reseller's own company name, `\"\"` for a logo-only reseller, or `Lightning Payroll` on the `public_default` branch.","examples":["Farm Focus Pty Ltd"],"example":"Farm Focus Pty Ltd"},"support_email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Email","description":"Support email to show."},"support_phone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Phone","description":"Support phone to show."},"homepage_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Homepage Url","description":"Partner homepage URL."},"support_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Support Url","description":"Partner support URL."},"has_logo":{"type":"boolean","title":"Has Logo","description":"Whether a logo is available.","examples":[true],"example":true},"has_dark_logo":{"type":"boolean","title":"Has Dark Logo","description":"Whether a dark-mode logo is available.","examples":[true],"example":true},"has_favicon":{"type":"boolean","title":"Has Favicon","description":"Whether a favicon is available.","examples":[true],"example":true},"has_style":{"type":"boolean","title":"Has Style","description":"Whether a custom stylesheet is available.","examples":[true],"example":true},"disable_dark_mode":{"type":"boolean","title":"Disable Dark Mode","description":"Whether dark mode should be suppressed.","examples":[false],"example":false},"uses_standalone_shell":{"type":"boolean","title":"Uses Standalone Shell","description":"True whenever a reseller was resolved, i.e. render the partner shell rather than the LP one.","examples":[true],"example":true},"auth_design":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Auth Design","description":"The reseller's login-screen design blob, null when unset."}},"type":"object","required":["source_type","has_logo","has_dark_logo","has_favicon","has_style","disable_dark_mode","uses_standalone_shell"],"title":"PublicBranding","description":"The branding block resolved for an unauthenticated page."},"PublicBrandingResponse":{"properties":{"branding":{"$ref":"#/components/schemas/PublicBranding"},"logo":{"$ref":"#/components/schemas/WhitelabelLogo"},"whitelabel_style":{"$ref":"#/components/schemas/WhitelabelStyle"}},"type":"object","required":["branding","logo","whitelabel_style"],"title":"PublicBrandingResponse"},"RequiredOwnedAddOn":{"properties":{"add_on_key":{"type":"string","title":"Add On Key","description":"Branding add-on key owned by the reseller."},"add_on_label":{"type":"string","title":"Add On Label","description":"Human-readable add-on label."},"customer_has_required_add_on":{"type":"boolean","title":"Customer Has Required Add On","description":"Whether the matched existing customer already has this branded add-on active."}},"additionalProperties":false,"type":"object","required":["add_on_key","add_on_label","customer_has_required_add_on"],"title":"RequiredOwnedAddOn"},"Termination":{"properties":{"termination_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Termination Date","description":"The last day of employment.","examples":["2026-09-11"],"example":"2026-09-11"},"reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Reason","description":"Why employment ended, for tax purposes. Australia only.","examples":["TERMINATION"],"example":"TERMINATION"},"cessation_type_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cessation Type Code","description":"STP cessation type, derived from `reason` unless you set it. Australia only.","examples":["V"],"example":"V"},"is_manual_leave_amounts":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Manual Leave Amounts","description":"Whether the unused-leave amounts were supplied rather than calculated.","examples":[false],"example":false},"is_payment_in_lieu_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payment In Lieu Paid","description":"Whether payment in lieu of notice was paid.","examples":[false],"example":false},"payment_in_lieu_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Payment In Lieu Type","description":"How the payment in lieu of notice was quantified. Australia only.","examples":["NOTICE_HOURS"],"example":"NOTICE_HOURS"},"notice_hours":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notice Hours","description":"Hours of notice paid out. Australia only.","examples":[38.0],"example":38.0},"notice_lump_sum":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Notice Lump Sum","description":"Notice paid as a lump sum. Australia only.","examples":[0.0],"example":0.0},"payment_in_lieu_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Payment In Lieu Amount","description":"Payment in lieu of notice actually paid.","examples":[0.0],"example":0.0},"is_unused_holiday_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Holiday Paid","description":"Whether unused annual/holiday leave was paid out.","examples":[true],"example":true},"is_unused_leave_loading_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Leave Loading Paid","description":"Whether unused leave loading was paid out. Australia only.","examples":[true],"example":true},"is_unused_lsl_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Lsl Paid","description":"Whether unused long service leave was paid out. Australia only.","examples":[false],"example":false},"is_unused_sick_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Sick Paid","description":"Whether unused sick/personal leave was paid out. Australia only.","examples":[false],"example":false},"unused_holiday_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Holiday Amount","description":"Unused annual/holiday leave paid out. In New Zealand, the annual holidays payout, valued in weeks.","examples":[3800.0],"example":3800.0},"unused_leave_loading_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Leave Loading Amount","description":"Unused leave loading paid out. Australia only.","examples":[665.0],"example":665.0},"unused_alt_holiday_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Alt Holiday Amount","description":"Unused alternative holidays paid out, valued in days. New Zealand only.","examples":[480.0],"example":480.0},"unused_sick_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Sick Amount","description":"Unused sick/personal leave paid out. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_pre_august_1978":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Pre August 1978","description":"Unused long service leave accrued before August 1978. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_august_1978_to_august_1993":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl August 1978 To August 1993","description":"Unused long service leave accrued Aug 1978 - Aug 1993. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_post_august_1993":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Post August 1993","description":"Unused long service leave accrued after August 1993. Australia only.","examples":[0.0],"example":0.0},"unused_lsl_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Amount","description":"Total unused long service leave paid out. Australia only.","examples":[0.0],"example":0.0},"non_etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Non Etp Amount","description":"Other non-ETP payout. In New Zealand, the additional termination amount, which includes the statutory 8% holiday pay owing since the employee's last anniversary unless you entered the amounts manually.","examples":[0.0],"example":0.0},"etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Amount","description":"Other ETP payout. Australia only.","examples":[0.0],"example":0.0},"redundancy_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Redundancy Amount","description":"Genuine redundancy or early retirement payment.","examples":[0.0],"example":0.0},"redundancy_tax_free_pilon_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Redundancy Tax Free Pilon Component","description":"Payment in lieu of notice treated as part of the tax-free redundancy. Australia only.","examples":[0.0],"example":0.0},"normal_earnings":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Normal Earnings","description":"Normal earnings for one pay period. Australia only.","examples":[1900.0],"example":1900.0},"total_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Amount","description":"Everything paid because of the termination. Included in the pay's `gross`.","examples":[4465.0],"example":4465.0},"total_etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Etp Amount","description":"Total of the ETP components. Australia only.","examples":[0.0],"example":0.0},"total_non_etp_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Non Etp Amount","description":"Total of the non-ETP components. Australia only.","examples":[4465.0],"example":4465.0},"tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Amount","description":"Total tax on the termination amounts. In New Zealand this is the extra pay tax across every termination component.","examples":[1428.0],"example":1428.0},"unused_lsl_tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Lsl Tax Amount","description":"Tax on the unused long service leave payout. Australia only.","examples":[0.0],"example":0.0},"unused_holiday_and_loading_tax_amount":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Unused Holiday And Loading Tax Amount","description":"Tax on the unused holiday leave and leave loading payouts.","examples":[1428.0],"example":1428.0},"lump_sum_a":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum A","description":"Lump Sum A as reported for STP. Australia only.","examples":[0.0],"example":0.0},"lump_sum_b":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum B","description":"Lump Sum B as reported for STP. Australia only.","examples":[0.0],"example":0.0},"lump_sum_d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum D","description":"Lump Sum D: the tax-free part of a genuine redundancy. Australia only.","examples":[0.0],"example":0.0},"etp_tax_withheld":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Tax Withheld","description":"Total tax withheld across the ETP tax summaries. Australia only.","examples":[0.0],"example":0.0},"etp_taxable_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Taxable Component","description":"Total taxable component across the ETP tax summaries. Australia only.","examples":[0.0],"example":0.0},"etp_tax_free_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Etp Tax Free Component","description":"Total tax-free component across the ETP tax summaries. Australia only.","examples":[0.0],"example":0.0},"tax_summaries":{"anyOf":[{"items":{"$ref":"#/components/schemas/TerminationTaxSummary-Output"},"type":"array"},{"type":"null"}],"title":"Tax Summaries","description":"The ETP tax summaries for this termination. Australia only."},"nz_ytd_taxable":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Nz Ytd Taxable","description":"Year-to-date taxable earnings supplied for the ACC earners' levy cap. New Zealand only.","examples":[48000.0],"example":48000.0},"nz_extra_pay_tax_breakdown":{"anyOf":[{"$ref":"#/components/schemas/NZExtraPayTaxBreakdown"},{"type":"null"}],"description":"How the extra pay tax was worked out, per termination component (`unused_holiday`, `alt_holiday`, `redundancy`, `other`), plus `total_tax` and `taxed_at_low_rate`. `taxed_at_low_rate` is what sets the lump sum indicator on the Employment Information return. New Zealand only."}},"type":"object","title":"Termination","description":"A termination as Lightning Payroll worked it out.\n\nEvery amount here is the calculated result, whether you supplied it or\nLightning Payroll derived it. Fields that do not apply to the company's\ncountry are left out of the response entirely."},"TerminationCreate":{"properties":{"termination_date":{"type":"string","format":"date","title":"Termination Date","description":"The last day of employment, `YYYY-MM-DD`. Must be on or after the employee's `start_date`. In New Zealand this is the employment finish date, and every leave balance is valued as at this date.","examples":["2026-09-11"],"example":"2026-09-11"},"is_manual_leave_amounts":{"type":"boolean","title":"Is Manual Leave Amounts","description":"Set to `true` to supply the unused-leave payout amounts yourself instead of having Lightning Payroll work them out from the employee's balances. This is the API equivalent of 'Show Advanced Settings' in the Australian termination wizard and 'Enter leave amounts manually' on the New Zealand employment finish screen.\n\nLeave it `false` and Lightning Payroll calculates the payouts, which is almost always what you want. The fields listed as manual only are refused while this is `false`, because they would be recalculated over the top before the pay was written.","default":false,"examples":[false],"example":false},"reason":{"type":"string","enum":["TERMINATION","INVALIDITY","DEATH_DEPENDENT","DEATH_NON_DEPENDENT","DEATH_ESTATE","REDUNDANCY"],"title":"Reason","description":"Why employment ended, for tax purposes. Australia only.\n\n`TERMINATION` an ordinary termination; `INVALIDITY` the employee can no longer work through ill health; `DEATH_DEPENDENT`, `DEATH_NON_DEPENDENT`, `DEATH_ESTATE` death of the employee with benefits paid to a dependant, a non-dependant or the estate; `REDUNDANCY` a genuine redundancy or early retirement scheme.\n\nThis drives the ETP tax treatment and the Lump Sum A type, and it sets the STP cessation type for every reason except `TERMINATION`.","default":"TERMINATION","examples":["TERMINATION"],"example":"TERMINATION"},"cessation_type_code":{"anyOf":[{"type":"string","enum":["V","F","C","T"]},{"type":"null"}],"title":"Cessation Type Code","description":"STP cessation type. Australia only, and only accepted when `reason` is `TERMINATION` -- every other reason determines the code itself (`I` ill health, `D` deceased, `R` redundancy), and sending one alongside it is refused rather than ignored.\n\n`V` voluntary cessation (resignation or retirement by the employee), `F` dismissal, `C` contract cessation, `T` transfer to another business, employer or payroll system. Defaults to `V`.","examples":["V"],"example":"V"},"is_payment_in_lieu_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Payment In Lieu Paid","description":"Whether payment in lieu of notice is being paid.","examples":[false],"example":false},"payment_in_lieu_type":{"anyOf":[{"type":"string","enum":["NOTICE_HOURS","NOTICE_LUMP_SUM"]},{"type":"null"}],"title":"Payment In Lieu Type","description":"How the payment in lieu of notice is quantified. Australia only, and required when `is_payment_in_lieu_paid` is `true`.\n\n`NOTICE_HOURS` pays `notice_hours` at the employee's hourly rate; `NOTICE_LUMP_SUM` pays `notice_lump_sum` as entered.","examples":["NOTICE_HOURS"],"example":"NOTICE_HOURS"},"notice_hours":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Notice Hours","description":"Hours of notice being paid out, as a decimal number of hours. Australia only; required when `payment_in_lieu_type` is `NOTICE_HOURS`.","examples":["38.0"],"example":"38.0"},"notice_lump_sum":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Notice Lump Sum","description":"Payment in lieu of notice as a lump sum. Australia only; required when `payment_in_lieu_type` is `NOTICE_LUMP_SUM`.","examples":["2500.00"],"example":"2500.00"},"payment_in_lieu_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Payment In Lieu Amount","description":"Payment in lieu of notice. New Zealand only, where the amount is entered directly. In Australia this is calculated from `payment_in_lieu_type` and returned on the response.","examples":["2500.00"],"example":"2500.00"},"is_unused_holiday_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Holiday Paid","description":"Pay out unused annual/holiday leave. Australia only.\n\nOmit it and Lightning Payroll decides exactly as the wizard does: on for an employee who is not a casual and has a leave balance remaining, off otherwise.","examples":[true],"example":true},"is_unused_leave_loading_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Leave Loading Paid","description":"Pay out unused leave loading. Australia only. Omit it and Lightning Payroll turns it on when holiday leave is being paid out and the employee has a leave loading percentage.","examples":[true],"example":true},"is_unused_lsl_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Lsl Paid","description":"Pay out unused long service leave. Australia only. Omit it and Lightning Payroll decides from the employee's length of service and the long service leave rules of the company's state.","examples":[false],"example":false},"is_unused_sick_paid":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Unused Sick Paid","description":"Pay out unused sick/personal leave. Australia only, and off by default: unused sick leave is not ordinarily payable on termination. New Zealand never pays unused sick leave out.","examples":[false],"example":false},"redundancy_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Redundancy Amount","description":"Genuine redundancy or early retirement scheme payment. In New Zealand this is a redundancy payment, which is taxed as extra pay and is not liable for the ACC earners' levy or KiwiSaver.","examples":["0.00"],"example":"0.00"},"redundancy_tax_free_pilon_component":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Redundancy Tax Free Pilon Component","description":"The part of the payment in lieu of notice that forms part of the tax-free redundancy amount. Australia only, and only accepted when `reason` is `REDUNDANCY`. It changes the tax treatment rather than adding to the payout, and it may not exceed the payment in lieu of notice itself.","examples":["0.00"],"example":"0.00"},"non_etp_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Non Etp Amount","description":"In Australia, another payout amount that is not an employment termination payment.\n\nIn New Zealand this is the 'additional termination amount', and it is only accepted with `is_manual_leave_amounts` set: otherwise Lightning Payroll uses this field to hold the statutory 8% holiday pay owing since the employee's last anniversary and would overwrite whatever you sent.","examples":["0.00"],"example":"0.00"},"etp_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Etp Amount","description":"Another payout amount that IS an employment termination payment, such as an ex-gratia payment or golden handshake. Australia only.","examples":["0.00"],"example":"0.00"},"unused_holiday_amount":{"anyOf":[{"type":"number"},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Holiday Amount","description":"Unused annual/holiday leave payout. Manual only. In New Zealand this is the annual holidays payout, which Lightning Payroll otherwise values in weeks at the greater of average weekly earnings and ordinary weekly pay. A negative value is accepted only in New Zealand, where it represents leave taken in advance.","examples":["3800.00"],"example":"3800.00"},"unused_leave_loading_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Leave Loading Amount","description":"Unused leave loading payout. Australia only. Manual only.","examples":["665.00"],"example":"665.00"},"unused_alt_holiday_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Alt Holiday Amount","description":"Unused alternative holidays payout (Holidays Act 2003 s.61). New Zealand only. Manual only. Lightning Payroll otherwise values the balance in days at relevant daily pay.","examples":["480.00"],"example":"480.00"},"unused_sick_amount":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Sick Amount","description":"Unused sick/personal leave payout. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"unused_lsl_pre_august_1978":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Lsl Pre August 1978","description":"Unused long service leave accrued before August 1978, which is taxed differently. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"unused_lsl_august_1978_to_august_1993":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Lsl August 1978 To August 1993","description":"Unused long service leave accrued between August 1978 and August 1993. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"unused_lsl_post_august_1993":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Unused Lsl Post August 1993","description":"Unused long service leave accrued after August 1993. This is where Lightning Payroll puts the whole balance unless you split it. Australia only. Manual only.","examples":["0.00"],"example":"0.00"},"normal_earnings":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Normal Earnings","description":"The employee's normal earnings for one pay period, used to work out the whole-of-income cap on an ETP. Australia only. Manual only; Lightning Payroll otherwise takes it from the employee.","examples":["1900.00"],"example":"1900.00"},"tax_summaries":{"anyOf":[{"items":{"$ref":"#/components/schemas/TerminationTaxSummary-Input"},"type":"array"},{"type":"null"}],"title":"Tax Summaries","description":"Hand-entered ETP tax summaries, replacing the ones Lightning Payroll would calculate. Australia only. Manual only. Sending this replaces the whole set, so include every row you want kept.","examples":[[{"etp_code":"O","lump_sum_d":"0.00","tax_free_component":"0.00","tax_withheld":"1500.00","taxable_component":"5000.00"}]],"example":[{"etp_code":"O","lump_sum_d":"0.00","tax_free_component":"0.00","tax_withheld":"1500.00","taxable_component":"5000.00"}]},"nz_ytd_taxable":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Nz Ytd Taxable","description":"Taxable earnings for this employee year to date at the finish date, used to apply the annual ACC earners' levy cap to the extra pay. New Zealand only. Omit it if Lightning Payroll holds the whole year; supply it when earnings were part-year in another system. Zero is read as 'not supplied'.","examples":["48000.00"],"example":"48000.00"}},"additionalProperties":false,"type":"object","required":["termination_date"],"title":"TerminationCreate","description":"The end of an employee's employment, recorded on their final pay.\n\nSend only the fields that apply to the company's country. An Australian\nfield on a New Zealand company (or the reverse) is refused with a `400`\nnaming it, rather than being accepted and ignored.","example":{"cessation_type_code":"V","is_payment_in_lieu_paid":false,"reason":"TERMINATION","termination_date":"2026-09-11"}},"TerminationTaxSummary-Input":{"properties":{"etp_code":{"type":"string","enum":["R","O","S","P","D","B","N","T"],"title":"Etp Code","description":"ETP code. `R` redundancy/invalidity/early retirement, `O` other (ex-gratia, golden handshake), `S` split of a type R, `P` split of a type O, `D` death benefit to a dependant, `N` death benefit to a non-dependant, `B` split of a type N, `T` death benefit to the trustee of the estate.","examples":["O"],"example":"O"},"tax_withheld":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Withheld","description":"Tax withheld from this ETP.","examples":["1500.00"],"example":"1500.00"},"taxable_component":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Taxable Component","description":"Taxable component of this ETP.","examples":["5000.00"],"example":"5000.00"},"tax_free_component":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Tax Free Component","description":"Tax-free component of this ETP.","examples":["0.00"],"example":"0.00"},"lump_sum_d":{"anyOf":[{"type":"number","minimum":0.0},{"type":"string","pattern":"^(?!^[-+.]*$)[+-]?0*\\d*\\.?\\d*$"},{"type":"null"}],"title":"Lump Sum D","description":"Lump Sum D: the tax-free part of a genuine redundancy.","examples":["0.00"],"example":"0.00"}},"additionalProperties":false,"type":"object","required":["etp_code"],"title":"TerminationTaxSummary","description":"One ETP tax summary row. Australia only.\n\nLightning Payroll builds these itself from the ETP tax tables. They are only\nwritable alongside `is_manual_leave_amounts`, mirroring the wizard's\nAdvanced ETP editor, and a payload that declares them replaces the whole set."},"TerminationTaxSummary-Output":{"properties":{"etp_code":{"type":"string","enum":["R","O","S","P","D","B","N","T"],"title":"Etp Code","description":"ETP code. `R` redundancy/invalidity/early retirement, `O` other (ex-gratia, golden handshake), `S` split of a type R, `P` split of a type O, `D` death benefit to a dependant, `N` death benefit to a non-dependant, `B` split of a type N, `T` death benefit to the trustee of the estate.","examples":["O"],"example":"O"},"tax_withheld":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Withheld","description":"Tax withheld from this ETP.","examples":[1500.0],"example":1500.0},"taxable_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Taxable Component","description":"Taxable component of this ETP.","examples":[5000.0],"example":5000.0},"tax_free_component":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Tax Free Component","description":"Tax-free component of this ETP.","examples":[0.0],"example":0.0},"lump_sum_d":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Lump Sum D","description":"Lump Sum D: the tax-free part of a genuine redundancy.","examples":[0.0],"example":0.0}},"additionalProperties":false,"type":"object","required":["etp_code"],"title":"TerminationTaxSummary","description":"One ETP tax summary row. Australia only.\n\nLightning Payroll builds these itself from the ETP tax tables. They are only\nwritable alongside `is_manual_leave_amounts`, mirroring the wizard's\nAdvanced ETP editor, and a payload that declares them replaces the whole set."},"TokenResponse":{"properties":{"access_token":{"type":"string","title":"Access Token","description":"JWT access token, signed with our system key","examples":["eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.…"],"example":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.…"},"token_type":{"type":"string","const":"Bearer","title":"Token Type","description":"Always **Bearer** for Lightning Payroll APIs","examples":["Bearer"],"example":"Bearer"},"expires_in":{"type":"integer","title":"Expires In","description":"Lifetime of the `access_token` in **seconds** (currently: 1800 = 30 minutes)","examples":[1800],"example":1800},"refresh_token":{"type":"string","title":"Refresh Token","description":"New opaque refresh token string (store this securely – it is shown only once)","examples":["v5G3sbpZBqC4mfA5fEUvVxv8povwU9Dg82kUn4qB6-M"],"example":"v5G3sbpZBqC4mfA5fEUvVxv8povwU9Dg82kUn4qB6-M"},"refresh_expires_in":{"type":"integer","title":"Refresh Expires In","description":"Lifetime of the `refresh_token` in **seconds** (default: 2 592 000 = 30 days)","examples":[2592000],"example":2592000}},"type":"object","required":["access_token","token_type","expires_in","refresh_token","refresh_expires_in"],"title":"TokenResponse","description":"Standard OAuth 2.0 token payload returned by this endpoint."},"UpdateApiClientResponse":{"properties":{"message":{"type":"string","title":"Message","description":"Confirmation message.","examples":["Client updated successfully"],"example":"Client updated successfully"},"new_secret":{"type":"string","title":"New Secret","description":"The new plaintext client secret when `regenerate_secret` was true, otherwise the literal string `unchanged`. Store a real secret immediately: it is shown once.","examples":["unchanged"],"example":"unchanged"},"timezone":{"type":"string","title":"Timezone","description":"Console timezone after the update.","examples":["Australia/Brisbane"],"example":"Australia/Brisbane"},"configured_branding":{"$ref":"#/components/schemas/ConfiguredBranding"},"email_domain":{"$ref":"#/components/schemas/EmailDomain"},"farm_focus_host_override":{"$ref":"#/components/schemas/FarmFocusHostOverride"},"effective_branding":{"$ref":"#/components/schemas/EffectiveBranding"}},"additionalProperties":true,"type":"object","required":["message","new_secret","timezone","configured_branding","email_domain","farm_focus_host_override","effective_branding"],"title":"UpdateApiClientResponse","description":"Answer from POST /api/update-api-client."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"WhitelabelAssetError":{"properties":{"error":{"type":"string","title":"Error","description":"What went wrong.","examples":["The file is larger than the 1 MB limit"],"example":"The file is larger than the 1 MB limit"},"requires_overwrite":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Requires Overwrite","description":"Present and true on a 409: an asset already exists. Repeat the upload with `overwrite_existing=true` to replace it.","examples":[true],"example":true}},"additionalProperties":true,"type":"object","required":["error"],"title":"WhitelabelAssetError","description":"The body every whitelabel asset endpoint answers a 4xx with.","example":{"error":"Logo already exists. Set overwrite_existing=true to replace it.","requires_overwrite":true}},"WhitelabelBanner":{"properties":{"has_banner":{"type":"boolean","title":"Has Banner","description":"Whether a banner is stored.","examples":[true],"example":true},"image_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Name","description":"Original filename.","examples":["banner.png"],"example":"banner.png"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data","description":"The banner as a `data:` URI."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO 8601 timestamp of the last change."}},"type":"object","required":["has_banner"],"title":"WhitelabelBanner","description":"The banner image."},"WhitelabelBannerMutationResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation message.","examples":["Banner uploaded"],"example":"Banner uploaded"},"whitelabel_banner":{"$ref":"#/components/schemas/WhitelabelBanner"}},"type":"object","required":["success","whitelabel_banner"],"title":"WhitelabelBannerMutationResponse"},"WhitelabelBannerResponse":{"properties":{"whitelabel_banner":{"$ref":"#/components/schemas/WhitelabelBanner"}},"type":"object","required":["whitelabel_banner"],"title":"WhitelabelBannerResponse"},"WhitelabelDarkLogo":{"properties":{"has_dark_logo":{"type":"boolean","title":"Has Dark Logo","description":"Whether a dark-mode logo is stored.","examples":[true],"example":true},"image_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Name","description":"Original filename.","examples":["logo-dark.png"],"example":"logo-dark.png"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data","description":"The dark-mode logo as a `data:` URI."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO 8601 timestamp of the last change."}},"type":"object","required":["has_dark_logo"],"title":"WhitelabelDarkLogo","description":"The dark-mode logo."},"WhitelabelDarkLogoMutationResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation message.","examples":["Dark mode logo uploaded"],"example":"Dark mode logo uploaded"},"whitelabel_dark_logo":{"$ref":"#/components/schemas/WhitelabelDarkLogo"}},"type":"object","required":["success","whitelabel_dark_logo"],"title":"WhitelabelDarkLogoMutationResponse"},"WhitelabelDarkLogoResponse":{"properties":{"whitelabel_dark_logo":{"$ref":"#/components/schemas/WhitelabelDarkLogo"}},"type":"object","required":["whitelabel_dark_logo"],"title":"WhitelabelDarkLogoResponse"},"WhitelabelFavicon":{"properties":{"has_favicon":{"type":"boolean","title":"Has Favicon","description":"Whether a favicon is stored.","examples":[true],"example":true},"image_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Name","description":"Original filename.","examples":["favicon.ico"],"example":"favicon.ico"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data","description":"The favicon as a `data:` URI."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO 8601 timestamp of the last change."}},"type":"object","required":["has_favicon"],"title":"WhitelabelFavicon","description":"The favicon."},"WhitelabelFaviconMutationResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation message.","examples":["Favicon uploaded"],"example":"Favicon uploaded"},"whitelabel_favicon":{"$ref":"#/components/schemas/WhitelabelFavicon"}},"type":"object","required":["success","whitelabel_favicon"],"title":"WhitelabelFaviconMutationResponse"},"WhitelabelFaviconResponse":{"properties":{"whitelabel_favicon":{"$ref":"#/components/schemas/WhitelabelFavicon"}},"type":"object","required":["whitelabel_favicon"],"title":"WhitelabelFaviconResponse"},"WhitelabelLogo":{"properties":{"has_logo":{"type":"boolean","title":"Has Logo","description":"Whether a logo is stored for this account.","examples":[true],"example":true},"image_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Name","description":"Original filename of the stored logo.","examples":["logo.png"],"example":"logo.png"},"image_data":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Image Data","description":"The logo as a `data:` URI, ready to use as an `<img>` src. Null when no logo is stored.","examples":["data:image/png;base64,iVBORw0KGgo..."],"example":"data:image/png;base64,iVBORw0KGgo..."},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO 8601 timestamp of the last logo change.","examples":["2026-05-02T04:11:07"],"example":"2026-05-02T04:11:07"},"source_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Client Id","description":"OAuth client the branding was resolved through, when resolved by client_id.","examples":["lp_demo_app_123"],"example":"lp_demo_app_123"},"source_customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Customer Id","description":"Customer whose branding row supplied this logo.","examples":[12345],"example":12345}},"type":"object","required":["has_logo"],"title":"WhitelabelLogo","description":"The primary logo, as returned by the whitelabel-logo endpoints."},"WhitelabelLogoMutationResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation message.","examples":["Whitelabel logo uploaded"],"example":"Whitelabel logo uploaded"},"whitelabel_logo":{"$ref":"#/components/schemas/WhitelabelLogo"}},"type":"object","required":["success","whitelabel_logo"],"title":"WhitelabelLogoMutationResponse"},"WhitelabelLogoResponse":{"properties":{"whitelabel_logo":{"$ref":"#/components/schemas/WhitelabelLogo"}},"type":"object","required":["whitelabel_logo"],"title":"WhitelabelLogoResponse"},"WhitelabelStyle":{"properties":{"has_style":{"type":"boolean","title":"Has Style","description":"Whether a non-empty stylesheet is stored.","examples":[true],"example":true},"css_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Css Name","description":"Original filename.","examples":["theme.css"],"example":"theme.css"},"css_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Css Text","description":"The sanitised CSS. Null when no stylesheet is stored.","examples":[":root { --brand: #00b1dd; }"],"example":":root { --brand: #00b1dd; }"},"updated_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Updated At","description":"ISO 8601 timestamp of the last change."},"source_client_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Client Id","description":"OAuth client the branding was resolved through."},"source_customer_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Source Customer Id","description":"Customer whose branding row supplied this stylesheet."}},"type":"object","required":["has_style"],"title":"WhitelabelStyle","description":"The custom stylesheet."},"WhitelabelStyleMutationResponse":{"properties":{"success":{"type":"string","title":"Success","description":"Confirmation message.","examples":["Whitelabel stylesheet uploaded"],"example":"Whitelabel stylesheet uploaded"},"whitelabel_style":{"$ref":"#/components/schemas/WhitelabelStyle"}},"type":"object","required":["success","whitelabel_style"],"title":"WhitelabelStyleMutationResponse"},"WhitelabelStyleResponse":{"properties":{"whitelabel_style":{"$ref":"#/components/schemas/WhitelabelStyle"}},"type":"object","required":["whitelabel_style"],"title":"WhitelabelStyleResponse"}},"securitySchemes":{"OAuth2PasswordBearer":{"type":"oauth2","flows":{"password":{"scopes":{},"tokenUrl":"login"}}},"HTTPBearer":{"type":"http","scheme":"bearer"}}},"tags":[{"name":"Address"},{"name":"Admin"},{"name":"API Health"},{"name":"Authentication"},{"name":"Company"},{"name":"Employee"},{"name":"FAQs"},{"name":"Pay Runs"},{"name":"Pays"},{"name":"Public"},{"name":"Single Touch"}]}