Accounting reports

Create an owner package

Builds the chosen reports for one owner over one period, bundles them into a single file, and returns the package with a download URL. Requires the reports:read permission.

POST
https://services.magicdoor.com/accounting/company-portal/reports/owner-package

Authorization

Authorizationstringrequired
Bearer token — Send your API token in the Authorization header as Bearer <token>. Requests without a valid token are rejected with 401 Unauthorized.

Body

application/json

The file is generated during the call — the response already carries a working fileUrl.

ownerIdstringrequired

The owner to build the package for.

example: 1830472847398404800
startDatestring · daterequired

First day of the period, read in the company's timezone.

example: 2026-07-01
endDatestring · daterequired

Last day of the period, read in the company's timezone. The whole day is included.

example: 2026-07-31
includeBillInvoicesbooleanrequired

true bundles the vendors' own invoice files in with the reports.

example: true
reportTypesenum<string>[]required

Which reports to include: any of balanceSheet, cashFlowStatement, incomeStatement and ownerStatement.

example: ["ownerStatement","incomeStatement"]balanceSheetcashFlowStatementincomeStatementownerStatement

Response

200 · The package that was generated, with a download URL.

idstring

Snowflake id of the package.

ownerIdstring

The owner it was built for.

startDatestring · date-time

First day of the period the package covers. Carries a UTC offset suffix.

endDatestring · date-time

Last moment of the period the package covers. Carries a UTC offset suffix.

includeBillInvoicesboolean

Whether the vendors' own invoice files were bundled in alongside the reports.

reportTypesstring[]

Which reports went into the package. These come back in PascalCase, unlike the camelCase enums used elsewhere in the API.

BalanceSheetCashFlowStatementIncomeStatementOwnerStatement
fileIdstring

The generated file.

fileUrlstring

A URL to download that file. Fetched fresh on every read, so do not store it — read the package again when you need it.

createdstring · date-time

When the package was generated. Carries a UTC offset suffix.

400 · A required field is missing, or an id is not a Snowflake.

401 · The access token is missing, expired, or not for this company.

403 · The caller does not hold the `reports:read` permission.

404 · The generated file could not be read back.