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

Community site session details

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

Standard API/OData for Item Variant Inventory Levels?

(2) ShareShare
ReportReport
Posted on by 4

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)

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
Sumit Singh Profile Picture

Sumit Singh 2,056

#2
YUN ZHU Profile Picture

YUN ZHU 1,680 Super User 2025 Season 2

#3
Rishabh Kanaskar Profile Picture

Rishabh Kanaskar 1,679

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans