{
 "openapi": "3.1.0",
 "info": {
  "title": "Payroll Readiness (HRMS)",
  "version": "20261030b",
  "description": "Each pay group’s period now due, how far its cycle has got, and what is still open before it can be run."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "payroll-readiness": {
    "type": "object",
    "required": [],
    "properties": {
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "pay_group_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pay group id",
      "readOnly": true
     },
     "pay_group_code": {
      "type": "string",
      "description": "Pay group code",
      "readOnly": true
     },
     "pay_group_name": {
      "type": "string",
      "description": "Pay group name",
      "readOnly": true
     },
     "pay_frequency": {
      "type": "string",
      "description": "Pay frequency",
      "readOnly": true
     },
     "calculation_mode": {
      "type": "string",
      "description": "Calculation mode",
      "readOnly": true
     },
     "country": {
      "type": "string",
      "description": "Country",
      "readOnly": true
     },
     "pay_period_id": {
      "type": "string",
      "format": "uuid",
      "description": "Pay period id",
      "readOnly": true
     },
     "period_no": {
      "type": "integer",
      "description": "Period 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
     },
     "cutoff_date": {
      "type": "string",
      "format": "date",
      "description": "Cutoff date",
      "readOnly": true
     },
     "days_to_pay": {
      "type": "integer",
      "description": "Days to pay",
      "readOnly": true
     },
     "employees": {
      "type": "integer",
      "description": "Employees",
      "readOnly": true
     },
     "cycle_status": {
      "type": "string",
      "description": "Cycle status",
      "readOnly": true
     },
     "periods_not_closed": {
      "type": "integer",
      "description": "Periods not closed",
      "readOnly": true
     },
     "unapproved_time_entries": {
      "type": "integer",
      "description": "Unapproved time entries",
      "readOnly": true
     },
     "unapproved_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Unapproved hours",
      "readOnly": true
     },
     "missing_timecards": {
      "type": "integer",
      "description": "Missing timecards",
      "readOnly": true
     },
     "retro_pending": {
      "type": "integer",
      "description": "Retro pending",
      "readOnly": true
     },
     "retro_pending_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Retro pending amount",
      "readOnly": true
     },
     "off_cycle_runs": {
      "type": "integer",
      "description": "Off cycle runs",
      "readOnly": true
     },
     "pay_rate_changes": {
      "type": "integer",
      "description": "Pay rate changes",
      "readOnly": true
     },
     "deduction_changes": {
      "type": "integer",
      "description": "Deduction changes",
      "readOnly": true
     },
     "tax_setup_gaps": {
      "type": "integer",
      "description": "Tax setup gaps",
      "readOnly": true
     },
     "direct_deposit_gaps": {
      "type": "integer",
      "description": "Direct deposit gaps",
      "readOnly": true
     },
     "corrections_this_year": {
      "type": "integer",
      "description": "Corrections this year",
      "readOnly": true
     },
     "runs_waiting": {
      "type": "integer",
      "description": "Runs waiting",
      "readOnly": true
     },
     "last_run_at": {
      "type": "string",
      "format": "date-time",
      "description": "Last run at",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/payroll-readiness": {
   "get": {
    "summary": "list payroll-readiness",
    "operationId": "list_payroll_readiness_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 readiness",
    "operationId": "action_payroll_readiness_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-readiness/{pay_group_id}": {
   "get": {
    "summary": "get payroll-readiness",
    "operationId": "get_payroll_readiness_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/payroll-readiness/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_payroll_readiness_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-readiness/{id}": {
   "put": {
    "summary": "Put payroll readiness",
    "operationId": "action_payroll_readiness_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 readiness",
    "operationId": "action_payroll_readiness_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  }
 }
}