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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Supply chain | Supply Chain Management, Commerce
Unanswered

use inventory visibility API to fetch stock for a WMSLocation

(3) ShareShare
ReportReport
Posted on by 96
I am developing an integration where i need to fetch stock levels for products from particular locations and then transfer this to a 3rd party system.
As i have checked it is not possible to use or /in operator with the api while using getonhand.
as per requirement, i need stock quantities for all WMS locations except one particular location.
In Inventory visibility , i can acheive this with putting filters like below.
I want to know, how can i acheive the same with Inventory visibility API.
 
i use a logicapp workflow to get data from IV and then send it further to third party.
I have the same question (0)
  • Kevin Xia Profile Picture
    Microsoft Employee on at
    Hi,
    You need to use the API to get the inventory quantity of the product from all WMS locations. Once you retrieve the inventory count, you can code out the data for specific locations to exclude in the integration code. Finally, the filtered inventory quantity data is transferred to your third-party system.
    Best regards,
    Kevin
  • Subhad365 Profile Picture
    21 User Group Leader on at
    My Apologies for this delayed response -- just I happened to bump across your post :=)
    Just in case you are still looking for an answer, you can also get this done by calling the version 2.0 of the inventory endpoint:
    {{IVUrl}}/api/environment/{{environment}}/onhand/indexquery
    And then you can keep passing your WMSLocations as array in the JSON body:
    {
      "filters": {
        "OrganizationId": [
          "USMF"
        ],
        "ProductId": [
          "1000", "10002"
        ],
        "SiteId": [
          "1"
        ],
        "LocationId": [
          "13", "15", "18"
        ]
      },
      "groupByValues": [],
      "returnNegative": true
    }
    Whereby you can get the result as an array response, for all WMSLocations, except the one(s) you are not interested. 
    Don't forget to set the Version as 2.0 in the header :-)
    api-version: 2.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…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Supply chain | Supply Chain Management, Commerce

#1
Siv Sagar Profile Picture

Siv Sagar 283 Super User 2025 Season 2

#2
Laurens vd Tang Profile Picture

Laurens vd Tang 213 Super User 2025 Season 2

#3
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 152 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans