v1

latestOpenAPI 3.1.02026-07-263644911022.4 KB
LoanProducts

Create loan product accounting profile

Configures the accounting profile for a loan product version that belongs to the path loan product.

post/api/v1/loan-products/{id}/accounting-profiles

Path parameters

idstring uuid required

Loan product identifier.

Example:550e8400-e29b-41d4-a716-446655440000

Loan product identifier.

Request body

accountingMode'accrual' | 'cash' required

Accounting recognition mode.

loanProductVersionIdstring uuid required

Loan product version identifier.

midazLedgerIdstring

Optional per-product Midaz ledger the profile's postings route into; both-or-neither with midazOrganizationId. Required under multi-tenant mode; empty single-tenant profiles fall back to the env default.

midazOrganizationIdstring

Optional per-product Midaz organization the profile's postings route into; both-or-neither with midazLedgerId. Required under multi-tenant mode; empty single-tenant profiles fall back to the env default.

Example request

{
  "accountingMode": "accrual",
  "loanProductVersionId": "550e8400-e29b-41d4-a716-446655440001",
  "midazLedgerId": "ledger-def",
  "midazOrganizationId": "org-abc",
  "postingRules": [
    {
      "eventType": "disbursement",
      "legs": [
        {
          "account": "1100.10.001",
          "component": "iof",
          "role": "principal",
          "side": "debit"
        }
      ]
    }
  ]
}

Response

Created

accountingModestring required

Accounting recognition mode (accrual|cash).

createdAtstring required

Creation timestamp (RFC3339, UTC).

idstring required

Server-assigned accounting profile identifier (uuid).

loanProductVersionIdstring required

Loan product version this profile is configured for (uuid).

Example response

{
  "accountingMode": "accrual",
  "createdAt": "2026-06-14T12:00:00Z",
  "id": "550e8400-e29b-41d4-a716-446655440003",
  "loanProductVersionId": "550e8400-e29b-41d4-a716-446655440001",
  "postingRules": [
    {
      "eventType": "disbursement",
      "legs": [
        {
          "account": "1100.10.001",
          "component": "iof",
          "role": "principal",
          "side": "debit"
        }
      ]
    }
  ]
}