> ## Documentation Index
> Fetch the complete documentation index at: https://docs.maesn.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Microsoft Business Central

> Integrate Microsoft Business Central easily with Maesn’s Unified API. See the documentation with detailed system coverage and setup prerequisites.

**TARGET\_SYSTEM:** `businesscentral`

<div className="integration-table">
  |                      |                          Read                          |                         Create                         |                         Update                         |                         Delete                         |                         Webhook                        |
  | -------------------- | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: | :----------------------------------------------------: |
  | Accounts             | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Async task           | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Bank accounts        | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Bills                | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Bill lines           | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Booking proposals    | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Contacts             | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Customers            | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Credit notes         | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Dimensions           | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Expenses             | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Files                | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Fiscal years         | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Goods receipts       | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Goods receipt lines  | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> |
  | Invoices             | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Invoice lines        | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Items                | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Journals             | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Journal entries      | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Offers               | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Offer lines          | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Open items           | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Payments             | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Payment terms        | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Projects             | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Purchase orders      | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Purchase order lines | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Sales orders         | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Sales order lines    | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Suppliers            | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="check" iconType="solid" color="#4db975" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="check" iconType="solid" color="#4db975" /> |
  | Tax rates            | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Transactions         | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Trial balance        | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="xmark" iconType="solid" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Units                | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Users                | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
  | Vendor credits       | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> | <Icon icon="phone" iconType="light" color="#828282" /> |
</div>

<Icon icon="check" iconType="solid" color="#4db975" /> = Supported by Maesn <br />
<Icon icon="phone" iconType="light" color="#828282" /> = On demand - contact us<br />
<Icon icon="xmark" iconType="solid" color="#828282" /> = Not supported by Business Central <br />

## How to connect to Microsoft Business Central

To allow your customers to link your application with their Business Central account, you need to set up a Microsoft Entra App and submit your application credentials to maesn.

<Note>
  When targeting Business Central endpoints, it is essential to fill in the *environmentName* and *companyId* query parameters.
  You can obtain these values by using the `GET Environments` and `GET Companies` endpoints available under the Authentication section.
</Note>

<Note>
  If you’re experiencing issues with the **POST endpoints**, ensure that your **API Setup** is correctly configured in **Business Central**.
  In Business Central, search for **API Setup** and verify that there are templates available for the object you want to create.
  Some mandatory fields are automatically populated by these templates and cannot be set through the API.
</Note>

<Steps>
  <Step title="Prerequisites">
    Before you begin, ensure you have the following:

    * An active Azure account with a valid subscription.
    * Cloud Application Administrator permissions on your Azure account.
    * A Microsoft Entra tenant.
      \*An Admin-permissioned Business Central account.
  </Step>

  <Step title="Set up a Multitenant Microsoft Entra Application">
    * Sign in to your [Microsoft Entra](https://entra.microsoft.com/) account.
    * In the sidebar, select Applications > App registrations.
    * To set up a new application, select "New registration" and enter a name for your application.
    * Select "Multitenant application".
    * Under "Redirect URL", select "Web" and enter the following URL:
      `https://api.maesn.dev/auth/callback/businesscentral`
    * Click "Register".

    On the "Overview" page of your application, you will find all the information about your application. Note the "Application (client) ID," as it will be needed later.
  </Step>

  <Step title="Set Permissions for Your Application">
    In you Microsoft Entra application:

    * Select API permissions in the sidebar > Add a permission > Microsoft APIs.
    * Select Dynamics 365 Business Central.
    * Select Application permissions, then click Add permissions.
      * Talk to us if you are unsure exactly what permissions you need for the endpoints you are using. During development you can choose AdminCenter.ReadWrite.All, to get access to all endpoints, but we strongly recommend not to use this in a production scenario, since it will deter customers from using your solution.

    **Note:** For security reasons, we recommend always restricting scopes to only the objects and operations that your application actually requires.

    * Add another permission by selecting Add a permission again.
    * Select Microsoft APIs > Dynamics 365 Business Central > Delegated Permissions.
    * Tick all boxes, then click Add permissions.
    * When the permissions have been added, click Grant admin consent for \<company name> next to the Add permissions button.
  </Step>

  <Step title="Generate Credentials">
    In you Microsoft Entra application

    * Select Certificates & secrets in the sidebar
    * Select Client secrets > New client secret.
    * Add a description for your client secret.
    * Select an expiration period for the client secret or specify a custom duration. Note that the default expiration for a client secret is six months. You may extend the lifetime to minimize the need for frequent credential updates.
    * Click Add.
    * Copy and securely store the secret's *value* immediately, as it will not be accessible after you leave this page.
  </Step>

  <Step title="Add the Application Credentials to Business Central">
    In Business Central:

    * Press the search bar and enter "Microsoft Entra Applications". If you dont find this page, please review your user permissions.
    * Click "New"
    * Add the application (client) ID of your application and enter a brief description for your application.
  </Step>

  <Step title="Configure Your Integration in the maesn API">
    Finally, set up your API tenant with your application's details. Contact your maesn representative to provide the following information:

    * **Application (Client) ID** of your application
    * **Client Secret** (ensure you provide the **value**, not the **ID**)

    Additionally, please inform us if your client secret expires and you generate a new one.
    If you are not sure who your technical contact is, do not hesitate to [reach out to us](https://www.maesn.com/contact).
  </Step>
</Steps>

## Webhooks

Business Central supports the following parameters for webhooks:

Resources:

* `ACCOUNT`
* `CREDIT_NOTE`
* `CUSTOMER`
* `DIMENSION`
* `EXPENSE`
* `ITEM`
* `INVOICE`
* `JOURNAL_ENTRY`
* `OFFER`
* `SALES_ORDER`
* `SUPPLIER`

Business Central only needs the resource and not the event type: you subscribe to a resource and get back all events for that resource.

The event types are `CREATED`,`UPDATED`, `DELETED` and `COLLECTION` types.
Collection events are special: Business Central waits for multiple events of a given resource type before sending them. Instead of sending individual IDs, a collection event provides a date range that represents when the events occurred.
When a collection event is received, the appropriate list endpoint must be called using the provided filterDate as `lastModifiedAt` filter.

The subscription is created **per customer**, which means for each customer, you will create a customized subscription for resources you want to be notified about.
To set this up, call Maesn's create webhook endpoint `POST /webhooks?companyId=<companyId>&environmentName=<environmentName>` (`companyId` and `environmentName` query parameters required if not using the interactive flow) with the following example body:

```javascript Example code snippet theme={null}
    const response = await axios.post(url, {
        "callbackUrl": callbackUrl,
        "resource": "CUSTOMER"
    }, {
        headers: {
            'X-API-KEY': apiKey,
            'X-ACCOUNT-KEY': accountKey
        }
    });
```

It will return the `id` associated with the subscription:

```json Example response theme={null}
{
    "data": {
        "id": "830251",
        "callbackUrl": "https://example.com/webhook-endpoint/12345",
        "createdDate": null,
        "expiresDate": "2026-01-29T08:48:40Z",
        "secret": "2f1fd5f883d4c0adf5b31b91e4d6ae2d2975620c67bac8fdb864c78047b1d522"
        "updatedDate": "2026-01-26T08:48:40Z",
    },
    "meta": {}
}
```

At this point, your system is ready to receive end-user–related events at the callback URL you provided. Business central retrieves a list of events.
The event response will be an array providing the following information:

```json Example event body theme={null}
[{
  "eventType": "UPDATED",
  "filterDate": null, //supported only for collection event types
  "resource": "CUSTOMER",
  "resourceId": "1605408d-ed88-4228-8a12-ab857a2972d8",
  "userId": null //not supported by business central
}]
```

To delete the webhook subscription, you can call the `DELETE` `/webhooks/{webhookId}?companyId=<companyId>&environmentName=<environmentName>` endpoint provinding both your `X-API-KEY` and the end user `X-ACCOUNT-KEY`.
