Using API Engine
Once you have set up your Suite Engine account and API Engine subscription, you are ready to start building API calls to external entities.
Because the API Engine exists as a development framework that you can use to build a wide variety of integrations, it is not possible to document all scenarios or configuration activities. The purpose of this documentation is to provide an overview of the different record types you need to set up to successfully make an API call for Business Central, as well as discussion of how these records can be configured in high-level scenarios. The basic understanding of the API Engine’s architecture should be your starting point for creating your own integrations.
More detailed instructions for specific use cases or more complex scenarios will be provided through supplementary documentation and other materials.
Creating an API Set
The various API calls that you want to make from Business Central to external entities are set up within the API Engine as “API functions.” These API functions are then grouped together into what is called an “API set.” In this way, you can manage API functions by platform, channel, or other external system.
For example, suppose we wanted to integrate Business Central with external eCommerce, credit card payment, and rate shopping platforms. In this scenario, we would create a separate API set for each platform, then define the relevant API functions within each set.
Accordingly, when you want to build a new integration, the first step you must complete is the creation of an API set:
- Choose looking glass inside of Business Central. Enter API Sets and then choose the related link.
- Choose a new line and enter a code that identifies the API set as unique in the Code field.
- In the Description field, enter additional description for the API set.
- Enter additional information about the external API, if desired:
• API Platform: enter the platform on which the external API exists.
• API Version: enter the external API’s version number/code.
• API Documentation URL: enter a link to the external API’s documentation.
These fields exist for informational purposes only and are optional.
These fields exist for informational purposes only and are optional.
Entering API Credentials
Once an API set is created, it is necessary to specify the necessary endpoint and credentials that will permit Business Central to make API requests to the external system. The specific requirements will differ from system to system; it may be that a very simple API requires just a single endpoint, while something like an eCommerce channel requires the entry for credentials that are obtained from the platform. For this reason, the API engine’s credentialing functionality is built to accommodate a wide range of credentialing authorization types.
To enter API credentials:
- With the relevant API set selected on the API Sets page, choose the API Credentials action in the ribbon.
- On the API Credentials page, choose the New action in the ribbon to open a new API credential card.
- In the Description field, enter additional description for the API set’s credentials.
- In the Authorization Type field, choose the type of authorization used by the API. The following authorization types are supported:
• Basic Authentication
• Bearer Token
• API Key
• OAuth 2.0
• AWS Signature
In addition, you can also indicate that no authorization is required. - In the API Endpoint URL field, enter the URL to which all functions contained within the API set will use. It is possible to perform additional endpoint definition for specific API functions, but it is still necessary to define a base URL against which all of these variables will be enacted. If we consider the components of an endpoint URL, the base URL would generally be assigned at the credential level.
- The other FastTabs on this page support the different authentication types. Choose the FastTab that corresponds to the selection in the Authorization Type field and fill out the required credential values.
Next: Exporting and Importing API Sets