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

Set up and access APIs in Wiise

How to set up an API

To learn how to set up an API for Wiise, refer to Microsoft's developer documentation:

Welcome to the API(v2.0) for Business Central.

This documentation explains how to build custom APIs using the AL API pages and publish them as part of an extension.

How to access API endpoints

APIs in Wiise are enabled by default through the Business Central API framework. Use the following base endpoints:

    • Production: https://api.businesscentral.dynamics.com/v2.0/[tenant-id]/production/api/v2.0/
    • Sandbox: [https://api.businesscentral.dynamics.com/v2.0/[tenant-id]/sandbox/api/v2.0]

      Note: Replace [tenant-id] with your Microsoft Entra tenant ID

For more information, see How to enable and access API endpoints on Microsoft Docs.

 

How to retrieve data using the Business Central API

Business Central APIs expose entities such as:

• companies
• customers
• vendors
• items
• salesOrders
• purchaseOrders

You can query these entities using OData query parameters.

Example: Retrieve the Item ID using the Item Number.

https://api.businesscentral.dynamics.com/v2.0/[tenant-id]/[production/sandbox]/api/v2.0/companies([company-id])/items?$select=id&$filter=number eq '1906-S'

How to test an API

1. You can access the APIs using any library of your choosing. We use Postman for this purpose.

2. Open Postman and create a new GET request by typing this URL on your internet browser: [https://api.businesscentral.dynamics.com/v2.0/[tenant_id]/[production/sandbox]/api/v2.0/companies]

3. Configure OAuth and create an access token

    1. Under the Authorization tab, set Type to OAuth 2.0.
    2. Under Add authorization data to, choose Request Headers.
    3. Enter a Token Name.
    4. Under Grant Type, choose Client Credentials.
    5. Under Access Token URL, enter: [https://login.microsoftonline.com/[tenant_id]/oauth2/v2.0/token]
    6. Your Client ID is the Application (client) ID you copied from the Azure Active Directory app.
    7. Your Client Secret is the client secret Value you copied from the Azure Active Directory app.
    8. Under Scope, enter: [https://api.businesscentral.dynamics.com/.default in the field].
    9. Under Client Authentication, choose Send Client Credentials in body.
    10. Select Get New Access Token.
    11. Select Use Token.
    12. Send the request to call the API and retrieve data. 

Troubleshooting API access

If you cannot connect to the API:

  1. Confirm the Microsoft Entra app registration is configured correctly

  2. Ensure the correct API permissions are granted

  3. Verify the tenant ID and environment name are correct

  4. Test the request using Postman

Postman responses will show error messages that help identify authentication or configuration issues.

Microsoft APIs in Wiise

Microsoft's Business Central API v2.0 endpoints are included by default in Wiise environments.

You do not need to install any extensions to access the standard APIs.

Additional developer resources

These resources provide guidance on creating custom APIs, extensions and integrations.