arAging
query · in the family Reading your records
What it does
The aging report — who owes what, and for how long (30/60/90 buckets).
The receivables aging report: the 5 fixed buckets over open charges via the O(open) frontier walk (the head at its cached partial, later charges at face), each {count, totalMinor}, + asOf + arCurrency + the cached balance (Σ buckets == arBalanceMinor BY construction). With arLedger this IS the lock's aging/statements data plane.
Before you call
A bearer session from an API key (see Authentication and key hygiene) or a signed-in user.
Capability area: Reading your records — Looking up and listing the records of your organization.
Roles that may call it:
- Owner
- System Administrator
- Manager
- Associate Manager
- Sales Associate
- An API key whose scope allows
api:arAging
What happens
Reads only.
Arguments
| Name | Type | Required | Notes |
|---|---|---|---|
orgCustomerId | ID ID! | yes |
Returns
ArAgingReport ArAgingReport! — The arAging report.
Example request
graphql
query ExampleArAging($orgCustomerId: ID!) {
arAging(orgCustomerId: $orgCustomerId) {
orgCustomerId
asOf
arCurrency
arBalanceMinor
}
}Variables:
json
{
"orgCustomerId": "01900000-0000-7000-8000-7c3b96a50000"
}Example response
json
{
"data": {
"arAging": {
"orgCustomerId": "01900000-0000-7000-8000-7c3b96a50000",
"asOf": "<as of>",
"arCurrency": "<ar currency>",
"arBalanceMinor": 1250
}
},
"extensions": {
"at": {
"callId": "01EXAMPLE-CALL-ID",
"version": {
"requested": null,
"serviced": {
"name": "genesis",
"number": 0
}
}
}
}
}Errors this call can answer
VALIDATION/INVALID— Something in the request is not valid. Retry: no. (VALIDATION)AUTHN/REQUIRED— Sign in to do this. Retry: no. (AUTHN)AUTHZ/FORBIDDEN— Your role does not allow this action. Retry: no. (AUTHZ)RATE_LIMIT/THROTTLED— Too many requests in a short time. Retry: yes. (RATE_LIMIT)NOT_FOUND/*— That record could not be found. Retry: no. (NOT_FOUND)