Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Attach PDF to emailed invoices from API #536

Open
AndrewLugg opened this issue Jun 20, 2021 · 2 comments
Open

Attach PDF to emailed invoices from API #536

AndrewLugg opened this issue Jun 20, 2021 · 2 comments

Comments

@AndrewLugg
Copy link

SDK you're using (please complete the following information):

  • Version 4..11.0

Is your feature request related to a problem? Please describe.
Attaching PDF to "emailInvoice" API endpoint. We have customers that use automated systems such as Hubdoc which automatically import the PDF from email, but if the invoice was generated via the API, I am unable to attach the PDF to the email, so they have to manually process our invoices, which they are grumpy about.

Describe the solution you'd like
Able to set "Attach PDF" on the API call, and it attach the same PDF as the web interface.

Describe alternatives you've considered
We are looking at generating the PDF manually to just look like the one Xero generates, and attach that document to an email that we generate, but we would have to be really careful to make sure that all the data is identical. And it seems like a lot of work for a feature that should be included.

We considered using the "download PDF" option via the API, but the API version of PDFs don't include custom fonts from the template. When the web version does include our fonts. So we would be forced to use our own PDF generation servers. The custom font is 3of9 for barcodes.

@SerKnight SerKnight self-assigned this Jun 21, 2021
@SerKnight
Copy link
Contributor

Hi Andrew.

So to get to the crux of this are you saying createInvoiceAttachmentByFileName is not working as expected?

https://xeroapi.github.io/xero-node/accounting/index.html#api-Accounting-createInvoiceAttachmentByFileName

Or are you trying to use the getInvoiceAsPdf but the fonts/template aren't accurate across as API (that is a known limitation of the get as pdf endpoint).

https://xeroapi.github.io/xero-node/accounting/index.html#api-Accounting-getInvoiceAsPdf

--

Not sure if your goal is to related to the attachments on an invoice, or generating the invoice and its data as its own pdf.

@AndrewLugg
Copy link
Author

I would like to use emailInvoice endpoint to send an email to my customer, with the Invoice PDF attached.

I am unable to use getInvoiceAsPdf because of the font issues.

I am not wanting to use createInvoiceAttachmentByFileName, as I am just trying to send the customer a copy of the invoice PDF not any attachments.

Essentially this screen via API and set the "Include PDF attachment"
sendInvoicePDF

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants