Bulk close-and-lock accounting periods

POST/api/v1/accounting-periods/bulk-lock

Close and lock multiple accounting periods in one call. Designed for historical-data migration: any open period in the list is closed first, then transitioned to locked. Already-locked periods are skipped.

Operation ID: bulk_lock_periods_api_v1_accounting_periods_bulk_lock_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

period_idsarray · stringrequired

Period UUIDs to lock

lock_reasonstring

Reason recorded on each period. Defaults to 'Historical migration - bulk locked' when omitted.

Responses

201Successful Response

successboolean
messagestring
codestring
dataBulkLockPeriodsResult

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject