← All guides

Publishing Business Central web services for retail integrations: OData, SOAP, and API pages

Data, integrations & replication · 8 min read · By Dex Carter · Published 2026-10-26 · Last updated 2026-10-26

Three shopfronts side by side, the first bright and new, the second worn with a peeling calendar, the third cracked
Three routes, three ages: each shopfront carries a different remaining lifespan.

For a new retail integration, build on API pages. For a query or a legacy consumer that already speaks OData, publish through the Web Services page and accept its deadlines. Keep SOAP only where an existing consumer forces it, because its removal date is the closest one on the calendar. That ordering is not taste, it follows the deprecation timeline Microsoft has published and the community has reported, set out in full below.

Business Central supports three web service types: API, SOAP, and OData. All three can expose the same underlying objects in different ways, which is why the choice looks interchangeable at first glance. It is not. Each route carries a different publishing step, a different object support pattern, and, the deciding factor, a different remaining lifespan for Microsoft-authored pages.

The decision in one page: which route for which retail flow

RouteHow it is publishedStandingRetail fit
API pages and API queriesBuilt as API objects; no UI-page publishing step on the Web Services pageRecommended by Microsoft instead of exposing UI pages, as the route optimized for this scenarioNew integrations: stock lookup, voucher validation, order intake being built today
OData via the Web Services pagePage or Query object published on the Web Services page; the OData URL field then shows the new URLSupported, but exposing Microsoft pages as OData retires in version 30 (2027 wave 1), community-reportedQueries, read scenarios, and existing OData consumers with a migration date in view
SOAP via the Web Services pagePage or Codeunit object published on the Web Services page; the SOAP URL field then shows the new URLDeprecated; publishing Microsoft UI pages as SOAP is removed in version 29 (2026 wave 2)Only an existing consumer that cannot yet move

The retail flows in the middle column’s last row are examples of integration shapes, not product features: a stock lookup is a read, an order intake is a write, and a voucher validation is a call an external system depends on at the till. Reads map naturally to queries. Writes and depended-upon calls deserve the route with the longest future, which is the API route.

Spec check, object support by route. The published support pattern, checked against Microsoft Learn and a community comparison: Codeunit and Page are valid for SOAP; Page and Query are valid for OData; from version 16.3 a Codeunit is also valid for OData v4 as unbound actions, with no URL shown. Pages support CRUD in all three types. Codeunits are not available as API web services. Queries are read-only in OData and API. An integration design that needs a codeunit behind an API endpoint fails that check on the first line.

Publish a page or query web service, step by step

The Web Services page procedure is short, and it is the same procedure behind both the OData and SOAP rows of the table.

  1. Open the Web Services page in Business Central and choose New.
  2. Select the object to expose, a Page or a Query for OData, a Page or a Codeunit for SOAP, per the support pattern above.
  3. Tick Published. Publishing is the act that makes the service live; an unpublished row is a draft, not an endpoint.
  4. Read the generated URLs. Once published, the OData URL and SOAP URL fields show the new URLs for the service. A Codeunit published for OData v4 as unbound actions is the exception: no URL is shown.
  5. Apply the on-premises control where it applies. Objects that must not be accessible from Business Central online can be marked with the [Scope('OnPrem')] attribute. Check that attribute before assuming a published object is reachable from the online environment, or before assuming it is protected from it.

What success looks like: the row shows Published ticked, the URL field for the intended route is populated, and the object type is one that route actually supports. Two of those three checks catch most failed first attempts, because a type mismatch fails quietly at design time rather than loudly at call time.

API pages: the route that skips the Web Services page

Microsoft’s guidance is direct: instead of exposing UI pages as endpoints, use API pages or API queries, because they have been optimized for this scenario. The practical difference for someone arriving from the Web Services page is that there is no UI page to publish. An API page is built for the integration scenario itself, rather than being a screen, designed for human interaction, pressed into service as an interface.

That design origin is also the performance argument on record. UI pages were designed for human interaction, and using them as APIs has caused performance bottlenecks and inconsistent behaviour, the stated reason behind the coming OData retirement for Microsoft pages. An integrator choosing between republishing a UI page and building the API page is choosing between a route with a retirement date and a route Microsoft recommends as its replacement.

None of that makes API pages universal. The support check still binds: codeunits are not available as API web services, and queries on the API route are read-only. A flow that genuinely needs a codeunit call today sits outside the API route’s current shape, and that constraint belongs in the design note, not in a workaround.

SOAP’s deadline: versions 26, 29 and what still forces SOAP today

Support for SOAP endpoints is deprecated, and Microsoft states it will be removed in an upcoming release, directing solutions to OData v4 or to API pages and queries, which are recommended. The specific date for the retail-relevant case is tighter than the general deprecation: publishing Microsoft UI pages as SOAP web services will be removed in 2026 release wave 2, version 29.0. The squeeze started earlier, from version 26.0, publishing those pages as SOAP is blocked unless the corresponding Feature Management key is turned off.

Read that sequence as a countdown with three marks. Version 26: blocked by default, possible only by turning a feature key off. Version 29, in 2026 wave 2: removed. Between those marks, a SOAP endpoint on a Microsoft page exists on borrowed configuration. A new integration built on it is built on a documented removal.

What still forces SOAP today is narrower than habit suggests: an existing consumer that already calls the SOAP endpoint and cannot be changed on the integration’s timeline. That is a migration problem with a deadline attached, version 29, not a reason to add a second SOAP consumer beside the first.

OData’s deadline: Microsoft pages retire in version 30

OData’s timeline runs one wave behind SOAP’s, and its source needs labelling. Dynamics Communities reports that in 2027 wave 1, version 30.0, Microsoft retires exposing Microsoft-authored pages as OData endpoints; only custom pages can still be exposed. The same reporting notes that from version 26, administrators see warnings when exposing Microsoft UI pages as OData endpoints, the same early-warning pattern as SOAP, one route later.

Two qualifications keep that paragraph honest. First, the retirement covers Microsoft-authored pages; custom pages can still be exposed as OData after version 30 on this reporting. Second, the version 30 claim is community-reported from Microsoft announcements, checked on 2026-10-26, rather than taken from the Learn page for publishing web services. Plan against it, the version 26 warnings are consistent with it, and cite it as reported, not as Learn-documented.

For a retail integrator, the combined timeline is the decision in dated form: SOAP on Microsoft pages goes in version 29 (2026 wave 2); OData on Microsoft pages follows in version 30 (2027 wave 1). Work that must survive both dates belongs on API pages, or on custom objects whose exposure survives them.

Verify the published service before an integrator depends on it

Verification here is a checklist, not a call log. Confirm the object type is valid for the chosen route, using the support pattern in the spec check. Confirm Published is ticked and the expected URL field is populated, remembering the one documented exception, a Codeunit on OData v4, which shows no URL. Confirm whether the [Scope('OnPrem')] attribute restricts the object, before promising an online consumer access to it. And confirm the route’s deadline against the integration’s expected life: a service meant to run past 2026 wave 2 cannot rest on a Microsoft page published as SOAP, whatever its test result says today.

A service that answers once has passed a connectivity test. A service whose type, scope, and deadline all check out has passed the verification that matters.

, Dex Carter, Tech Writer

Keep readingNext: Business Central APIs and web services for retail data: which route to use →