Browse the extensions reference

openPayables

returns OpenBalanceAggregate!

Graph-wide open AP — symmetric to openReceivables.

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
{ openPayables { 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": "{ openPayables { totalOpenCents counterpartyCount openEventCount currency } }"}'