Is it possible to query below data structure using salesforce OOTB API(Rest, Soap or Composite)?
Lets assume that from account all objects below have 1:M relationship with their parents There can be multiple orders for an account, multiple order lines for an order and multiple products per order line, multiple product lines per product. technically the output ids of one object becomes input to another.
The problem that i am trying to is we need to send different data structures like this to external system for document creation and i am trying to check if this can be done without needing to write custom apex wrapper classes.
Based on the document template we need to define certain data structures with fields and that needs to be queried in run time.
I checked Rest API documentation and was not able to figure out how to query hierarchical data using it.