OData
OData web services in Business Central: how to consume them in JSON and AtomPub, read the metadata document, filter data, modify records, call V4 unbound actions, run transactional batches, and troubleshoot or tune calls. It answers questions on URI syntax, supported operations, known limits, error codes and client performance.
Path: Integration > Web services > OData · tier official · system integration · narrative reviewed (checked by Opus)
Overview
This section covers working with Business Central data through OData web services. It starts with the basics of consuming services: returning JSON or AtomPub (OData V3) documents, and getting the EDMX service metadata document that describes the entity data model. Containments and associations explain navigation between published pages.
Several pages cover querying and changing data. Filtering is described for OData URIs (with AL filter equivalents), for API/OData calls in general, and for FlowFilters on FlowFields. Data modification pages explain POST, PATCH and DELETE on writable pages, and OData V4 unbound actions let you call AL codeunit procedures published as web services. Transactional $batch requests group inner requests into one transaction.
For operations, use the performance guidelines, the troubleshooting page on error and HTTP status codes, the page on queries with a top number of rows, and the Known OData Limitations page. A sensible start is the metadata document and the filter pages, then data modification, then the limitations and performance pages.
Key points
- JSON documents are consumed via URI parameters, with JSON-P callbacks supported; AtomPub documents apply to OData V3, including keyed entries and filtered feeds.
- The EDMX service metadata document defines the entity data model, so tools such as LINQ can query Business Central data.
- Writes use POST, PATCH and DELETE on writable pages; InsertAllowed, ModifyAllowed and DeleteAllowed control them, triggers run by operation type, and user permissions are enforced.
- OData V4 unbound actions call AL codeunit procedures published as web services, using HTTP POST with JSON parameters and OAuth authentication.
- Transactional $batch requests use the Isolation: snapshot header; if any inner request fails, all changes are reverted.
- Performance guidance: Data-Access-Intent ReadOnly, batch requests, $select, $filter, $top and server-driven paging.
- For queries with TopNumberOfRows, Max Page Size (odata.maxpagesize) must be greater than the TopNumberOfRows value to get correct counts.
- Known limits include no PATCH on collection properties, no OR filters on distinct fields, no lambda operators, and no deep insert or deep patch.
Learn pages
- How to: Use OData to Return-Obtain a JSON Document: Learn about how to use OData to obtain a JSON document
- How to: Use OData to Return-Obtain an AtomPub Document: Learn how OData V3 clients can use Atom Publishing Protocol documents to interact with Business Central data
- Known OData Limitations: Learn about known limitations with Business Central OData.
- OData V4 Unbound Actions in Business Central: Create an OData V4 unbound action in AL, publish a codeunit as a web service, and send authenticated JSON requests to call its procedures in Business Central.
- OData Web Services Data Modification: Write to the database using an OData web service that exposes a writable page and implement it in on Microsoft SharePoint Online.
- In the observatory: Table 18 “Customer”
- OData/API web service client performance: Learn about how to develop efficient and fast OData/API web service clients for Business Central.
- Troubleshooting REST API/OData calls: Learn about how to troubleshoot Business Central web service errors of types REST API or OData.
- Use OData to Return and Obtain a Service Metadata Document: Using OData to return and obtain a Service Metadata (EDMX) Document.
- Using Containments and Associations: Learn how to use containments and associations with OData for creating relationships between pages.
- Using Filter Expressions in OData URIs: Learn how to use filter expressions in OData URIs to limit results, map to AL filters, and see syntax examples.
- Using filters with API/OData calls: Learn how to use filters with API calls to get targeted information in return.
- Using FlowFilters in OData URIs: Learn how to use FlowFilter expressions in OData URIs.
- Using OData transactional $batch requests: How to specify that all inner requests in a certain OData $batch request are processed in a transactional way in Business Central.
- Using OData with Queries That are Set with a Top Number of Rows: Learn about using queries that are set with a top number of rows.
Videos, posts and code changes
Linked by a Haiku matcher with a grounding quote from the item’s summary (link/topics.ts); machine-generated.
- #12324 Obsolete Http Web Request Mgt. usage in public API (webhooks, OData) (code change): “ODataUtility CreateMetadataWebRequest is pending obsolete; build requests with native HttpClient”
- #8051 [Edit in Excel] Expose ExternalizeODataObjectName and add Page Control Field publisher (code change): “Edit in Excel codeunit now exposes a public procedure for OData object name conversion”
- #8742 Enhance SharePoint error handling and add tests (code change): “OData verbose error responses to show meaningful error messages”
- Business Central 2027 release wave 1: Preparing for OData Endpoint Removal (community post): “Pages exposed as OData web services will no longer be available from Microsoft-managed pages”
- Dynamics 365 Business Central: compressing API responses at max. (community post): “use Brotli compression instead of gzip to reduce the size of OData API responses”
- Quick Tip: Say Goodbye to OData on Microsoft Pages in Business Central 2027 Wave 1 (version 30.0) (community post): “Microsoft no longer allows exposing Microsoft-authored pages as OData endpoints”
- Dynamics 365 Business Central: How to use the OData V4 IN operator in web service queries (community post): “OData V4 IN operator simplifies web service queries in Business Central”
Source: Microsoft Learn (CC BY 4.0). Descriptions are Learn’s own.
What Learn documents here 8 of 14 Learn pages
- learnHow to: Use OData to Return-Obtain a JSON Document2024-01-28
- learnHow to: Use OData to Return-Obtain an AtomPub Document2021-04-01
- learnKnown OData Limitations2022-04-01
- learnOData V4 Unbound Actions in Business Central2026-10-29
- learnOData Web Services Data Modification2021-04-01
- learnOData/API web service client performance2023-07-03
- learnTroubleshooting REST API/OData calls2024-02-06
- learnUse OData to Return and Obtain a Service Metadata Document2025-12-23
Show 6 more
- learnUsing Containments and Associations2024-01-28
- learnUsing Filter Expressions in OData URIs2025-06-20
- learnUsing filters with API/OData calls2026-03-23
- learnUsing FlowFilters in OData URIs2024-01-28
- learnUsing OData transactional $batch requests2023-04-25
- learnUsing OData with Queries That are Set with a Top Number of Rows2021-05-26