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

# Get the last completed reconciliation for each ledger

> Get the last completed reconciliation for each ledger.



## OpenAPI

````yaml GET /v0/reconciliations/last-completed
openapi: 3.1.0
info:
  title: Teal API
  version: '0.1'
servers:
  - url: https://api.sandbox.teal.dev
    description: Sandbox
  - url: https://api.teal.dev
    description: Production
security: []
paths:
  /v0/reconciliations/last-completed:
    get:
      tags:
        - Reconciliation
      summary: Get the last completed reconciliation for each ledger
      description: Get the last completed reconciliation for each ledger.
      operationId: get_last_completed_reconciliation_v0_reconciliations_last_completed_get
      parameters:
        - name: ledger_ids
          in: query
          required: false
          schema:
            anyOf:
              - items:
                  type: string
                type: array
              - type: 'null'
            description: The ledger IDs.
            teal_explode: false
            title: Ledger Ids
          description: The ledger IDs.
        - name: teal-instance-id
          in: header
          required: true
          schema:
            type: string
            description: The Teal instance ID
            title: Teal-Instance-Id
          description: The Teal instance ID
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties:
                  $ref: '#/components/schemas/Reconciliation'
                title: >-
                  Response Get Last Completed Reconciliation V0 Reconciliations
                  Last Completed Get
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TealErrorResponse'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TealErrorResponse'
          description: Not Found
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TealErrorResponse'
          description: Unprocessable Content
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TealErrorResponse'
          description: Service Unavailable
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    Reconciliation:
      properties:
        id:
          type: string
          title: Id
          description: The Reconciliation ID.
          examples:
            - FYQxHfWNCMnUuXr6iQhjgG
        ledger_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Ledger Id
          description: The Ledger ID
          examples:
            - WTjdK47SHxokWUdypL8zyB
        start_datetime:
          type: string
          format: date-time
          title: Start Datetime
          description: The start datetime of the Reconciliation.
          examples:
            - '2024-01-01T00:00:00Z'
        end_datetime:
          type: string
          format: date-time
          title: End Datetime
          description: The end datetime of the Reconciliation.
          examples:
            - '2024-01-01T00:00:00Z'
        reconciled_balance:
          type: number
          title: Reconciled Balance
          description: >-
            The balance of all reconciled journal entries in the ledger with a
            datetime before the end datetime. Excludes journal entries that were
            skipped to be reconciled in a later reconciliation after the end
            datetime.
          examples:
            - 132629.38
        statement_starting_balance:
          anyOf:
            - type: number
            - type: 'null'
          title: Statement Starting Balance
          description: >-
            The starting balance of the statement. Equal to the
            statement_ending_balance of the previous reconciliation or the
            opening balance of the ledger
          examples:
            - 122629.38
        statement_ending_balance:
          type: number
          title: Statement Ending Balance
          description: >-
            The ending balance of the statement used to perform the
            Reconciliation.
          examples:
            - 132629.38
        reconciliation_status:
          $ref: '#/components/schemas/ReconciliationStatus'
          description: The status of the Reconciliation.
          examples:
            - unreconciled
            - reconciled
        progress_status:
          type: string
          title: Progress Status
          description: The progress of the Reconciliation.
          examples:
            - in_progress
            - completed
        completed_on_datetime:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Completed On Datetime
          description: The datetime when the Reconciliation was last changed to completed.
          examples:
            - '2024-01-01T00:00:00Z'
        final_reconciled_balance:
          type: number
          title: Final Reconciled Balance
          description: >-
            The statement balance after applying all journal entries in the
            reconciliation period. For completed reconciliations this equals the
            reconciled_balance. For in-progress reconciliations this is the
            running balance through the last journal entry.
          examples:
            - 132629.38
      type: object
      required:
        - id
        - start_datetime
        - end_datetime
        - reconciled_balance
        - statement_ending_balance
        - reconciliation_status
        - progress_status
        - final_reconciled_balance
      title: Reconciliation
    TealErrorResponse:
      properties:
        message:
          anyOf:
            - type: string
            - type: 'null'
          title: Message
          description: A description of the error for API developers.
        data:
          title: Data
          description: Data associated with the error.
        display_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Display Message
          description: A description of the error for end users.
        error_code:
          anyOf:
            - $ref: '#/components/schemas/TealErrorCode'
            - type: 'null'
          description: Error code associated with the error.
      type: object
      required:
        - message
      title: TealErrorResponse
    ReconciliationStatus:
      type: string
      enum:
        - reconciled
        - unreconciled
      title: ReconciliationStatus
    TealErrorCode:
      type: string
      enum:
        - invalid_date
        - invalid_ledger
        - missing_parameters
        - duplicate_name
        - duplicate_sort_code
        - invalid_ledger_type
        - invalid_ledger_report_cash_flow
        - deleting_required_ledger
        - repeated_tag_group
        - deleting_transaction_line
        - modifying_read_only_ledger
        - debits_credits_not_equal
        - modifying_datetime_opening_balance
        - modifying_accrual_journal_entry
        - modifying_payment_application_journal_entry
        - reconciliation_in_progress
        - reconciled_balance_does_not_match
        - journal_entry_outside_reconciliation_period
        - entries_start_date_after_transactions
        - entries_start_date_after_reconciliations
        - entries_start_date_after_journal_entries
      title: TealErrorCode
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      description: >-
        Bearer authentication header of the form Bearer <token>, where <token>
        is your auth token.
      flows:
        password:
          scopes: {}
          tokenUrl: https://developer.teal.dev

````