Browse the extensions reference

openReceivables

returns OpenBalanceAggregate!

Graph-wide open AR — total + counterparty count + open invoice count.

Derived from the event duality chain: sum of unsettled invoice_issued / sales_receipt_recorded amounts minus discharges pointed at them.

Arguments

None. The graph is chosen by the URL, never by an argument.

Returns OpenBalanceAggregate

Graph-wide open AR or open AP aggregate. totalOpenCents is the sum of unsettled originating-event balances; counterpartyCount is the number of distinct agents with at least one open invoice or bill. The currency is uniform per graph today (mixed-currency books would need a per-currency breakdown — out of scope for v1).

FieldTypeDescription
totalOpenCentsInt!Sum of unsettled balances in minor currency units.
counterpartyCountInt!Distinct agents with at least one open balance.
openEventCountInt!Distinct originating events with a nonzero open balance.
currencyString!Currency code (uniform per graph).

Example

query
{ openReceivables { totalOpenCents counterpartyCount openEventCount currency } }
curl
curl -X POST "https://api.robosystems.ai/extensions/$GRAPH_ID/graphql" \
  -H "X-API-Key: $ROBOSYSTEMS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query": "{ openReceivables { totalOpenCents counterpartyCount openEventCount currency } }"}'