How to Use External APIs in Business Central
This post explains how to consume external APIs from within Business Central by making HTTP requests using the HttpClient data type and parsing JSON responses. It includes two practical examples: retrieving Chuck Norris jokes and validating email addresses through public APIs, with complete AL code samples and guidance on security prompts.

post Aardvark Labs
"An interface that we can use to allow our application to access some service through programming."
Key points
- APIs provide an interface to access services and data from outside Business Central using HTTP requests with GET, POST, PUT, DELETE, or PATCH methods
- The HttpClient data type is used to send HTTP requests, set headers, and handle responses containing JSON data
- JSON responses must be parsed using JsonObject to extract specific fields needed for your business logic
- Public APIs can be found through search engines or in service documentation, with resources like GitHub’s public-apis list available
- Business Central shows a security prompt when extensions attempt to access external services to prevent unauthorized data exfiltration
Quotes
- “An interface that we can use to allow our application to access some service through programming.” (This is the fundamental definition of an API that guides developers in understanding how Business Central can interact with external systems.)
AL objects mentioned
As named in the post. A name that matches one object page by exact type and name links to it; the others stay as named.
- codeunit “ARDGetChuckNorrisJoke”
- codeunit “ARDValidateEmail”
Not found in BC28-30: codeunit “ARDGetChuckNorrisJoke”, codeunit “ARDValidateEmail”.
Context
- Features: HttpClient data type, HTTP requests, JSON parsing, External service integration, Email validation
Source: Aardvark Labs, community blog. Summary, key points and quotes are derived (CONTENT-NOTICE.md); read the original for the full text.