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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

How to Create Custom Webhook/API in Business Central to Receive XML Payload from ThirdParty System?

(1) ShareShare
ReportReport
Posted on by 16

I'm working on integrating a third-party application with Microsoft Dynamics 365 Business Central.

The third-party system can only send data as an HTTP POST request with an XML payload to a webhook URL. My goal is to receive this XML in Business Central, parse it, and create or update records based on the data.

I have a few questions:

  1. Is it possible to create a custom webhook endpoint directly in Business Central that can accept raw XML payloads?
  2. If not, is exposing a SOAP Web Service (Codeunit) a suitable approach for receiving XML from the third-party system?
  3. Has anyone implemented a similar XML integration without using middleware such as Azure Functions or Logic Apps?
  4. If SOAP is the recommended option, could you share an example of how to:
    • Publish the Codeunit as a SOAP Web Service
    • Receive the XML request
    • Parse the XML in AL

Any guidance, best practices, or sample implementations would be greatly appreciated.

Thank you!

I have the same question (0)
  • Suggested answer
    Grigorios Mavrogeorgis Profile Picture
    2,827 Super User 2026 Season 1 on at
    Hi,
    I would not build a new integration on SOAP today. It's deprecated, Microsoft UI pages already can't be published as SOAP from v26 unless you flip a feature key off, and removal is scheduled for 29.0, 2026 wave 2. Codeunit SOAP is not dead yet at that exact date but the whole direction of travel is clear, you'd be building something with a known expiry on it.
    On your question 1, no, there's no way to define a truly custom raw webhook endpoint in BC that accepts arbitrary XML at a URL of your choosing, you get the endpoints BC gives you, API pages, API queries, OData. What you can do is an API page or a codeunit with an unbound action exposed through OData V4, then POST to that. Body handling is the catch, these expect JSON, so if the sender is hard locked to XML with Content-Type text/xml you can't just point it straight at BC.
    Honestly for a sender that only does XML POST, a thin middleware layer is the cleaner answer, Azure Function that takes the XML, converts, calls BC's API. If you must avoid middleware, take the XML as a string parameter into an unbound action and parse it in AL with XmlDocument, XmlNodeList and SelectNodes, that works fine.
    Is the third party genuinely unable to change content type, or just sending XML by default?
     
    Glad to help - follow up if anything is unclear.  
    ►  If this solved it, marking it verified helps others too.      
    Regards,
    Grigorios Mavrogeorgis
    Business Central Consultant & AL Developer

    Work: Gmsoft Limited
    Blog:  insidebusinesscentral
    LinkedIn: linkedin.com/in/gregorymavrogeorgis

     
  • Suggested answer
    YUN ZHU Profile Picture
    102,516 Super User 2026 Season 1 on at
    Hi, Try the following method.
    Dynamics 365 Business Central: Using OData V4 unbound action (Codeunit API?) to communicate and exchange data seamlessly
     
    You can first load this XML file into BC and then read its contents.
     
     
    Hope this can give you some hints.
    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the June Top 10 Community Leaders

These are the community rock stars!

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 658 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 499 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 328 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans