Edit

[POST] .../v1/docperiodclosing/edit

Edits period closing document. Use this method to update a period closing document while it is locked and before immutable workflow fields become unavailable. The request body is required, id, firm_id and close_date are required by the current controller validation and run_date must be at least four hours after the end of the account-local close_date day when supplied. When run_date is omitted, the existing processing date is preserved and must still satisfy this interval if close_date changes. If the document is already beyond WaitingClose status, the persistent layer ignores close_date, run_date and firm_id changes and only editable fields such as description can be updated; conflicting later periods, short run_date gaps, no changes or missing rows return business errors. The response returns row_affected and fires the DocPeriodClosingEdited webhook; business errors such as missing body, invalid id, denied access, invalid dates, state conflicts, no matching row or database failures are returned as HTTP 200 ErrorResult.

Request Parameters

Name Type Required Description
close_date Int64 Required Required period closing date as Unix time in seconds according to current controller validation. The period day is resolved in the account timezone.
description String Optional Optional additional description patch value. Null leaves it unchanged; an empty string clears it. Maximum length is 300 characters.
firm_id Int64 Required Required company ID according to current controller validation.
id Int64 Required Required period closing document ID.
run_date Int64 Optional Optional period closing processing date as Unix time in seconds. When supplied, it must be at least four hours after the end of the account-local close_date day; when omitted, the existing processing date is kept.
scheduler_uuid String Optional Scheduler UUID used by the period closing scheduler. Maximum length is 50 characters.

Request Example

{
  "id": 44,
  "firm_id": 2,
  "close_date": 1714521599,
  "run_date": 1714539600,
  "description": "April 2024 closing, shifted run time"
}

Response Parameters

Name Type Description
ok Boolean Indicates whether the request completed successfully.
result Update Update operation result.

Response Example

{
  "ok": true,
  "result": {
    "row_affected": 1
  }
}