SET API · SET Close
Set the first period or when entries post
PUT/v1/close/settings
Sets the first month SET Close covers, or when journal entries post to a connected ledger. A new startPeriod restarts Close's reading of SET's ledger at that month. The answer is the settings object, as GET /v1/close/settings returns it.
Body
startPeriodstring- A month as
YYYY-MM(UTC), no later than the current month (otherwise 400start_period_invalid). postOn"approve" | "match"approve: entries post once the period is approved.match: each entry posts when its payment matches. Any other value answers 400post_on_invalid.
Notes
- SET Close is switched on per deployment; when off, every
/v1/closecall answers 403close_off. CheckGET /v1/capabilities(features.*). - Needs a key with the
writescope. - Both fields are optional; a field left out stays as it is.
startPeriodmay be any past month or the current one, never a later one.- Payments dated before
startPeriodare matched as ignored, with reasonbefore_start. - The example was made with a sandbox key.
- This example is a recorded run of SET's own code (wallet release
e9b03447) with a sandbox key; ids and times are that run's.
Errors
403 close_off400 start_period_invalid400 post_on_invalid