How to fetch html template used in invoice using invoice_id using api? I want to generate a pdf from it and make it available for my customer to view it in future

Is there a way to fetch the invoice template using api?