Skip to content
SETSimple Easy Transactions
SET DocsSET Crypto API Suite and SET API referenceCurrent as of 2026-11-21 · wallet release 7d8a79fb
Browse: SET API

SET API · SET Close

Set the first period or when entries post

PUT/v1/close/settings

Key scope: write · Success: 200

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

startPeriod string
A month as YYYY-MM (UTC), no later than the current month (otherwise 400 start_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 400 post_on_invalid.

Notes

  • SET Close is switched on per deployment; when off, every /v1/close call answers 403 close_off. Check GET /v1/capabilities (features.*).
  • Needs a key with the write scope.
  • Both fields are optional; a field left out stays as it is.
  • startPeriod may be any past month or the current one, never a later one.
  • Payments dated before startPeriod are matched as ignored, with reason before_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_off
  • 400 start_period_invalid
  • 400 post_on_invalid

All codes: Errors.