{
 "openapi": "3.1.0",
 "info": {
  "title": "Time Entries (HRMS)",
  "version": "20261030b",
  "description": "Read and maintain time entries records (hr.time_entries)."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "time-entries": {
    "type": "object",
    "required": [
     "employee_id",
     "work_date",
     "hours"
    ],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee"
     },
     "work_date": {
      "type": "string",
      "format": "date",
      "description": "Work date"
     },
     "hours": {
      "type": "string",
      "format": "decimal",
      "description": "Hours"
     },
     "entry_type": {
      "type": "string",
      "description": "Type",
      "enum": [
       "regular",
       "overtime",
       "oncall",
       "holiday"
      ]
     },
     "project_ref": {
      "type": "string",
      "description": "Project ref"
     },
     "status": {
      "type": "string",
      "description": "Status",
      "enum": [
       "submitted",
       "approved",
       "rejected"
      ]
     },
     "approved_by": {
      "type": "string",
      "format": "uuid",
      "description": "Approved by",
      "readOnly": true
     },
     "cost_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cost center"
     },
     "profit_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Profit center id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "timesheet_id": {
      "type": "string",
      "format": "uuid",
      "description": "Timesheet id",
      "readOnly": true
     },
     "shift_id": {
      "type": "string",
      "format": "uuid",
      "description": "Shift id",
      "readOnly": true
     },
     "start_time": {
      "type": "string",
      "description": "Start time",
      "readOnly": true
     },
     "end_time": {
      "type": "string",
      "description": "End time",
      "readOnly": true
     },
     "break_minutes": {
      "type": "integer",
      "description": "Break minutes",
      "readOnly": true
     },
     "premium_type": {
      "type": "string",
      "description": "Premium type",
      "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
     },
     "evaluation_basis": {
      "type": "string",
      "description": "Evaluation basis",
      "readOnly": true
     },
     "work_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work order id",
      "readOnly": true
     },
     "notes": {
      "type": "string",
      "description": "Notes",
      "readOnly": true
     },
     "approved_at": {
      "type": "string",
      "format": "date-time",
      "description": "Approved at",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "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_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "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"
     },
     "grant_id": {
      "type": "string",
      "format": "uuid",
      "description": "Grant"
     },
     "program_id": {
      "type": "string",
      "format": "uuid",
      "description": "Program"
     },
     "location_id": {
      "type": "string",
      "format": "uuid",
      "description": "Property / site"
     },
     "department": {
      "type": "string",
      "description": "Department"
     },
     "source": {
      "type": "string",
      "description": "Source",
      "readOnly": true
     },
     "raw_start_time": {
      "type": "string",
      "description": "Raw start time",
      "readOnly": true
     },
     "raw_end_time": {
      "type": "string",
      "description": "Raw end time",
      "readOnly": true
     },
     "raw_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Raw hours",
      "readOnly": true
     },
     "rounding_basis": {
      "type": "string",
      "description": "Rounding basis",
      "readOnly": true
     },
     "premium_earning_code": {
      "type": "string",
      "description": "Premium earning code",
      "readOnly": true
     },
     "premium_hours": {
      "type": "string",
      "format": "decimal",
      "description": "Premium hours",
      "readOnly": true
     },
     "premium_multiplier": {
      "type": "string",
      "format": "decimal",
      "description": "Premium multiplier",
      "readOnly": true
     },
     "premium_amount": {
      "type": "string",
      "format": "decimal",
      "description": "Premium amount",
      "readOnly": true
     },
     "premium_basis": {
      "type": "string",
      "description": "Premium basis",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/time-entries": {
   "get": {
    "summary": "list time-entries",
    "operationId": "list_time_entries_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "create time-entries",
    "operationId": "create_time_entries_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/time-entries/{id}": {
   "get": {
    "summary": "get time-entries",
    "operationId": "get_time_entries_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "change time-entries",
    "operationId": "change_time_entries_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "delete time-entries",
    "operationId": "delete_time_entries_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/time-entries/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_time_entries_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"
     }
    }
   }
  }
 }
}