Expanding responses
Many objects allow you to request additional information as an expanded response by using the expand
parameter. For example, a Journal Entry
object has an assoication to its line entries; by using the expand
parameter, you can request the full Line Entry
objects. Expandable fields are denoted in this documentation in their description.
To expand responses, specifiy the nested fields that you would like to expand. For example, passing line_entries
on a journal entry request would give you the complete Line Entry objects for every line entry associated with the journal entry.
You can recursively expand responses up to a depth of two levels, using a dot (.
) between attributes. For example requesting line_entries.ledger
on a journal entry would get the ledger assoiciated with a journal entry’s corresponding line entries. Note that deep expansions, especially on lists of objects, may result in slower processing times.
Pass multiple expressions to the expand
parameter to expand multiple objects at once in a single request.