API Search endpoints…⌘K Get API credentialsGet access

Run fees for a period and produce draft invoices

POST/lokta-lms/api/v1/fee-runs

Computes partner fees for a period and produces a draft invoice for each partner and currency.

Walks every attributed loan, finds the agreement in force for that loan's product, and accrues each fee line for the uncovered day-ranges of the period (a live accrual for the same loan+line covers its days). Then produces one draft invoice per partner+currency with a non-zero amount, each carrying a tracking number, the per-line basis with the terms version, and an identity snapshot. A rerun tops up late attributions; nothing is superseded or refused for overlap. A zero amount produces no draft.

Requires an Idempotency-Key; a replayed compute would double a partner's earnings for a period.

When to use it

Run this at the end of a period to compute partner fees from attributed loans and produce a draft invoice for each partner and currency.

Worth knowing

Header parameters

Idempotency-Keyheader · string · optional

Per-intent key

Request body application/json

period_startstring · optional

Placeholder name, to be confirmed. The first day of the period to compute.

period_endstring · optional

Placeholder name, to be confirmed. The last day of the period to compute.

Responses

defaultdefault response

Every request authenticates with HTTP Basic and carries a Tenant-Identifier header. See the conventions for dates, commands, pagination and errors. Open this operation in the interactive explorer, or read it as Markdown.

This is the API reference for Lokta, the agentic loan servicing platform. Go to lokta.ai