SET API · SET Close
Resolve an exception: link a record, ignore it, or leave it open with a note
POST/v1/close/exceptions/{exception}/resolve
Resolves an exception. link puts a record in the payment's empty slot and matches it only if the amounts then agree; ignore sets the match aside with a note; leave_open keeps it an exception with a note, so it no longer blocks prepare.
Path parameters
exceptionstringrequired- The match id (
cm_…) of an exception, fromGET /v1/close/exceptions.
Headers
Idempotency-Keystring- Any unique string. What a repeat of this call answers is in the notes. See Idempotency.
Body
action"link" | "ignore" | "leave_open"required- What to do with the exception. Anything else is 400
action_invalid. recordstring- For
link: the record id (cr_…) to put in the payment's empty slot. notestring- 1 to 500 characters. Optional for
link; required forignoreandleave_open(400note_required).
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
writescope. Platform and business keys can both call it. linkanswers 409link_disagreeswhen the payment and the named record do not then agree on the amount.- Linking an uploaded line also closes that line's own exception: it becomes
ignoredwith the note "Linked to cm_…" and an empty rail slot. leave_openkeeps the match an exception, but one with a note no longer blocksPOST /v1/close/periods/{period}/prepare.- A match that is no longer an exception answers 409
not_an_exception, including when the same request is sent again. - Once the match's period is locked the answer is 409
period_locked. - Each resolution writes a
close.exception.resolvedevent. - 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 not_an_exception409 period_locked400 note_required400 record_invalid409 record_slot_filled409 record_in_use400 note_invalid400 action_invalid409 match_changed409 link_disagrees