Import Data from External Web Api In dynamics Nav 365BC

Hello Everyone,

I have to import data from external web api by calling method “Get_Pay_Roll” in dynamics Nav 365BC version 13.0.24623. I have already complete a project in which i create a VS project and call Dynamics Nav CodeUnit after some Interval . But in this task i don’t know how can i import data in NAV from external web Api. Should i create a VS project to import data or use 1279 codeunit as written in this post ? I just want to know which process will be good in my case and what steps i should take. I read different blogs but i am not sure is it related to my task or not because most of the blog post are usnig Nav Page or Codeunit to Export data.


So you are importing payroll data from Dynamics 365 Business Central via it’s API’s and you are importing it into Dynamics NAV? The important here is not really which services you are consuming, but where you are going to consuming it from? Which NAV version?

Unless a very old version, then no reason to use Visual Studio here. You can do it directly in C/AL. Check out these examples from [mention:5c9cb1234ea24fe88a9f3664f096d8bc:e9ed411860ed4f2ba0265705b8793d05] at Github:

Thanks Erik for reply

I am working on Dynamics NAV 365BC Version 13.0.24623

I have to import data from external web Api into dynamics NAV table and than display that data on some new pages. I have to get data from this site by calling get_emp_payrolls function. The only thing i want to know how can i get Data from this site into NAV. After getting data i will be able to complete other task.

Why do you talk about Dynamics NAV, if you are using BC? That’s just confusing anyone. But the same examples can be used, they show how you can connect to various API’s.

Erik you are right it is Dynamics 365BC.

Thank for your reply and support.

In the above comment you share a github link and i download those files but i didn’t figure out which folder is related to my task.

The folder names are






If you know any other link or example please mention in comment. Thanks again.

They are examples on how to consume different API’s. Of course not specifically on your problem, they are just examples!

YOU need to figure out how to read from the API you mention, check their documentation and see if they provide any general examples.

Ok Thanks Erik,

Documentation is not available with these examples. I will figure out how can i use these examples.

Hello Erik,

I import data in codeunit and store in json format but i have to pick up all EmpID from Json object can you recommend me something useful to complete this task?

Yes I can recommend something useful - an advanced AL developer course! Sorry - I couldn’t leave it… [emoticon:dbebcc234b5646ae9035b59f9b586acd]

But seriously, then I would start by trying out the examples. Then when I know how they (or at least some of them) work, then I think I knew enough to try with the payroll/employee API I really needed. I would recommend you to do the same.