Close cycles and create their draws

POST/api/v1/credit/cycles/close

Closes every cycle whose period has ended: fixes the principal, computes the disbursement fee and the full-term interest once, and sets the due date. Idempotent — a cycle already closed is skipped. Pass dry_run to see what would close without writing.

Operation ID: close_cycles_api_v1_credit_cycles_close_post·View as markdown·OpenAPI slice

Authentication

Bearer token authentication. Pass your DayZero API token in the Authorization header and the target business UUID in x-business-id.

Request body

credit_line_idstring

Limit to one line. Omit to sweep the business.

as_ofstring · date

Treat this as today. Defaults to the current date.

issue_statementsboolean

Also mark closed cycles issued.

dry_runboolean

Responses

201Successful Response

successboolean
messagestring
codestring
dataCycleCloseResponse

400Bad Request - Invalid input

401Unauthorized - Authentication required

403Forbidden - Insufficient permissions

422Validation Error

detailarray · ValidationErrorValidationError
5 fields
locarray · string | integerrequired
msgstringrequired
typestringrequired
inputobject
ctxobject