Business Central Web Services APIs

Introduction- Business Central Web Services APIs 

In this blog, we will talk about Business Central Web Services APIs. Business Central supports multiple web services like API, SOAP, and OData. These are extremely lightweight and easy to use. Because of these services, industry-standard application functionality is available to various external systems and users. We have used these web services to create custom report for clients, handle data in excel or use data in a reporting tool like Power BI.

When Business Central objects are published as web services, they’re immediately available on the network.

In this blog, we will be covering the following topics

  • Understand the existing web services and their use in excel
  • Create any new web service if not available on the list

Finding the right Business Central Web Services APIs

In order to use the web services, navigate to the list of web services available in the system.

Now copy paste the URL as it will include all the details including the company name and allow you to read data from the Business Central System. Note that the web service will be company specific.

In this case, I need to extract the Purchase order line items. So here is the highlighted odata URL for page 54 API.

Business Central Web Services APIs

  • Open excel > Go to Data > Get Data > Online Services > Dynamics 365 online
  • Or, Data > Other Sources > OData Feed

Business Central Web Services APIs

  • Update the API link in the pop up which opens up as below

Business Central Web Services APIs

It might give you an error as below:

“OData Version: 3 and 4, Error: The remote server returned an error: (400) Bad Request. (Bad Request)”

Business Central Web Services APIs

Sometimes, the API either has an issue or it is not published or is not the right API to use. So look for another one.

I found another API page 138 API as below where I am able to get the data loaded after I pasted the API and pressed on “Ok”.

Now, do the same thing in calling these APIs via Power BI Report. To create power BI Report call the Odata service,

Business Central Web Services APIs

It would list down all the companies.

Business Central Web Services APIs

  • Select from the standard set of APis the data needed and click on data to start building the report

Business Central Web Services APIs

  • Select the right table visual and see the data on the dashboard page.

Business Central Web Services APIs

Conclusion- Business Central Web Services APIs

It is always useful to be able to create custom reports for the client even though there are a lot of standard reports available, and I find this feature very handy as I don’t have to keep downloading excel to do my comparison as I connect via APIs and just refresh the data for any new changes.

Business Central comes with an extensive list of built-in APIs that requires no code and minimal setup to use. When using the built-in APIs, please choose the highest API version available. 

You can also develop your own custom APIs using the AL object types API pages and API queries.

For more information:https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/webservices/api-overview   

 

Get In Touch If You Have A Business Query

Related Posts