Using transactions to simplify lookup

I have a series of objects that each reference a parent object, and am trying to look up everything with one API call using transactions.

The data structure is as follows:
Book (top-level object)
Section (contains reference to the parent Book)
Chapter (contains reference to parent Section)
Subchapter (contains reference to parent Chapter)

Currently, the way we load the table of contents for a book is as follows:
Load all sections with book.objectId=the book Id we want
Load all chapters with section.objectId IN (result from previous step)
Load all subchapters with chapter.objectId IN (result from previous step)

This is not an ideal solution since it requires three API calls that have to be done in sequence to load the table of contents, and I was looking into the use of transactions or some alternate way to load the entire table of contents in one operation without any success so far. Is this even possible, and if so how would I go about doing it?

Hello @Jacob_Goldberg

Could you describe all the information that you want to get in one request?

Also, for example, using the next query on subchapter table you already could get a lot of needed information

chapter.section.book.objectId = 'some id'

You could combine it with relations settings, to reduce/extend response with needed information.

And last but not least. If in your table structure Book is top level object. Isn’t it better to build a relation from book, but not to it? At least in this case you could get all the information that references to this book in one simple query.

Regards, Dima.