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

The week's package: every match, its records and compared amounts

GET/v1/close/weeks/{week}/package

Key scope: read · Success: 200

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

week stringrequired
YYYY-Www, a real ISO week such as 2026-W33. Anything else answers 404 not_found.

Query parameters

format "json" | "csv"
json (the default) or csv. Anything else answers 400 format_invalid.
customer string
A customer id (cus_…): only that customer's matches. Anything else answers 400 customer_invalid.

Notes

  • SET Close is switched on per deployment; while it is off every /v1/close/* call answers 403 close_off. Check GET /v1/capabilities (features.close).
  • Needs a key with the read scope.
  • final is true once every month the week cuts is locked.
  • With format=csv the answer is text/csv; charset=utf-8, sent as an attachment named set-close-<week>.csv (set-close-<week>-<customer>.csv with customer), one line per match.
  • The CSV carries the week's state in the close-week-state header and, once the week is signed, its hash in close-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_off
  • 404 not_found
  • 400 format_invalid
  • 400 customer_invalid

All codes: Errors.