{"id":20343,"date":"2025-05-06T09:09:06","date_gmt":"2025-05-06T09:09:06","guid":{"rendered":"https:\/\/techpearl.com\/1719395789229\/?p=20343"},"modified":"2025-05-19T05:29:06","modified_gmt":"2025-05-19T05:29:06","slug":"integrating-business-central","status":"publish","type":"post","link":"https:\/\/techpearl.com\/1719395789229\/integrating-business-central\/","title":{"rendered":"Seamless Integration of Microsoft Dynamics 365 Business Central with Django"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"20343\" class=\"elementor elementor-20343\" data-elementor-settings=\"[]\">\n\t\t\t\t\t\t\t<div class=\"elementor-section-wrap\">\n\t\t\t\t\t\t\t<section class=\"has_ma_el_bg_slider elementor-section elementor-top-section elementor-element elementor-element-2cd63f20 elementor-section-boxed elementor-section-height-default elementor-section-height-default jltma-glass-effect-no\" data-id=\"2cd63f20\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_ma_el_bg_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-437687b9 jltma-glass-effect-no\" data-id=\"437687b9\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-6fd6e2d4 jltma-glass-effect-no elementor-widget elementor-widget-theme-post-title elementor-page-title elementor-widget-heading\" data-id=\"6fd6e2d4\" data-element_type=\"widget\" data-widget_type=\"theme-post-title.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h1 class=\"elementor-heading-title elementor-size-default\">Seamless Integration of Microsoft Dynamics 365 Business Central with Django<\/h1>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-654a0e5 elementor-author-box--align-left elementor-author-box--image-valign-top jltma-glass-effect-no elementor-widget elementor-widget-author-box\" data-id=\"654a0e5\" data-element_type=\"widget\" data-widget_type=\"author-box.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"elementor-author-box\">\n\t\t\t\n\t\t\t<div class=\"elementor-author-box__text\">\n\t\t\t\t\t\t\t\t\t<div >\n\t\t\t\t\t\t<h4 class=\"elementor-author-box__name\">Vinod Charan Kumar<\/h4>\t\t\t\t\t<\/div>\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-49769c6d bdt-ss-btns-view-icon bdt-ss-btns-shape-rounded bdt-ss-btns-align-left bdt-ep-grid-0 bdt-ss-btns-style-flat bdt-ss-btns-color-original jltma-glass-effect-no elementor-widget elementor-widget-bdt-social-share\" data-id=\"49769c6d\" data-element_type=\"widget\" data-widget_type=\"bdt-social-share.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"bdt-social-share bdt-ep-grid\">\n\t\t\t\t\t\t\t<div class=\"bdt-social-share-item bdt-ep-grid-item\">\n\t\t\t\t\t<div class=\"bdt-ss-btn bdt-ss-linkedin\" data-social=\"linkedin\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"bdt-ss-icon\">\n\t\t\t\t\t\t\t\t<i class=\"ep-linkedin\"><\/i>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"bdt-social-share-item bdt-ep-grid-item\">\n\t\t\t\t\t<div class=\"bdt-ss-btn bdt-ss-twitter\" data-social=\"twitter\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"bdt-ss-icon\">\n\t\t\t\t\t\t\t\t<i class=\"ep-twitter\"><\/i>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t\t\t<div class=\"bdt-social-share-item bdt-ep-grid-item\">\n\t\t\t\t\t<div class=\"bdt-ss-btn bdt-ss-facebook\" data-social=\"facebook\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t<span class=\"bdt-ss-icon\">\n\t\t\t\t\t\t\t\t<i class=\"ep-facebook\"><\/i>\n\t\t\t\t\t\t\t<\/span>\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t\t<\/div>\n\n\t\t\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_ma_el_bg_slider elementor-section elementor-top-section elementor-element elementor-element-8ca0303 elementor-section-boxed elementor-section-height-default elementor-section-height-default jltma-glass-effect-no\" data-id=\"8ca0303\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_ma_el_bg_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-a869007 jltma-glass-effect-no\" data-id=\"a869007\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-08201a5 jltma-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"08201a5\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"2000\" height=\"2000\" src=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25.jpg\" class=\"attachment-full size-full\" alt=\"25\" srcset=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25.jpg 2000w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25-300x300.jpg 300w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25-1024x1024.jpg 1024w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25-150x150.jpg 150w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25-768x768.jpg 768w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/25-1536x1536.jpg 1536w\" sizes=\"auto, (max-width: 2000px) 100vw, 2000px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_ma_el_bg_slider elementor-section elementor-top-section elementor-element elementor-element-30b5d308 elementor-section-boxed elementor-section-height-default elementor-section-height-default jltma-glass-effect-no\" data-id=\"30b5d308\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_ma_el_bg_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-6d839c4d jltma-glass-effect-no\" data-id=\"6d839c4d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-3b59a29f jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"3b59a29f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Microsoft Dynamics 365 Business Central is an all-in-one enterprise resource planning (ERP) solution designed to help small and medium-sized businesses manage their operations efficiently. It\u2019s part of the Microsoft Dynamics 365 family, a suite of business applications, but Business Central specifically focuses on integrating core business functions into a unified platform. Think of it as a digital hub that connects finance, sales, customer service, supply chain, and operations, reducing silos and manual work while giving businesses real-time visibility into their performance.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b9db82a jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"b9db82a\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Core Components and Functionality<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5642bf0 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"5642bf0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ol><li><strong>Financial Management<\/strong>: This is the backbone for many users. It handles general ledger, budgeting, cash flow forecasting, accounts payable and receivable, fixed assets, and bank reconciliation. It supports multi-currency transactions and tax compliance, making it adaptable for businesses operating globally.<\/li><li><strong>Supply Chain Management<\/strong>: This covers inventory tracking, warehouse management, purchase orders, and sales order processing. It helps optimize stock levels, manage vendor relationships, and ensure timely delivery to customers.<\/li><li><strong>Sales and Customer Management<\/strong>: Built-in CRM (Customer Relationship Management) tools let you track customer interactions, manage sales pipelines, and create quotes or invoices. It syncs with Outlook for seamless communication.<\/li><li><strong>Project Management<\/strong>: Ideal for service-based or project-driven businesses, it allows you to plan projects, allocate resources, track time, and monitor profitability\u2014all within the same system.<\/li><li><strong>Manufacturing and Operations<\/strong>: For companies that produce goods, it offers production planning, bill of materials (BOM), and capacity management. It\u2019s not as robust as specialized manufacturing ERPs but works well for light assembly or make-to-order scenarios.<\/li><li><strong>Reporting and Analytics<\/strong>: Powered by integration with Power BI, it provides customizable dashboards and real-time insights. You can drill down into data\u2014like sales trends or cash flow\u2014without needing a separate tool.<\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-0ae7670 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"0ae7670\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Integrating <strong>Microsoft Dynamics 365 Business Central<\/strong> with <strong>Django<\/strong> can offer several benefits, depending on your business needs. Here\u2019s why you might want to do it:<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-02ea8a5 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"02ea8a5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">1. Centralized Data Management<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-92390af jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"92390af\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>ERPs manage core business data such as finance, HR, procurement, inventory, etc.<\/li><li>Django can serve as an intermediary, synchronizing data between the ERP and other platforms.<\/li><li>Reduces data duplication and inconsistencies across multiple systems.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9a59c82 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"9a59c82\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">2. Automation of Business Processes<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e2b46cf jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"e2b46cf\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Instead of <strong>manually updating<\/strong> Business Central records, Django can <strong>automate<\/strong> tasks like:<\/p><ul><li>Syncing inventory data<\/li><li>Processing orders<\/li><li>Generating invoices e.t.c<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a83097e jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"a83097e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">3. Custom Web & Mobile Applications<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2b6b8df jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"2b6b8df\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>ERP UIs are often <strong>complex and rigid<\/strong>.<\/li><li>Django allows you to create <strong>custom web dashboards and mobile-friendly apps<\/strong> using Ionic, React, or Angular.<\/li><li>Example: A warehouse management system pulling data from ERP and showing real-time stock levels in a Django-based dashboard.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-04daed0 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"04daed0\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">4. Data Reporting & Analysis<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3cbc019 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"3cbc019\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Django can extract and store Business Central data for:<\/p><ul><li><strong style=\"font-size: 16px;\">Advanced reporting<\/strong><span style=\"font-size: 16px;\"> (using Django + Pandas, Matplotlib, or Power BI)<\/span><\/li><li><strong>Custom analytics dashboards<\/strong><\/li><li><strong style=\"font-size: 16px;\">Machine learning models<\/strong><span style=\"font-size: 16px;\"> for business insights<\/span><\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-b6db198 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"b6db198\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Integration with Other Services<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-966fe4f jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"966fe4f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Django can act as a <strong>bridge<\/strong> between Business Central and other services, such as:<\/p><ul><li><strong>AWS S3<\/strong> for storing invoices and documents<\/li><li><strong>Payment Gateways<\/strong> (Stripe, Razorpay) for automated billing<\/li><li><strong>E-commerce Platforms<\/strong> (Shopify, WooCommerce) for inventory sync<\/li><li><strong>CRM Systems<\/strong> (Salesforce, HubSpot) for customer data<\/li><li><strong>BI &amp; Reporting Tools<\/strong> (Power BI, Pandas, Matplotlib) for analytics<\/li><li style=\"list-style-type: none;\">\u00a0<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-034f09e jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"034f09e\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Use Case: Why We Integrated Business Central<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-e11254f jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"e11254f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Our application needed to communicate with Business Central to:<\/p><ul><li>Fetch warehouse shipments<\/li><li>Get and update pick details<\/li><li>Register shipment picks<\/li><li>Post warehouse shipments<\/li><\/ul><p>We wanted all of this to be configurable through the Admin panel without changing code.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c151b0c jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"c151b0c\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">High-Level Design Overview<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c36efff jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"c36efff\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Our goal is to create a flexible and reusable integration system within Django that:<\/p><ul><li>Manages and stores Business Central API credentials and configurations.<\/li><li>Authenticates using OAuth2 and refreshes tokens when needed.<\/li><li>Makes dynamic API calls to Business Central endpoints.<\/li><\/ul><p>We built a Django model called <strong>AppIntegration<\/strong> to store:<\/p><ul><li>OAuth credentials (Client ID, Secret, Tenant ID)<\/li><li>Base API URL and environment identifiers<\/li><li>Access\/Refresh tokens<\/li><li>List of API endpoints and HTTP methods<\/li><\/ul><p>Everything is dynamic and editable.This allows you to store and manage APIs dynamically from the UI without changing code.<\/p><p>This screen is the <strong>central control panel<\/strong> for configuring and managing the integration between your platform and <strong>Microsoft Dynamics 365 Business Central<\/strong>. It offers complete flexibility for setting up API access, authorizing OAuth2 tokens, and managing dynamic API endpoints.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bc3d17b jltma-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"bc3d17b\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"550\" src=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-27-33-1024x550.png\" class=\"attachment-large size-large\" alt=\"Screenshot from 2025 05 05 14 27 33\" srcset=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-27-33-1024x550.png 1024w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-27-33-300x161.png 300w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-27-33-768x412.png 768w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-27-33-1536x824.png 1536w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-27-33.png 1729w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-f0f0943 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"f0f0943\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">1. Integration Information Section<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-4587e29 jltma-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"4587e29\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1701\" height=\"339\" src=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-42-38.png\" class=\"attachment-full size-full\" alt=\"Screenshot from 2025 05 05 14 42 38\" srcset=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-42-38.png 1701w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-42-38-300x60.png 300w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-42-38-1024x204.png 1024w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-42-38-768x153.png 768w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-42-38-1536x306.png 1536w\" sizes=\"auto, (max-width: 1701px) 100vw, 1701px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1f74ae5 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"1f74ae5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>Enter the <strong>name of the integration<\/strong>, e.g., <em>Microsoft Business Central<\/em>.<br \/><br \/><\/li><li>Provide the <strong>Base URL<\/strong> for the Business Central API.<br \/><br \/><\/li><li>Define the <strong>API version<\/strong> used by both Business Central and your own app.<br \/><br \/><\/li><li>Fill in <strong>Tenant ID<\/strong>, <strong>Database Name<\/strong>, and <strong>Company details<\/strong> for Business Central multi-tenant configuration.<br \/><br \/><\/li><li>Enter <strong>OAuth2 credentials<\/strong> like Client ID and Client Secret.<br \/><br \/><\/li><li>Set a <strong>Redirect URI<\/strong> that the Microsoft OAuth system will call back after authentication.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-20ed847 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"20ed847\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">2. OAuth2 Authorization Section<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-3ef1ea6 jltma-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"3ef1ea6\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1696\" height=\"93\" src=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-43-31.png\" class=\"attachment-full size-full\" alt=\"Screenshot from 2025 05 05 14 43 31\" srcset=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-43-31.png 1696w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-43-31-300x16.png 300w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-43-31-1024x56.png 1024w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-43-31-768x42.png 768w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-43-31-1536x84.png 1536w\" sizes=\"auto, (max-width: 1696px) 100vw, 1696px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-9f3247c jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"9f3247c\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>A <strong>\u201cAuthorize\u201d<\/strong> button initiates Microsoft login to generate the token.<br \/><br \/><\/li><li>A <strong>status indicator<\/strong> shows whether the token is currently valid.<br \/><br \/><\/li><li>The <strong>\u201cDeauthorize\u201d<\/strong> button revokes the token and clears the session.<br \/><br \/><\/li><li>This section connects to Microsoft\u2019s identity system to handle secure token management.<br \/><br \/><\/li><li>As shown in the screenshot, a popup window allows the user to log in using Microsoft credentials.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1402676 jltma-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"1402676\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1729\" height=\"928\" src=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-28-59.png\" class=\"attachment-full size-full\" alt=\"Screenshot from 2025 05 05 14 28 59\" srcset=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-28-59.png 1729w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-28-59-300x161.png 300w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-28-59-1024x550.png 1024w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-28-59-768x412.png 768w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-28-59-1536x824.png 1536w\" sizes=\"auto, (max-width: 1729px) 100vw, 1729px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cc445d3 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"cc445d3\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">3. API Configuration Section<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-75e9b0b jltma-glass-effect-no elementor-widget elementor-widget-image\" data-id=\"75e9b0b\" data-element_type=\"widget\" data-widget_type=\"image.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<img loading=\"lazy\" decoding=\"async\" width=\"1703\" height=\"432\" src=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-41-48.png\" class=\"attachment-full size-full\" alt=\"Screenshot from 2025 05 05 14 41 48\" srcset=\"https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-41-48.png 1703w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-41-48-300x76.png 300w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-41-48-1024x260.png 1024w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-41-48-768x195.png 768w, https:\/\/techpearl.com\/1719395789229\/wp-content\/uploads\/2025\/05\/Screenshot-from-2025-05-05-14-41-48-1536x390.png 1536w\" sizes=\"auto, (max-width: 1703px) 100vw, 1703px\" \/>\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_ma_el_bg_slider elementor-section elementor-top-section elementor-element elementor-element-6b3bffd elementor-section-boxed elementor-section-height-default elementor-section-height-default jltma-glass-effect-no\" data-id=\"6b3bffd\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_ma_el_bg_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-21e2aff jltma-glass-effect-no\" data-id=\"21e2aff\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-b98698b jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"b98698b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>This section is fully dynamic and allows users to configure multiple APIs:<\/p><ul><li>Add a <strong>custom code<\/strong> to identify the API (e.g., GET_SALES_ORDER_NOS).<br \/><br \/><\/li><li>Define a <strong>user-friendly name<\/strong> for each API (e.g., &#8220;Get Sales Order Number&#8221;).<br \/><br \/><\/li><li>Choose the <strong>HTTP method<\/strong> (GET or POST).<br \/><br \/><\/li><li>Enter the <strong>API URI<\/strong> relative to the base URL (e.g., GetNextSalesOrderNo).<br \/><br \/><\/li><li>Enable or disable each API using the <strong>\u201cAPI Enabled\u201d<\/strong><br \/><br \/><\/li><li>APIs can be<strong> updated, or deleted<\/strong> dynamically without touching backend code.<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_ma_el_bg_slider elementor-section elementor-top-section elementor-element elementor-element-f3ac7f4 elementor-section-boxed elementor-section-height-default elementor-section-height-default jltma-glass-effect-no\" data-id=\"f3ac7f4\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_ma_el_bg_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-9273d5d jltma-glass-effect-no\" data-id=\"9273d5d\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c1b08f4 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"c1b08f4\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Here\u2019s how the flow works:<\/p><ol><li>Admin sets up credentials + API metadata.<\/li><li>Django app fetches\/stores tokens with expiry handling.<\/li><li>Each API call is constructed dynamically using stored metadata.<\/li><li>If a token has expired, it auto-refreshes before retrying.<\/li><\/ol>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-46c1853 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"46c1853\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">The AppIntegration Model<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d0f80e5 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"d0f80e5\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>class AppIntegration(SembaModel):<\/p><p>\u00a0\u00a0\u00a0 code = models.CharField(max_length=50, unique=True)<\/p><p>\u00a0\u00a0\u00a0 name = models.CharField(max_length=100)<\/p><p>\u00a0\u00a0\u00a0 is_valid_auth = models.BooleanField(default=False)<\/p><p>\u00a0\u00a0\u00a0 auth_details = JSONField(blank=True, null=True)<\/p><p>\u00a0\u00a0\u00a0 api_details = JSONField(blank=True, null=True)<\/p><p>\u00a0\u00a0\u00a0 \u2026. other required fields<\/p><p>\u00a0<\/p><p><strong>auth_details<\/strong> holds everything for authentication:<\/p><p>{<\/p><p>\u00a0 &#8220;client_id&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0 &#8220;client_secret&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0 &#8220;access_token_details&#8221;: {<\/p><p>\u00a0\u00a0\u00a0 &#8220;access_token&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;refresh_token&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;expires_in&#8221;: 3600<\/p><p>\u00a0 },<\/p><p>\u00a0 &#8220;tenant_id&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0 &#8220;token_url&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0 &#8220;resource_url&#8221;: &#8220;&#8230;&#8221;,<\/p><p>\u00a0 &#8220;scope&#8221;: &#8220;&#8230;&#8221;<\/p><p>}<\/p><p><strong>api_details<\/strong> includes custom API endpoints:<\/p><p>[<\/p><p>\u00a0 {<\/p><p>\u00a0\u00a0\u00a0 &#8220;is_enabled&#8221;:true,<\/p><p>\u00a0\u00a0\u00a0 &#8220;api_url&#8221;:&#8221;GetNextSalesOrderNo&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;code&#8221;:&#8221;GET_SALES_ORDER_NOS&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;name&#8221;:&#8221;Get Sales Order Number&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;method&#8221;:&#8221;POST&#8221;<\/p><p>\u00a0 },<\/p><p>\u00a0 {<\/p><p>\u00a0\u00a0\u00a0 &#8220;is_enabled&#8221;:true,<\/p><p>\u00a0\u00a0\u00a0 &#8220;api_url&#8221;:&#8221;GetWhseShipmentList&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;code&#8221;:&#8221;GET_WHSE_SHPT_LINES&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;name&#8221;:&#8221;Get Warehouse Shipment Lines&#8221;,<\/p><p>\u00a0\u00a0\u00a0 &#8220;method&#8221;:&#8221;POST&#8221;<\/p><p>\u00a0 }<\/p><p>]<\/p><p>This allows us to add\/edit endpoints on the fly without any code changes.<\/p><p><strong>Encrypt<\/strong> auth_details and api_details if stored as plain JSON in DB.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2e8fad6 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"2e8fad6\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Token Handling and Auto-Refresh<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7412782 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"7412782\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>We check token validity before every request. If the token has expired, we refresh it automatically using the refresh token.<\/p><p>def refresh_access_token(app_integration_obj):<\/p><p>\u00a0\u00a0\u00a0 payload = {<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;client_id&#8221;: &#8230;,<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;client_secret&#8221;: &#8230;,<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;grant_type&#8221;: &#8220;refresh_token&#8221;,<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;refresh_token&#8221;: &#8230;,<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;scope&#8221;: &#8230;<\/p><p>\u00a0\u00a0\u00a0 }<\/p><p>\u00a0\u00a0\u00a0 response = requests.post(token_url, data=payload)<\/p><p>\u00a0\u00a0\u00a0 if response.status_code == 200:<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 app_integration_obj.auth_details[&#8220;access_token_details&#8221;] = response.json()<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 app_integration_obj.is_valid_auth = True<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 app_integration_obj.save()<\/p><p>This means we never need to re-authenticate manually once the initial setup is done.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-eefc6f1 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"eefc6f1\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Making API Requests the Smart Way<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8137529 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"8137529\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>We created a generic method to make API calls based on the stored metadata:<\/p><p>def process_api_request(url, method, access_token, payload):<\/p><p>\u00a0\u00a0\u00a0 headers = {<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;Authorization&#8221;: f&#8221;Bearer {access_token}&#8221;,<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8220;Content-Type&#8221;: &#8220;application\/json&#8221;<\/p><p>\u00a0\u00a0\u00a0 }<\/p><p>\u00a0\u00a0\u00a0 response = requests.request(method, url, headers=headers, json=payload)\u00a0\u00a0\u00a0<\/p><p>\u00a0\u00a0\u00a0 if response.status_code == 401:<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 # Token might be expired. Try refreshing it.<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 new_token = refresh_access_token(&#8230;)<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return process_api_request(url, method, new_token, payload)<\/p><p>\u00a0\u00a0\u00a0 return response<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7446bf9 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"7446bf9\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Constructing the API URLs<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-054fe2f jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"054fe2f\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Business Central APIs have a specific structure:<\/p><p>https:\/\/&lt;resource_url&gt;\/&lt;api_version&gt;\/&lt;environment&gt;\/&lt;tenant&gt;\/&lt;endpoint&gt;?Company=&lt;company_name&gt;<\/p><p>We dynamically construct this in code:<\/p><p>def construct_api_url(auth_details, entity_set_name):<\/p><p>\u00a0\u00a0\u00a0 return f&#8221;{auth_details[&#8216;resource_url&#8217;]}\/{auth_details[&#8216;api_version&#8217;]}\/{auth_details[&#8216;environment&#8217;]}\/{auth_details[&#8216;tenant&#8217;]}\/APICodeunits_{entity_set_name}?Company={auth_details[&#8216;company&#8217;]}&#8221;<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-79041e4 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"79041e4\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Real-Life API Methods<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-dbb660d jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"dbb660d\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Each use case maps to a method in our AppIntegrations class:<\/p><p>class AppIntegrations:<\/p><p>\u00a0\u00a0\u00a0 @classmethod<\/p><p>\u00a0\u00a0\u00a0 def get_warehouse_shipment_list(cls, payload):<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return cls.execute_bc_api(&#8220;get_warehouse_shipment_list&#8221;, payload)<\/p><p>\u00a0\u00a0\u00a0 @classmethod<\/p><p>\u00a0\u00a0\u00a0 def execute_bc_api(cls, api_key, payload):<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 &#8230;<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 url = construct_api_url(auth_details, api_code)<\/p><p>\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0 return process_api_request(url, http_method, token, payload)<\/p><p>This modular design allows adding new API actions in minutes.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ee2fe65 jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"ee2fe65\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h3 class=\"elementor-heading-title elementor-size-default\">Admin Panel View<\/h3>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c263a50 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"c263a50\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Here\u2019s what our admin panel looks like:<\/p><ul><li><strong>API Details<\/strong><ul><li>API Code: GetWhseShipmentList<\/li><li>Method: POST<\/li><li>Enabled: true<br \/><br \/><\/li><\/ul><\/li><li><strong>OAuth Info<\/strong><ul><li>Client ID &amp; Secret<\/li><li>Tenant ID<\/li><li>Refresh Token &amp; Access Token (auto-updated)<br \/><br \/><\/li><\/ul><\/li><li><strong>Environment Info<\/strong><ul><li>Base API URL<\/li><li>Company ID<\/li><li>API Version<\/li><li>Environment (Sandbox\/Production)<\/li><\/ul><\/li><\/ul><p>This interface is so flexible that non-developers can update credentials or add APIs.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t<section class=\"has_ma_el_bg_slider elementor-section elementor-top-section elementor-element elementor-element-53ffc19 elementor-section-boxed elementor-section-height-default elementor-section-height-default jltma-glass-effect-no\" data-id=\"53ffc19\" data-element_type=\"section\" data-settings=\"{&quot;_ha_eqh_enable&quot;:false}\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"has_ma_el_bg_slider elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f867d71 jltma-glass-effect-no\" data-id=\"f867d71\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-c923aca jltma-glass-effect-no elementor-widget elementor-widget-heading\" data-id=\"c923aca\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Key Benefits<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-019ba51 jltma-glass-effect-no elementor-widget elementor-widget-text-editor\" data-id=\"019ba51\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<ul><li>No code changes needed to add new BC APIs<\/li><li>Automatic token refresh avoids manual headaches<\/li><li>Centralized admin panel for full control<\/li><li>Reusable, modular code structure for any ERP\/REST API<\/li><\/ul>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>Microsoft Dynamics 365 Business Central is an all-in-one enterprise resource planning (ERP) solution designed to help small and medium-sized businesses manage their operations efficiently. It\u2019s part of the Microsoft Dynamics 365 family, a suite of business applications, but Business Central specifically focuses on integrating core business functions into a unified platform. Think of it as &hellip;<\/p>\n<p class=\"read-more\"> <a class=\"\" href=\"https:\/\/techpearl.com\/1719395789229\/integrating-business-central\/\"> <span class=\"screen-reader-text\">Seamless Integration of Microsoft Dynamics 365 Business Central with Django<\/span> Read More &raquo;<\/a><\/p>\n","protected":false},"author":15,"featured_media":20485,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[63,16],"tags":[],"class_list":["post-20343","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","category-django"],"_links":{"self":[{"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/posts\/20343","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/users\/15"}],"replies":[{"embeddable":true,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/comments?post=20343"}],"version-history":[{"count":44,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/posts\/20343\/revisions"}],"predecessor-version":[{"id":20484,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/posts\/20343\/revisions\/20484"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/media\/20485"}],"wp:attachment":[{"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/media?parent=20343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/categories?post=20343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techpearl.com\/1719395789229\/wp-json\/wp\/v2\/tags?post=20343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}