web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Answered

Standard API/OData for Item Variant Inventory Levels?

(5) ShareShare
ReportReport
Posted on by 12

Hello Dynamics Community,

I've been struggling for a few days trying to find a reliable way to fetch inventory stock levels by item variant, and I'm hoping someone here has a solution.

My Goal:
I need to get the current inventory stock (e.g., quantity on hand, or projected available balance) for each specific variant of an item (e.g., Item "TSHIRT", Variant "RED", Variant "BLUE").

What I Have Tested So Far:

  1. API v2.0 /items?$expand=itemVariants and /item and /itemVariants

    • This successfully returns the parent item and a list of its variants. However, the itemVariants entity only contains descriptive data (code, description) and does not contain any inventory fields.

  2. API v2.0 /itemLedgerEntries

    • My plan was to calculate the stock myself by summing the quantity from this endpoint.

    • The Problem: The itemLedgerEntries response only includes the parent itemNumber. It's missing the variantId or variantCode field, which makes it impossible to link a ledger entry to its specific variant.

  3. ODataV4 Endpoints

    • I have inspected several standard OData pages (like ItemLedgerEntries, PostedSalesShipments, etc.), but they all seem to have the same limitation. 

My Constraint (Important):
I am building an integration that needs to be scalable for multiple clients. Therefore, I cannot deploy custom AL code (like a custom API page or query) to the client's environment. The solution must use the standard, out-of-the-box API or OData endpoints.

My Question:
Is there a standard API or OData endpoint that I'm missing? How can I get the inventory stock for each specific item variant without writing custom code?

Thank you in advance for your help!

I have the same question (0)
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    22,132 Super User 2026 Season 1 on at
  • Verified answer
    OussamaSabbouh Profile Picture
    12,973 Super User 2026 Season 1 on at
    Hello,
     
    Currently, the standard Business Central APIs don’t expose variant-level inventory quantities. The itemVariants entity only includes descriptive data, and itemLedgerEntries doesn’t return a variantCode. So without custom AL code (custom API/page/query), there’s no way to get stock per variant through the public APIs.
    The only workarounds are:
    Use web services (OData) exposing the standard “Item Availability by Variant” page (if published manually per tenant).
    Or compute it inside BC using a custom API or query (needed for variant quantities).
    In short: no out-of-the-box API provides variant-level stock data — it requires a custom extension.
     
    Regards,
    Oussama Sabbouh
  • Suggested answer
    YUN ZHU Profile Picture
    99,090 Super User 2026 Season 1 on at
    Hi, hope the following can give you some hints.
    Dynamics 365 Business Central: How to quickly check inventory quantity for locations at Item-Variant level (Variant inventory per location)
     
    Thanks.
    ZHU
     
  • Gerardo Rentería García Profile Picture
    25,555 Most Valuable Professional on at
  • Suggested answer
    Rishabh Kanaskar Profile Picture
    6,219 Super User 2026 Season 1 on at
    Hi,
     
    There is no standard API or OData endpoint that returns inventory by item variant out-of-the-box. The items API only provides variant details without inventory fields, and itemLedgerEntries does not include variant information. Business Central does not expose variant-level inventory in standard APIs.
     
    Thanks
    Rishabh

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the March Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,993 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,116 Super User 2026 Season 1

#3
Khushbu Rajvi. Profile Picture

Khushbu Rajvi. 557 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans