Skip to main content

Aggregate fields

Aggregate is returned as the aggregate entry of the Insights bundle. Check the entry's status before reading its data; the fields below describe that data payload. For what Aggregate summarises, see Aggregate in the Overview.

Using the fields​

  • Use hierarchy to see where a node sits in the structure: top-level sections, nested subtables, individual rows and totals
  • Use type to decide how to parse values - as an array of child nodes, a time series object or a key-value object
  • Read Aggregate alongside the Completeness entry in the same bundle - low coverage can distort aggregated totals

Response fields​

The data payload contains a tables array of aggregation nodes. Each node contains:

FieldDescription
idUnique identifier for the aggregation node
nameHuman-readable label for the aggregation category, when available
hierarchyStructural role of the node in the aggregation output: table, subtable, row, or total
typeData shape of the node's values field: objectArray, timeseries, or keyValue
valuesAggregated values for the node. The structure depends on the node type (see below)

The shape of values depends on type:

  • objectArray - values is an array of child nodes (recursive nesting)
  • timeseries - values is an object keyed by "yyyy-MM" month with numeric amounts (or null where no value exists), plus a total key
  • keyValue - values is an object of key/value pairs; values are mixed types (strings, numbers, dates, nulls)