SET API · SET Close
Recompute a locked period's hash and its link to the prior period
GET/v1/close/periods/{period}/verify
Recomputes a locked period's hash from its stored matches and checks it against the hash written at the lock, and checks that the prior period's stored hash still equals this period's priorHash.
Path parameters
periodstringrequired- The month as
YYYY-MM(UTC), locked.
Notes
- SET Close is switched on per deployment; when it is off, every
/v1/closecall answers 403close_offafter the key is checked.GET /v1/capabilitiesshows it asfeatures.close. - Needs a key with the
readscope. Platform and business keys can both call it. - A period that is open or prepared answers 409
period_not_locked. recomputedHashis computed now;hashMatchessays it equalssnapshotHash.priorMatchessays the prior period's stored hash still equalspriorHash(true for the first period, which has none).validis both.- A line uploaded later for a locked month does not change it: the line goes to the first open month as a
prior_periodexception, and verify still answersvalidtrue. - 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_off404 not_found409 period_not_locked