Billing Integration
ZopNight reconciles rack-rate cost estimates against actual cloud invoices by syncing billing data nightly. Endpoints for sync status, re-triggering, and verifying connected accounts.
ZopNight reconciles its rack-rate cost estimates against your actual cloud invoices by syncing billing data nightly from each connected cloud account. The endpoints on this page let you check sync state, re-trigger a sync, and verify a freshly-connected account.
Org-Wide Sync Status
/billing/sync-statusReturns sync state for every cloud account in the org. Used by the dashboard's billing health badge.
{
"data": [
{
"cloudAccountID": "ca_abc123",
"provider": "aws",
"lastSyncedAt": "2026-04-29T05:00:00Z",
"status": "ok",
"monthsBackfilled": 13
},
{
"cloudAccountID": "ca_def456",
"provider": "gcp",
"lastSyncedAt": "2026-04-25T05:00:00Z",
"status": "stale",
"message": "Last successful sync was 4 days ago"
}
]
}/billing/verifyTrigger an immediate billing sync across all cloud accounts. Returns a job reference; poll /billing/sync-status until the job completes.
Verifying Cloud Accounts
Billing verification is org-wide, not per cloud account.
POST /billing/verify kicks off a sync for every connected
cloud account in the org. The job runs asynchronously; poll
GET /billing/sync-status until each entry in the response
is ok. The onboarding wizard uses these same two endpoints
— there is no per-account verify route.
The sync confirms the billing export is reachable, schemas match, and
a sample of recent records lands cleanly. Failures surface in
sync-status with a per-account message.
Historical Backfill
On first connection, ZopNight backfills up to 13 months of billing
history if your provider exposes it (AWS Cost & Usage Reports always
do; GCP needs the BigQuery billing export enabled; Azure cost exports
need to be configured at the subscription level). Backfill is part of
the verify job and reports progress via monthsBackfilled in the
sync-status response.
See Cloud Accounts for the full onboarding flow including the steps that precede billing verification.