0

I need to get accurate inventory numbers via the Acumatica API so that I can update inventory on an external site. Our only method of getting accurate inventory is running a report under Distribution -> Inventory -> Reports Tab then selecting Inventory Balance and running the report without an Inventory ID so I get a full list of all inventory in our system. How can I run this report (or any report) via Acumatica's API? I can use REST or SOAP in this case.

I need the data from the report in a manner that I can consume it in my C# application and use it to update a database on an external site. So for example, if I were using the REST API, I would want a report returned in JSON format. Example desired return below:

{
    "InventoryID": {
        "value": "CW-500-MC-30"
    },
    "Warehouse": {
        "value": "WH1"
    },
    "Description": {
        "value": "Milk chocolate chews"
    },
    "Available": {
        "value": 8
    }
},
{
    "InventoryID": {
        "value": "AB-100-SE-30"
    },
    "Warehouse": {
        "value": "WH1"
    },
    "Description": {
        "value": "Face lotion"
    },
    "Available": {
        "value": 12
    }
}
big_water
  • 3,024
  • 2
  • 26
  • 44

1 Answers1

1

As mentioned in the Appendix of the I210 course pdf section Generate a printable invoice by invoice ID :

This web integration scenario is not supported in the available versions of system endpoints. If you need to generate reports, you can use the screen-based SOAP API. For details, see the I200 Screen-Based Web Services training course in Acumatica University.

Looking in that course and following the Example 4.3.3: Generating the Printable Version of an Invoice will show how to get a report through the API.

Which can be resumed by putting the following information in the command list sent through the API.

  1. The different parameters that need to be set for the report
  2. A mention to the PDF Content from the Report Result so that the API knows that must return it to you.

After that you only need to use any library capable of writing to your file system in order to create the PDF file with the information you just received.

samol518
  • 1,354
  • 9
  • 8
  • Can I get just the data from the report? i.e. rows from the inventory report so I can get quantity available per item. I don't need the PDF necessarily. The data is more important so that I can consume it and use it to update an external site. I'll update my question, sorry if it was misleading – big_water Jan 10 '18 at 19:19
  • 1
    No the information that you can get from the report is only in the form of a pdf while using the API. If you want to have the data I would suggest you try and create an inquiry with the same setting and use it throught the API to get the values – samol518 Jan 10 '18 at 19:22
  • 1
    There appears to be a workaround, create the report in an action and attach it to a record. From the soap client invoke the action and retrieve the file, it is explained here: https://stackoverflow.com/a/49325327/7376238 – Hugues Beauséjour Jan 02 '19 at 15:07