Browse the extensions reference

openReceivablesByAgent

returns [OpenBalanceByAgent!]!

Per-counterparty open AR rows, ordered by absolute balance descending.

Arguments

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

Returns OpenBalanceByAgent

Per-agent open balance row. Used for both the aging-by-counterparty list and the per-Agent GraphQL field. openBalanceCents reflects only the unsettled remainder (sum of originating amounts minus sum of discharges) so partial-payment chains net out correctly.

FieldTypeDescription
agentIdString!
openBalanceCentsInt!Unsettled originating-event amounts minus discharges, in minor currency units. Positive for normal AR/AP; negative when overpaid.
openEventCountInt!Number of originating events with nonzero balance for this agent.
currencyString!

Example

query
{ openReceivablesByAgent { agentId openBalanceCents 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": "{ openReceivablesByAgent { agentId openBalanceCents openEventCount currency } }"}'