List accounting periods

GET /api/v1/accounting-periods

List all accounting periods for the business.

Operation ID: list_periods_api_v1_accounting_periods_get · 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.

Parameters

Query

status string

Filter by status: open, closed, locked

cursor string

Cursor for pagination

limit integer

Pagination limit

direction string default: next

Pagination direction: 'next' or 'prev'

include_total_count boolean default: False

Whether to include total count (expensive - avoid if possible)

sort_by string

Column name to sort by (e.g. 'created_at', 'amount', 'name'). When changing sort, reset cursor to None.

descending boolean default: True

Sort direction: true for descending (newest/largest first), false for ascending

Responses

200 Successful Response

items array · AccountingPeriodResponse requiredAccountingPeriodResponse

List of items

13 fields
id string required

Period UUID

business_id string required

Business UUID

period_start string · date required

Start date of the period

period_end string · date required

End date of the period

status string required

Status: open, closed, or locked

closed_at string · date-time

When period was closed

closed_by_user_id string

User who closed the period

lock_reason string

Reason period was closed

reopen_reason string

Reason period was reopened

reopened_at string · date-time

When period was reopened

reopened_by_user_id string

User who reopened the period

created_at string · date-time required

Creation timestamp

updated_at string · date-time required

Last update timestamp

total integer

Total number of items (null when not calculated for performance)

limit integer

Pagination limit

next_cursor string

Cursor for next page

prev_cursor string

Cursor for previous page

has_next boolean required

Whether there are more items

has_prev boolean required

Whether there are previous items

401 Unauthorized - Authentication required

403 Forbidden - Insufficient permissions

422 Validation Error

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