{
 "openapi": "3.1.0",
 "info": {
  "title": "Payroll Tax Periods (HRMS)",
  "version": "20261030b",
  "description": "A run has a purpose as well as a period. The same pay period appears in a deposit run, a return and a year end at different times, computed the same way and reconciled against each other."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "payroll-tax-runs": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "run_no": {
      "type": "string",
      "description": "Run no",
      "readOnly": true
     },
     "pack_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pack id",
      "readOnly": true
     },
     "country": {
      "type": "string",
      "description": "Country",
      "readOnly": true
     },
     "purpose": {
      "type": "string",
      "description": "Purpose",
      "readOnly": true
     },
     "period_kind": {
      "type": "string",
      "description": "Period kind",
      "readOnly": true
     },
     "period_code": {
      "type": "string",
      "description": "Period code",
      "readOnly": true
     },
     "period_from": {
      "type": "string",
      "format": "date",
      "description": "Period from",
      "readOnly": true
     },
     "period_to": {
      "type": "string",
      "format": "date",
      "description": "Period to",
      "readOnly": true
     },
     "payroll_run_ids": {
      "type": "array",
      "items": {
       "type": "string"
      },
      "description": "Payroll run ids",
      "readOnly": true
     },
     "pay_date_from": {
      "type": "string",
      "format": "date",
      "description": "Pay date from",
      "readOnly": true
     },
     "pay_date_to": {
      "type": "string",
      "format": "date",
      "description": "Pay date to",
      "readOnly": true
     },
     "deposit_due_date": {
      "type": "string",
      "format": "date",
      "description": "Deposit due date",
      "readOnly": true
     },
     "return_due_date": {
      "type": "string",
      "format": "date",
      "description": "Return due date",
      "readOnly": true
     },
     "currency": {
      "type": "string",
      "description": "Currency",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "current_step": {
      "type": "integer",
      "description": "Current step",
      "readOnly": true
     },
     "steps_total": {
      "type": "integer",
      "description": "Steps total",
      "readOnly": true
     },
     "steps_done": {
      "type": "integer",
      "description": "Steps done",
      "readOnly": true
     },
     "employee_count": {
      "type": "integer",
      "description": "Employee count",
      "readOnly": true
     },
     "gross_wages": {
      "type": "string",
      "format": "decimal",
      "description": "Gross wages",
      "readOnly": true
     },
     "taxable_wages": {
      "type": "string",
      "format": "decimal",
      "description": "Taxable wages",
      "readOnly": true
     },
     "exempt_wages": {
      "type": "string",
      "format": "decimal",
      "description": "Exempt wages",
      "readOnly": true
     },
     "employee_tax": {
      "type": "string",
      "format": "decimal",
      "description": "Employee tax",
      "readOnly": true
     },
     "employer_tax": {
      "type": "string",
      "format": "decimal",
      "description": "Employer tax",
      "readOnly": true
     },
     "total_liability": {
      "type": "string",
      "format": "decimal",
      "description": "Total liability",
      "readOnly": true
     },
     "already_deposited": {
      "type": "string",
      "format": "decimal",
      "description": "Already deposited",
      "readOnly": true
     },
     "net_due": {
      "type": "string",
      "format": "decimal",
      "description": "Net due",
      "readOnly": true
     },
     "penalty_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Penalty amount",
      "readOnly": true
     },
     "interest_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Interest amount",
      "readOnly": true
     },
     "open_findings": {
      "type": "integer",
      "description": "Open findings",
      "readOnly": true
     },
     "blocking_findings": {
      "type": "integer",
      "description": "Blocking findings",
      "readOnly": true
     },
     "registration_count": {
      "type": "integer",
      "description": "Registration count",
      "readOnly": true
     },
     "journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Journal id",
      "readOnly": true
     },
     "deposited_at": {
      "type": "string",
      "format": "date-time",
      "description": "Deposited at",
      "readOnly": true
     },
     "deposit_reference": {
      "type": "string",
      "description": "Deposit reference",
      "readOnly": true
     },
     "filed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Filed at",
      "readOnly": true
     },
     "filed_by": {
      "type": "string",
      "format": "uuid",
      "description": "Filed by",
      "readOnly": true
     },
     "filing_reference": {
      "type": "string",
      "description": "Filing reference",
      "readOnly": true
     },
     "approved_by": {
      "type": "string",
      "format": "uuid",
      "description": "Approved by",
      "readOnly": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at",
      "readOnly": true
     },
     "started_by": {
      "type": "string",
      "format": "uuid",
      "description": "Started by",
      "readOnly": true
     },
     "started_at": {
      "type": "string",
      "format": "date-time",
      "description": "Started at",
      "readOnly": true
     },
     "closed_at": {
      "type": "string",
      "format": "date-time",
      "description": "Closed at",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes"
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "xf_text_1": {
      "type": "string",
      "description": "Xf text 1",
      "readOnly": true
     },
     "xf_text_2": {
      "type": "string",
      "description": "Xf text 2",
      "readOnly": true
     },
     "xf_text_3": {
      "type": "string",
      "description": "Xf text 3",
      "readOnly": true
     },
     "xf_text_4": {
      "type": "string",
      "description": "Xf text 4",
      "readOnly": true
     },
     "xf_text_5": {
      "type": "string",
      "description": "Xf text 5",
      "readOnly": true
     },
     "xf_num_1": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 1",
      "readOnly": true
     },
     "xf_num_2": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 2",
      "readOnly": true
     },
     "xf_num_3": {
      "type": "string",
      "format": "decimal",
      "description": "Xf num 3",
      "readOnly": true
     },
     "xf_date_1": {
      "type": "string",
      "format": "date",
      "description": "Xf date 1",
      "readOnly": true
     },
     "xf_date_2": {
      "type": "string",
      "format": "date",
      "description": "Xf date 2",
      "readOnly": true
     },
     "created_by": {
      "type": "string",
      "format": "uuid",
      "description": "Created by",
      "readOnly": true
     },
     "updated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Updated at",
      "readOnly": true
     },
     "updated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Updated by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/payroll-tax-runs": {
   "get": {
    "summary": "list payroll-tax-runs",
    "operationId": "list_payroll_tax_runs_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create payroll-tax-runs",
    "operationId": "create_payroll_tax_runs_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-tax-runs/{id}": {
   "get": {
    "summary": "get payroll-tax-runs",
    "operationId": "get_payroll_tax_runs_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change payroll-tax-runs",
    "operationId": "change_payroll_tax_runs_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete payroll-tax-runs",
    "operationId": "delete_payroll_tax_runs_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-tax-runs/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_payroll_tax_runs_0_6",
    "description": "Body keys: overrides, preview, withLines",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}