Create NOTE with Attachment without SOAP

In my CRM, I have built a custom button in the leads module. The function of the button is to an invoice number and a PDF that includes the same invoice number. All of this is done via Ajax.

After clicking on the button, the default action uses SOAP and creates a Note and generates a PDF attachment as well.

I am looking for a way so that I can avoid using SOAP or use another mechanism that performs the same action. I just wanted to know if this is possible or not?