{
 "openapi": "3.1.0",
 "info": {
  "title": "Payroll Register (HRMS)",
  "version": "20261030b",
  "description": "Every payslip in every run, with what it cost the employer."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "payroll-register": {
    "type": "object",
    "required": [],
    "properties": {
     "payslip_id": {
      "type": "string",
      "format": "uuid",
      "description": "Payslip id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "run_no": {
      "type": "string",
      "description": "Run no",
      "readOnly": true
     },
     "period_start": {
      "type": "string",
      "format": "date",
      "description": "Period start",
      "readOnly": true
     },
     "period_end": {
      "type": "string",
      "format": "date",
      "description": "Period end",
      "readOnly": true
     },
     "pay_date": {
      "type": "string",
      "format": "date",
      "description": "Pay date",
      "readOnly": true
     },
     "run_status": {
      "type": "string",
      "description": "Run status",
      "readOnly": true
     },
     "run_type": {
      "type": "string",
      "description": "Run type",
      "readOnly": true
     },
     "calculation_mode": {
      "type": "string",
      "description": "Calculation mode",
      "readOnly": true
     },
     "engine_name": {
      "type": "string",
      "description": "Engine name",
      "readOnly": true
     },
     "employee_no": {
      "type": "string",
      "description": "Employee no",
      "readOnly": true
     },
     "employee_name": {
      "type": "string",
      "description": "Employee name",
      "readOnly": true
     },
     "work_state": {
      "type": "string",
      "description": "Work state",
      "readOnly": true
     },
     "pay_group": {
      "type": "string",
      "description": "Pay group",
      "readOnly": true
     },
     "regular_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Regular hours",
      "readOnly": true
     },
     "overtime_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Overtime hours",
      "readOnly": true
     },
     "gross_pay": {
      "type": "string",
      "format": "decimal",
      "description": "Gross pay",
      "readOnly": true
     },
     "pretax_deductions": {
      "type": "string",
      "format": "decimal",
      "description": "Pretax deductions",
      "readOnly": true
     },
     "fit_wages": {
      "type": "string",
      "format": "decimal",
      "description": "Fit wages",
      "readOnly": true
     },
     "fica_wages": {
      "type": "string",
      "format": "decimal",
      "description": "Fica wages",
      "readOnly": true
     },
     "taxes": {
      "type": "string",
      "format": "decimal",
      "description": "Taxes",
      "readOnly": true
     },
     "deductions": {
      "type": "string",
      "format": "decimal",
      "description": "Deductions",
      "readOnly": true
     },
     "posttax_deductions": {
      "type": "string",
      "format": "decimal",
      "description": "Posttax deductions",
      "readOnly": true
     },
     "net_pay": {
      "type": "string",
      "format": "decimal",
      "description": "Net pay",
      "readOnly": true
     },
     "employer_taxes": {
      "type": "string",
      "format": "decimal",
      "description": "Employer taxes",
      "readOnly": true
     },
     "employer_contributions": {
      "type": "string",
      "format": "decimal",
      "description": "Employer contributions",
      "readOnly": true
     },
     "total_cost": {
      "type": "string",
      "format": "decimal",
      "description": "Total cost",
      "readOnly": true
     },
     "calculated_by_engine": {
      "type": "string",
      "description": "Calculated by engine",
      "readOnly": true
     },
     "is_retro": {
      "type": "boolean",
      "description": "Is retro",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/payroll-register": {
   "get": {
    "summary": "list payroll-register",
    "operationId": "list_payroll_register_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post payroll register",
    "operationId": "action_payroll_register_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-register/{payslip_id}": {
   "get": {
    "summary": "get payroll-register",
    "operationId": "get_payroll_register_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-register/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_payroll_register_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"
     }
    }
   }
  },
  "/api/hrms/payroll-register/{id}": {
   "put": {
    "summary": "Put payroll register",
    "operationId": "action_payroll_register_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete payroll register",
    "operationId": "action_payroll_register_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}