Browse the extensions reference

periodDrafts

returns PeriodDrafts

All draft entries for a fiscal period, ready for review before close.

The close-review outbox: each draft is annotated with its QB write-back disposition (willPublishToQb) and the response carries a publish summary — which drafts close-period will push to QuickBooks vs. post locally only.

Arguments

NameTypeDescription
periodString!The fiscal period, as YYYY-MM.

Returns PeriodDrafts

All draft entries for a fiscal period, ready for review before close.

FieldTypeDescription
periodString!YYYY-MM period name
periodStartDate!
periodEndDate!
draftCountInt!
totalDebitInt!Sum across all drafts, in cents
totalCreditInt!Sum across all drafts, in cents
allBalancedBoolean!True if every draft entry has debit == credit
qbWritebackConnectionIdStringId of the QuickBooks connection these drafts publish to on close, or null when the graph has no qb_authoritative/hybrid QB connection (the drafts post locally only).
qbWritePolicyStringwrite_policy of the publishing QB connection ('qb_authoritative' / 'hybrid'), or null when there is no write-back connection.
qbPublishCountInt!Number of drafts that will publish to QuickBooks on close.
localOnlyCountInt!Number of drafts that post locally only (no QB write-back).
drafts[DraftEntry!]!

Example

query
{ periodDrafts(period: "...") { period periodStart periodEnd draftCount } }
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": "{ periodDrafts(period: \"...\") { period periodStart periodEnd draftCount } }"}'