# Download Reports (Excel / CSV)

> 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

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