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

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
    95,647 Super User 2025 Season 2 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

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 2,577

#2
YUN ZHU Profile Picture

YUN ZHU 888 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 778 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans