> ## 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.

# Add a rate period

> A new annual rate from a date onward. The date must be on or after the loan's last accrual date;
interest from that date is recomputed. Settles a pending payment-change question dated on or before it.



## OpenAPI

````yaml /openapi/v1.json post /finance/accounts/{accountId}/loan/rate-periods
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/rate-periods:
    post:
      tags:
        - Loans
      summary: Add a rate period
      description: >-
        A new annual rate from a date onward. The date must be on or after the
        loan's last accrual date;

        interest from that date is recomputed. Settles a pending payment-change
        question dated on or before it.
      operationId: financial.accounts.loan.rate-periods.store
      parameters:
        - name: accountId
          in: path
          required: true
          description: The financial account ID
          schema:
            type: integer
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateLoanRatePeriodRequest'
      responses:
        '201':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                    const: Rate period added.
                  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:
    CreateLoanRatePeriodRequest:
      type: object
      properties:
        effective_from:
          type: string
          format: date-time
          description: >-
            The first day the new rate applies. On or after the last accrual
            date: rates only change going forward.
        annual_rate:
          type: number
          description: Annual interest rate in percent, 0 to 100.
          minimum: 0
          maximum: 100
      required:
        - effective_from
        - annual_rate
      title: CreateLoanRatePeriodRequest
    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
  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.