Close a period: accruals, provisioning and closure
To close a period you accrue income up to the period end, generate provisioning for the loan book, check the postings, and then close accounting so nothing more can be posted into the period.
Before you start
- Ledger accountsThe accounts the period posts to. Open the guide
- Provisioning criteriaThey set the provisioning percentages for the loan products you select. Open the reference
- The period end dateAccruals, provisioning and the closure all take it.
Set your environment
Every request authenticates with HTTP Basic and names its tenant in a header. Set these once and the commands below work as written.
export LOKTA_API="https://default.lokta.tech"
export LOKTA_USER="your-username"
export LOKTA_PASS="your-password"
1. Run periodic accruals
Accrual accounting takes income up to the date you give. The date is the only mandatory field.
/v1/runaccrualscurl -X POST "$LOKTA_API/lokta-lms/api/v1/runaccruals" \
-u "$LOKTA_USER:$LOKTA_PASS" \
-H "Tenant-Identifier: default" \
-H "Content-Type: application/json" \
-d '{
"tillDate": "31 August 2026",
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}'
2. Generate provisioning entries
Generate the provisioning entries for a date. Set createjournalentries to true to create the matching journal entries in the same call.
curl -X POST "$LOKTA_API/lokta-lms/api/v1/provisioningentries" \
-u "$LOKTA_USER:$LOKTA_PASS" \
-H "Tenant-Identifier: default" \
-H "Content-Type: application/json" \
-d '{
"date": "31 August 2026",
"createjournalentries": true,
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}'
3. Check the provisioning entries
List the entries that have been generated and open the one you just created.
curl -X GET "$LOKTA_API/lokta-lms/api/v1/provisioningentries" \
-u "$LOKTA_USER:$LOKTA_PASS" \
-H "Tenant-Identifier: default"
4. Review the journal entries
Read the postings for the period before you close it. After the closure, entries prior to the closing date can no longer be posted or reversed for that office.
curl -X GET "$LOKTA_API/lokta-lms/api/v1/journalentries" \
-u "$LOKTA_USER:$LOKTA_PASS" \
-H "Tenant-Identifier: default"
5. Close accounting for the office
A closure needs the office and the closing date. Comments are optional.
/v1/glclosurescurl -X POST "$LOKTA_API/lokta-lms/api/v1/glclosures" \
-u "$LOKTA_USER:$LOKTA_PASS" \
-H "Tenant-Identifier: default" \
-H "Content-Type: application/json" \
-d '{
"officeId": 1,
"closingDate": "31 August 2026",
"comments": "August close",
"dateFormat": "dd MMMM yyyy",
"locale": "en"
}'
Where to go next
Every request authenticates with HTTP Basic and carries a Tenant-Identifier header. See the conventions. Read this guide as Markdown.
This is the API reference for Lokta, the agentic loan servicing platform. Go to lokta.ai