Just think of it that it’s just a way for you to consolidate data in a structured way. If you’re able to use relations + lookups/joined list to pull data from different tables, you should be able to have a complete JSON for your own need.
Check the docs here:
And the video about line items.
@Rupert Should be able to help you more via the DocsAutomator chat once you gets to it.