Skip to main content

Notifications

Announcements

No record found.

Small and medium business | Business Central, N...
Suggested answer

How to call external API using C/AL code and how to process the JSON response for inserting into a NAV table

(0) ShareShare
ReportReport
Posted on by 68

Hello all, 

I want to call an external API using C/AL code.

When calling from a browser the external API is returning a JSON response.

How I can call the external API using C/AL code and process the JSON response for inserting each entity as a new record in a new NAV table.

Please provide some pointers to achieve this scenario.

Thanks in Advance!

  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 76,095 Super User 2024 Season 2 on at
    RE: How to call external API using C/AL code and how to process the JSON response for inserting into a NAV table

    Hi, hope the following helps.

    HttpClient Data Type

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/httpclient/httpclient-data-type

    More details:

    https://www.kauffmann.nl/2015/11/26/web-services-examples-part-1-the-basic-pattern/

    And here is a simple example for BC.

    https://yzhums.com/21873/

    Hope this helps.

    Thanks.
    ZHU

    Hope this helps.

    Thanks.

    ZHU

  • Suggested answer
    Nitin Verma Profile Picture
    Nitin Verma 21,081 Super User 2024 Season 1 on at
    RE: How to call external API using C/AL code and how to process the JSON response for inserting into a NAV table

    Hi,

    Below is the link has a very good article telling about the API integration in NAV 2018, I hope it will help you.

    www.sauravdhyani.com/.../microsoft-dynamics-nav-2018-api-part-1.html

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Congratulations 2024 Spotlight Honorees

Kudos to all of our 2024 community stars! 🎉

Meet the Top 10 leaders for December

Congratulations to our December super stars! 🥳

Start Your Super User Journey Pt 2

Join the ranks of our community heros! 🦹

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,861 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,540 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans