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

# Post Journal Entry



## OpenAPI

````yaml /api/openapi-finindex.json post /api/v1/gl/journal-entries
openapi: 3.1.0
info:
  title: Finindex API — ERP · Finance · Accounting
  version: 0.1.0
servers:
  - url: https://vinmake-erp.onrender.com
security: []
paths:
  /api/v1/gl/journal-entries:
    post:
      tags:
        - GL
      summary: Post Journal Entry
      operationId: post_journal_entry_api_v1_gl_journal_entries_post
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/JournalEntryPost'
      responses:
        '201':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/JournalEntryResponse'
        '401':
          description: Unauthorized
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - OAuth2PasswordBearer: []
components:
  schemas:
    JournalEntryPost:
      properties:
        sourceType:
          type: string
          title: Sourcetype
        sourceId:
          type: string
          title: Sourceid
        entryDate:
          type: string
          format: date
          title: Entrydate
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        entrySet:
          anyOf:
            - type: string
            - type: 'null'
          title: Entryset
          default: primary
        lines:
          items:
            $ref: '#/components/schemas/JournalEntryPostLine'
          type: array
          title: Lines
      type: object
      required:
        - sourceType
        - sourceId
        - entryDate
        - lines
      title: JournalEntryPost
      description: >-
        Request to post a balanced journal entry through
        LedgerService.post_entry().
    JournalEntryResponse:
      properties:
        id:
          type: string
          title: Id
        orgId:
          type: string
          title: Orgid
        entryNumber:
          anyOf:
            - type: string
            - type: 'null'
          title: Entrynumber
        entryDate:
          type: string
          format: date
          title: Entrydate
        periodId:
          anyOf:
            - type: string
            - type: 'null'
          title: Periodid
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        sourceType:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourcetype
        sourceId:
          anyOf:
            - type: string
            - type: 'null'
          title: Sourceid
        entrySet:
          type: string
          title: Entryset
        status:
          type: string
          enum:
            - Draft
            - Posted
            - Voided
          title: Status
        reversalOfEntryId:
          anyOf:
            - type: string
            - type: 'null'
          title: Reversalofentryid
        postedBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Postedby
        postedAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Postedat
        createdAt:
          anyOf:
            - type: string
              format: date-time
            - type: 'null'
          title: Createdat
        createdBy:
          anyOf:
            - type: string
            - type: 'null'
          title: Createdby
        lines:
          anyOf:
            - items:
                $ref: '#/components/schemas/JournalEntryLineResponse'
              type: array
            - type: 'null'
          title: Lines
      type: object
      required:
        - id
        - orgId
        - entryDate
        - entrySet
        - status
      title: JournalEntryResponse
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    JournalEntryPostLine:
      properties:
        accountId:
          type: string
          title: Accountid
        debitAmount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Debitamount
          default: '0'
        creditAmount:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Creditamount
          default: '0'
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        currency:
          anyOf:
            - type: string
            - type: 'null'
          title: Currency
        exchangeRate:
          anyOf:
            - type: number
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Exchangerate
      type: object
      required:
        - accountId
      title: JournalEntryPostLine
    JournalEntryLineResponse:
      properties:
        id:
          type: string
          title: Id
        entryId:
          type: string
          title: Entryid
        accountId:
          type: string
          title: Accountid
        debitAmount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Debitamount
        creditAmount:
          type: string
          pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
          title: Creditamount
        currency:
          type: string
          title: Currency
        exchangeRate:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Exchangerate
        debitBase:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Debitbase
        creditBase:
          anyOf:
            - type: string
              pattern: ^(?!^[-+.]*$)[+-]?0*\d*\.?\d*$
            - type: 'null'
          title: Creditbase
        description:
          anyOf:
            - type: string
            - type: 'null'
          title: Description
        lineOrder:
          anyOf:
            - type: integer
            - type: 'null'
          title: Lineorder
        isReconciled:
          type: boolean
          title: Isreconciled
        tags:
          anyOf:
            - additionalProperties: true
              type: object
            - type: 'null'
          title: Tags
        glChecksum:
          anyOf:
            - type: string
            - type: 'null'
          title: Glchecksum
        prevChecksum:
          anyOf:
            - type: string
            - type: 'null'
          title: Prevchecksum
      type: object
      required:
        - id
        - entryId
        - accountId
        - debitAmount
        - creditAmount
        - currency
        - isReconciled
      title: JournalEntryLineResponse
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    OAuth2PasswordBearer:
      type: oauth2
      flows:
        password:
          scopes: {}
          tokenUrl: /auth/login

````