How can I run a generic inquiry that I created via Acumatica's REST API? I was using the Inventory Summary Inquiry before but it was not returning all of the data I needed so we created a Generic Inquiry to return available for shipment quantity for ALL stock items. However I can't find how to get the data from this report via the API.
UPDATE:
I've tried creating an extended endpoint service and adding my endpoint for the report as described in I210 Documentation and then hitting via the REST API (which is not shown in I210). I added all of the result fields to the fields tab of the endpoint that I need returned.
Here are the details I used:
Extended Endpoint Name: MyInventoryAvailable
Endpoint version: 6.00.001
Endpoint: GetAvailableInventory
URL: https://mycompany.acumatica.com/entity/MyInventoryAvailable/6.00.001/GetAvailableInventory?$expand=Results
When I do a PUT request using the above details, this is the response I get:
{
"message": "The request is invalid.",
"modelState": {
"": [
"The request body should not be empty."
]
}
}
UPDATE 2
Here is the setup in Acumatica for the extended endpoint:
I've tried setting up a request body but with no success:
{
"InventoryID": {
"Value": "AB-CL-60"
},
"Description": {
"Value": ""
},
"Location": {
"Value": ""
},
"QtyHardAvailable":{
"Value": 0.0
},
"QtyOnHand":{
"Value": 0.0
},
"Warehouse":{
"Value": 0.0
}
}
When sending any request body, regardless of the content I recieve this error:
"exceptionMessage": "The given key was not present in the dictionary.",
"exceptionType": "System.Collections.Generic.KeyNotFoundException",
UPDATE 3 - Inquiry Structure
Here is the structure of the inquiry:
And here are the results in Acumatica's UI:
UPDATE 4