SET API · SET Close
The week's package: every match, its records and compared amounts
GET/v1/close/weeks/{week}/package
The week's package: every match in the week with its provider, rail, chain and book records and the amounts compared, plus reconcilingItems (the lines in transit). Works for a week in any state. JSON by default, or CSV.
Path parameters
weekstringrequiredYYYY-Www, a real ISO week such as2026-W33. Anything else answers 404not_found.
Query parameters
format"json" | "csv"json(the default) orcsv. Anything else answers 400format_invalid.customerstring- A customer id (
cus_…): only that customer's matches. Anything else answers 400customer_invalid.
Notes
- SET Close is switched on per deployment; while it is off every
/v1/close/*call answers 403close_off. CheckGET /v1/capabilities(features.close). - Needs a key with the
readscope. finalis true once every month the week cuts is locked.- With
format=csvthe answer istext/csv; charset=utf-8, sent as an attachment namedset-close-<week>.csv(set-close-<week>-<customer>.csvwithcustomer), one line per match. - The CSV carries the week's state in the
close-week-stateheader and, once the week is signed, its hash inclose-snapshot-hash. - 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_found400 format_invalid400 customer_invalid