Very cool! I commend your efforts!
Getting data from the API with epicor is an immensely satisfying feeling of freedom. It feels like you get control back from the database to some extent. We can help get you there. For us the easiest way to get the data is with Excel. That may work nicely with your HTML and Python, or it may need a few tweaks.
Think about it like this, if you can make a BAQ that shows the data, and you can use that BAQ in an excel spreadsheet to populate your HTML, then we can help you get your data from Epicor into Excel to make that happen. Since you are already using AI to help, you know how to ask the right questions. Ask it to help you modify the mcode if you need special grouping, or other summary data.
Here is my mcode template that has been working great. You have to setup the API key and access scope in Epicor first. And assign your BAQ to the access scope. But once you do it is not too hard. Not like trying to make a BAQ in Kinetic!
let
Base64Auth = "Basic " & Binary.ToText(Text.ToBinary("yourapiusername:yourapiuserpassword"), BinaryEncoding.Base64),
ApiKey = "yourwholeactualapikey",
Headers = [
#"Authorization" = Base64Auth,
#"X-API-Key" = ApiKey,
#"Content-Type" = "text/plain"
],
paramQuery = "yourbaqname",
Source = OData.Feed("https://yourserverhere/api/v2/odata/yourcompany/BaqSvc/" & paramQuery & "/Data?", Headers, [Implementation = "2.0"])
in
Source
Check out this thread to get you started, and let us know where you get stuck.
Pulling BAQ into Excel - Web API, OData, JSON? - Kinetic ERP - Epicor User Help Forum