Lock Before Opening Baseline
POST/api/ledger/close/hard-date/opening
Move the accounting start date to a new opening baseline and set the hard close date to the day before it, in one transaction, so everything before it is frozen while the opening day stays open for reconciling. This is the one case where the date need not be a month end. It only moves forward, runs immediately rather than in the background, and when the hard date is already there it only moves the start date. A moved start date then parks the opening-balance transition, as a settings save would.
accounting:writeGrant this scope to your token under Settings → Developer → Personal Access Tokens.
Body: start_date (date, Y-m-d, required) — the opening baseline date.
Returns the resulting hard_date.
Authentication: Bearer token. Requires the accounting.period.hard_close permission.
Errors: 422 when the books are already locked past that day, or when it would cover a closed month. Use Move Hard Close Date in those cases.
Request
Responses
- 200
- 401
- 403
- 422
- 429
OK
Response Headers
Unauthenticated — the bearer token is missing, revoked, expired, or malformed. Never retry automatically; fix the credential. See the Errors guide.
Forbidden — the token lacks a required scope, the endpoint is not available to API tokens, or the user behind the token lacks the permission. A human must adjust the token scopes or user permissions; do not retry.
Unprocessable Content
Response Headers
Rate limited — platform limit is 1,000 requests/min; individual tokens may carry lower limits. Honor the Retry-After header before retrying. See the Rate Limits guide.