# Balance Sheet

> Solarium docs, Reports. 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

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"
    }
  }
}
```
