List dashboard summaries
Lists dashboard summaries the caller can see. Results are filtered by the caller's accessible organizations; many routes paginate via page and limit.
Scope: invoices:read
Endpoint: GET /api/dashboard
Example request
curl "https://app.guliel.com/api/dashboard?organizationId=value" \
-H "Authorization: Bearer $GULIEL_API_KEY"Query parameters
organizationIdreqstringyearintegerfromstringtostring
Response (200/201)
totalInvoicesreqintegertotalRevenuereqnumberoutstandingAmountreqnumberpendingAmountreqnumberinvoicesByStatusreqobjectPer-status counts of the org's invoices for the requested year.draftreqintegerunsentreqintegersentreqintegerpaidreqinteger
revenueByMonthreqarray<object>monthreqstringrevenuereqnumbersentreqnumberunsentreqnumberdraftreqnumber
revenueByCustomerreqarray<object>Top customers by revenue, sorted descending. Currency-converted to `displayCurrency`. `count` is that client's own number of PAID invoices.namereqstringrevenuereqnumbercountreqinteger
growthreqnumberYoY revenue growth percentage.displayCurrencyreqstringCurrency that all monetary fields are converted to (the organization's primary currency).exchangeRateDatereqstringDate of the FX-rate snapshot used for conversions.pendingPaymentsListreqarray<object>Open invoices awaiting payment, sorted by due date.expenseTotalreqnumberexpensesByMonthreqarray<object>expensesByVendorreqarray<object>expensesByEmployeereqarray<object>Employer payroll cost per employee (Σ EARNING + Σ EMPR_CONTRIBUTION over APPROVED+PAID payslips), converted to displayCurrency, sorted descending. A distinct party edge from vendors — PAYROLL_PLAN.md rule 8b. Σ(expensesByVendor) + Σ(expensesByEmployee) = approved expense total. Payroll-sensitive (HR ARCHITECTURE law 33c): without scope `payroll:read` AND role MANAGER this collapses to a single aggregate `Payroll (n employees)` row of the same total.namereqstringamountreqnumber
paidInvoicesCountreqintegerapprovedExpensesCountreqintegerexpenseGrowthreqnumbernetTotalreqnumberRevenue minus expenses, in displayCurrency.netGrowthreqnumbermarginPercentreqnumberpendingExpensesTotalreqnumberpendingExpensesCountreqintegerpendingExpensesGrowthreqnumbercashFlowByMonthreqarray<object>lowStockItemsCountreqintegeractiveItemsCountreqintegerfxIncompletebooleanTrue when one or more source currencies could not be converted to `displayCurrency` (missing FX rate). Those amounts were summed at face value — totals are approximate. Surfaced in ALL environments (data quality, not a diagnostic).fxMissingCurrenciesarray<string>Source currencies that lacked a usable rate to `displayCurrency`. Present (and non-empty) iff `fxIncomplete` is true._diagnosticsarray<string>Only present in non-production environments — surfaces errors that were caught and logged but didn't abort the response.
Error responses
400 | Validation |
401 | Unauthenticated |
403 | Forbidden |
500 | Internal |