# Reports

> Solarium docs. All requests are `POST https://api.trysolarium.com/graphql/` with `Authorization: Bearer <api key>` and a JSON body `{"query": ..., "variables": ...}`. Every query and mutation takes an `organizationId` (find it with `myOrganizations`). Index of all pages: https://trysolarium.com/llms.txt

## Dashboard Summary

High-level financial snapshot: revenue, expenses, net income, receipt counts for a date range.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date` | No | Start of range (defaults to start of current month) |
| `endDate` | `Date` | No | End of range (defaults to today) |

### Request

```graphql
query {
  dashboardSummary(
    organizationId: "a1b2c3d4-..."
    startDate: "2025-01-01"
    endDate: "2025-03-31"
  ) {
    totalRevenue
    totalExpenses
    netIncome
    receiptCount
    unreviewedCount
  }
}
```

### Response

```json
{
  "data": {
    "dashboardSummary": {
      "totalRevenue": "84500.00",
      "totalExpenses": "52300.00",
      "netIncome": "32200.00",
      "receiptCount": 89,
      "unreviewedCount": 3
    }
  }
}
```

## Income Statement

Full profit & loss report broken down by account.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date` | No | Start of range |
| `endDate` | `Date` | No | End of range |

### Request

```graphql
query {
  incomeStatement(
    organizationId: "a1b2c3d4-..."
    startDate: "2025-01-01"
    endDate: "2025-03-31"
  ) {
    incomeAccounts { accountId accountName total }
    expenseAccounts { accountId accountName total }
    totalIncome
    totalExpenses
    netIncome
  }
}
```

### Response

```json
{
  "data": {
    "incomeStatement": {
      "incomeAccounts": [
        { "accountId": "...", "accountName": "Sales", "total": "84500.00" }
      ],
      "expenseAccounts": [
        { "accountId": "...", "accountName": "Rent", "total": "18000.00" },
        { "accountId": "...", "accountName": "Payroll", "total": "28000.00" },
        { "accountId": "...", "accountName": "Office Supplies", "total": "6300.00" }
      ],
      "totalIncome": "84500.00",
      "totalExpenses": "52300.00",
      "netIncome": "32200.00"
    }
  }
}
```

## Profit & Loss By Period

Profit & loss with one column per month or quarter. Accounts are grouped into Revenue, Cost of Goods Sold, Operating Expenses and Other Expenses; each line carries its amount per period, its total, and its share of its section. Amounts are natural-signed (revenue and expenses both positive) in the organization's functional currency. A single-period result always equals the Income Statement.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of range (YYYY-MM-DD); the first period is clipped to it |
| `endDate` | `Date!` | Yes | End of range (YYYY-MM-DD); the last period is clipped to it |
| `granularity` | `String` | No | "month" (default) or "quarter" |

### Request

```graphql
query {
  profitAndLoss(
    organizationId: "a1b2c3d4-..."
    startDate: "2026-01-01"
    endDate: "2026-03-31"
    granularity: "month"
  ) {
    currency
    periods { key label startDate endDate }
    sections {
      key
      title
      lines { accountId accountName taxCode amounts total percent }
      totals
      total
    }
    grossProfit { amounts total }
    netIncome { amounts total }
  }
}
```

### Response

```json
{
  "data": {
    "profitAndLoss": {
      "currency": "CAD",
      "periods": [
        { "key": "2026-01", "label": "Jan 2026", "startDate": "2026-01-01", "endDate": "2026-01-31" },
        { "key": "2026-02", "label": "Feb 2026", "startDate": "2026-02-01", "endDate": "2026-02-28" },
        { "key": "2026-03", "label": "Mar 2026", "startDate": "2026-03-01", "endDate": "2026-03-31" }
      ],
      "sections": [
        {
          "key": "revenue",
          "title": "Revenue",
          "lines": [
            { "accountId": "...", "accountName": "Sales", "taxCode": "8000", "amounts": ["26500.00", "27100.00", "30900.00"], "total": "84500.00", "percent": "100.0" }
          ],
          "totals": ["26500.00", "27100.00", "30900.00"],
          "total": "84500.00"
        },
        {
          "key": "operating_expenses",
          "title": "Operating Expenses",
          "lines": [
            { "accountId": "...", "accountName": "Rent", "taxCode": "8910", "amounts": ["6000.00", "6000.00", "6000.00"], "total": "18000.00", "percent": "34.4" },
            { "accountId": "...", "accountName": "Wages", "taxCode": "9060", "amounts": ["9300.00", "9300.00", "9400.00"], "total": "28000.00", "percent": "53.5" }
          ],
          "totals": ["15300.00", "15300.00", "15400.00"],
          "total": "46000.00"
        }
      ],
      "grossProfit": { "amounts": ["26500.00", "27100.00", "30900.00"], "total": "84500.00" },
      "netIncome": { "amounts": ["11200.00", "11800.00", "15500.00"], "total": "38500.00" }
    }
  }
}
```

## Spending By Vendor

Expenses grouped by vendor, one column per month or quarter. Uses the same posted expense lines as the Profit & Loss (Cost of Goods Sold, Operating and Other Expenses, before tax), so the grand total always equals the P&L's total expenses. A line belongs to its transaction's vendor, else the line's own contact (QuickBooks history), else its known business, else its cleaned bank text; anything left is "No Vendor" (key "none"). Vendors are sorted biggest first. To list one vendor's entries, call accountLines with the returned accountIds and vendor set to the row's key.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of range (YYYY-MM-DD) |
| `endDate` | `Date!` | Yes | End of range (YYYY-MM-DD) |
| `granularity` | `String` | No | "month" (default) or "quarter" |

### Request

```graphql
query {
  spendingByVendor(
    organizationId: "a1b2c3d4-..."
    startDate: "2026-01-01"
    endDate: "2026-02-28"
  ) {
    currency
    periods { key label startDate endDate }
    vendors { key name logoUrl amounts total percent count }
    totals
    total
    accountIds
  }
}
```

### Response

```json
{
  "data": {
    "spendingByVendor": {
      "currency": "CAD",
      "periods": [
        { "key": "2026-01", "label": "Jan 2026", "startDate": "2026-01-01", "endDate": "2026-01-31" },
        { "key": "2026-02", "label": "Feb 2026", "startDate": "2026-02-01", "endDate": "2026-02-28" }
      ],
      "vendors": [
        { "key": "c:7f3e...", "name": "Hall Properties", "logoUrl": null, "amounts": ["900.00", "900.00"], "total": "1800.00", "percent": "62.1", "count": 2 },
        { "key": "g:41aa...", "name": "Slack", "logoUrl": "https://...", "amounts": ["12.00", "12.00"], "total": "24.00", "percent": "0.8", "count": 2 },
        { "key": "none", "name": "No Vendor", "logoUrl": null, "amounts": ["0", "40.00"], "total": "40.00", "percent": "1.4", "count": 1 }
      ],
      "totals": ["1430.00", "1470.00"],
      "total": "2900.00",
      "accountIds": ["..."]
    }
  }
}
```

## Receivables & Payables (Aged)

Who owes what as of a date: customers who owe you (side "receivable", A/R accounts) or vendors you owe (side "payable", A/P accounts), grouped by the customer/vendor on each posted line. Aging is first-in, first-out: payments clear the oldest charges first and what remains is aged by its own date into 0–30, 31–60, 61–90 and over 90 days. A contact who has overpaid shows a negative balance in current. Lines with no contact are grouped under key "none". The grand total equals the accounts' balance-sheet balance. To list one row's entries, call accountLines with the returned accountIds, endDate = asOf and contact set to the row's key.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `side` | `String!` | Yes | "receivable" or "payable" |
| `asOf` | `Date!` | Yes | Balances as of this date (YYYY-MM-DD) |

### Request

```graphql
query {
  openBalances(organizationId: "a1b2c3d4-...", side: "receivable", asOf: "2026-04-15") {
    currency
    rows { key name current days31To60 days61To90 over90 total oldest }
    totals { current days31To60 days61To90 over90 total }
    accountIds
  }
}
```

### Response

```json
{
  "data": {
    "openBalances": {
      "currency": "CAD",
      "rows": [
        { "key": "7f3e...", "name": "Buduchnist", "current": "0", "days31To60": "0", "days61To90": "0", "over90": "200.00", "total": "200.00", "oldest": "2026-01-10" },
        { "key": "91ab...", "name": "HMECU", "current": "0", "days31To60": "30.00", "days61To90": "0", "over90": "0", "total": "30.00", "oldest": "2026-03-01" }
      ],
      "totals": { "current": "0", "days31To60": "30.00", "days61To90": "0", "over90": "200.00", "total": "230.00" },
      "accountIds": ["..."]
    }
  }
}
```

## Download Reports (Excel / CSV)

Every report for a date range in one .xlsx workbook: Profit & Loss by period, Balance Sheet, Spending By Vendor, Receivables and Payables (balances as of endDate). Amounts are numeric cells in the organization's currency format, built from the same services as the queries above, so they always agree. With format "csv", returns just the one report named by report (pnl, balance-sheet, vendors, receivable, payable) as plain rows: amounts to the cent with no symbols, ISO dates. Returns the file name, content type and the file as base64.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of range (YYYY-MM-DD) |
| `endDate` | `Date!` | Yes | End of range (YYYY-MM-DD); balance sheets are as of this date |
| `granularity` | `String` | No | "month" (default) or "quarter" for the P&L and vendor sheets |
| `format` | `String` | No | "xlsx" (default, every report) or "csv" (one report) |
| `report` | `String` | No | For csv: pnl, balance-sheet, vendors, receivable or payable |

### Request

```graphql
query {
  reportsExport(organizationId: "a1b2c3d4-...", startDate: "2026-01-01", endDate: "2026-03-31") {
    filename
    contentType
    contentBase64
  }
}
```

### Response

```json
{
  "data": {
    "reportsExport": {
      "filename": "Vanilla-Bite-Ltd-Reports-2026-01-01-to-2026-03-31.xlsx",
      "contentType": "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "contentBase64": "UEsDBBQAAAAIA..."
    }
  }
}
```

## Balance Sheet

Assets, liabilities and equity as of a date, optionally compared to a second date. Accounts are grouped by type (Current Assets, Fixed Assets, Current Liabilities, Long-Term Liabilities, Equity). Equity includes two computed lines derived from the P&L, the way QuickBooks derives retained earnings: "Prior Years' Earnings" (before Jan 1 of the as-of year, accountId prior_earnings) and "Net Income (Year To Date)" (accountId net_income). outOfBalance is assets minus liabilities and equity, and is zero for balanced books.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `asOf` | `Date!` | Yes | Balance date (YYYY-MM-DD), inclusive |
| `compareAsOf` | `Date` | No | Optional second date; fills compareAmount / compareTotal |

### Request

```graphql
query {
  balanceSheet(
    organizationId: "a1b2c3d4-..."
    asOf: "2026-03-31"
    compareAsOf: "2025-12-31"
  ) {
    asOf
    compareAsOf
    currency
    sections {
      key
      title
      groups {
        key
        title
        lines { accountId accountName taxCode amount compareAmount computed }
        total
        compareTotal
      }
      total
      compareTotal
    }
    liabilitiesAndEquity
    outOfBalance
  }
}
```

### Response

```json
{
  "data": {
    "balanceSheet": {
      "asOf": "2026-03-31",
      "compareAsOf": "2025-12-31",
      "currency": "CAD",
      "sections": [
        {
          "key": "assets",
          "title": "Assets",
          "groups": [
            {
              "key": "current_assets",
              "title": "Current Assets",
              "lines": [
                { "accountId": "...", "accountName": "Chequing", "taxCode": "1001", "amount": "24680.50", "compareAmount": "19450.00", "computed": false }
              ],
              "total": "24680.50",
              "compareTotal": "19450.00"
            }
          ],
          "total": "24680.50",
          "compareTotal": "19450.00"
        },
        {
          "key": "equity",
          "title": "Equity",
          "groups": [
            {
              "key": "equity",
              "title": "Equity",
              "lines": [
                { "accountId": "...", "accountName": "Owner Contributions", "taxCode": "3500", "amount": "5000.00", "compareAmount": "5000.00", "computed": false },
                { "accountId": "prior_earnings", "accountName": "Prior Years' Earnings", "taxCode": null, "amount": "14450.00", "compareAmount": "0.00", "computed": true },
                { "accountId": "net_income", "accountName": "Net Income (Year To Date)", "taxCode": null, "amount": "5230.50", "compareAmount": "14450.00", "computed": true }
              ],
              "total": "24680.50",
              "compareTotal": "19450.00"
            }
          ],
          "total": "24680.50",
          "compareTotal": "19450.00"
        }
      ],
      "liabilitiesAndEquity": "24680.50",
      "outOfBalance": "0.00"
    }
  }
}
```

## Account Balances

Current balance for every account in the chart of accounts.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |

### Request

```graphql
query {
  accountBalances(organizationId: "a1b2c3d4-...") {
    accountId
    accountName
    accountType
    classification
    balance
  }
}
```

### Response

```json
{
  "data": {
    "accountBalances": [
      {
        "accountId": "...",
        "accountName": "Checking",
        "accountType": "bank",
        "classification": "asset",
        "balance": "24680.50"
      },
      {
        "accountId": "...",
        "accountName": "Accounts Receivable",
        "accountType": "accounts_receivable",
        "classification": "asset",
        "balance": "12400.00"
      }
    ]
  }
}
```

## GST/HST Filing Period

Canadian organizations. The organization's GST/HST filing period by its filing frequency (monthly, quarterly or annual — calendar months/quarters/years). offset 0 is the latest period that has already ended (the return you'd file now); -1 is the one before it, 1 is the period in progress. Returns the dates to pass to gstHstReturn plus the due date (null for annual filers, whose deadline depends on the filer).

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `offset` | `Int` | No | Periods from the latest ended one (default 0) |

### Request

```graphql
query {
  filingPeriod(organizationId: "a1b2c3d4-...", offset: 0) {
    frequency
    label
    startDate
    endDate
    dueDate
    offset
  }
}
```

### Response

```json
{
  "data": {
    "filingPeriod": {
      "frequency": "quarterly",
      "label": "Q3 2026",
      "startDate": "2026-07-01",
      "endDate": "2026-09-30",
      "dueDate": "2026-10-31",
      "offset": 0
    }
  }
}
```

## GST/HST Return

Canadian organizations. GST/HST return summary for a filing period: tax collected on sales, input tax credits (ITCs) claimable on expenses, ITC adjustments (e.g. the 50% meals & entertainment restriction), and the net amount owing or refundable. The province, rate, and filing frequency/deadline are derived from the organization's tax configuration. Each collected/ITC line carries its accountId and revenueAccountIds lists the revenue accounts, so accountLines can list the entries behind any line. Before filing, check unbookedCount / unbookedTotal (transactions in the period still in review — not counted yet) and receiptsMissingTaxCount (receipts in the period with no tax read). Use filingPeriod to get the period dates.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of the filing period (YYYY-MM-DD) |
| `endDate` | `Date!` | Yes | End of the filing period (YYYY-MM-DD) |

### Request

```graphql
query {
  gstHstReturn(
    organizationId: "a1b2c3d4-..."
    startDate: "2026-01-01"
    endDate: "2026-03-31"
  ) {
    province
    provinceName
    taxRate
    filingFrequency
    filingDeadline
    filingDeadlineDate
    collectedLines { accountId accountName amount }
    itcLines { accountId accountName amount }
    itcAdjustmentLines { accountName amount }
    revenueAccountIds
    totalRevenue
    totalCollected
    totalItcs
    totalItcAdjustment
    netClaimableItcs
    netOwing
    isRefund
    hasTaxAccounts
    unbookedCount
    unbookedTotal
    receiptsMissingTaxCount
  }
}
```

### Response

```json
{
  "data": {
    "gstHstReturn": {
      "province": "ON",
      "provinceName": "Ontario",
      "taxRate": "13%",
      "filingFrequency": "quarterly",
      "filingDeadline": "2026-04-30",
      "filingDeadlineDate": "2026-04-30",
      "collectedLines": [
        { "accountId": "5c1e...", "accountName": "HST Payable", "amount": "10985.00" }
      ],
      "itcLines": [
        { "accountId": "9d2a...", "accountName": "GST/HST Receivable", "amount": "4212.55" }
      ],
      "revenueAccountIds": ["7f3e..."],
      "unbookedCount": 3,
      "unbookedTotal": "412.80",
      "receiptsMissingTaxCount": 2,
      "itcAdjustmentLines": [
        { "accountName": "Meals & Entertainment (50%)", "amount": "-96.20" }
      ],
      "totalRevenue": "84500.00",
      "totalCollected": "10985.00",
      "totalItcs": "4212.55",
      "totalItcAdjustment": "-96.20",
      "netClaimableItcs": "4116.35",
      "netOwing": "6868.65",
      "isRefund": false,
      "hasTaxAccounts": true
    }
  }
}
```

## Provincial Sales Tax Return

Provincial sales tax return for PST (BC/SK/MB) and QST (QC), returned as one section per tax component so an organization registered for more than one province files each separately. Each section reports tax collected, input tax credits (QST registrants only — PST is a cost, not recoverable), and the net owing or refundable for that agency.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of the filing period (YYYY-MM-DD) |
| `endDate` | `Date!` | Yes | End of the filing period (YYYY-MM-DD) |

### Request

```graphql
query {
  provincialSalesTaxReturn(
    organizationId: "a1b2c3d4-..."
    startDate: "2026-01-01"
    endDate: "2026-03-31"
  ) {
    hasAny
    totalRevenue
    sections {
      taxCode
      label
      agency
      collectedLines { accountName amount }
      totalCollected
      inputCreditLines { accountName amount }
      totalInputCredits
      netOwing
      isRefund
      hasInputCredits
    }
  }
}
```

### Response

```json
{
  "data": {
    "provincialSalesTaxReturn": {
      "hasAny": true,
      "totalRevenue": "84500.00",
      "sections": [
        {
          "taxCode": "PST_BC",
          "label": "PST (British Columbia)",
          "agency": "BC Ministry of Finance",
          "collectedLines": [
            { "accountName": "PST Payable - BC", "amount": "5915.00" }
          ],
          "totalCollected": "5915.00",
          "inputCreditLines": [],
          "totalInputCredits": "0.00",
          "netOwing": "5915.00",
          "isRefund": false,
          "hasInputCredits": false
        }
      ]
    }
  }
}
```

## Tax Collected vs Paid

For organizations on their own rates (outside Canada and the US): per rate, tax collected on sales, tax paid on purchases, how much of that is claimed back, and the net owed (collected minus claimed back). Tax that isn't claimed back is part of the expense.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of the period (YYYY-MM-DD) |
| `endDate` | `Date!` | Yes | End of the period (YYYY-MM-DD) |

### Request

```graphql
query {
  taxSummary(organizationId: "a1b2c3d4-...", startDate: "2026-07-01", endDate: "2026-09-30") {
    currency
    totalCollected
    totalClaimedBack
    net
    lines { code name collected paid claimedBack net }
  }
}
```

### Response

```json
{
  "data": {
    "taxSummary": {
      "currency": "GBP",
      "totalCollected": "4000.00",
      "totalClaimedBack": "1250.00",
      "net": "2750.00",
      "lines": [
        { "code": "vat", "name": "VAT", "collected": "4000.00", "paid": "1250.00", "claimedBack": "1250.00", "net": "2750.00" }
      ]
    }
  }
}
```

## Sales Tax Collected By State

US organizations: sales tax collected in the period for each state, a liability summary of what is owed to each state. Each state has its own return and due dates. Sales tax paid on purchases is part of their cost, so it isn't listed.

### Arguments

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `organizationId` | `UUID!` | Yes | Organization ID |
| `startDate` | `Date!` | Yes | Start of the period (YYYY-MM-DD) |
| `endDate` | `Date!` | Yes | End of the period (YYYY-MM-DD) |

### Request

```graphql
query {
  salesTaxByState(organizationId: "a1b2c3d4-...", startDate: "2026-07-01", endDate: "2026-09-30") {
    currency
    total
    lines { state name collected }
  }
}
```

### Response

```json
{
  "data": {
    "salesTaxByState": {
      "currency": "USD",
      "total": "1463.20",
      "lines": [
        { "state": "NY", "name": "New York", "collected": "1180.00" },
        { "state": "NJ", "name": "New Jersey", "collected": "283.20" }
      ]
    }
  }
}
```
