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...
Suggested Answer

Dyanmics Business Central API Updating/Patch an Attachment

(0) ShareShare
ReportReport
Posted on by 5

I am trying to attach a PDF file to a Purchase Invoice.

I am able to create the attachment and get a valid response with the etag, etc.

I am not however finding any info on the format of the Patch call to update the attachment and provide the attachment content.

In Postman, I have these headers:

pastedimage1670530899495v1.png

and the body looks like this now:

pastedimage1670530947752v2.png

I have also tried sending the body as JSON with both "Content", "attachmentContent" keys and also tried both with and without the base64 prefix "data:application/pdf;base64,".

The file is created in Dynamics but it is a text file of the body verbatim so it isn't being converted from Base64 to PDF.

Anyone that might have worked with this and can help is appreciated.

I have the same question (0)
  • Suggested answer
    YUN ZHU Profile Picture
    95,548 Super User 2025 Season 2 on at

    Hi, hope the following helps.

       

    Thanks.

    ZHU

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,151

#2
Jainam M. Kothari Profile Picture

Jainam M. Kothari 1,443 Super User 2025 Season 2

#3
YUN ZHU Profile Picture

YUN ZHU 1,092 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans