Skip to main content

Notifications

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.

  • Suggested answer
    YUN ZHU Profile Picture
    84,274 Super User 2025 Season 1 on at
    RE: Dyanmics Business Central API Updating/Patch an Attachment

    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

Jainam Kothari – Community Spotlight

We are honored to recognize Jainam Kothari as our June 2025 Community…

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard >

Featured topics

Product updates

Dynamics 365 release plans