Credit memos

The underwriting write-up beside the numbers, rendered to a PDF your system can file.

A credit memo is the document: the underwriting write-up an analyst authors and saves in SpreadSpace, in the workspace or inside your product through the embed. The attribute snapshot is the data from the same spread. One loan produces both: the figures your system keys on and the narrative a credit file needs.

This surface hands out metadata and finished artifacts only. A memo’s contents are never returned through the API; what you can fetch is the list, the render state, and a link to the rendered PDF.

The loop

Three operations, in the Loan Credit Memos group of the API reference. The list and the PDF link need the memos:read scope; requesting a render needs memos:render.

StepOperation
1. List what existsGET /api/loans/{loanId}/memos
2. Ask for a PDFPOST /api/loans/{loanId}/memos/{memoId}/renders
3. Fetch the linkGET /api/loans/{loanId}/memos/{memoId}/pdf

List returns each memo’s id, name, updated_at and render_state:

render_stateMeaning
noneNever rendered.
renderingA render is in flight.
readyThe latest PDF matches the memo as saved.
staleThe memo was edited after its latest PDF was rendered.

Render answers 202 with an async operation. Poll it on GET /api/async-operations/{operationId} until it reaches a terminal status; when it succeeds, the PDF is available at step 3. A memo unchanged since its latest finished render is not re-rendered. The operation that produced that PDF is returned instead, so asking twice costs nothing.

PDF returns a short-lived download link: url, expires_in_seconds, rendered_at, and stale. The link is good for five to ten minutes; request again for a fresh one. Until a render has finished, this operation answers 404. That is the normal state of a memo nobody has rendered, not an error to retry against.

stale on that response means the same thing as in the list: the memo was edited after this PDF was rendered. The link still resolves to the older PDF, so decide whether to pull it or request a fresh render first.

Render after finalize

Render once the spread is finalized. Finalizing freezes the loan’s figures as the final attribute snapshot and locks the board, so a memo rendered after that point is a PDF of numbers that can no longer move underneath it. Render against an open board and the analyst may change a figure a minute later, with nothing in the PDF to say so.

A render is not pinned to a snapshot version: the PDF records what the memo said when it was rendered, and rendered_at is what dates it. If you need the figures themselves tied to a version, that is what the attribute snapshot’s version and finalized_at are for.

One render at a time

Renders for a workspace run one at a time. While one is in progress a second request is refused with 429 and Retry-After: 10, and the refusal names the in-flight operation in operation_id. Wait and retry, or poll that operation. A typical render takes seconds.