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

Posted on by 186

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 73,698 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,091 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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

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

#2
Martin Dráb Profile Picture

Martin Dráb 230,235 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans