Skip to main content
POST
/
loans
Create a new loan
curl --request POST \
  --url https://lms.tausi.africa/v1/loans \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "borrower_id": 123,
  "loan_id": 123,
  "products": [
    {
      "stock_id": 123,
      "quantity": 123,
      "price": 123
    }
  ],
  "principal_amount": 123,
  "released_date": "<string>",
  "due_date": "<string>",
  "duration": 123,
  "duration_period": "<string>",
  "loan_type": "<string>",
  "description": "<string>"
}
'
{
  "item": {
    "borrower_id": 123,
    "loan_id": 123,
    "principal_amount": 123,
    "released_date": "<string>",
    "due_date": "<string>",
    "duration": 123,
    "duration_period": "<string>",
    "created_at": "2023-11-07T05:31:56Z",
    "updated_at": "2023-11-07T05:31:56Z",
    "loan_type": "<string>",
    "products": [
      {
        "stock_id": 123,
        "quantity": 123,
        "price": 123
      }
    ],
    "description": "<string>"
  },
  "success": true
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
borrower_id
integer<int64>
required
loan_id
integer<int64>
required
products
object[]
required
principal_amount
number<float>
required
released_date
string
required
due_date
string
required
duration
integer
required
duration_period
string
required
loan_type
string
description
string

Response

Loan created successfully.

item
object
required
success
boolean
required
Example:

true