{
 "openapi": "3.1.0",
 "info": {
  "title": "Operation Time Variance (Manufacturing)",
  "version": "20261030b",
  "description": "What the routing said each operation would take and what it took, so an estimate that is consistently wrong can be corrected rather than argued about."
 },
 "servers": [
  {
   "url": "https://{tenant}.tranxact.ai",
   "variables": {
    "tenant": {
     "default": "demo"
    }
   }
  }
 ],
 "components": {
  "securitySchemes": {
   "bearer": {
    "type": "http",
    "scheme": "bearer"
   }
  },
  "schemas": {
   "operation-time-variance": {
    "type": "object",
    "required": [],
    "properties": {
     "id": {
      "type": "string",
      "format": "uuid",
      "description": "Id",
      "readOnly": true
     },
     "production_order_id": {
      "type": "string",
      "format": "uuid",
      "description": "Production order id",
      "readOnly": true
     },
     "op_no": {
      "type": "integer",
      "description": "Op no",
      "readOnly": true
     },
     "work_center_id": {
      "type": "string",
      "format": "uuid",
      "description": "Work center id",
      "readOnly": true
     },
     "description": {
      "type": "string",
      "description": "Description",
      "readOnly": true
     },
     "planned_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Planned minutes",
      "readOnly": true
     },
     "actual_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Actual minutes",
      "readOnly": true
     },
     "status": {
      "type": "string",
      "description": "Status",
      "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
     },
     "org_id": {
      "type": "string",
      "format": "uuid",
      "description": "Org id",
      "readOnly": true
     },
     "scheduled_start": {
      "type": "string",
      "format": "date-time",
      "description": "Scheduled start",
      "readOnly": true
     },
     "scheduled_end": {
      "type": "string",
      "format": "date-time",
      "description": "Scheduled end",
      "readOnly": true
     },
     "actual_start": {
      "type": "string",
      "format": "date-time",
      "description": "Actual start",
      "readOnly": true
     },
     "actual_end": {
      "type": "string",
      "format": "date-time",
      "description": "Actual end",
      "readOnly": true
     },
     "qty_completed": {
      "type": "string",
      "format": "decimal",
      "description": "Qty completed",
      "readOnly": true
     },
     "qty_scrapped": {
      "type": "string",
      "format": "decimal",
      "description": "Qty scrapped",
      "readOnly": true
     },
     "qty_reworked": {
      "type": "string",
      "format": "decimal",
      "description": "Qty reworked",
      "readOnly": true
     },
     "sequence_no": {
      "type": "integer",
      "description": "Sequence no",
      "readOnly": true
     },
     "equipment_id": {
      "type": "string",
      "format": "uuid",
      "description": "Equipment id",
      "readOnly": true
     },
     "cam_program_id": {
      "type": "string",
      "format": "uuid",
      "description": "Cam program id",
      "readOnly": true
     },
     "is_subcontracted": {
      "type": "boolean",
      "description": "Is subcontracted",
      "readOnly": true
     },
     "setup_minutes": {
      "type": "string",
      "format": "decimal",
      "description": "Setup minutes",
      "readOnly": true
     },
     "planned_start": {
      "type": "string",
      "format": "date",
      "description": "Planned start",
      "readOnly": true
     },
     "planned_end": {
      "type": "string",
      "format": "date",
      "description": "Planned end",
      "readOnly": true
     },
     "predecessor_op_no": {
      "type": "integer",
      "description": "Predecessor op no",
      "readOnly": true
     },
     "requires_inspection": {
      "type": "boolean",
      "description": "Requires inspection",
      "readOnly": true
     },
     "inspection_plan_id": {
      "type": "string",
      "format": "uuid",
      "description": "Inspection plan id",
      "readOnly": true
     },
     "inspection_status": {
      "type": "string",
      "description": "Inspection status",
      "readOnly": true
     },
     "supplier_id": {
      "type": "string",
      "format": "uuid",
      "description": "Supplier id",
      "readOnly": true
     },
     "subcontract_po_id": {
      "type": "string",
      "format": "uuid",
      "description": "Subcontract po id",
      "readOnly": true
     },
     "employee_id": {
      "type": "string",
      "format": "uuid",
      "description": "Employee id",
      "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
     }
    }
   }
  }
 },
 "security": [
  {
   "bearer": []
  }
 ],
 "paths": {
  "/api/mfg/operation-time-variance": {
   "get": {
    "summary": "list operation-time-variance",
    "operationId": "list_operation_time_variance_0_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "post": {
    "summary": "Post operation time variance",
    "operationId": "action_operation_time_variance_1_4",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/operation-time-variance/{id}": {
   "get": {
    "summary": "get operation-time-variance",
    "operationId": "get_operation_time_variance_0_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "put": {
    "summary": "Put operation time variance",
    "operationId": "action_operation_time_variance_1_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   },
   "delete": {
    "summary": "Delete operation time variance",
    "operationId": "action_operation_time_variance_2_5",
    "responses": {
     "200": {
      "description": "OK"
     },
     "401": {
      "description": "No or bad credential"
     },
     "403": {
      "description": "Not granted"
     },
     "422": {
      "description": "Refused by validation"
     }
    }
   }
  },
  "/api/mfg/operation-time-variance/{id}/copy": {
   "post": {
    "summary": "Copy",
    "operationId": "action_operation_time_variance_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"
     }
    }
   }
  }
 }
}