0

I am using the Acumatica REST endpoint https://sandbox.kimballinc.com/AcumaticaERP/entity/Default/6.00.001 in my application

I am using the URL https://sandbox.kimballinc.com/AcumaticaERP/entity/Default/6.00.001/StockItem?$filter=InventoryID eq '123456'&$expand=WarehouseDetails to fetch info about a Product and to get complete warehouse details

My query is how to use multiple product id's in single request, so that to get info about multiple products in single request to Acumatica Erp REST Url.

For example I have three product Id's product id 1 is 123456 product id 2 is 457963 product id 1 is 135780

how to form one request to fetch records of all these three product id's. we cant form a request with generic product id but we need to mention all three product ids in the request.

Thanks

venkat
  • 39
  • 1
  • 8

1 Answers1

3

I'm looking through the documentation and don't see a way to do multiple unless you do

$filter=InventoryID eq '123456' or InventoryID eq '457963' or InventoryID eq '135780' etc.

This would work for a few but probably wouldn't work if you had a lot of IDs to send at once.

Rochelle C
  • 928
  • 3
  • 10
  • 22
  • There's no hard limit on URL length, I think this should scale reasonably well even for lots of ID. – Hugues Beauséjour Mar 21 '19 at 13:48
  • Its not working for me. single product is working but two products not working when i tried like this -> https://sandbox.kimballinc.com/AcumaticaERP/entity/Default/6.00.001/StockItem?$filter=InventoryID eq '000032-000' or InventoryID eq '000042-000'' – venkat Mar 26 '19 at 13:57
  • "message": "An error has occurred.", "exceptionMessage": "There is an unterminated string literal at position 60 in 'InventoryID eq '000032-000' or InventoryID eq '000042-000'''.", "exceptionType": "Microsoft.Data.OData.ODataException", "stackTrace": " at Microsoft.Data.OData.Query.ExpressionLexer.NextToken()\r\n at Microsoft.Data.OData.Query.UriQueryExpressionParser.ParseComparison()\r\n – venkat Mar 26 '19 at 13:59
  • I attempted to do this on mine using the URL http://localhost/entity/default/18.200.001/StockItem?$filter=InventoryID eq '2332FG' or InventoryID eq '2332P' and I get a different error that says "Only AND logical operator is supported". Is the Or operator not supported in Acumatica? I'm looking at page https://www.odata.org/documentation/odata-version-3-0/url-conventions/ linked from the Acumatica help file and at 5.1.2.1.10 it shows an example using an Or operator. Might need a response from Acumatica to know if this is a bug or if I have an error in my URL. – Rochelle C Mar 27 '19 at 14:43
  • Acumatica not supporting the feature mentioned in OData URL conventions, thats why i raised this question. How to raise this question with Acumatica Technical Support Team ? Thanks – venkat Apr 01 '19 at 11:57