PUT
Loan Approval
Approve or reject a pending loan application.
PUT/v2/loans/{loan_id}/approve
Use this endpoint to update the status of a loan from PENDING to APPROVED or REJECTED. This is typically utilized by an admin or an automated risk-assessment service.
Headers
| Header | Required | Description |
|---|---|---|
Authorization | YES | Bearer token containing your secret API key. |
Content-Type | YES | Must be set to application/json. |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
loan_id | string | YES | The unique ID of the loan application. |
Body Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
status | string | YES | The decision for the loan: APPROVED or REJECTED. |
comment | string | NO | Optional reasoning for the approval or rejection decision. |
Example Request
cURL
curl -X PUT "https://sandbox.hexcore.io/v2/loans/ln_a1b2c3d4e5f6/approve" \-H "Authorization: Bearer sk_test_your_secret_key" \-H "Content-Type: application/json" \-d '{ "status": "APPROVED", "comment": "Customer meets all credit requirements." }'Example Response
JSON (200 OK)
{"status": true,"message": "Loan status updated to APPROVED","data": {"loan_id": "ln_a1b2c3d4e5f6","status": "APPROVED","approved_at": "2026-05-02T11:00:00Z"} }