Business Central Endpoints
Microsoft Dynamics 365 Business Central supports several different endpoints to connect to data, in two categories: Common Service endpoints, and Web Services endpoints. Within each category, each set of endpoints is split into Production and Testing endpoints. Production endpoints require an OAuth connection, whereas Testing endpoints may be connected to via User and AccessKey. Note that both Production and Testing endpoints access and interact with the same data. The main difference between them is the type of authentication that is allowed.
Note: Basic authentication is no longer supported for the cloud version.
By default, the OrganizationURL attempts to resolve to a Common Service Production endpoint if any https://businesscentral.dynamics.com/ URL is specified. However, this may be configured by modifying the EndpointType. In addition, specifying any https://api.businesscentral.dynamics.com/ overrides both EndpointType and UseSandbox as it causes Microsoft Dynamics 365 Business Central to use the specified OrganizationURL without alteration.
Common Service Endpoints
Common Service endpoints contain the business data associated with Microsoft Dynamics 365 Business Central. For instance, accounts, sales orders, and sales invoices are all found on the Common Service.
Common Service Endpoints: Production
- https://api.businesscentral.dynamics.com/v2.0/{environment name}/api/v2.0
- https://api.businesscentral.dynamics.com/v1.0/api/v2.0
- https://api.businesscentral.dynamics.com/v2.0/sandbox/api/v2.0
Common Service Endpoints: Testing
- https://api.businesscentral.dynamics.com/v2.0/{tenant id}/{environment name}/api/v2.0
- https://api.businesscentral.dynamics.com/v1.0/{tenant id}/api/v2.0
- https://api.businesscentral.dynamics.com/v2.0/{tenant id}/sandbox/api/v2.0
Note: The Tenant Id is the ID of your tenant in Azure that the Business Central app is available on. To find this, do either of the following:
- Log in to portal.azure.com, select your user name, and navigate to the Switch Directory.
- Log in to portal.azure.com, navigate to Active Directory, then navigate to Overview.
Look for environment names at https://businesscentral.dynamics.com/{tenant id}/admin.
Web Services Endpoints
Web Service endpoints include anything that has been custom exposed in Microsoft Dynamics 365 Business Central. This can include KPIs, reports, individual entities, or other feeds. To get an idea of what is exposed by these endpoints, navigate to Service, click the magnifying glass and search for Web Services.
Web Services Endpoint - Production
- https://api.businesscentral.dynamics.com/v1.0/ODataV4/
Web Services Endpoint - Testing
- https://api.businesscentral.dynamics.com/v1.0/{tenant id}/ODataV4/
Custom API Endpoints
To connect to custom API endpoints, you set OrganizationURL to your custom base URL, which is in the format: https://api.businesscentral.dynamics.com/v2.0/{tenant}/api/{API publisher}/{API group}/{API version}