Loans

Cancel all loans by account

Cancels all active loans for the specified account

Note: This endpoint requires an account-specific access token.

This endpoint generates Loan updated events for each canceled loan.

post/v2/accounts/{accountId}/loans/cancel

Request

  • Base URL
    https://sandbox.pismolabs.io/lending
  • URL
    https://sandbox.pismolabs.io/lending/v2/accounts/{accountId}/loans/cancel
  • Auth
    HTTP bearer

Path parameters

accountIdstring required

ID of the account the loan belongs to

Headers

Idempotency-Keystring uuid required

Required UUID that makes the request idempotent, enabling you to retry it multiple times while the system processes it only once.

Request body

bring_to_present_valueboolean

Calculate loan balances to present value before cancellation? When true, the system calculates interest and charges up to the cancellation date.

Response

Cancellation accepted

total_to_be_canceledinteger required

Total number of loans to be canceled

Example response

{
  "to_be_canceled_loans": [
    {
      "loan_id": "550e8400-e29b-41d4-a716-446655440000",
      "tracking_id": "4df987e3-8179-11ed-8209-06c7b022d1ee"
    }
  ],
  "total_to_be_canceled": 2
}

Changes

No recorded changes to this operation across all 1 revision of this API.