Reputation: 39
In Acumatica REST API - StockItem Question 1: How to get the multiple UOM of a Product ? Question 2: How to get Branch wise Qty of a Product ?
I am using the url https://sandbox.kimballinc.com/AcumaticaERP/entity/Default/18.200.001/StockItem?$filter=InventoryID eq '12345'
Upvotes: 0
Views: 1114
Reputation: 1712
To get Qty of the product per warehouse you can use expand = warehouseDetails parameter
{{sitename}}/entity/Default/18.200.001/StockItem?$expand=WarehouseDetails&$filter=InventoryID eq '12345'
As for UOM, you get them right away with you initial request. If you are talking about UOM conversions, you use expand = UOMConversions
{{sitename}}/entity/Default/18.200.001/StockItem?$expand=UOMConversions&$filter=InventoryID eq '12345'
If you need more details about entity schema, you can observe endpoint schema on Web Service Endpoints form inside Acumatica ERP.
However, if you want to retrieve both of them at the same time in Acumatica ERP 219r1 or earlier, you will have to change the request and use retrieval of record by key fields request: https://help-2019r1.acumatica.com/(W(13))/Help?ScreenId=ShowWiki&pageid=52c97a83-1fa1-40e9-8219-52a89a91f2da (Starting from 2019r2 version you can retrieve both using filter)
So, instead of $filter parameter, you modify url itself, like that:
{{sitename}}/entity/Default/18.200.001/StockItem/12345?$expand=UOMConversions,WarehouseDetails
(12345 here is Inventory ID)
Upvotes: 2