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

# List Operations by Account

> Use this endpoint to retrieve all Operations from a specific Account.



## OpenAPI

````yaml /en/openapi/v3-current/ledger.yaml get /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/operations
openapi: 3.1.0
info:
  title: Midaz Ledger API
  description: >-
    Complete API reference for Midaz Ledger services including organization
    management, ledger operations, assets, segments, portfolios, accounts,
    account types, transactions, operations, balances, operation routes,
    transaction routes, and metadata indexes.
  version: 3.7.1
servers:
  - url: https://ledger.sandbox.lerian.net
security: []
tags:
  - name: Organizations API
  - name: Ledgers API
  - name: Assets API
  - name: Segments API
  - name: Portfolios API
  - name: Account Types API
  - name: Accounts API
  - name: Balances API
  - name: Transactions API
  - name: Operations API
  - name: Operation Routes API
  - name: Transaction Routes API
  - name: Metadata Indexes API
paths:
  /v1/organizations/{organization_id}/ledgers/{ledger_id}/accounts/{account_id}/operations:
    get:
      tags:
        - Operations API
      summary: List Operations by Account
      description: Use this endpoint to retrieve all Operations from a specific Account.
      parameters:
        - $ref: '#/components/parameters/OrganizationId'
        - $ref: '#/components/parameters/Authorization'
        - $ref: '#/components/parameters/LedgerId'
        - $ref: '#/components/parameters/ContentType'
        - $ref: '#/components/parameters/AccountId'
        - $ref: '#/components/parameters/XRequestId'
        - name: limit
          in: query
          description: The maximum number of items to include in the response.
          required: true
          example: '10'
          schema:
            type: string
        - name: start_date
          in: query
          description: >-
            The beginning of the period you want to retrieve. You must also
            include the end_date.
          required: false
          example: '2021-01-01'
          schema:
            type: string
        - name: end_date
          in: query
          description: >-
            The end of the period you want to retrieve. You must also include
            the start_date.
          required: false
          example: '2025-01-01'
          schema:
            type: string
        - name: sort_order
          in: query
          description: The order used to sort the results.
          required: false
          example: asc
          schema:
            type: enum
            enum:
              - asc
              - desc
        - name: cursor
          in: query
          description: >-
            An encoded cursor token from a previous response (next_cursor or
            prev_cursor) to navigate forward or backward through results.
          required: false
          example: >-
            eyJpZCI6IjAxOTNiNTZmLWJhY2YtNzQ0MS05NDU4LTEyZTE5MjVlOGI4NCIsInBvaW50c19uZXh0Ijp0cnVlfQ==
          schema:
            type: string
        - name: type
          in: query
          description: The type of operation.
          required: false
          example: DEBIT
          schema:
            type: enum
            enum:
              - CREDIT
              - DEBIT
              - ON_HOLD
              - RELEASE
              - OVERDRAFT
        - name: direction
          in: query
          description: Filter operations by direction in double-entry accounting.
          required: false
          example: debit
          schema:
            type: string
            enum:
              - debit
              - credit
        - name: route_id
          in: query
          description: Filter operations by the operation route ID.
          required: false
          example: 019c96a0-1071-7a0d-9916-a831221de252
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: >-
            Indicates that the request was successful and the response contains
            the expected data.
          content:
            application/json:
              schema:
                type: object
                properties:
                  items:
                    type: array
                    items:
                      $ref: '#/components/schemas/GetOperationResponse'
                  next_cursor:
                    type: string
                    description: Encoded cursor pointing to the next page of results.
                  prev_cursor:
                    type: string
                    description: Encoded cursor pointing to the previous page of results.
                  limit:
                    type: integer
                    description: The maximum number of items included in the response.
        '400':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0082:
                  $ref: '#/components/examples/Error0082'
                Error0081:
                  $ref: '#/components/examples/Error0081'
                Error0080:
                  $ref: '#/components/examples/Error0080'
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0041:
                  $ref: '#/components/examples/Error0041'
                Error0042:
                  $ref: '#/components/examples/Error0042'
        '403':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0043:
                  $ref: '#/components/examples/Error0043'
        '404':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0052:
                  $ref: '#/components/examples/Error0052'
                Error0069:
                  $ref: '#/components/examples/Error0069'
        '500':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorFormat'
              examples:
                Error0046:
                  $ref: '#/components/examples/Error0046'
      security:
        - bearer: []
components:
  parameters:
    OrganizationId:
      name: organization_id
      in: path
      description: The unique identifier of the Organization associated with the Ledger.
      required: true
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
    Authorization:
      name: Authorization
      in: header
      description: >-
        The authorization token. **This header is required if your environment
        has Access Manager enabled**.
      required: false
      schema:
        type: string
    LedgerId:
      name: ledger_id
      in: path
      description: The unique identifier of the associated Ledger.
      required: true
      example: 019c96a0-0ac0-7de9-9f53-9cf842a2ee5a
      schema:
        type: string
    ContentType:
      name: Content-Type
      in: header
      description: >-
        The type of media of the resource. Recommended value is
        `application/json`.
      required: false
      example: application/json
      schema:
        type: string
    AccountId:
      name: account_id
      in: path
      description: >-
        The unique identifier of the account of which you want to retrieve the
        balances.
      required: true
      example: 019c96a0-0c0c-7221-8cf3-13313fb60081
      schema:
        type: string
    XRequestId:
      name: X-Request-Id
      in: header
      description: A unique identifier used to trace and track each request.
      required: false
      example: 019c96a0-0a98-7287-9a31-786e0809c769
      schema:
        type: string
        format: uuid
  schemas:
    GetOperationResponse:
      type: object
      properties:
        id:
          type: string
          description: The unique identifier of the Operation.
          format: uuid
        transactionId:
          type: string
          format: uuid
          description: The unique identifier of the Transaction.
        organizationId:
          type: string
          format: uuid
          description: The unique identifier of the Organization.
        ledgerId:
          type: string
          description: The unique identifier of the Ledger.
          format: uuid
        accountId:
          type: string
          description: The unique identifier of the Account.
          format: uuid
        accountAlias:
          type: string
          description: The alias for the account used in the operation.
        balanceId:
          type: string
          description: The unique identifier of the Balance.
        balanceKey:
          type: string
          description: The unique key that identifies the Balance.
        description:
          type: string
          description: Description of the transaction.
        type:
          type: string
          description: >-
            The type of the operation. `OVERDRAFT` identifies system-generated
            companion operations on the internal `"overdraft"` balance —
            `direction` then carries the lifecycle semantics (`debit` for a
            draw, `credit` for a repayment).
          enum:
            - CREDIT
            - DEBIT
            - ON_HOLD
            - RELEASE
            - OVERDRAFT
        assetCode:
          type: string
          description: The name of the asset used in the operation.
        chartOfAccounts:
          type: string
          description: The name of the Chart-of-Accounts that the operation belongs to.
        route:
          type: string
          deprecated: true
          description: >-
            **Deprecated.** Use `routeId` instead. Will be removed in the next
            major version. The unique ID of the operation route for this
            transaction leg.
        routeId:
          type: string
          format: uuid
          description: >-
            The unique identifier of the operation route associated with this
            operation. Companion overdraft operations inherit this value from
            the primary operation that triggered them.
        routeCode:
          type: string
          maxLength: 100
          description: >-
            A human-readable code for the operation route, useful for audit
            trail and traceability.
        routeDescription:
          type: string
          description: >-
            The description of the operation route associated with this
            operation.
        direction:
          type: string
          enum:
            - debit
            - credit
          description: The direction of the operation in double-entry accounting.
        amount:
          type: object
          description: >-
            An object containing information about the amount used in the
            operation.
          properties:
            value:
              type: string
              description: The amount that will be sent.
        balance:
          type: object
          description: >-
            An object containing information about the balance before the
            operation.
          properties:
            available:
              type: string
              description: Previous available balance.
            onHold:
              type: string
              description: Amount on hold/reserved.
            version:
              type: integer
              description: Balance version, which is updated with each transaction.
            overdraftUsed:
              type: string
              description: >-
                The overdraft consumed by this balance before the operation, as
                a decimal string. `"0"` for operations that do not touch
                overdraft.
        balanceAfter:
          type: object
          description: >-
            An object containing information about the balance after the
            operation.
          properties:
            available:
              type: string
              description: Current available balance.
            onHold:
              type: string
              description: Amount on hold/reserved.
            version:
              type: integer
              description: Balance version, which is updated with each transaction.
            overdraftUsed:
              type: string
              description: >-
                The overdraft consumed by this balance after the operation, as a
                decimal string. `"0"` for operations that do not touch
                overdraft.
        status:
          type: object
          description: The transaction status (pending, completed, reversed).
          properties:
            code:
              type: string
              description: Transaction status code.
            description:
              type: string
              description: Transaction status description.
              nullable: true
        balanceAffected:
          type: boolean
          description: If true, indicates that the operation affected the account balance.
        createdAt:
          type: string
          format: date-time
          description: Timestamp of creation (UTC).
        updatedAt:
          type: string
          format: date-time
          description: Timestamp of last update (UTC).
        deletedAt:
          type: string
          format: date-time
          description: Timestamp of soft deletion, if applicable (UTC).
          nullable: true
        metadata:
          $ref: '#/components/schemas/Metadata'
    ErrorFormat:
      type: object
      description: The response message error.
      required:
        - code
        - title
        - message
      properties:
        code:
          type: string
          description: A unique, stable identifier for the error.
        title:
          type: string
          description: A brief summary of the issue.
        message:
          type: string
          description: Detailed guidance for resolving the error.
        fields:
          type: object
          additionalProperties: true
          description: Additional information about the fields that caused the error.
    Metadata:
      type: object
      additionalProperties:
        type: string
      description: >-
        An object containing key-value pairs to add as metadata, where the field
        `name` is the key and the field `value` is the value. For example, to
        add a Cost Center, use 'costCenter': 'BR_11101997'.
  examples:
    Error0082:
      value:
        code: '0082'
        title: Invalid Query Parameter
        message: >-
          One or more query parameters are in an incorrect format. Please check
          the following parameters '{{parameter}}' and ensure they meet the
          required format before trying again.
      summary: Invalid Query Parameter
    Error0081:
      value:
        code: '0081'
        title: Invalid Sort Order
        message: >-
          The 'sort_order' field must be 'asc' or 'desc'. Please provide a valid
          sort order and try again.
      summary: Invalid Sort Order
    Error0080:
      value:
        code: '0080'
        title: Pagination Limit Exceeded
        message: >-
          The pagination limit exceeds the maximum allowed of {{pageLimit}}
          items per page. Please verify the limit and try again.
      summary: Pagination Limit Exceeded
    Error0041:
      summary: Token Missing
      value:
        code: '0041'
        title: Token Missing
        message: >-
          A valid token must be provided in the request header. Please include a
          token and try again.
    Error0042:
      summary: Invalid Token
      value:
        code: '0042'
        title: Invalid Token
        message: >-
          The provided token is expired, invalid or malformed. Please provide a
          valid token and try again.
    Error0043:
      summary: Insufficient Privileges
      value:
        code: '0043'
        title: Insufficient Privileges
        message: >-
          You do not have the necessary permissions to perform this action.
          Please contact your administrator if you believe this is an error.
    Error0052:
      value:
        code: '0052'
        title: Account ID Not Found
        message: >-
          The provided account ID does not exist in our records. Please verify
          the account ID and try again.
      summary: Account ID Not Found
    Error0069:
      value:
        code: '0069'
        title: No Operations Found
        message: >-
          No operations were found for the given query parameters. Please adjust
          your filters and try again.
      summary: No Operations Found
    Error0046:
      summary: Internal Server Error
      value:
        code: '0046'
        title: Internal Server Error
        message: >-
          The server encountered an unexpected error. Please try again later or
          contact support.
  securitySchemes:
    bearer:
      type: http
      scheme: bearer

````