Invoice pdf download

Invoice pdf download

How do I get the pdf of an invoice from creator based on the invoice number? I would like to be able to fetch the pdf file and put it into an attachment field in my form. Is there a certain api call that I can use?