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

Prepare a period: open to prepared

POST/v1/close/periods/{period}/prepare

Key scope: write · Success: 200

Moves a period from open to prepared, recording the calling key as the preparer. Only after the month has ended (UTC), and only with no exception left without a note. No body is read.

Path parameters

period stringrequired
The month as YYYY-MM (UTC). It must have ended and must not be before the start period.

Headers

Idempotency-Key string
Any unique string. What a repeat of this call answers is in the notes. See Idempotency.

Notes

  • SET Close is switched on per deployment; when it is off, every /v1/close call answers 403 close_off after the key is checked. GET /v1/capabilities shows it as features.close.
  • Needs a key with the write scope. Platform and business keys can both call it.
  • The current month answers 409 period_not_ended; a month before the start period answers 409 before_start_period.
  • Exceptions with no note answer 409 open_exceptions with the count. Resolve them with POST /v1/close/exceptions/{exception}/resolve.
  • A wallet balance mismatch in the month with no note answers 409 open_position_mismatches.
  • Preparing again before approval replaces the preparer. Once the period is locked the answer is 409 period_locked, including for a repeat of the same request.
  • A new exception arriving in a prepared month, from SET's scheduled pass or an upload, puts the period back to open.
  • Writes a close.period.prepared event.
  • The example was made with a sandbox key (sandbox: true).
  • 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
  • 404 not_found
  • 409 period_not_ended
  • 409 before_start_period
  • 409 period_locked
  • 409 open_exceptions

All codes: Errors.