Browse the extensions reference

fiscalCalendar

returns FiscalCalendar

An entity's fiscal calendar — pointers, gap, closeable status.

Arguments

NameTypeDescription
entityIdStringThe entity whose calendar to read. Omit for the group parent.

Returns FiscalCalendar

Current fiscal calendar state for one entity of a graph.

FieldTypeDescription
graphIdString!—
entityIdStringThe entity whose calendar this is.
fiscalYearStartMonthInt!—
closedThroughStringLatest closed period (YYYY-MM), or null if nothing closed
closeTargetStringTarget period the user wants closed through (YYYY-MM)
gapPeriodsInt!Number of periods between closed_through and close_target (inclusive of close_target). 0 means caught up.
catchUpSequence[String!]!Ordered list of periods that a close run would process
closeableNowBoolean!Whether the next period in the catch-up sequence passes all closeable gates
blockers[String!]!Structured blocker codes when closeable_now is False: 'sequence_violation', 'period_incomplete', 'sync_stale', 'calendar_not_initialized', 'period_already_closed', 'pending_obligations', 'stranded_obligations', 'reconciling_items', 'unposted_source_events', 'unreconciled_accounts'
pendingObligationCountInt!Number of pending schedule_entry_due events blocking close. Non-zero only when pending_obligations is in blockers.
pendingObligationSample[PendingObligationDetail!]!Sample of up to 5 pending obligations (schedule_id, schedule_name, period, event_id) ordered by occurred_at. Use list-event-blocks with event_type=schedule_entry_due&status=pending for the full set.
earliestPendingPeriodStringEarliest period (YYYY-MM) with a pending obligation blocking close. Null when no pending_obligations blocker is active.
syncStaleDaysIntDays the most recent sync is stale relative to the period to close. Populated only when sync_stale is in blockers and last_sync_at exists (null when there's a connection but no sync has ever run).
strandedObligationCountInt!Matured schedule_entry_due events already at 'classified' with no drafted closing entry for their (schedule, period) — adjusting entries a close would silently omit. Resolve by running promote-obligations with dispatch_handlers=true (which reaches them) or voiding the obligation.
strandedObligationSample[PendingObligationDetail!]!Sample of up to 5 stranded obligations (schedule_id, schedule_name, period, event_id) ordered by occurred_at.
reconcilingItemCountInt!Posted events in or before this period whose source payload changed afterwards and that nobody has dispositioned — differences between the books and the source system. Resolve each with resolve-reconciling-item, or close over them knowingly with allow_reconciling_items.
reconcilingItemSample[String!]!Source identifiers (or event ids) of up to 5 unresolved reconciling items, so the blocker names what is holding the close.
unpostedSourceEventCountInt!Source events dated in this period that were never committed: bank-feed lines still captured or classified, and QuickBooks transactions whose automatic posting failed. Commit or void each, or close over them knowingly with allow_unposted_source_events.
unpostedSourceEventSample[String!]!Source identifiers (or event ids) of up to 5 unposted source events, so the blocker names what is holding the close.
unreconciledAccountCountInt!Reconciliations the close waits on that are not reconciled for this period, including any never compared for it. Run refresh-reconciliations and clear what it reports, release one with set-reconciliation-policy, or close over them knowingly with allow_unreconciled_accounts.
unreconciledAccountSample[String!]!Name and status of up to 5 of those reconciliations, so the blocker names what is holding the close.
lastCloseAtDateTime—
initializedAtDateTime—
lastSyncAtDateTimeMost recent QB sync timestamp (if connected)
periods[FiscalPeriodSummary!]!Fiscal period rows for this graph

Example

query
{ fiscalCalendar { graphId entityId fiscalYearStartMonth closedThrough } }
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": "{ fiscalCalendar { graphId entityId fiscalYearStartMonth closedThrough } }"}'