Skip to content

Create a loan package

POST
/v1/loans
curl --request POST \
--url http://localhost:8080/v1/loans \
--header 'Content-Type: application/json' \
--data '{ "externalRef": "example", "borrowerName": "example", "expectedPrincipal": "example", "newVersion": true }'

Registers a bank loan number (externalRef) with the borrower name and an optional expectedPrincipal (decimal string) as package v1 in state intake, chaining the intake into evidence. A reference that already exists is refused with 409 unless newVersion is true, which adds the next package version; packages are never overwritten. Admin, manager or specialist, or an API key with intake:write. 400 for invalid fields, 422 when the license has expired (intake is read-only).

Media typeapplication/json

Body of POST /v1/loans. bool CreateLoanRequest.NewVersion is the explicit opt-in a duplicate reference requires.

object
externalRef
string
borrowerName
string
expectedPrincipal

Money as a string, optional pre-fill.

null | string
newVersion
boolean
Examplegenerated
{
"externalRef": "example",
"borrowerName": "example",
"expectedPrincipal": "example",
"newVersion": true
}

Created

Media typeapplication/json
object
id
required
string format: uuid
externalRef
required
string
packageVersion
required
integer | string format: int32
/^-?(?:0|[1-9]\d*)$/
borrowerName
required
string
expectedPrincipal
required
null | string
state
required
string
hasExceptions
required
boolean
assigneeId
required
null | string format: uuid
createdBy
required
null | string format: uuid
createdAt
required
string format: date-time
updatedAt
required
string format: date-time
Examplegenerated
{
"id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"externalRef": "example",
"packageVersion": 1,
"borrowerName": "example",
"expectedPrincipal": "example",
"state": "example",
"hasExceptions": true,
"assigneeId": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"createdBy": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0",
"createdAt": "2026-04-15T12:00:00Z",
"updatedAt": "2026-04-15T12:00:00Z"
}