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

HeaderRequiredDescription
AuthorizationYESBearer token containing your secret API key.
Content-TypeYESMust be set to application/json.

Path Parameters

ParameterTypeRequiredDescription
loan_idstringYESThe unique ID of the loan application.

Body Parameters

ParameterTypeRequiredDescription
statusstringYESThe decision for the loan: APPROVED or REJECTED.
commentstringNOOptional 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"} }