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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

Get invoice PDF via API

(1) ShareShare
ReportReport
Posted on by 63
Hi Team,

I am going to receive invoice PDF via API from Business Central, but BC returns the error message.
I use the cloud version of Business Central.

Example of the request:

https:/api.businesscentral.dynamics.com/api/v2.0/companies(111e9e8a-5177-ee11-817e-6045bdc893e2)/salesInvoices(f57ff210-c5af-ee11-a568-000d3a0b28bf)/pdfDocument/pdfDocumentContent

Response:
 
{
    /error/: {
        /code//RequestDataInvalid/,
        /message//Request data is invalid./
    }
}

What is the reason of this issue and how to fix it?


Also, I added web services:

 
 
 
 
I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    99,968 Super User 2026 Season 1 on at
    Hi, an attachment in the Business Central standard API is defined as an Incoming Document (table 130), not Document Attachment (table 1173).
    I have used this standard API in Power Automate and hope it can give you some tips.
    How to automatically upload files from OneDrive to Business Central with Power Automate (No customization)
     
     
    Thanks.
    ZHU
  • Verified answer
    Andrew1986 Profile Picture
    63 on at
    I used this documentation - https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/api-reference/v2.0/api/dynamics_salesquote_pdfdocument

    So, my request is

    https://api.businesscentral.dynamics.com/api/v2.0/companies(111e9e8a-5177-ee11-817e-6045bdc893e2)/salesInvoices(f57ff210-c5af-ee11-a568-000d3a0b28bf)/pdfDocument

    But Business Central returns that the request is invalid.

     
    {
        "error": {
            "code""RequestDataInvalid",
            "message""Request data is invalid."
        }
    }


    what is the reason of the issue and how I should fix it?
  • Suggested answer
    Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    Please refrain from posting content on the forum that is not related to this forum, or advertising other products, as this will reduce the usefulness of the forum and lose its original relevance. Please delete that statement and thank you.
    Best regards,
    Kevin

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,024 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,145 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 705 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans