{
 "openapi": "3.1.0",
 "info": {
  "title": "Punch Corrections (HRMS)",
  "version": "20261030b",
  "description": "A missed or wrong punch put right, with the reason, decided by somebody other than whoever asked and never by the employee themselves. Those an employee asks for wait in their manager’s Team Approvals too."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "punch-corrections": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "org_unit_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org unit id",
      "readOnly": true
     },
     "correction_no": {
      "type": "string",
      "description": "Correction 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
     },
     "manager_id": {
      "type": "string",
      "format": "uuid",
      "description": "Manager id",
      "readOnly": true
     },
     "action": {
      "type": "string",
      "description": "Action",
      "readOnly": true
     },
     "punch_id": {
      "type": "string",
      "format": "uuid",
      "description": "Punch id",
      "readOnly": true
     },
     "punch_type": {
      "type": "string",
      "description": "Punch type",
      "readOnly": true
     },
     "status_code": {
      "type": "string",
      "description": "Status code",
      "readOnly": true
     },
     "corrected_at": {
      "type": "string",
      "format": "date-time",
      "description": "Corrected at",
      "readOnly": true
     },
     "original_at": {
      "type": "string",
      "format": "date-time",
      "description": "Original at",
      "readOnly": true
     },
     "reason": {
      "type": "string",
      "description": "Reason",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "readOnly": true
     },
     "requested_by": {
      "type": "string",
      "format": "uuid",
      "description": "Requested by",
      "readOnly": true
     },
     "requested_by_name": {
      "type": "string",
      "description": "Requested by name",
      "readOnly": true
     },
     "requested_at": {
      "type": "string",
      "format": "date-time",
      "description": "Requested at",
      "readOnly": true
     },
     "decided_by": {
      "type": "string",
      "format": "uuid",
      "description": "Decided by",
      "readOnly": true
     },
     "decided_by_name": {
      "type": "string",
      "description": "Decided by name",
      "readOnly": true
     },
     "decided_at": {
      "type": "string",
      "format": "date-time",
      "description": "Decided at",
      "readOnly": true
     },
     "decision_note": {
      "type": "string",
      "description": "Decision note",
      "readOnly": true
     },
     "applied_punch_id": {
      "type": "string",
      "format": "uuid",
      "description": "Applied punch id",
      "readOnly": true
     },
     "created_at": {
      "type": "string",
      "format": "date-time",
      "description": "Created at",
      "readOnly": true
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/hrms/punch-corrections": {
   "get": {
    "summary": "list punch-corrections",
    "operationId": "list_punch_corrections_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post punch corrections",
    "operationId": "action_punch_corrections_1_4",
    "description": "Body keys: employeeId, employee_id",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/punch-corrections/{id}": {
   "get": {
    "summary": "get punch-corrections",
    "operationId": "get_punch_corrections_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put punch corrections",
    "operationId": "action_punch_corrections_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete punch corrections",
    "operationId": "action_punch_corrections_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/punch-corrections/{id}/decide": {
   "post": {
    "summary": "Decide",
    "operationId": "action_punch_corrections_0_6",
    "description": "Body keys: decision, comment, note, reason",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/hrms/punch-corrections/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_punch_corrections_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"
     }
    }
   }
  }
 }
}