I have a Business Central v18.0 On-Prem client that wants to use the pdfDocument functionality in an API to download reports.
I have configured my Postman API setup to retrieve the Sales Invoice Data, which worked great. I was able to retrieve the information. Th
http://*********/UAT/api/beta/companies(*********)/salesInvoices(4a504f68-e9a6-ed11-8b9a-00155d001620)
According to the Microsoft Documentation https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_pdfdocument_get we only net to add "pdfDocument" and a link with the report will be returned.
Here is the new URL with pdf documents attached
http://*********/UAT/api/beta/companies(*********)/salesInvoices(4a504f68-e9a6-ed11-8b9a-00155d001620)/pdfDocument
The first time it did work and it did return the URL for the report. The second time I received the following error.
I need to get the reports through a URL. Any assistance to remedy this would be highly appreciated.
Thanks
For some Reason. APIV2 extension wasn't installed.
Here is the weird part. The extensions for API are not shown in extension management.
We got the Microsoft__Exclude_APIV2_.app file from the onPrem download file.
..\Applications\APIV2\Source
After Publishing and installing V2.0 was available on the web service Table = 2000000193
hello, you have to add "/pdfDocumentContent" to the url, as in the attached image:
this way you get the file:
Don't forget to help the community by Verifying the answer and Like it if your question has been answered. It will let others know that the topic has verified answer.
Thanks & Regards,
Gian
Stay up to date on forum activity by subscribing. You can also customize your in-app and email Notification settings across all subscriptions.
André Arnaud de Cal... 291,134 Super User 2024 Season 2
Martin Dráb 229,928 Most Valuable Professional
nmaenpaa 101,156