curl --request POST \
--url https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"loanProductVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postingRules": [
{
"legs": [
{
"account": "<string>",
"component": "<string>",
"optional": true
}
],
"metadata": {}
}
],
"midazLedgerId": "<string>",
"midazOrganizationId": "<string>"
}
'import requests
url = "https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles"
payload = {
"loanProductVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postingRules": [
{
"legs": [
{
"account": "<string>",
"component": "<string>",
"optional": True
}
],
"metadata": {}
}
],
"midazLedgerId": "<string>",
"midazOrganizationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
loanProductVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
postingRules: [
{
legs: [{account: '<string>', component: '<string>', optional: true}],
metadata: {}
}
],
midazLedgerId: '<string>',
midazOrganizationId: '<string>'
})
};
fetch('https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'loanProductVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'postingRules' => [
[
'legs' => [
[
'account' => '<string>',
'component' => '<string>',
'optional' => true
]
],
'metadata' => [
]
]
],
'midazLedgerId' => '<string>',
'midazOrganizationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles"
payload := strings.NewReader("{\n \"loanProductVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"postingRules\": [\n {\n \"legs\": [\n {\n \"account\": \"<string>\",\n \"component\": \"<string>\",\n \"optional\": true\n }\n ],\n \"metadata\": {}\n }\n ],\n \"midazLedgerId\": \"<string>\",\n \"midazOrganizationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"loanProductVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"postingRules\": [\n {\n \"legs\": [\n {\n \"account\": \"<string>\",\n \"component\": \"<string>\",\n \"optional\": true\n }\n ],\n \"metadata\": {}\n }\n ],\n \"midazLedgerId\": \"<string>\",\n \"midazOrganizationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"loanProductVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"postingRules\": [\n {\n \"legs\": [\n {\n \"account\": \"<string>\",\n \"component\": \"<string>\",\n \"optional\": true\n }\n ],\n \"metadata\": {}\n }\n ],\n \"midazLedgerId\": \"<string>\",\n \"midazOrganizationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accountingMode": "<string>",
"createdAt": "<string>",
"id": "<string>",
"loanProductVersionId": "<string>",
"postingRules": [
{
"eventType": "<string>",
"legs": [
{
"account": "<string>",
"optional": true,
"component": "<string>"
}
],
"metadata": {}
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank",
"upstream": {
"code": "<string>",
"message": "<string>"
}
}Create loan product accounting profile
Configures the accounting profile for a loan product version that belongs to the path loan product.
curl --request POST \
--url https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"loanProductVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postingRules": [
{
"legs": [
{
"account": "<string>",
"component": "<string>",
"optional": true
}
],
"metadata": {}
}
],
"midazLedgerId": "<string>",
"midazOrganizationId": "<string>"
}
'import requests
url = "https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles"
payload = {
"loanProductVersionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"postingRules": [
{
"legs": [
{
"account": "<string>",
"component": "<string>",
"optional": True
}
],
"metadata": {}
}
],
"midazLedgerId": "<string>",
"midazOrganizationId": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
loanProductVersionId: '3c90c3cc-0d44-4b50-8888-8dd25736052a',
postingRules: [
{
legs: [{account: '<string>', component: '<string>', optional: true}],
metadata: {}
}
],
midazLedgerId: '<string>',
midazOrganizationId: '<string>'
})
};
fetch('https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'loanProductVersionId' => '3c90c3cc-0d44-4b50-8888-8dd25736052a',
'postingRules' => [
[
'legs' => [
[
'account' => '<string>',
'component' => '<string>',
'optional' => true
]
],
'metadata' => [
]
]
],
'midazLedgerId' => '<string>',
'midazOrganizationId' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles"
payload := strings.NewReader("{\n \"loanProductVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"postingRules\": [\n {\n \"legs\": [\n {\n \"account\": \"<string>\",\n \"component\": \"<string>\",\n \"optional\": true\n }\n ],\n \"metadata\": {}\n }\n ],\n \"midazLedgerId\": \"<string>\",\n \"midazOrganizationId\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"loanProductVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"postingRules\": [\n {\n \"legs\": [\n {\n \"account\": \"<string>\",\n \"component\": \"<string>\",\n \"optional\": true\n }\n ],\n \"metadata\": {}\n }\n ],\n \"midazLedgerId\": \"<string>\",\n \"midazOrganizationId\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://lender.sandbox.lerian.net/api/v1/loan-products/{id}/accounting-profiles")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"loanProductVersionId\": \"3c90c3cc-0d44-4b50-8888-8dd25736052a\",\n \"postingRules\": [\n {\n \"legs\": [\n {\n \"account\": \"<string>\",\n \"component\": \"<string>\",\n \"optional\": true\n }\n ],\n \"metadata\": {}\n }\n ],\n \"midazLedgerId\": \"<string>\",\n \"midazOrganizationId\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"accountingMode": "<string>",
"createdAt": "<string>",
"id": "<string>",
"loanProductVersionId": "<string>",
"postingRules": [
{
"eventType": "<string>",
"legs": [
{
"account": "<string>",
"optional": true,
"component": "<string>"
}
],
"metadata": {}
}
]
}{
"code": "<string>",
"detail": "<string>",
"errors": [
{
"location": "<string>",
"message": "<string>",
"value": "<unknown>"
}
],
"instance": "<string>",
"status": 123,
"title": "<string>",
"type": "about:blank",
"upstream": {
"code": "<string>",
"message": "<string>"
}
}Authorizations
JWT bearer token issued by the identity provider.
Path Parameters
Loan product identifier.
"550e8400-e29b-41d4-a716-446655440000"
Body
Accounting recognition mode.
accrual, cash "accrual"
Loan product version identifier.
"550e8400-e29b-41d4-a716-446655440001"
Non-null GL account mappings per accounting event. New profiles require disbursement, repayment, prepayment, accrual, collection_unapplied, collection_reapply, and collection_refund; accrual_tax is optional.
7 - 8 elementsShow child attributes
Show child attributes
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.
128"ledger-def"
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.
128"org-abc"
Response
Created
Accounting recognition mode (accrual|cash).
"accrual"
Creation timestamp (RFC3339, UTC).
"2026-06-14T12:00:00Z"
Server-assigned accounting profile identifier (uuid).
"550e8400-e29b-41d4-a716-446655440003"
Loan product version this profile is configured for (uuid).
"550e8400-e29b-41d4-a716-446655440001"
Persisted GL account mappings, one per accounting event.
Show child attributes
Show child attributes
Was this page helpful?

