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

# 가장 빠른 은퇴

> 필요한 권한: `plans:read`



## OpenAPI

````yaml /openapi.json get /v1/plans/{id}/optimize/early-retirement
openapi: 3.1.0
info:
  title: OpenAPI definition
  version: v0
servers:
  - url: https://api.morrowly.app
security:
  - token: []
paths:
  /v1/plans/{id}/optimize/early-retirement:
    get:
      tags:
        - plans
      summary: 가장 빠른 은퇴
      description: '필요한 권한: `plans:read`'
      operationId: earliestRetirement
      parameters:
        - in: path
          name: id
          required: true
          schema:
            format: uuid
            type: string
        - in: query
          name: limits
          required: false
          schema:
            default: []
            items:
              $ref: '#/components/schemas/Limit'
            type: array
            uniqueItems: true
      responses:
        '200':
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/ApiResponseEarliestRetirementView'
          description: OK
        '401':
          description: 토큰이 없거나 틀리거나 만료됨(본문 없음)
        '403':
          description: 토큰의 권한이 모자람(본문 없음)
components:
  schemas:
    Limit:
      enum:
        - PRIVATE_PENSION
        - FINANCIAL_INCOME
        - DEPENDENT_INCOME
      type: string
    ApiResponseEarliestRetirementView:
      properties:
        data:
          oneOf:
            - $ref: '#/components/schemas/EarliestRetirementView'
            - type: 'null'
        error:
          oneOf:
            - $ref: '#/components/schemas/ErrorMessage'
            - type: 'null'
        result:
          $ref: '#/components/schemas/ResultType'
      required:
        - data
        - error
        - result
      type: object
    EarliestRetirementView:
      properties:
        best:
          oneOf:
            - $ref: '#/components/schemas/RetirementOption'
            - type: 'null'
        combinations:
          format: int32
          type: integer
        current:
          oneOf:
            - $ref: '#/components/schemas/RetirementOption'
            - type: 'null'
        currentChoice:
          $ref: '#/components/schemas/Choice'
        endAge:
          format: int32
          type: integer
        financesRevision:
          type: string
        limits:
          items:
            $ref: '#/components/schemas/LimitStatus'
          type: array
        planRevision:
          type: string
        publicPensionAges:
          items:
            $ref: '#/components/schemas/PublicPensionAge'
          type: array
        retirement:
          type: string
        retirementAge:
          format: int32
          type: integer
      required:
        - best
        - combinations
        - current
        - currentChoice
        - endAge
        - financesRevision
        - limits
        - planRevision
        - publicPensionAges
        - retirement
        - retirementAge
      type: object
    ErrorMessage:
      properties:
        code:
          type: string
        data: {}
        message:
          type: string
      required:
        - code
        - data
        - message
      type: object
    ResultType:
      enum:
        - SUCCESS
        - ERROR
      type: string
    RetirementOption:
      properties:
        age:
          format: int32
          type: integer
        choice:
          $ref: '#/components/schemas/Choice'
        month:
          type: string
        netWorth:
          format: int64
          type: integer
      required:
        - age
        - choice
        - month
        - netWorth
      type: object
    Choice:
      properties:
        harvestGains:
          type: boolean
        homePension:
          oneOf:
            - $ref: '#/components/schemas/HomePensionChoice'
            - type: 'null'
        pensionContributions:
          additionalProperties:
            format: int64
            type: integer
          type:
            - object
            - 'null'
        pensionStartAge:
          format: int32
          type:
            - integer
            - 'null'
        pensionYears:
          format: int32
          type:
            - integer
            - 'null'
        prepayDebt:
          type: boolean
        publicPensionShift:
          format: int32
          type:
            - integer
            - 'null'
        withdrawalOrder:
          $ref: '#/components/schemas/WithdrawalOrder'
      required:
        - harvestGains
        - homePension
        - pensionContributions
        - pensionStartAge
        - pensionYears
        - prepayDebt
        - publicPensionShift
        - withdrawalOrder
      type: object
    LimitStatus:
      properties:
        avoidable:
          type: boolean
        firstYear:
          format: int32
          type:
            - integer
            - 'null'
        limit:
          $ref: '#/components/schemas/Limit'
      required:
        - avoidable
        - firstYear
        - limit
      type: object
    PublicPensionAge:
      properties:
        age:
          format: int32
          type: integer
        owner:
          $ref: '#/components/schemas/Owner'
      required:
        - age
        - owner
      type: object
    HomePensionChoice:
      properties:
        age:
          format: int32
          type: integer
        assetId:
          type: string
      required:
        - age
        - assetId
      type: object
    WithdrawalOrder:
      enum:
        - PROPORTIONAL
        - TAXABLE_FIRST
        - TAX_FREE_FIRST
      type: string
    Owner:
      enum:
        - SELF
        - SPOUSE
        - JOINT
      type: string
  securitySchemes:
    token:
      scheme: bearer
      type: http

````

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