By using this website, you agree to our Terms of Use (click here)
Does anyone have experience and examples to share using the Contract Based REST API to get StockItem attribute values from an Acumatica instance? I’m able to retrieve StockItem data via the REST API but have not figured out how to get Attributes or their values.
This GET request works fine. It returns a 200 code and a nice json string with the expected data from our 2019R1 instance:
http://10.1.1.22/alive/entity/Default/17.200.001/StockItem?$filter=startswith(InventoryID ,'IDDG')&$top=5&$expand=Boxes
But when I try to retrieve attribute IDs or values from StockItems, Acumatica returns a 500 code without much to go on. I tried following the instructions in the Integration Development Guide but it isn’t real clear on this topic. I must have something wrong with the GET request syntax. Here I’m trying to get the value of the StockItem Attribute named A1007:
http://10.1.1.22/alive/entity/Default/17.200.001/StockItem?$expand=Attributes&$Custom=Document.AttributeA1007&$top=10
Made this request a few months ago.
If I remember right, you can not expand the Attributes only. you have expand all the fields include custom fields. that made the request very large.
or you can have another endpoint to request the attribute, and combine the data on somewhere else.
