Skip to main content

Approve loan

POST /api/v1/Loans/approve-loan

Description

This endpoint is used to approve a loan.

Tags: Loans

URL:
/api/v{version}/Loans/approve-loan

ApiKey:
No API key required

Content-Type:
application/json

Request Body:
ApproveLoanCommand object

Query Parameters:
version: string, required
Accept-Language: header, optional, change the default response message language from English (en) to French (fr) or English (en)

Response:
Success, returns the ID of the loan that was approved.

Error Codes:
400: Bad Request
404: Resource not found
500: Internal server error

Example:

bashCopy codePOST /api/v1/Loans/approve-loan
Content-Type: application/json
{
"loanId": "abc-123"
}

Response:

jsonCopy code{
"id": "abc-123"
}

/api/v1/Loans/approve-loan

Headers

Content-TypeValue
Accept-Language

Headers

Content-TypeValue
Content-Typeapplication/json

Headers

Content-TypeValue
Accepttext/plain

Body (raw)

{
"loanId": `<integer>`,
"note": `<string>`,
"approvedOnDate": `<dateTime>`,
"expectedDisbursementDate": `<dateTime>`
}

Response: 200

{
"succeeded": `<boolean>`,
"message": `<string>`,
"errors": [
`<string>`,
`<string>`
],
"data": `<integer>`
}

LANGUAGE

AUTHORIZATION

Bearer

CURL REQUEST


curl --request POST \ 
--url /api/v1/Loans/approve-loan \
--header 'accept: application/json' \
--header 'content-type: application/json'

RESPONSE


Click Try It! to start a request and see the response here!