Move the period lock deliberately backwards, and record why
const url = 'https://example.com/v1/entities/example/reopen';const options = { method: 'POST', headers: {'Content-Type': 'application/json'}, body: '{"through":"example","close_id":"example","reason":"example","expected_version":1}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/entities/example/reopen \ --header 'Content-Type: application/json' \ --data '{ "through": "example", "close_id": "example", "reason": "example", "expected_version": 1 }'Open a closed period again.
Reopening is how an incomplete month gets fixed, so it does not depend on the checks that refuse a close (issue 0005, pitfall 1). The month that most needs reopening is exactly the one that cannot pass them. Nothing is undone: the close record and its snapshot stay as they are, and this appends a second record saying the lock moved back.
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”The entity this path is relative to
The entity this path is relative to
Request Bodyrequired
Section titled “Request Bodyrequired”Move the lock deliberately backwards, and say why.
Give exactly one of through or close_id. through is a boundary (“open March again”);
close_id is an action (“undo that close”) and resolves to the boundary that close advanced from.
A reopen is not gated on the close checks, because the month that most needs reopening is the one that cannot pass them. Nothing is undone: the close record and its snapshot stay where they are.
object
Example generated
{ "through": "example", "close_id": "example", "reason": "example", "expected_version": 1}Responses
Section titled “Responses”Successful Response
object
The verification snapshot the close was recorded against. Computed by the server, never supplied.
object
object
Example generated
{ "entity_id": "example", "legal_name": "example", "base_currency": "example", "snapshot_seq": 1, "close_id": "example", "kind": "example", "reopened_close_id": "example", "lock": { "through": "example", "version": 1, "close_id": "example" }, "snapshot": { "id": "example", "snapshot_seq": 1, "state_hash": "example", "through": "example" }, "audit_seq": 1, "links": { "additionalProperty": "example" }}Bad Request
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Unauthorized
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Forbidden
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Not Found
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Conflict
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Precondition Failed
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Unprocessable Content
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Internal Server Error
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}Service Unavailable
object
Example generated
{ "error": { "code": "example", "message": "example", "retryable": true, "details": [ {} ], "request_id": "example", "next_action": {} }}