---
title: "Update a Personal Loan"
method: PATCH
path: "/v1/users/{userId}/personalLoans/{personalLoanId}"
tags: ["User Management"]
---

# Update a Personal Loan

`PATCH /v1/users/{userId}/personalLoans/{personalLoanId}`

## Request

- Base URL: `https://sandbox-api.spinwheel.io`
- URL: `https://sandbox-api.spinwheel.io/v1/users/{userId}/personalLoans/{personalLoanId}`
- Auth: API key in header `Authorization`

This API updates user records with accurate personal loan account numbers.

## Path parameters

- `userId` string, required
- `personalLoanId` string, required

## Request body

- UpdateLiabilityRequest
  - `liabilityProfile` LiabilityProfileRequest, required
    - `accountNumber` string, required

## Response `200`

Success

- UpdatePersonalLoanResponse
  - `status` ResponseStatus, required
    - `code` number
    - `desc` string
    - `messages` Message[]
      - `desc` string, required
      - `type` 'ERROR' | 'WARN' | 'INFO'
  - `data` UpdatePersonalLoan, required
    - `personalLoanId` string, required: Unique identifier for the personal loan
    - `logoUrl` string, required: Logo URL for the institution
    - `displayName` string: Name of the institution
    - `updatedOn` number: Timestamp of the last update
    - `createdOn` number: Timestamp of the creation
    - `userId` string, required
    - `liabilityProfile` LiabilityProfileWithAccountNumber, required
      - `accountOriginationDate` string, date: Date of account origination
      - `status` 'OPEN' | 'CLOSED': Liability status
      - `interestRateDerived` number: Interest rate derived
      - `loanOriginationAmount` number: Loan origination amount
      - `highCreditAmount` number: Represents the highest balance or amount of credit owed on a specific account during a specific period, as reported by the creditor
      - `accountRating` string: Account rating
      - `liabilitySubtype` string: Subtype of liability
      - `debtType` 'SECURED' | 'UNSECURED' | 'UNKNOWN': The type of debt. This field indicates whether the debt is secured or unsecured.
      - `pendingLoanTermInMonthsDerived` number: Pending loan term in months derived
      - `loanTermInMonths` number: Loan term in months
      - `termsFrequency` 'BIWEEKLY' | 'DEFERRED' | 'SEMI_MONTHLY' | 'BI_MONTHLY' | 'MONTHLY' | 'SINGLE_PAYMENT_LOAN' | 'QUARTERLY' | 'SEMI_ANNUALLY' | 'TRI_ANNUALLY' | 'WEEKLY' | 'ANNUALLY': Indicates how often payments are due
      - `closedDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `accountOwnershipType` 'AUTHORIZED_USER' | 'COMAKER' | 'INDIVIDUAL' | 'JOINT_CONTRACTUAL_LIABILITY' | 'JOINT_PARTICIPATING' | 'MAKER' | 'ON_BEHALF_OF' | 'TERMINATED' | 'UNDESIGNATED' | 'DECEASED': Type of account ownership
      - `ecoaCode` 'I' | 'J' | 'A' | 'C' | 'M' | 'T' | 'X': This field represents the Equal Credit Opportunity Act code for a particular liability. Where it can be represented as both a letter and a number, we opt to display the letter
      - `reviewedInMonths` number: Number of months the account has been reviewed
      - `reportedDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `accountType` 'CREDIT_LINE' | 'INSTALLMENT' | 'MORTGAGE' | 'OPEN' | 'REVOLVING' | 'UNKNOWN': Type of account
      - `consumerDisputeStatus` 'DISPUTED' | 'NOT_DISPUTED': Consumer dispute status
      - `derogatoryDataStatus` 'DEROGATORY' | 'NOT_DEROGATORY': Status of derogatory data
      - `collectionStatus` 'IN_COLLECTION' | 'NOT_IN_COLLECTION': Collection status
      - `chargeOffStatus` 'CHARGED_OFF' | 'NOT_CHARGED_OFF': Charge-off status
      - `chargeOffAmount` number: Charge-off amount
      - `chargeOffDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `firstDelinquencyDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `lastActivityDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `accountTypeCode` string: Account type code
      - `highestAdverseRating` '0' | '1' | '2' | '3' | '4' | '5' | '6' | 'G' | 'H' | 'J' | 'R' | 'L' | 'E' | 'B' | 'D': Highest adverse rating
      - `highestAdverseRatingDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `mostRecentAdverseRating` '0' | '1' | '2' | '3' | '4' | '5' | '6' | 'G' | 'H' | 'J' | 'R' | 'L' | 'E' | 'B' | 'D': Most recent adverse rating
      - `mostRecentAdverseRatingDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `secondMostRecentAdverseRating` '0' | '1' | '2' | '3' | '4' | '5' | '6' | 'G' | 'H' | 'J' | 'R' | 'L' | 'E' | 'B' | 'D': Second most recent adverse rating
      - `secondMostRecentAdverseRatingDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `adverseRatingCount` number: Total count of adverse ratings
      - `liabilityTransfers` LiabilityTransfers
        - `transferredFrom` LiabilityTransfer
          - `creditorName` string, required: Creditor name
        - `transferredTo` LiabilityTransfer
          - `creditorName` string, required: Creditor name
      - `narratives` Narratives[]: Details about consumer account narratives
        - `code` string: Narrative's code
        - `description` string: Narrative's description
      - `accountNumberLastFour` string: Last four digits of the account number. For accounts with fewer than four digits, the full account number is returned. This field is only returned for non-credit card liability types (auto loans, student loans, home loans, personal loans, and miscellaneous liabilities).
      - `accountNumber` string: Full account number
      - `paymentHistory` PaymentHistory
        - `lastAssessedStatementDate` string, date: Date of the last assessed statement
        - `details` PaymentHistoryDetails[]
          - `date` string, date: Date of billing period
          - `description` string: Description of the payment
          - `code` '0' | '1' | '2' | '3' | '4' | '5' | '6' | 'G' | 'H' | 'J' | 'R' | 'L' | 'E' | 'B' | 'D': Code representing the payment status
    - `balanceDetails` LiabilityBalanceDetails, required
      - `outstandingBalance` number: Current balance on the account
      - `updatedOn` number: Timestamp of the last update
    - `statementSummary` LiabilityStatementSummary, required
      - `statementDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `statementBalance` number: Total balance on the statement
      - `principalBalance` number: Principal balance on the loan
      - `minimumPaymentAmount` number: Minimum amount due for payment
      - `lastPaymentDateWithFormat` DateWithFormat
        - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
        - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
      - `dueDate` string, date: Due date for the next payment
      - `overduePeriod` 'LATE_30_DAYS' | 'LATE_60_DAYS' | 'LATE_90_DAYS' | 'LATE_120_DAYS' | 'NOT_OVERDUE': Overdue period status
      - `amountPastDue` number: Amount past due
      - `updatedOn` number: Timestamp of the last update
    - `creditor` Creditor
      - `industryType` string: Industry type of the creditor
      - `industryCode` string: Industry code of the creditor
      - `phoneNumber` string: Creditor phone number
      - `originalName` string: Creditor original name
      - `bureauSubscriberCode` string: Creditor subscriber code
      - `billingAddresses` BillingAddress[]: Previous and current billing addresses
        - `addressLine1` string, required
        - `addressLine2` string
        - `city` string, required
        - `state` 'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'Ne' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY', required
        - `zip` string, required
        - `zipExtension` string
        - `reportedDate` string, date-time: Date when this address was reported
        - `reportedDateWithFormat` DateWithFormat
          - `value` string, date, required: Date value in format YYYY-MM-DD or YYYY-MM or YYYY
          - `format` string, required: Format of the date value. Possible values: YYYY-MM-DD, YYYY-MM, YYYY
        - `addressType` 'PREVIOUS' | 'CURRENT': Type of address (current/previous)
      - `address` Address
        - `addressLine1` string, required
        - `addressLine2` string
        - `city` string, required
        - `state` 'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'Ne' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY', required
        - `zip` string, required
        - `zipExtension` string
      - `billingAddress` Address
        - `addressLine1` string, required
        - `addressLine2` string
        - `city` string, required
        - `state` 'AL' | 'AK' | 'AZ' | 'AR' | 'CA' | 'CO' | 'CT' | 'DC' | 'DE' | 'FL' | 'GA' | 'HI' | 'ID' | 'IL' | 'IN' | 'IA' | 'KS' | 'KY' | 'LA' | 'ME' | 'MD' | 'MA' | 'MI' | 'MN' | 'MS' | 'MO' | 'MT' | 'Ne' | 'NE' | 'NV' | 'NH' | 'NJ' | 'NM' | 'NY' | 'NC' | 'ND' | 'OH' | 'OK' | 'OR' | 'PA' | 'RI' | 'SC' | 'SD' | 'TN' | 'TX' | 'UT' | 'VT' | 'VA' | 'WA' | 'WV' | 'WI' | 'WY', required
        - `zip` string, required
        - `zipExtension` string
    - `capabilities` CapabilityMatrix, required
      - `payments` PaymentsCapability
        - `billPayment` Capability, required
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `pushToCard` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `receiveOnlyPayment` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
      - `data` DataCapability
        - `realtimeBalance` Capability, required
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `payoffSummary` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `liabilityGroupPayoffQuote` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `statementSummary` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `annualPercentageRate` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.
        - `cardBrand` Capability
          - `availability` 'NOT_SUPPORTED' | 'SUPPORTED' | 'FIELD_ERROR', required: The availability status of a capability
          - `fieldErrors` FieldError[]: Field-level errors if applicable.
            - `field` string, required: The field associated with the error.
            - `error` string, required: The reason for the error.
          - `description` 'INSTITUTION_NOT_SUPPORTED' | 'INSTITUTION_DISABLED' | 'REFRESH_EXHAUSTED' | 'NOT_PRIMARY_ACCOUNT_HOLDER' | 'ACCOUNT_TERMINATED' | 'CLOSED_ACCOUNT_NO_BALANCE' | 'CLOSED_ACCOUNT' | 'ACCOUNT_NUMBER_VERIFICATION_FAILED': Description of why the capability is not supported, if applicable.
          - `nextEligibleRefreshOn` number: The earliest timestamp that the capability will be available, if applicable.
          - `liabilityGroupId` string: Unique identifier of the liability group for the capability.

## Other responses

- `400`: Bad request response
- `401`: Unauthorized response
- `404`: Not found response
- `500`: Internal server error response

---

[API](https://skmtc.dev/spinwheel/apis/optimize.md) - [All operations](https://skmtc.dev/spinwheel/apis/optimize/llms.txt) - [OpenAPI document](https://skmtc.dev/spinwheel/apis/optimize/revisions/6222309663d2?raw)
