Queue a month-end package build

POST /api/v1/month-end-packages

Persist a queued package row and start the Temporal build workflow.

Operation ID: create_package_api_v1_month_end_packages_post · View as markdown · OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

accounting_period_id string

Optional accounting period UUID. If omitted, period_start and period_end are used directly.

period_start string · date

Required if accounting_period_id is not provided.

period_end string · date

Required if accounting_period_id is not provided.

report_format MonthEndPackageFormatEnum MonthEndPackageFormatEnum

Per-report format inside the zip (pdf or xlsx).

selected_reports array · string required

Report keys to include in the package. Supported values: pl, balance_sheet, cash_flow, ar_aging, ap_aging, budget_vs_actual, bank_reconciliation.

Responses

201 Successful Response

package MonthEndPackageResponse requiredMonthEndPackageResponse

The freshly created package record

17 fields
id string required

Month-end package UUID

business_id string required

Owning business UUID

accounting_period_id string

Linked accounting period UUID, if any

period_start string · date-time required

Start of the covered period

period_end string · date-time required

End of the covered period

status MonthEndPackageStatusEnum requiredMonthEndPackageStatusEnum

Build status: queued, in_progress, ready, or failed

report_format MonthEndPackageFormatEnum requiredMonthEndPackageFormatEnum

Per-report format inside the zip

selected_reports array · string

Report keys included in the package

workflow_id string

Temporal workflow id driving the build

file_size_bytes integer

Final zip size in bytes (set when ready)

filename string

Suggested attachment filename for the zip download

error_message string

Failure reason when status == 'failed'

requested_by_user_id string

User who requested the package

started_at string · date-time

When the build started

ready_at string · date-time

When the package became downloadable

created_at string · date-time required

Creation timestamp

updated_at string · date-time required

Last update timestamp

workflow_id string

Temporal workflow id (also on package)

400 Bad Request - Invalid input

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

404 Not Found - Resource does not exist

422 Validation Error

detail array · ValidationError ValidationError
5 fields
loc array · string | integer required
msg string required
type string required
input object
ctx object