Skip to content
  • There are no suggestions because the search field is empty.

Defining API Functions

Once you have set up an API set and established its endpoint and any necessary credentials, you can create the functions that are containers within the set. Separate API function records are defined for the different API calls you want to make from Business Central. For example, if we were integrating to an external platform and wanted to send or retrieve standard master data records, we might create different API functions for sending customers, sending vendors, 
sending items, and so forth.

To define API functions

  1. With the relevant API set selected on the API Sets page, choose the API Functions action in the ribbon.
  2. Choose a new line and enter a code that identifies the API function as unique in the Function Code field.
  3. In the Description field, enter additional description for the API function.

    By default, the Request Processing Method field contains a single Default option. The API Engine provides the capability for developers to create custom methods via codeunit interfaces, however, so it is possible for additional options to be available. The process of creating custom request processing methods is explained in other Suite Engine documentation.
  4. In the Static Path field, enter any static path components of the API function’s endpoint URL. This syntax will be appended to the API set’s endpoint URL that you assigned to the API set’s credentials. You can also use API variables to assign path values to an API function’s endpoint.
  5. In the Buffer Processing Type field, indicate the structure in which data buffers for API messages that are created from the function are created.
  6. In the Response Processing Method field, indicate the manner in which the API Engine should process responses to the API function’s calls:
    1. None: API calls will not be processed by the API Engine.
    2. Single Record Update: the API Engine will create or update a single record in Business Central.
    3. Multiple Records Update: the API Engine will create or update multiple recorded in Business Central.
  7. When you have finished configuring the API function, you can test it by choosing the Execute action in the ribbon. A notification will ask if you want to open the new API message that was created.
  8. Choose the Yes button to review this API message and confirm that the API function is making API calls as intended.

Next: Defining API Variables