web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Business Central API pdfDocument "BadRequest_NotFound"

(0) ShareShare
ReportReport
Posted on by 629

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)


pastedimage1681217964957v5.png

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. 
pastedimage1681217406757v2.png

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.
pastedimage1681217909982v4.png

I need to get the reports through a URL. Any assistance to remedy this would be highly appreciated. 
Thanks

I have the same question (0)
  • Suggested answer
    Gianfranco C. Profile Picture
    370 on at

    hello, you have to add "/pdfDocumentContent" to the url, as in the attached image:

    pastedimage1681220533151v1.png

    this way you get the file:

    pastedimage1681220657665v2.png

    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

  • Suggested answer
    Hein Kruger Profile Picture
    629 on at

    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

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 3,316

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 2,449 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,431 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans