{
 "openapi": "3.1.0",
 "info": {
  "title": "Payroll Runs (HRMS)",
  "version": "20261030b",
  "description": "Read and maintain payroll runs records (hr.payroll_runs)."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "payroll-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
     },
     "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
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "total_gross": {
      "type": "string",
      "format": "decimal",
      "description": "Total gross",
      "readOnly": true
     },
     "total_net": {
      "type": "string",
      "format": "decimal",
      "description": "Total net",
      "readOnly": true
     },
     "total_taxes": {
      "type": "string",
      "format": "decimal",
      "description": "Total taxes",
      "readOnly": true
     },
     "total_deductions": {
      "type": "string",
      "format": "decimal",
      "description": "Total deductions",
      "readOnly": true
     },
     "journal_id": {
      "type": "string",
      "format": "uuid",
      "description": "Journal id",
      "readOnly": true
     },
     "calculated_by": {
      "type": "string",
      "format": "uuid",
      "description": "Calculated by",
      "readOnly": true
     },
     "approved_by": {
      "type": "string",
      "format": "uuid",
      "description": "Approved by",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center id",
      "readOnly": true
     },
     "profit_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Profit center id",
      "readOnly": true
     },
     "pay_group_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pay group id",
      "readOnly": true
     },
     "pay_period_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pay period id",
      "readOnly": true
     },
     "run_type": {
      "type": "string",
      "description": "Run type",
      "readOnly": true
     },
     "tax_year": {
      "type": "integer",
      "description": "Tax year",
      "readOnly": true
     },
     "quarter": {
      "type": "integer",
      "description": "Quarter",
      "readOnly": true
     },
     "employer_taxes": {
      "type": "string",
      "format": "decimal",
      "description": "Employer taxes",
      "readOnly": true
     },
     "employer_contributions": {
      "type": "string",
      "format": "decimal",
      "description": "Employer contributions",
      "readOnly": true
     },
     "employee_count": {
      "type": "integer",
      "description": "Employee count",
      "readOnly": true
     },
     "calculation_mode": {
      "type": "string",
      "description": "Calculation mode",
      "readOnly": true
     },
     "engine_name": {
      "type": "string",
      "description": "Engine name",
      "readOnly": true
     },
     "paid_at": {
      "type": "string",
      "format": "date-time",
      "description": "Paid at",
      "readOnly": true
     },
     "reversal_of": {
      "type": "string",
      "format": "uuid",
      "description": "Reversal of",
      "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
     },
     "fund_id": {
      "type": "string",
      "format": "uuid",
      "description": "Fund id",
      "readOnly": true
     },
     "grant_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grant id",
      "readOnly": true
     },
     "program_id": {
      "type": "string",
      "format": "uuid",
      "description": "Program id",
      "readOnly": true
     },
     "function_id": {
      "type": "string",
      "format": "uuid",
      "description": "Function id",
      "readOnly": true
     },
     "derivation_trace": {
      "type": "object",
      "description": "Derivation trace",
      "readOnly": true
     },
     "left_out": {
      "type": "object",
      "description": "Left out",
      "readOnly": true
     },
     "ytd_posted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Ytd posted at",
      "readOnly": true
     },
     "paid_by": {
      "type": "string",
      "format": "uuid",
      "description": "Paid by",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/payroll-runs": {
   "get": {
    "summary": "list payroll-runs",
    "operationId": "list_payroll_runs_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 runs",
    "operationId": "action_payroll_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-runs/{id}": {
   "get": {
    "summary": "get payroll-runs",
    "operationId": "get_payroll_runs_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put payroll runs",
    "operationId": "action_payroll_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 runs",
    "operationId": "action_payroll_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-runs/{id}/lines": {
   "get": {
    "summary": "Lines",
    "operationId": "action_payroll_runs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_payroll_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"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{parentId}/payslips": {
   "get": {
    "summary": "Payslips",
    "operationId": "action_payroll_runs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Payslips",
    "operationId": "action_payroll_runs_1_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{parentId}/payslips/{lineId}": {
   "put": {
    "summary": "Payslips",
    "operationId": "action_payroll_runs_0_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Payslips",
    "operationId": "action_payroll_runs_1_7",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/calculate": {
   "post": {
    "summary": "Calculate",
    "operationId": "action_payroll_runs_0_5",
    "description": "Body keys: employeeId, earningCode, amount, hours, reason, periodStart, periodEnd, payDate, payGroupId, payPeriodId, runType, missingTime, force, forceReason, employeeIds, earnings",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/payslips": {
   "get": {
    "summary": "Payslips",
    "operationId": "action_payroll_runs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/approve": {
   "post": {
    "summary": "Approve",
    "operationId": "action_payroll_runs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/approve-override": {
   "post": {
    "summary": "Approve override",
    "operationId": "action_payroll_runs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/send-back": {
   "post": {
    "summary": "Send back",
    "operationId": "action_payroll_runs_0_6",
    "description": "Body keys: reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/cancel": {
   "post": {
    "summary": "Cancel",
    "operationId": "action_payroll_runs_0_6",
    "description": "Body keys: reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-runs/{id}/post": {
   "post": {
    "summary": "Post",
    "operationId": "action_payroll_runs_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}