I’m being diving how to retrieve all fields when listing a doc_type thru REST Api. Let’s say instead of explicitly asking for each field by its name, I would like to know if something like this: “https://demo.erpnext.com/api/resource/Currency Exchange/?fields=all” is possible.
Please request a single invoice to get the items. In the list of invoices, child tables are not included.
You can GET /api/resource/Sales Invoice for a list of invoice names. Then loop over the list and GET /api/resource/Sales Invoice/{current_invoice}. The latter will return all invoice data, including the items.
It would have been nice if at least listing items from child tables was possible. Instead of sending 20 get requests to the api to deeply fetch the parent it would be done in a single one and a filter like [['Material Request Item', 'parent', 'in', ['name1', 'name2', ...]]]
That would be much faster and close enough to a join for me.
But erpnext just keeps responding “Broken Pipe Error”. great. So instead I’ll just wait a few seconds each time the page refreshes for all requests to resolve… great user experience