Browse the extensions reference

fiscalCalendar

returns FiscalCalendar

Current fiscal calendar state — pointers, gap, closeable status.

Arguments

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

Returns FiscalCalendar

Current fiscal calendar state for a graph.

FieldTypeDescription
graphIdString!
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'
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.
lastCloseAtDateTime
initializedAtDateTime
lastSyncAtDateTimeMost recent QB sync timestamp (if connected)
periods[FiscalPeriodSummary!]!Fiscal period rows for this graph

Example

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