Skip to main content
POST
/
accounting_new
/
periods
/
close
Close accounting period
curl --request POST \
  --url https://api.zenskar.com/accounting_new/periods/close \
  --header 'Content-Type: application/json' \
  --header 'organisation: <api-key>' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "end_date": "2023-12-25",
  "period_name": "<string>"
}
'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "period_start": "2023-12-25",
  "period_end": "2023-12-25",
  "status": "<string>",
  "closed_at": "2023-11-07T05:31:56Z",
  "closed_by_user_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "period_name": "<string>",
  "closed_by_user": {
    "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "first_name": "<string>",
    "last_name": "<string>",
    "email": "<string>",
    "role": "<string>",
    "phone": "<string>",
    "rbac_role_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
    "totp": true,
    "additional_permissions": [
      "<unknown>"
    ]
  }
}

Authorizations

x-api-key
string
header
default:<your-api-key>
required
organisation
string
header
default:<your-organisation-id>
required

Body

application/json

Request schema for closing an accounting period.

period_start is auto-calculated server-side from either the last closed period's end date + 1 day, or (for the first-ever close) the earliest journal entry's posting date.

end_date
string<date>
required

End date of the period to close (must not be in future)

period_name
string | null

Optional descriptive name for the period

Maximum string length: 255

Response

Successful Response

Response schema for an accounting period.

Includes the closing user's information so the caller doesn't have to fetch it separately.

id
string<uuid>
required

Unique identifier

organisation_id
string<uuid>
required

Organization ID

period_start
string<date>
required

Period start date

period_end
string<date>
required

Period end date

status
string
required

Period status

closed_at
string<date-time>
required

When the period was closed

closed_by_user_id
string<uuid>
required

User who closed the period

created_at
string<date-time>
required

Record creation timestamp

updated_at
string<date-time>
required

Record update timestamp

period_name
string | null

Descriptive name

closed_by_user
UserResponseSchema · object

User who closed the period