{
 "openapi": "3.1.0",
 "info": {
  "title": "Timesheets (HRMS)",
  "version": "20261030b",
  "description": "Hours entered, then evaluated against the rule that governs the person so that what a manager approves is what will be paid."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "timesheets": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "timesheet_no": {
      "type": "string",
      "description": "Timesheet no",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee id",
      "readOnly": true
     },
     "employee_no": {
      "type": "string",
      "description": "Employee no",
      "readOnly": true
     },
     "employee_name": {
      "type": "string",
      "description": "Employee name",
      "readOnly": true
     },
     "period_start": {
      "type": "string",
      "format": "date",
      "description": "Period start",
      "readOnly": true
     },
     "period_end": {
      "type": "string",
      "format": "date",
      "description": "Period end",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "total_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Total hours",
      "readOnly": true
     },
     "regular_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Regular hours",
      "readOnly": true
     },
     "overtime_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Overtime hours",
      "readOnly": true
     },
     "double_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Double hours",
      "readOnly": true
     },
     "leave_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Leave hours",
      "readOnly": true
     },
     "holiday_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Holiday hours",
      "readOnly": true
     },
     "overtime_rule": {
      "type": "string",
      "description": "Overtime rule",
      "readOnly": true
     },
     "overtime_rule_name": {
      "type": "string",
      "description": "Overtime rule name",
      "readOnly": true
     },
     "evaluated_at": {
      "type": "string",
      "format": "date-time",
      "description": "Evaluated at",
      "readOnly": true
     },
     "submitted_at": {
      "type": "string",
      "format": "date-time",
      "description": "Submitted at",
      "readOnly": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at",
      "readOnly": true
     },
     "approved_by_name": {
      "type": "string",
      "description": "Approved by name",
      "readOnly": true
     },
     "entries": {
      "type": "integer",
      "description": "Entries",
      "readOnly": true
     },
     "standing": {
      "type": "string",
      "description": "Standing",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/timesheets": {
   "get": {
    "summary": "list timesheets",
    "operationId": "list_timesheets_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post timesheets",
    "operationId": "action_timesheets_1_4",
    "description": "Body keys: employeeId*, periodStart, periodEnd",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/timesheets/{id}": {
   "get": {
    "summary": "get timesheets",
    "operationId": "get_timesheets_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete timesheets",
    "operationId": "action_timesheets_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put timesheets",
    "operationId": "action_timesheets_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/timesheets/{id}/entries": {
   "post": {
    "summary": "Entries",
    "operationId": "action_timesheets_0_6",
    "description": "Body keys: workDate*, hours, entryType, startTime, endTime, breakMinutes, shiftId, notes",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/timesheets/{id}/evaluate": {
   "post": {
    "summary": "Evaluate",
    "operationId": "action_timesheets_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/timesheets/{id}/submit": {
   "post": {
    "summary": "Submit",
    "operationId": "action_timesheets_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/timesheets/{id}/approve": {
   "post": {
    "summary": "Approve",
    "operationId": "action_timesheets_0_6",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/timesheets/{id}/reject": {
   "post": {
    "summary": "Reject",
    "operationId": "action_timesheets_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/timesheets/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_timesheets_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"
     }
    }
   }
  }
 }
}