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

# Update ledger status

> Update ledger active status or close ledger



## OpenAPI

````yaml put /v1/ledgers/{id}/status
openapi: 3.0.0
info:
  title: Ledgers API
  version: 1.0.0
  description: API for managing accounting ledgers and entries
servers: []
security:
  - bearerAuth: []
tags:
  - name: Ledgers
    description: Ledger management operations
paths:
  /v1/ledgers/{id}/status:
    put:
      tags:
        - Ledger Operations
      summary: Update ledger status
      description: Update ledger active status or close ledger
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: Ledger UUID
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateLedgerStatus'
      responses:
        '200':
          description: Status updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LedgerResponse'
components:
  schemas:
    UpdateLedgerStatus:
      type: object
      required:
        - active
      properties:
        active:
          type: boolean
          description: Set ledger active status
        closing_date:
          type: string
          format: date-time
          description: Date when ledger should be closed
        closing_reason:
          type: string
          description: Reason for closing the ledger
    LedgerResponse:
      type: object
      properties:
        ledger:
          type: object
          properties:
            id:
              type: string
              format: uuid
            code:
              type: string
            description:
              type: string
            type:
              type: string
              enum:
                - asset
                - liability
                - equity
                - income
                - expense
            currency_id:
              type: string
              format: uuid
            currency_code:
              type: string
            balance_current:
              type: integer
              description: Amount in cents
            balance_available:
              type: integer
              description: Amount in cents
            overdraft_enabled:
              type: boolean
            overdraft_limit:
              type: integer
              description: Amount in cents
            last_activity_date:
              type: string
              format: date-time
            opening_date:
              type: string
              format: date-time
            closing_date:
              type: string
              format: date-time
              nullable: true
            parent_ledger_id:
              type: string
              format: uuid
              nullable: true
            child_ledger_ids:
              type: array
              items:
                type: string
                format: uuid
            created_at:
              type: string
              format: date-time
            created_by:
              type: string
              format: uuid
            modified_at:
              type: string
              format: date-time
            modified_by:
              type: string
              format: uuid
            active:
              type: boolean
            metadata:
              type: object
              nullable: true
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````