pennylane-accounting-exportslisted
Install: claude install-skill Xileades/pennylane-api-toolkit
# Accounting exports
**Prerequisite: `pennylane-access`.**
Scopes: `exports:fec`, `exports:gl`, `exports:agl`, `trial_balance:readonly`,
`fiscal_years:readonly`.
## 1. Always start with the fiscal year
Exports take **a date range, never a fiscal year id**. So read the year first:
```powershell
$fy = PLGetAll 'company-a' 'fiscal_years' $null '-start'
$fy | Select-Object id, start, finish, status
```
`status`: `open`, `reopen`, `closed`, `frozen`. There is **no "current fiscal
year" endpoint and no server-side filter on status**: the selection happens in
memory. **Several years can be open at once** (`open` + `reopen`) — do not assume
uniqueness, and confirm with the user when it is ambiguous.
## 2. The three exports
Same model for all three: **create a job, poll, then download**. Not a
synchronous download.
| Export | Create | Poll | Scope | Format |
|---|---|---|---|---|
| FEC | `POST /exports/fecs` | `GET /exports/fecs/{id}` | `exports:fec` | undocumented |
| General ledger | `POST /exports/general_ledgers` | `GET /exports/general_ledgers/{id}` | `exports:gl` | xlsx |
| Analytical general ledger | `POST /exports/analytical_general_ledgers` | `GET /.../{id}` | `exports:agl` | xlsx |
```powershell
$base = 'https://app.pennylane.com/api/external/v2'
$hd = PLHdr 'company-a'
$b = @{ period_start = '2026-01-01'; period_end = '2026-12-31' } | ConvertTo-Json
$job = Invoke-RestMethod -Uri "$base/exports/fecs" -Headers $hd `
-Method Post -ContentType 'applicati