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

# Get an account plan

> Returns the plan header and the version in effect at the instant of the request.



## OpenAPI

````yaml /en/openapi/v3-current/ledger.yaml get /v2/organizations/{organization_id}/ledgers/{ledger_id}/account-plans/{account_plan_id}
openapi: 3.1.0
info:
  title: Midaz Ledger API
  version: 4.0.0
servers:
  - url: https://ledger.sandbox.lerian.net
security: []
tags:
  - name: Account Block Exceptions (v2)
  - name: Account Plan Assignments (v2)
  - name: Account Plans (v2)
  - name: Account Types (v1)
  - name: Account Types (v2)
  - name: Accounts (v1)
  - name: Accounts (v2)
  - name: Asset Rates (v1)
  - name: Assets (v1)
  - name: Assets (v2)
  - name: Balances (v1)
  - name: Balances (v2)
  - name: Billing Calculate (v2)
  - name: Billing Packages (v2)
  - name: Composition (v2)
  - name: Dashboard (v1)
  - name: Dashboard (v2)
  - name: Encryption (v2)
  - name: Fee Charges (v2)
  - name: Fee Debts (v2)
  - name: Fees (v2)
  - name: Holders (v2)
  - name: Instruments (v2)
  - name: Ledgers (v1)
  - name: Ledgers (v2)
  - name: Metadata Indexes (v1)
  - name: Metadata Indexes (v2)
  - name: Operation Routes (v1)
  - name: Operation Routes (v2)
  - name: Operations (v1)
  - name: Operations (v2)
  - name: Organizations (v1)
  - name: Organizations (v2)
  - name: Packages (v2)
  - name: Portfolios (v1)
  - name: Portfolios (v2)
  - name: Protection (v2)
  - name: Segments (v1)
  - name: Segments (v2)
  - name: Transaction Routes (v1)
  - name: Transaction Routes (v2)
  - name: Transactions (v1)
  - name: Transactions (v2)
paths:
  /v2/organizations/{organization_id}/ledgers/{ledger_id}/account-plans/{account_plan_id}:
    get:
      tags:
        - Account Plans (v2)
      summary: Get an account plan
      description: >-
        Returns the plan header and the version in effect at the instant of the
        request.
      operationId: getAccountPlanByIDV2
      parameters:
        - description: Organization ID (UUID)
          in: path
          name: organization_id
          required: true
          schema:
            description: Organization ID (UUID)
            type: string
        - description: Ledger ID (UUID)
          in: path
          name: ledger_id
          required: true
          schema:
            description: Ledger ID (UUID)
            type: string
        - description: Account plan ID (UUID)
          in: path
          name: account_plan_id
          required: true
          schema:
            description: Account plan ID (UUID)
            type: string
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/FeeAccountPlanView'
          description: OK
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Internal Server Error
        default:
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Error
      security:
        - BearerAuth: []
components:
  schemas:
    FeeAccountPlanView:
      additionalProperties: false
      properties:
        createdAt:
          examples:
            - '2026-01-01T00:00:00Z'
          format: date-time
          type: string
        currentVersion:
          description: Highest version created for the plan.
          examples:
            - 1
          format: int64
          type: integer
        deletedAt:
          examples:
            - '2026-01-01T00:00:00Z'
          format: date-time
          type: string
        description:
          examples:
            - Essential plan for individuals
          type: string
        effectiveFrom:
          description: Instant the version in effect applies from.
          examples:
            - '2026-01-01T00:00:00Z'
          format: date-time
          type: string
        enable:
          description: >-
            Whether new accounts can be assigned to the plan. Disabling it keeps
            charging the accounts already assigned.
          examples:
            - true
          type: boolean
        fees:
          additionalProperties:
            $ref: '#/components/schemas/FeeAccountPlanFee'
          description: Fees of the version in effect, keyed by fee key.
          type: object
        id:
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        label:
          description: Plan name, unique among the ledger's plans that are not deleted.
          examples:
            - Essential PF
          type: string
        ledgerId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        organizationId:
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        timezone:
          description: >-
            IANA timezone the monthly free quota is counted in. Defaults to
            America/Sao_Paulo.
          examples:
            - America/Sao_Paulo
          type: string
        updatedAt:
          examples:
            - '2026-01-01T00:00:00Z'
          format: date-time
          type: string
        version:
          description: Version in effect at the instant of the read.
          examples:
            - 1
          format: int64
          type: integer
      required:
        - version
        - effectiveFrom
        - fees
        - id
        - organizationId
        - ledgerId
        - label
        - enable
        - timezone
        - currentVersion
        - createdAt
        - updatedAt
      type: object
    Error:
      additionalProperties: true
      properties:
        code:
          description: >-
            Stable, machine-readable domain error code scoped to the emitting
            service (format: <SERVICE>-NNNN).
          type: string
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
        upstream:
          $ref: '#/components/schemas/Upstream'
          description: >-
            RFC 9457 extension member: the error a proxied third-party provider
            reported. Absent unless the emitting service explicitly surfaced
            one.
      type: object
    FeeAccountPlanFee:
      additionalProperties: false
      properties:
        accounting:
          $ref: '#/components/schemas/FeeAccountPlanAccounting'
          description: >-
            Routes of the fee. Required when the ledger validates accounting
            routes; only stored otherwise.
        calculationModel:
          $ref: '#/components/schemas/FeeCalculationModel'
        creditAccount:
          description: Alias of the ledger account that receives the fee.
          examples:
            - receita_tarifa_ted
          type: string
        feeLabel:
          examples:
            - TED enviada
          type: string
        freeQuota:
          description: Units per period charged nothing. Defaults to 0.
          examples:
            - 10
          format: int64
          minimum: 0
          type: integer
        period:
          description: Window the free quota resets on. Only monthly is accepted.
          enum:
            - monthly
          examples:
            - monthly
          type: string
        referenceAmount:
          description: >-
            Amount the fee is calculated on. Only originalAmount, the amount the
            account sends, is accepted.
          enum:
            - originalAmount
          examples:
            - originalAmount
          type: string
        trigger:
          $ref: '#/components/schemas/FeeAccountPlanTrigger'
      required:
        - feeLabel
        - trigger
        - calculationModel
        - referenceAmount
        - creditAccount
        - freeQuota
        - period
      type: object
    ErrorDetail:
      additionalProperties: false
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    Upstream:
      additionalProperties: false
      properties:
        code:
          description: The upstream provider's own error code, verbatim.
          examples:
            - E4001
          type: string
        message:
          description: >-
            The upstream provider's own error message, verbatim (bounded, never
            its raw response body).
          examples:
            - account not found at provider
          type: string
      type: object
    FeeAccountPlanAccounting:
      additionalProperties: false
      properties:
        operationRouteFrom:
          description: Operation route of the fee debit leg.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        operationRouteTo:
          description: Operation route of the fee credit leg.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
        transactionRoute:
          description: >-
            Transaction route identifier the transaction routeId must equal for
            the fee to match.
          examples:
            - 00000000-0000-0000-0000-000000000000
          type: string
      required:
        - transactionRoute
        - operationRouteFrom
        - operationRouteTo
      type: object
    FeeCalculationModel:
      additionalProperties: false
      properties:
        applicationRule:
          examples:
            - maxBetweenTypes
          type: string
        calculations:
          items:
            $ref: '#/components/schemas/FeeCalculation'
          type:
            - array
            - 'null'
      required:
        - applicationRule
        - calculations
      type: object
    FeeAccountPlanTrigger:
      additionalProperties: false
      properties:
        direction:
          description: Side of the transaction the fee incurs on. Only sent is accepted.
          enum:
            - sent
          examples:
            - sent
          type: string
        metadata:
          additionalProperties:
            type: string
          description: >-
            Metadata pairs a transaction must all carry for the fee to match,
            each matching only a string metadata value equal to it. Each pair
            counts one toward fee specificity: among the fees of a plan that
            match one transaction, the one carrying the most pairs applies.
            Transaction fees only. Absent or empty matches whatever the
            metadata.
          examples:
            - channel: app
          type: object
        schemes:
          description: >-
            Transaction schemes the fee matches, normalized to trimmed upper
            case. Required when the ledger does not validate accounting routes;
            optional otherwise, where empty matches any scheme on the fee
            transaction route.
          examples:
            - - TED
          items:
            type: string
          type:
            - array
            - 'null'
        serviceCode:
          description: >-
            Service code charged through fee-charges, normalized to trimmed
            upper case. Required for a service trigger.
          examples:
            - SAQUE
          type: string
        type:
          enum:
            - transaction
            - service
          examples:
            - transaction
          type: string
      required:
        - type
      type: object
    FeeCalculation:
      additionalProperties: false
      properties:
        type:
          examples:
            - percentage
          type: string
        value:
          examples:
            - '100.00'
          type: string
      required:
        - type
        - value
      type: object
  securitySchemes:
    BearerAuth:
      bearerFormat: JWT
      description: JWT bearer token issued by the identity provider.
      scheme: bearer
      type: http

````

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