to get a personalized navigation.
to get a personalized navigation.
Hi all,
I'm trying to find out if it is possible to download / open the invoice (PDF) in Visma using the API. I would like to know if somehow, i can use details which are extracted from the JournalTransactionV2 endpoint in order to get to the invoice (PDF). Hoping someone could point me in the right direction :).
Kind regards,
Daan
Solved! Go to Solution.
Hi Magnus,
I've been able to find and use the PDF PRINT endpoints for CustomerInvoice and CustomerCreditNote, but unable to find the PDF PRINT option for SupplierInvoice.
Will this be added any time soon?
Br,
Juliane
There is no direct action for the supplierInvoices.
But you can get the attachments for the invoice with the attachmentID on the supplierInvoice and then get by id via the "Attachment" endpoint.
Hi,
Will I be able to print the PDFs as an octetstream through your described solution?
Can't see the print option from the Attachment endpoint:
Hi,
Yes that is correct, please let us know if you run in to any issues.
Hi Magnus,
Thanx for the quick and detailed response. I'm not familiar with octetstream yet but from the looks of it, this is exactly what i need.
Regards,
Daan
Hi,
This would depend on what the source document for the journalTransaction is.
Scenario 1 - Transaction is for a payment to an invoice:
From UI:
Get JournalTransaction:
To get to the CustomerInvoice in this case you would first need to GET customerPayment, with the referenceNumber in the reply above:
In the response from CustomerPayment, you would check the paymentLines for the invoice referenceNumber and continue with steps below.
Scenario 2 - Transaction is for the invoice:
Here you would directly get the referenceNumber from the lines and call the customerInvoice/InvoiceNumber/print endpoint:
In the response you would receive the PDF as an octetstream:
Copyright © 2022 Visma.com. All rights reserved.