> ## Documentation Index
> Fetch the complete documentation index at: https://docs.synci.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Update loan terms

> Everything on the `loan` object except the rate, which has its own endpoint. Changing the fee or the
day count applies to payments from now on. Setting a paying account turns schedule mode off.



## OpenAPI

````yaml /openapi/v1.json put /finance/accounts/{accountId}/loan
openapi: 3.2.0
info:
  title: Synci
  version: '1.0'
  description: >-
    Synci is a platform for integrating financial accounts with your favorite
    apps.
servers:
  - url: https://api.synci.io/api/v1
security:
  - oauth2: []
  - http: []
tags:
  - name: Finance
    kind: nav
  - name: Connections
    parent: Finance
  - name: Accounts
    parent: Finance
  - name: Transactions
    parent: Finance
  - name: Institutions
    parent: Finance
  - name: Destinations
    kind: nav
  - name: YNAB
    parent: Destinations
  - name: Lunch Money
    parent: Destinations
  - name: Google Sheets
    parent: Destinations
  - name: SimpleFIN
    parent: Destinations
  - name: Notion
    parent: Destinations
  - name: Account
    kind: nav
  - name: Webhooks
    parent: Account
  - name: User
    parent: Account
  - name: rule-engine
    summary: Rules
    kind: nav
  - name: Rules
    parent: rule-engine
  - name: Rule Logs
    parent: rule-engine
  - name: Transfers
    kind: nav
  - name: Transfer Links
    parent: Transfers
  - name: Transfer Logs
    parent: Transfers
paths:
  /finance/accounts/{accountId}/loan:
    put:
      tags:
        - Loans
      summary: Update loan terms
      description: >-
        Everything on the `loan` object except the rate, which has its own
        endpoint. Changing the fee or the

        day count applies to payments from now on. Setting a paying account
        turns schedule mode off.
      operationId: financial.accounts.loan.update
      parameters:
        - name: accountId
          in: path
          required: true
          description: The financial account ID
          schema:
            type: integer
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLoanTermsRequest'
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    const: Loan terms updated.
                  data:
                    $ref: '#/components/schemas/LoanTermsResource'
                required:
                  - message
                  - data
        '401':
          $ref: '#/components/responses/AuthenticationException'
        '403':
          $ref: '#/components/responses/AuthorizationException'
        '404':
          $ref: '#/components/responses/ModelNotFoundException'
        '422':
          $ref: '#/components/responses/ValidationException'
components:
  schemas:
    UpdateLoanTermsRequest:
      type: object
      properties:
        kind:
          $ref: '#/components/schemas/LoanKindEnum'
        repayment_type:
          $ref: '#/components/schemas/LoanRepaymentTypeEnum'
        fee_per_payment:
          type: number
          description: Applies to payments from now on.
          minimum: 0
        day_count:
          $ref: '#/components/schemas/LoanDayCountEnum'
          description: Applies to accruals from now on.
        original_amount:
          type:
            - number
            - 'null'
          minimum: 0
        start_date:
          type:
            - string
            - 'null'
          format: date-time
        term_months:
          type:
            - integer
            - 'null'
          minimum: 1
          maximum: 600
        paying_financial_account_id:
          type:
            - integer
            - 'null'
          description: >-
            A bank account of the loan's owner that pays the loan; null switches
            to schedule mode (set `schedule`).
        schedule:
          type:
            - object
            - 'null'
          description: >-
            Schedule mode; null turns it off (set
            `paying_financial_account_id`).
          properties:
            amount:
              type: number
            day_of_month:
              type: integer
              minimum: 1
              maximum: 31
      title: UpdateLoanTermsRequest
    LoanTermsResource:
      type: object
      properties:
        kind:
          type:
            - string
            - 'null'
          description: >-
            MORTGAGE, STUDENT, AUTO, PERSONAL or OTHER. Drives the default
            account type in destinations.
        repayment_type:
          type:
            - string
            - 'null'
          description: >-
            ANNUITY, SERIAL or INTEREST_ONLY. Only the months-remaining estimate
            depends on it.
        fee_per_payment:
          type: number
          description: Fixed fee posted with every regular payment.
        day_count:
          type:
            - string
            - 'null'
          description: ACT_365, ACT_360 or THIRTY_360.
        current_rate:
          type:
            - number
            - 'null'
          description: The annual rate in force today, in percent.
        rate_periods:
          type: string
          description: Every rate period, oldest first.
        anchor_balance:
          type: number
          description: >-
            The balance the user last verified (negative: money owed) and the
            date it was true. Every balance is derived from it.
        anchor_date:
          type:
            - string
            - 'null'
        balance_verified_at:
          type: string
        paying_financial_account_id:
          type:
            - string
            - 'null'
          description: >-
            The bank account whose matched payments drive the loan, or null in
            schedule mode. Also null for an app the user did not share that
            account with.
        schedule:
          type:
            - object
            - 'null'
          description: >-
            Schedule mode: a fixed amount posted on a day of month when no bank
            account pays the loan.
          properties:
            amount:
              type: number
            day_of_month:
              type: string
          required:
            - amount
            - day_of_month
        last_regular_payment_amount:
          type:
            - number
            - 'null'
          description: The amount of the last payment Synci took as the regular one.
        expected_payment_day:
          type: string
          description: >-
            The day of month payments are expected on, from the last regular
            payment or the schedule.
        payment_change:
          type:
            - object
            - 'null'
          description: >-
            A payment whose amount changed on cycle, awaiting the user's answer
            to "has the rate changed?". Null when nothing is pending.
          properties:
            booking_date:
              type:
                - string
                - 'null'
              description: The date of the payment that changed.
            previous_amount:
              type: number
            amount:
              type: number
              description: The new amount.
            detected_at:
              type: string
          required:
            - booking_date
            - previous_amount
            - amount
            - detected_at
        next_payment_date:
          type:
            - string
            - 'null'
          description: >-
            When the next payment is expected: the next schedule day, or a month
            after the last regular payment. Null before either is known.
        months_remaining_estimate:
          type:
            - integer
            - 'null'
          description: >-
            Rough months until paid off from the current balance, rate and
            regular payment; null when unknown.
        original_amount:
          type:
            - number
            - 'null'
        start_date:
          type:
            - string
            - 'null'
        term_months:
          type: string
        last_accrual_date:
          type:
            - string
            - 'null'
      required:
        - kind
        - repayment_type
        - fee_per_payment
        - day_count
        - current_rate
        - rate_periods
        - anchor_balance
        - anchor_date
        - balance_verified_at
        - paying_financial_account_id
        - schedule
        - last_regular_payment_amount
        - expected_payment_day
        - payment_change
        - next_payment_date
        - months_remaining_estimate
        - original_amount
        - start_date
        - term_months
        - last_accrual_date
      title: LoanTermsResource
    LoanKindEnum:
      type: string
      description: >
        What kind of debt a manual loan account is. Drives the default account
        type when the loan is created in a destination.
      enum:
        - MORTGAGE
        - STUDENT
        - AUTO
        - PERSONAL
        - OTHER
      title: LoanKindEnum
    LoanRepaymentTypeEnum:
      type: string
      description: >
        How the loan is paid down. Only the months-remaining estimate depends on
        it; the interest, fee and payment split never does.
      enum:
        - ANNUITY
        - SERIAL
        - INTEREST_ONLY
      title: LoanRepaymentTypeEnum
    LoanDayCountEnum:
      type: string
      description: >
        How days between two dates are counted when accruing interest, and the
        denominator that goes with them.
      enum:
        - ACT_365
        - ACT_360
        - THIRTY_360
      title: LoanDayCountEnum
  responses:
    AuthenticationException:
      description: Unauthenticated
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    AuthorizationException:
      description: Authorization error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ModelNotFoundException:
      description: Not found
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Error overview.
            required:
              - message
    ValidationException:
      description: Validation error
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
                description: Errors overview.
              errors:
                type: object
                description: A detailed description of each field that failed validation.
                additionalProperties:
                  type: array
                  items:
                    type: string
            required:
              - message
              - errors
  securitySchemes:
    oauth2:
      type: oauth2
      flows:
        authorizationCode:
          authorizationUrl: https://api.synci.io/oauth/authorize
          tokenUrl: https://api.synci.io/oauth/token
          scopes:
            profile:read: View your name, email, and profile details
            accounts:read: View your connected financial accounts and balances
            accounts:write: >-
              Update, sync, and remove your financial accounts, and change their
              settings
            transactions:read: View your transactions
            transactions:write: Create, update, and delete your transactions
            sensitive:read: >-
              See sensitive identifiers like account numbers and account holder
              names
            transfer-links:read: View your transfer links and their transfer history
            transfer-links:write: Create, update, and delete transfer links, and undo transfers
            rules:read: View your rules and rule activity
            rules:write: Create, update, and delete rules, and undo rule actions
            webhooks:read: View your webhook endpoints
            webhooks:write: >-
              Create, update, and delete webhook endpoints, and rotate their
              secrets
            destinations:read: View your connected destinations
            destinations:write: Connect, update, and remove destinations
            financial-connections:read: View your connected institutions
            financial-connections:write: Manage your connected institutions
    http:
      type: http
      description: Bearer token (personal access token or OAuth access token)
      scheme: bearer

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.