Articles in this section

Import and export data with OData and the Microsoft Dynamics 365 Business Central connector

Business Central is a business management solution for small and mid-sized organizations that automates and streamlines business processes and helps you manage your business. Business Central enables companies to manage their business, including finance, manufacturing, sales, shipping, project management, services, and more. Companies can easily add functionality that is relevant to the region of operation, and that is customized to support even highly specialized industries.

Note: You must use an HTTPS connector to connect to Microsoft Dynamics 365 Business Central with OData.

This article leads you through prerequisites for creating imports and exports using Business Central's OData web services.

Additional references: Set up a connection to Microsoft Dynamics 365 Business Central, Handlebars helper reference

A. Import and export prerequisites

Prior to importing and exporting data, you must enable APIs in Microsoft Dynamics Business Central and Create an iClient (application) in Microsoft Dynamics 365 Business Central. Your Client ID is available In your Microsoft - App registrations. Don't forget to write down the Tenant ID, Client ID, and Client Secret.

Authentication

To authenticate Microsoft Dynamics Business Central via OData APIs, follow these steps:

  1. Create a new HTTPS connection.
  1. Enter the Base URI: https://api.businesscentral.dynamics.com/v2.0
  1. Enter the authentication type OAuth2.0 and configure your iClient.
  2. Enter the Auth URI: https://login.windows.net/[Tenant_ID]/oauth2/authorize?resource=https://api.businesscentral.dynamics.com.
  3. Enter the Access Token URI: https://login.microsoftonline.com/common/oauth2/token

B. Exports

Below is an example export using the 'Get Invoices' operation.

 

C. Imports

Below is an example import using the 'Post Invoices' operation. The relative URI is: /[Your_Tenant_Id]/[Your_Environment_Name]/ODataV4/MWISalesPosting_PostInvoice?Company=[Your_Company_Name]

ODATA

Below is an example import using the 'Create Sales Order Lines' operation (one import that creates multiple lines). The relative URI is: /[Your_Tenant_Id]/[Your_Environment_Name]/ODataV4/salesDocumentLines?Company=[Your_Company_Name]

ODATA

The example HTTP request body is as follows:

Was this article helpful?
0 out of 0 found this helpful

Comments

0 comments

Please sign in to leave a comment.