Budgets
Budgets let you set spending targets by account and compare actual performance against plan. This feature requires the CFO Suite add-on.
Create a Budget
bash
curl -X POST "https://api.ondayzero.com/api/v1/budgets" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Q2 2026 Operating Budget",
"fiscal_year": 2026,
"start_date": "2026-04-01",
"end_date": "2026-06-30"
}'Add Budget Lines
Each line ties a budgeted amount to a ledger account:
bash
curl -X POST "https://api.ondayzero.com/api/v1/budgets/{budget_id}/lines" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{
"ledger_id": "EXPENSE_LEDGER_UUID",
"amount": 500000
}'
amountis in cents.500000= $5,000.00 budget for that account.
List Budgets
bash
curl "https://api.ondayzero.com/api/v1/budgets?fiscal_year=2026&status=active" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Filter Parameters
| Parameter | Type | Description |
|---|---|---|
status |
string | Filter by budget status |
fiscal_year |
integer | Filter by year (e.g., 2026) |
Activate a Budget
Draft budgets must be activated to track actuals:
bash
curl -X POST "https://api.ondayzero.com/api/v1/budgets/{budget_id}/activate" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Budget vs. Actual
Compare budgeted amounts to actual spending for a date range:
bash
curl "https://api.ondayzero.com/api/v1/budgets/{budget_id}/vs-actual?start_date=2026-04-01&end_date=2026-06-30" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID"Returns line-by-line comparisons with variance amounts and percentage completion.
Forecasts
Generate AI-powered spending forecasts based on historical data:
bash
curl -X POST "https://api.ondayzero.com/api/v1/budgets/forecast" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{}'Copy a Budget
Duplicate an existing budget as a starting point:
bash
curl -X POST "https://api.ondayzero.com/api/v1/budgets/{budget_id}/copy" \
-H "Authorization: Bearer dz_your_token_here" \
-H "x-business-id: YOUR_BUSINESS_ID" \
-H "Content-Type: application/json" \
-d '{"name": "Q3 2026 Operating Budget"}'