Business Central API Explained: Endpoints, Limits and How to Connect WooCommerce
Quick Answer
Yes, Business Central has an API. The Business Central API is a REST API built on OData v4 that lets outside apps read and write ERP data such as customers, items, sales orders and invoices in JSON. You authenticate with OAuth 2.0 through Microsoft Entra ID, call an endpoint that includes your environment and company ID, and stay inside Microsoft’s rate limits.
Introduction
Most people who search for the Business Central API are not curious about APIs for fun. They have a real problem. Orders are being typed in twice, stock levels on the website are wrong, or a developer has been asked to “just connect the store to the ERP” by Friday.
I have spent a lot of time around this exact problem, mostly from the ecommerce side, where a WooCommerce store needs to talk to Microsoft Dynamics 365 Business Central without someone copying data by hand. In my experience, the Business Central API itself is not the hard part. The hard part is knowing which endpoint to call, how to authenticate, what the limits are, and where a ready-made WooCommerce Business Central integration saves you from rebuilding the same plumbing everyone else already built.
This guide walks through the Business Central API in plain language. I cover the base URL, company ID, standard and custom API pages, authentication, sales orders, rate limits, testing tools like Postman and Power Automate, and finally how WooCommerce fits into the picture.
Does Business Central Have an API?
Yes. Business Central ships with a standard REST API, and for the online (SaaS) version it is switched on by default. You do not need to install anything extra to start making calls. On-premises installations need the APIs enabled first, but once they are on, they behave the same way.
The current version is API v2.0. If you still see v1.0 examples floating around in old forum posts, treat them as history. Microsoft moved its standard entities to v2.0, and new work should target that version.
So when someone asks “does Business Central have an API?”, the short answer is yes, and it is a fairly modern one. Any language that can send an HTTP request and parse JSON can use the Business Central API: C#, Python, JavaScript, PHP, or a no-code tool.
What Is the Business Central API and How Does It Work?
The Business Central API is a set of web endpoints that expose ERP data as resources. Each resource, called an entity, maps to something you already know from the Business Central client: customers, vendors, items, sales orders, sales invoices, journals and so on.
Under the hood, the Business Central API follows the OData v4 standard. That matters because OData gives you a consistent way to ask for data. You can filter, sort, select specific fields and expand related records in a single request, instead of writing custom logic for every query.
Here is how a typical exchange works:
- Your app gets an access token from Microsoft Entra ID for the Business Central API.
- It sends an HTTP request (GET, POST, PATCH or DELETE) to a Business Central API endpoint.
- Business Central checks the token and the user’s permissions.
- It returns JSON, or an error code if something is wrong.
Microsoft keeps the full list of entities, fields and methods in its Business Central API v2.0 reference. I keep that page open whenever I plan an integration, because field names in the Business Central API do not always match the captions you see on screen.
Business Central API documentation: what to look for
When you open the Business Central API documentation for the first time, it can feel like a maze. These are the parts I check first:
- Resource types: the entity you need, such as salesOrder or item, and its properties.
- Methods: which actions are supported. Not every entity allows POST or DELETE.
- Navigation properties: related data you can reach, such as sales order lines.
- Bound actions: special operations like posting or shipping a document.
- Read-only fields: totals and system fields you cannot write to.
Standard API vs Custom API Pages and API Queries
This is where a lot of first projects go sideways, so it is worth slowing down.
Standard APIs
Standard APIs are the ones Microsoft publishes and maintains. They cover the most common business objects and stay stable across updates. If your use case fits the standard entities, use them. You get version stability and you do not have to maintain extra code.
Custom API pages
A custom API page is an AL object a developer builds inside an extension. You need one when the standard Business Central API does not expose a field or table you care about. A common example is a custom field your company added to the item card.
Here is a detail that surprises people: you cannot simply extend a standard API with extra fields. Microsoft’s guidance is to copy the AL code for the standard API and build a custom API from it. Custom APIs get their own route, made up of an API publisher, an API group and a version, so they never clash with Microsoft’s endpoints.
API queries
API queries are read-only and are built for reporting and analytics. They can join several tables and return a flat, summarized result. If you are feeding Power BI or a data warehouse, an API query is often cleaner than calling several pages and stitching the data together yourself.
Which one should you pick?
| Need | Best option |
|---|---|
| Create or update common records like customers and orders | Standard API |
| Expose a custom field or a custom table | Custom API page |
| Read joined or summarized data for reports | API query |
My rule of thumb: start with the standard Business Central API and only build custom pages when you hit a real gap. Every custom object is something your partner or developer has to maintain through every Business Central update.
Business Central API Endpoints: Base URL, Environment and Company ID
Most “it doesn’t work” messages I have seen come down to a wrong URL. A Business Central API endpoint has a few moving parts, and every one of them has to be right.
The base URL for Business Central online
For the online version, the base URL follows this pattern:
https://api.businesscentral.dynamics.com/v2.0/{tenant}/{environment}/api/v2.0
- Tenant: your Microsoft Entra tenant ID or your domain name.
- Environment: the name of the environment, such as production or a sandbox name. This part is required, because one tenant can hold several environments.
Adding the company ID
Almost every Business Central API endpoint sits under a company. A tenant can contain several companies, so you need the company’s ID, which is a GUID, not its display name. You get it by calling the companies endpoint first:
GET …/api/v2.0/companies
Then you build your real request on top of it:
GET …/api/v2.0/companies({companyId})/salesOrders
I always save the company ID in configuration rather than hardcoding it. Companies get renamed, sandboxes get copied, and a hardcoded ID becomes a silent bug the day someone points the integration at a new environment.
On-premises and custom API endpoints
On-premises endpoints use your own server address, port and service instance instead of the cloud host. Custom APIs add the publisher, group and version to the route, so a custom endpoint looks something like /api/{publisher}/{group}/{version}/companies({id})/....
Business Central API vs OData Web Services and SOAP
Business Central actually offers three kinds of web services: the REST API, OData web services and SOAP. People mix them up all the time, so here is how I explain the difference.
The Business Central API is the modern, versioned interface. Its endpoints are stable, its entities are designed for integration, and Microsoft keeps them consistent across updates. When I start a new integration, the Business Central API is my default choice.
OData web services are pages, queries or codeunits that someone publishes from the Web Services page inside Business Central. They are quick to expose, which is why older integrations used them heavily. The catch is that they mirror the user interface, so a change to a page can quietly break whatever depends on it.
SOAP is the oldest option. You still find it in legacy on-premises setups, but I would not start anything new on it.
When to choose each one
- Business Central API: new integrations, ecommerce sync, apps you plan to maintain for years.
- OData web services: quick internal reads, or legacy tools that already depend on them.
- SOAP: only when an existing system gives you no other option.
If you are unsure, pick the Business Central API. It is the option Microsoft keeps investing in, and it gives you the cleanest path when you later move to custom API pages or add more systems.
Security Tips for Any Business Central API Integration
A Business Central API connection can read and change financial data, so I treat it like a set of keys to the business.
- Use a dedicated app registration for each integration rather than sharing one across tools. If one is compromised, you revoke only that one.
- Give the smallest permission sets possible. A store sync rarely needs access to general ledger setup or payroll.
- Store secrets in a vault, not in code, plugin settings exports or shared spreadsheets.
- Rotate client secrets before they expire, and put the expiry date in a calendar. An expired secret is one of the most common reasons a Business Central API sync suddenly stops overnight.
- Log every call that fails, with enough detail to trace the order or item involved, but never log tokens or customer payment data.
These habits cost almost nothing to set up on day one, and they are painful to add later.
How Authentication Works With the Business Central API
For the Business Central API online, you authenticate with OAuth 2.0 through Microsoft Entra ID (formerly Azure Active Directory). The old method of using a username plus a web service access key, often called basic authentication, is deprecated for the online version and no longer supported there.
There are two common OAuth flows:
- Delegated (user) flow: the app acts on behalf of a signed-in user. Good for tools where a person is present.
- Service-to-service (client credentials) flow: the app acts as itself, with no user logged in. This is what most background integrations use, including store-to-ERP sync.
For a service-to-service setup, the usual steps are:
- Register an app in Microsoft Entra ID and create a client secret or certificate.
- Grant it the Business Central API permissions it needs.
- In Business Central, add the app on the Microsoft Entra Applications page and assign permission sets.
- Request a token using the tenant ID, client ID and secret, then send it as a Bearer token.
In my experience, permission sets cause more failed calls than bad code does. If the API returns 401 or 403, check the assigned permissions before you start rewriting your request.
Working With Sales Orders Through the Business Central API
Sales orders are the heart of most ecommerce integrations, so this is the entity I spend the most time on. The salesOrders entity in the Business Central API supports GET, POST, PATCH and DELETE, which means you can read, create, update and remove orders.
A sales order on its own is only the header. The items live in sales order lines, which you reach through a navigation property:
GET .../companies({id})/salesOrders({orderId})/salesOrderLines
There is also a bound action called shipAndInvoice. It ships and invoices the order in one call, which is handy when your fulfilment process allows it.
A practical order flow
Here is a simple pattern that works well for a store sending orders into the ERP:
- Check whether the customer exists by email or customer number. Create them if not.
- POST the sales order header with the customer, order date and currency.
- POST each line with the item number, quantity and unit price.
- Read back the order to confirm totals match the web order.
- Store the Business Central order number against the web order so you never create it twice.
That last step is the one people skip. Without it, a retry after a timeout can create a duplicate order. Idempotency, meaning a repeated call does not create a second record, is something you have to design yourself.
You can also use deep insert to create the header and lines in one request, but I only do that once the basic flow is tested. It is harder to debug when something fails halfway.
What Are the Business Central API Rate Limits?
Business Central online limits how fast and how heavily you can call the Business Central API, and you need to design around these limits from day one. According to Microsoft’s operational limits for Business Central online, the main OData and API limits are:
- Rate per user: 6,000 requests in a 5-minute sliding window.
- Rate per environment: 300 requests per minute for sandboxes and 600 per minute for production.
- Concurrent requests: 5 per user. Extra requests wait in a queue.
- Queue size: 95 requests. Past that, you get errors.
- Page size: up to 20,000 entities per page.
- Batch size: up to 100 operations in one $batch request.
- Operation timeout: 8 minutes.
When you cross a limit, Business Central returns HTTP 429, Too Many Requests. Your code has to catch that and retry after a pause. Exponential back-off, where you wait a little longer after each failed attempt, is the safest pattern.
How I design around the limits
- Send changes, not full catalogs. Filter on lastModifiedDateTime to pull only what changed.
- Use $batch to group small writes into fewer calls.
- Queue writes instead of firing them all at once during a sale.
- Log every 429 so you can see when you are getting close to the ceiling.
A busy WooCommerce store during a promotion is exactly when these limits bite. This is one of the main reasons I prefer a queue-based connector over a script that calls the Business Central API on every page load.
Testing the Business Central API With Postman, Power Automate and Middleware
You do not need to write production code to start exploring.
Postman
Postman is where I test every new Business Central API endpoint. Set up an OAuth 2.0 authorization in a collection, add the token URL and client details, and you can send requests in minutes. It is the fastest way to see what a real response looks like and to confirm your company ID and environment name are right.
Power Automate
Power Automate has a Business Central connector that lets business users build simple flows without code, such as creating a record when a form is submitted. It is great for light, internal automations. For high-volume ecommerce sync, I find it gets fragile and hard to monitor.
Middleware
Middleware platforms sit between your systems and handle mapping, queues and retries. They are useful when you connect several apps to Business Central at once. The tradeoff is another subscription and another system to maintain.
Is the Business Central API Easy to Integrate With?
Honestly, it depends on what you mean by “integrate”.
Making your first Business Central API call is easy. If you understand REST and OAuth, you can read customers or items within an afternoon. The Business Central API is well structured and follows a known standard.
Building a reliable, two-way integration is a different job. These are the things that take real time:
- Mapping data that does not line up neatly, such as product variations, tax, payment methods and locations.
- Handling rate limits, timeouts and retries without creating duplicates.
- Keeping stock in sync when orders come from several channels.
- Monitoring failures so a broken sync does not go unnoticed for days.
- Maintaining custom APIs through every Business Central update.
I have written before about common ERP integration challenges, and most of them have nothing to do with the API. They come from messy data and unclear ownership of which system is the source of truth.
How Do I Connect WooCommerce to Business Central Through the API?
Now for the part most store owners actually care about. WooCommerce has its own API, and the job is to make it talk to the Business Central API.
Understanding the WooCommerce side
WooCommerce runs a REST API (currently v3) that exposes orders, products, customers and stock. You authenticate with a consumer key and secret generated in WooCommerce settings. The WooCommerce REST API also supports webhooks, so the store can push an event the moment an order is placed instead of waiting to be polled.
The basic integration flow
- Products and stock: Business Central is usually the master. Items, prices and inventory flow from the ERP to WooCommerce.
- Orders: a new WooCommerce order triggers a webhook. Your integration creates the customer and sales order in Business Central through the API.
- Fulfilment: shipment status and tracking flow from Business Central back to the store.
- Invoices: invoices posted in Business Central are sent back to the customer record in WooCommerce.
- Error handling: every failed call is logged, queued and retried, with a clear alert when something needs a human.
Build it yourself or use a connector?
You can build all of this on the Business Central API yourself. I have seen teams do it well. But you take on the mapping, the rate-limit handling, the monitoring and every future update.
A connector packages that work. If you look at the Business Central WooCommerce connector features, you will see the pieces I listed above already handled: two-way order sync, price and customer-specific pricing sync, real-time inventory, shipment tracking, invoice sync and flexible data mapping.
It also matters if you run more than one store. If you need to connect multiple WooCommerce stores to one Business Central account, the mapping gets more complex, and doing it in custom code multiplies your maintenance.
When I compare the two paths, I look at total cost over two or three years, not just the build cost. Comparing that against Business Central WooCommerce connector pricing usually makes the decision clear for small and mid-sized sellers.
Common Mistakes I See With the Business Central API
- Leaving out the environment name in the URL and getting a 404.
- Using the company name instead of the company ID.
- Trying basic authentication on Business Central online.
- Pulling the full item list every few minutes instead of only changed records.
- Ignoring 429 errors and losing orders during busy periods.
- No duplicate check, so retries create the same order twice.
- Building custom APIs too early when a standard entity would have worked.
- Testing only in production. Always use a sandbox, and remember its rate limit is lower.
Key Takeaways
- Business Central has a standard REST API (v2.0) built on OData v4, and it is enabled by default online.
- Endpoints need the right tenant, environment name and company ID.
- Use standard APIs first, custom API pages for missing fields, and API queries for reporting.
- Online authentication uses OAuth 2.0 through Microsoft Entra ID. Basic auth is deprecated there.
- Respect the limits: 6,000 requests per user per 5 minutes, plus per-environment rates, and handle 429 errors.
- WooCommerce connects through its own REST API and webhooks, and a connector can save you from maintaining all the sync logic yourself.
Frequently Asked Questions
1. Does Business Central have an API?
Yes. Business Central includes a standard REST API, currently version 2.0, based on OData v4. It is enabled by default for Business Central online and can be enabled for on-premises installations. It covers common entities such as customers, items, sales orders and invoices.
2. What is the Business Central API base URL?
For Business Central online, the base URL is api.businesscentral.dynamics.com followed by v2.0, your tenant, your environment name and then api/v2.0. Most requests also add the company ID, because nearly all data sits under a specific company.
3. How do I find my company ID?
Call the companies endpoint under your environment’s base URL with a valid token. The response lists every company in that environment with its ID, which is a GUID. Use that ID in the URL for all company-specific requests.
4. What authentication does the Business Central API use?
Business Central online uses OAuth 2.0 through Microsoft Entra ID. Integrations usually use the service-to-service flow with a registered app, a client secret or certificate, and permission sets assigned inside Business Central. Web service access keys are deprecated for the online version.
5. What are the Business Central API rate limits?
Microsoft allows 6,000 requests per user in a 5-minute sliding window, plus per-environment rates of 300 requests per minute for sandboxes and 600 for production. There are also limits on concurrent requests, queue size, page size and batch size.
6. What happens when I hit the rate limit?
Business Central returns HTTP 429, Too Many Requests. Your integration should catch this error, wait, and retry. A back-off strategy that waits longer after each failed attempt helps you recover without flooding the service.
7. What is the difference between standard and custom API pages?
Standard APIs are built and maintained by Microsoft for common business objects. Custom API pages are built by developers in AL extensions to expose fields or tables the standard ones do not include. Custom APIs have their own publisher, group and version in the route.
8. Can I create sales orders through the Business Central API?
Yes. The salesOrders entity supports creating, reading, updating and deleting orders. You add items through sales order lines, and you can use the shipAndInvoice action to ship and invoice an order in one call.
9. Is the Business Central API easy to integrate with?
Making basic calls is straightforward for anyone who knows REST and OAuth. A dependable two-way integration takes more work, because you need data mapping, duplicate protection, rate-limit handling, monitoring and ongoing maintenance through updates.
10. How do I connect WooCommerce to Business Central?
You connect the WooCommerce REST API to the Business Central API, usually with webhooks for new orders and scheduled sync for products and stock. You can build this yourself or use a dedicated connector that handles mapping, queues and errors for you.
Conclusion
The Business Central API gives you everything you need to connect outside systems to your ERP: a standard REST interface, clear endpoints, secure OAuth and well-documented limits. Once you understand the base URL, company ID, entities and rate limits, the API stops feeling mysterious.
The real decision is how much of the integration you want to own. If you have a development team and unusual requirements, building on the Business Central API directly can make sense. If you run a WooCommerce store and want orders, stock, prices, shipments and invoices to sync reliably without maintaining custom code, a purpose-built connector is usually the faster and safer route. Book a demo with the BCWC team to see how your store and Business Central would work together.
