Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

Posting Invoices Using APIs

Posted on by 50

Hi All, 

Is it possible to post an invoice using an API in Business Central? I know that there's the action within Flow but it doesn't accommodate for Multi-Companies.

I've had a look at the Purch-Post codeunit but there doesn't seem to be a schema where you input the invoice ID.

Thanks

Spencer

  • Ethan-Sorenson Profile Picture
    Ethan-Sorenson 225 on at
    RE: Posting Invoices Using APIs

    Spencer,

    I ran into the same issue and created a web service to do this. I had to copy most of the existing CodeUnit to custom CodeUnits so I could pass the error messages back to the web service.

    github.com/.../PostOrdersWebService

  • Spencer A-C Profile Picture
    Spencer A-C 50 on at
    RE: Posting Invoices Using APIs

    Thanks, I know that creating my own CodeUnit is an option but I'm trying to use as much out the box functionality as possible.

    It seems strange to me that they have a CodeUnit for Purch-Post but no SOAP Action for actually posting the document.

  • Suggested answer
    JAngle Profile Picture
    JAngle 33,159 on at
    RE: Posting Invoices Using APIs

    It’s not too dissimilar to this concept: d365bcangle.wordpress.com/.../

    You just need a codeunit that does the sales or purchase post instead.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,253 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,188 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans