Close a period through an effective moment
Closes a period through an effective moment: it checkpoints every account's balance in effective time, raises the ledger's closed-through mark, and from then on refuses any posting whose effective_...
/v1/ledgers/{ledgerId}/periodsCloses a period through an effective moment: it checkpoints every account's balance in effective time, raises the ledger's closed-through mark, and from then on refuses any posting whose effective_at falls inside the period with period_closed (422). The close takes an exclusive advisory lock that pairs with the shared lock every posting takes, so it waits out the postings already in flight and computes checkpoints nothing can dodge. ends_at must be after the current mark and must not be in the future; either refuses as invalid.
Authorization
bearerAuth In: header
Path Parameters
uuidRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
curl -X POST "https://example.com/v1/ledgers/497f6eca-6276-4993-bfeb-53cbbbba6f08/periods" \ -H "Content-Type: application/json" \ -d '{ "ends_at": "2019-08-24T14:15:22Z" }'{ "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "starts_at": "2019-08-24T14:15:22Z", "ends_at": "2019-08-24T14:15:22Z", "closed_at": "2019-08-24T14:15:22Z"}