SolariumSolariumDocs
Browse The Docs

Docs/API Reference/Reports

POST

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. To compare with an earlier range (this month so far against the same days last month), pass compareStartDate and compareEndDate: the result then has exactly two periods, the compare range first and the requested range second, granularity is ignored, and every total and percent covers the requested range only.

Parameters

organizationIdUUID!required

Organization ID

startDateDate!required

Start of range (YYYY-MM-DD); the first period is clipped to it

endDateDate!required

End of range (YYYY-MM-DD); the last period is clipped to it

granularityString

"month" (default) or "quarter"

viewString

"all" (default, every entry) or "management" (leaves out the income and expense of entries marked to leave out of management reports). Their sales tax and the balance sheet stay the same

compareStartDateDate

First day of an earlier range to show as a first column (YYYY-MM-DD). Needs compareEndDate

compareEndDateDate

Last day of the compare range (YYYY-MM-DD, inclusive). Must be before startDate

Request
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
{
  "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" }
    }
  }
}