Alletec Logo
  • Solutions & Services
    • AI Business Applications
    • Enterprise Data Services
    • AI & Intelligent Solutions
    • Azure Infrastructure & Platform Services
    • Security Solutions
    • Services
    • Partner Services
    • Modern Work & Digital Productivity
    Microsoft Dynamics 365Microsoft Dynamics 365Power PlatformPower Platform
    • BusinessCentralBusiness Central
    • SalesSales
    • FinanceFinance
    • Customer InsightsCustomer Insights | Marketing
    • Supply Chain ManagementSupply Chain Management
    • Customer ServiceCustomer Service
    • Project OperationsProject Operations
    • Field ServiceField Service
    • Human ResourcesHuman Resources
    • Contact CenterContact Center
    • Power BIPower BI
    • Power AppsPower Apps
    • Power AutomatePower Automate
    • Power PagesPower Pages
    Microsoft AzureData Engineering & Modern Data Platforms
     
    • Modern Data PlatformsModern Data Platforms
    • Data EngineeringData Engineering
    • Microsoft FabricMicrosoft Fabric
    • Data Governance & QualityData Governance & Quality
    • Analytics & InsightsAnalytics & Insights
      AI & Intelligent SolutionsAI & Intelligent Solutions
       
      • AI Agents & CopilotsAI Agents & Copilots
      • Unified Intelligence FrameworkUnified Intelligence Framework
      • Applications ModernizationApplications Modernization
      • Applied AI Use CasesApplied AI Use Cases
      • RPARobotic Process Automation (RPA)
        • Power BIPower BI
        • Power AppsPower Apps
        • Power AutomatePower Automate
        • Power PagesPower Pages
        Microsoft AzureAzure Infrastructure & Platform Services
        • Cloud Architecture & Landing ZonesCloud Architecture & Landing Zones
        • Resilience, Backup & Disaster RecoveryResilience, Backup & Disaster Recovery
        • Azure InfrastructureAzure Infrastructure (IaaS)
        • Azure Platform ServicesAzure Platform Services (PaaS)
        • Hybrid & Multi-Cloud EnablementHybrid & Multi-Cloud Enablement
        • Cloud Operations & FinOpsCloud Operations & FinOps
        • Security & GovernanceSecurity & Governance
        • Managed ServicesAzure Managed Services
        • Modern Data PlatformsModern Data Platforms
        • Data EngineeringData Engineering
        • Microsoft FabricMicrosoft Fabric
        • Data Governance & QualityData Governance & Quality
        • Analytics & InsightsAnalytics & Insights
        • AI Agents & CopilotsAI Agents & Copilots
        • Unified Intelligence FrameworkUnified Intelligence Framework
        • Applications ModernizationApplications Modernization
        • Applied AI Use CasesApplied AI Use Cases
        • RPARobotic Process Automation (RPA)
        • Cloud Architecture & Landing ZonesCloud Architecture & Landing Zones
        • Resilience, Backup & Disaster RecoveryResilience, Backup & Disaster Recovery
        • Azure InfrastructureAzure Infrastructure (IaaS)
        • Azure Platform ServicesAzure Platform Services (PaaS)
        • Hybrid & Multi-Cloud EnablementHybrid & Multi-Cloud Enablement
        • Cloud Operations & FinOpsCloud Operations & FinOps
        • Security & GovernanceSecurity & Governance
        • Managed ServicesAzure Managed Services
          • Data EngineeringData Engineering
          • Microsoft FabricData Fabric
          • AI Powered SolutionsAI-Powered Solutions
          • RPARobotic Process Automation (RPA)
          • AIMAIM Modernization Center
          • NAVD365 Business Central | NAV
          • Upgrade Nav to BCUpgrade NAV to D365 Business Central
          • Customer EngagementD365 Customer Engagement Services
          • GP to BCGP To D365 BC Migration
          • SharePointSharePoint Solutions
          • Data EngineeringData Engineering
          • Microsoft FabricMicrosoft Fabric
          • RPARobotic Process Automation (RPA)
          • AI PoweredAI-Powered Solutions
          • AIM Modernization CenterAIM Modernization Center
          • MasterVARMasterVAR
          Security SolutionsSecurity Solutions
           
          • Cyber Threat DefenseCyber Threat Defense
          • Protect Business DataProtect Business Data
          • Manage DevicesDevice Management
          • Secure Remote AccessSecure Remote Access
          • Keep Employees ConnectedKeep Employees Connected
            Modern Work & Digital ProductivityModern Work & Digital Productivity
             
            • Teams & CollaborationTeams & Collaboration
            • SharePoint & Knowledge ManagementSharePoint & Knowledge Management
            • Microsoft 365 CopilotMicrosoft 365 Copilot
            • Secure remote & hybrid workSecure remote & hybrid work
            • Industries
              • Professional Services
              • Manufacturing
              • Education
              • Trade & Distribution
              • Financial Services
              • Retail & Digital Commerce
              • Travel
              • Food & Beverages
                • Bakery
                • Beverages
                • Confectionary
                • Dairy
                • Fresh Produce
                • Frozen & Packaged Food
                • Meat & Poultry
                • Sauces & Dressings
                • Snacks
                • Spices
            • Products
              • Industry Solutions
              • Dynamics 365 Accelerators
              • Travel 365Travel 365
              • EdTech 365EdTech 365
              • Smart-CXSmart-CX
              • BAFINSBAFINS
              • EPC 365EPC 365
              • XtendedWMSXtendedWMS
              • socialRelaySocialRelay
              • ProActivateProActivate
              • CyborgCyborg
              • P2P 365P2P 365
            • Resources
              • Alletec Blog
              • Videos
              • Case Studies
              • Brochures
              • eBooks & Infographics
            • Alletec
              • Company Profile
              • Board of Directors
              • Investor Relations
              • Life @ Alletec
              • Careers
              • Contact Us
            Great Place to work Alletec
            Blog

            D365 Finance and Supply Chain Integration PART I – Leveraging REST Framework

            AlletecAlletec

            In this always connected world there is constant requirement for various applications to communicate with each other. One of the communication mediums in which programs talk to each other is REST (Representational State Transfer). REST represents set of rules that enables different programs to communicate with each other. In this 2-part blog series, we will see how D365 Finance and Supply Chain Management integrates with third party software. The same equally applies to D365 Finance and Operations integration.

            • Consume external REST api in D365 Finance and Supply Chain, and
            • How one can consume D365 Finance and Supply Chain REST api in the third-party software

            Before we jump upon part 1, lets understand when to use REST based integration. Though its not a thumb rule and developer can use any technology for integration. But below points will help in making decision faster to use REST based integration.

            • If there is need for real-time (synchronized) data availability between the 2 systems
            • If one needs to quickly develop the integration without any complex message body
            • If the data which is being sent over REST is not heavy
            • Wide range of support – since REST works over HTTP/HTTPS, any browser or system which supports HTTP/HTTPS can work with REST
            • Minimal learning curve for developers

            Part I – Consuming external REST api in D365 Finance and Supply Chain

            Calling external REST api is very well supported in D365 Finance and Supply Chain. One can use existing .NET classes in x++ to call the REST api. To demonstrate and explain how to consume the REST api in D365 Finance and Supply Chain we will use Zomato’s api for getting City Id.

            Demo

            Let’s have a look at below sample code which consumes Zomato’s api. In this example we are consuming the api to get the additional information related to a city for e.g. Mumbai. Brief explanation for each line of code is mentioned below:

             

            Line#9 to Line#15:

            This section contains all the required declarations of variables which will be used throughout the code

            System.Net.WebHeaderCollection – Via this object we will mention the key which is provided to us by Zomato. This will serve as a kind of validation. This is must without which we will not get any response.

            System.Net.WebRequest – request object in which we will pass the api url, set the format of the payload i.e. application/json and set the which method we will be calling i.e. “GET”

            System.Net.HttpWebResponse – to hold response received from api

            System.IO.Stream – to get the response stream

            System.IO.StreamReader – to read the stream

            System.String – to hold the output of the stream in string format

            Newtonsoft.Json.Linq.JObject – to serialize the string in json format

            Line#19 to Line#32:

            This section contains the main logic in which we call the api and get the results.

            Line#19 – sets the language in which we are going to send or receive the data

            Line#20 – REST method. ‘GET’ in our case

            Line#22-Line#23 – getting the header object and setting the “user-key” value which is api key in our case. Via this Zomato will validate the call. Without this we will not get correct response.

            Line#25 – this is main line which makes the request i.e. calls the api with given parameters.

            Line#27-Line#28 – gets the response stream and assign it to stream reader

            Line#30 – read the stream till end of it and assign the value to variable as string

            Line#31 – parse the saved response string to JSON

            Line#32 – show the final response as json string via Info class. The final json response looks like

            Once we execute the logic, we will receive the response. After parsing the response correctly, we are presented with below json string. As we can see in response to our query for city Mumbai, we have response i.e. id of the city, name of country in which city resides, etc.

             

            Conclusion

            With this demonstration we were able to consume the REST service in D365 Finance and Supply Chain. This scenario can also be known as “Pull method” i.e. D365 Finance and Supply Chain pulling the records via REST from 3rd party. This scenario can be helpful in cases where 3rd party has already hosted the services and once can pull the data for further use. Now, in our 2nd part of the blog we will try to consume the D365 Finance and Supply Chain’s exposed REST api to read data from D365.

            Stay tuned with us to know more about Microsoft Dynamics 365 Finance and Supply Chain integration PART II

            Let's Build Smarter, Agile, and Scalable Solutions Together
            Talk to An Expert
            Talk to An Expert Alletec
            Dec 10, 2020 6388 Views

            Recent Posts

            Dynamics 365 Project Operations for Professional Services: 5 Ways to Simplify Project Expense Management

            Jan 27, 2026

            Dynamics 365 Project Operations for Professional Services: 5 Ways to Simplify Project Expense Management
            Read Full Blog    
            Decoding Microsoft’s New IQ Layer: Work IQ, Fabric IQ, and Foundry IQ Explained

            Jan 13, 2026

            Decoding Microsoft’s New IQ Layer: Work IQ, Fabric IQ, and Foundry IQ Explained
            Read Full Blog    
            5 Cybersecurity Mistakes Your Business Cannot Afford in 2026

            Jan 9, 2026

            5 Cybersecurity Mistakes Your Business Cannot Afford in 2026
            Read Full Blog    

            Alletec blends deep Microsoft solutions expertise with industry knowledge and 25+ years of experience to catalyse digital transformation and amplify business outcomes for enterprises.

            FOLLOW US
            LATEST NEWS
            • Alletec recognized as 2025/26 Inner Circle Winner for Microsoft AI Business Solutions
            • From Copilot to Sustainability: Alletec to Lead Expert Discussions at Directions ASIA 2025
            • Alletec Strengthens North American Footprint with Major Microsoft Dynamics 365 Contact Center Win
            • Alletec Expands to the Middle East with a Subsidiary in Dubai
            • Alletec Named a Great Place to Work® for the Third Consecutive Year
            CONTACT US
            • India: A-1, Sector - 58 Noida - 201 301, India +91 120 3000 300

            • USA: 5605 North MacArthur Blvd., Ste 1000, Irving, Texas 75038 +1 469 767 9753

            • Kenya: The Westwood Vale Close Off Ring Road Westland +254 725 074 589

            • Canada: 181 Bay Street, #1800, Toronto, Ontario, M5J 2T9 +1 289 763 5998

            • United Arab Emirates: IFZA Business Park, DDP, PO Box 342001, Dubai +971 58 248 0169

            • info@alletec.com
            Quick Links
            • eBooks
            • Blogs
            • Case Studies
            • Brochures
            • Life At Alletec
            • Company Profile
            • Partner Program
            • Privacy Policy

            @ 2026 Alletec. All rights reserved.

            Chatbot IconAsk me anything