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

# Create journal entry

> Creates a manual entry within a business's general ledger.



## OpenAPI

````yaml post /v1/businesses/{businessId}/ledger/journal-entries
openapi: 3.0.1
info:
  title: API
  version: latest
servers: []
security:
  - BearerAuth: []
tags: []
externalDocs:
  url: /
paths:
  /v1/businesses/{businessId}/ledger/journal-entries:
    post:
      tags: []
      summary: Create journal entry
      description: Creates a manual entry within a business's general ledger.
      operationId: business.ledger.journal-entries.post
      parameters:
        - name: businessId
          in: path
          description: The UUID of the business to create the journal entry for.
          required: true
          schema:
            type: string
        - name: Content-Type
          in: header
          description: Content-Type must be set to application/json.
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateManualLedgerEntry'
            example:
              external_id: example-external-id
              entry_at: '2023-11-07T05:31:56Z'
              created_by: jsmith
              memo: Example debit/credit entry
              line_items:
                - account_identifier:
                    type: AccountId
                    id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                  amount: 123
                  direction: CREDIT
                  customer_id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
                  customer_external_id: null
                  tags:
                    - key: Location
                      value: MainStreet
                - account_identifier:
                    type: AccountId
                    id: db7fb036-5691-4354-a057-cba1836c042a
                  amount: 123
                  direction: DEBIT
                  customer_id: null
                  customer_external_id: null
                  tags: []
              customer_id: 3c90c3cc-0d44-4b50-8888-8dd25736052a
              customer_external_id: customer-1
              tags:
                - key: Location
                  value: MainStreet
      responses:
        '200':
          description: ''
          headers: {}
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/ApiManualLedgerEntry'
                required:
                  - data
        '400':
          description: Invalid journal entry creation parameters.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
        '404':
          description: >-
            Business id is not found. This indicates the business id is invalid
            or the business has been archived.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ApiError'
      deprecated: false
components:
  schemas:
    CreateManualLedgerEntry:
      type: object
      properties:
        external_id:
          type: string
          description: Unique ID of the ledger entry in your system. **Idempotency key.**.
        entry_at:
          type: string
          format: date-time
          description: >-
            The date and time when the entry should be recorded effective in the
            ledger, in ISO 8601 format.
        created_by:
          type: string
          description: Identifier of the user or system that created the manual entry.
        memo:
          type: string
          description: Description or memo of the manual entry.
        line_items:
          type: array
          items:
            $ref: '#/components/schemas/CreateLedgerEntryLineItem'
        customer_id:
          description: >-
            Layer customer ID to associate with the ledger entry. Customer IDs
            can be specified on the entry or on individual line items, but not
            both.
          type: string
          format: uuid
        customer_external_id:
          description: >-
            External ID of the Layer customer to associate with the ledger
            entry. Can be specified in place of the Layer customer ID. Customer
            IDs can be specified on the entry or on individual line items, but
            not both.
          type: string
          example: customer-1
        vendor_id:
          description: >-
            Layer vendor ID to associate with the ledger entry. Vendor IDs can
            be specified on the entry or on individual line items, but not both.
          type: string
          format: uuid
        vendor_external_id:
          description: >-
            External ID of the Layer vendor to associate with the ledger entry.
            Can be specified in place of the Layer vendor ID. Vendor IDs can be
            specified on the entry or on individual line items, but not both.
          type: string
          example: vendor-1
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagKeyValue'
      required:
        - entry_at
        - created_by
        - memo
        - line_items
    ApiManualLedgerEntry:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `Api_Manual_Ledger_Entry`.
          example: Api_Manual_Ledger_Entry
        id:
          type: string
          format: uuid
          description: Universally unique identifier of the manual ledger entry.
        created_by:
          type: string
          description: Name of the user who created the manual ledger entry.
        memo:
          type: string
          description: Memo or description for the manual ledger entry.
        entry_id:
          type: string
          description: ID of the associated ledger entry.
        customer:
          $ref: '#/components/schemas/ApiCustomerData'
        vendor:
          $ref: '#/components/schemas/ApiVendorData'
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
    ApiError:
      type: object
      description: An error object returned in API error responses.
      properties:
        type:
          $ref: '#/components/schemas/ApiErrorType'
          description: >-
            A fixed category for the error, helpful for categorizing and
            processing errors.
        description:
          type: string
          description: A human-readable error description.
        error_enum:
          $ref: '#/components/schemas/ApiEnumErrorType'
          description: >-
            A stable, machine-readable identifier for programmatically handling
            specific error conditions. Only present for 4xx client errors—not
            included for 5xx server errors. Use this instead of parsing the
            description field, as enum values remain stable across API versions.
          nullable: true
        meta:
          type: object
          description: Optional additional information about the error.
          nullable: true
      required:
        - type
        - description
    CreateLedgerEntryLineItem:
      type: object
      properties:
        account_identifier:
          $ref: '#/components/schemas/AccountIdentifier'
        amount:
          type: integer
          format: int64
        direction:
          $ref: '#/components/schemas/BankTransactionDirection'
        customer_id:
          description: >-
            Layer customer ID to associate with the ledger entry. Customer IDs
            can be specified on the entry or on individual line items, but not
            both.
          type: string
          format: uuid
        customer_external_id:
          description: >-
            External ID of the Layer customer to associate with the ledger
            entry. Can be specified in place of the Layer customer ID. Customer
            IDs can be specified on the entry or on individual line items, but
            not both.
          type: string
        tags:
          type: array
          items:
            $ref: '#/components/schemas/TagKeyValue'
    TagKeyValue:
      type: object
      description: >-
        A TagKeyValue holds key=value data related to a tag. This is used when
        creating or updating taggable entities (transactions, invoices, etc.).
      properties:
        key:
          type: string
          description: The tag dimension key (e.g., "department", "project", "location").
          example: department
        dimension_display_name:
          type: string
          nullable: true
          description: >-
            If the TagDimension doesn't exist, providing this value specifies
            the display name upon database insertion. Otherwise, it is left as
            null on the TagDimension.
          example: Department
        value:
          type: string
          description: The tag value (e.g., "sales", "marketing", "engineering").
          example: sales
        value_display_name:
          type: string
          nullable: true
          description: >-
            If the TagValueDefinition doesn't exist, providing this value
            specifies the display name upon database insertion. Otherwise, it is
            left as null on the TagValueDefinition.
          example: Sales Department
      required:
        - key
        - value
    ApiCustomerData:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `CustomerData`.
          example: CustomerData
        id:
          type: string
          format: uuid
          description: Unique identifier for the customer.
        external_id:
          type: string
          description: >-
            Unique ID of the customer in your system for linking purposes.
            **Idempotency key**.
          example: '31415926535'
        individual_name:
          type: string
          nullable: true
          description: >-
            Full name of the individual customer or contact at a corporate
            customer.
        company_name:
          type: string
          nullable: true
          description: Name of the company customer.
        email:
          type: string
          nullable: true
          description: Email address of the customer.
        mobile_phone:
          type: string
          nullable: true
          description: Mobile phone number of the customer.
        office_phone:
          type: string
          nullable: true
          description: Office phone number of the customer.
        address_string:
          type: string
          nullable: true
          description: Address of the customer.
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the customer (for
            example, to display to end users).
        status:
          type: string
          description: 'Status of the customer. Possible values: `ACTIVE`, `ARCHIVED`.'
          example: ACTIVE
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
    ApiVendorData:
      type: object
      properties:
        type:
          type: string
          description: Resource type. Value will be `VendorData`.
          example: VendorData
        id:
          type: string
          format: uuid
          description: Unique identifier for the vendor.
        external_id:
          type: string
          description: >-
            Unique ID of the vendor in your system for linking purposes.
            **Idempotency key**.
        individual_name:
          type: string
          nullable: true
          description: Full name of the individual vendor or contact at a corporate vendor.
        company_name:
          type: string
          nullable: true
          description: Name of the company vendor.
        email:
          type: string
          nullable: true
          description: Email address of the vendor.
        mobile_phone:
          type: string
          nullable: true
          description: Mobile phone number of the vendor.
        office_phone:
          type: string
          nullable: true
          description: Office phone number of the vendor.
        address_string:
          type: string
          nullable: true
          description: Address of the vendor.
        memo:
          type: string
          nullable: true
          description: >-
            Memo for any text you would like to associate with the vendor (for
            example, to display to end users).
        status:
          type: string
          enum:
            - ACTIVE
            - ARCHIVED
          description: Status of the vendor.
          example: ACTIVE
        transaction_tags:
          type: array
          items:
            $ref: '#/components/schemas/ApiTag'
    ApiTag:
      type: object
      properties:
        id:
          type: string
          format: uuid
          description: ID for the tag.
        key:
          type: string
          description: Key for the tag.
          example: ExampleTagKey
        dimension_display_name:
          type: string
          nullable: true
          description: Display name for the tag dimension.
        value:
          type: string
          description: Value for the tag.
          example: ExampleTagValue
        value_display_name:
          type: string
          nullable: true
          description: Display name for the tag value definition.
        dimension_id:
          type: string
          format: uuid
          description: ID of the tag dimension this tag belongs to.
        definition_id:
          type: string
          format: uuid
          description: ID of the tag value definition.
        archived_at:
          type: string
          format: date-time
          nullable: true
          description: When the tag was archived.
      required:
        - id
        - key
        - value
        - dimension_id
        - definition_id
    ApiErrorType:
      type: string
      enum:
        - ResourceArchived
        - AuthFailure
        - Plaid
        - Stripe
        - InvalidState
        - ResourceNotFound
        - InvalidParameters
        - JsonSerialization
        - Unknown
        - BadRequest
        - PaginationCursor
        - Conflict
        - LedgerOperationFailed
      example: InvalidParameters
    ApiEnumErrorType:
      type: string
      description: >-
        Stable enum values for programmatic error handling. Only present in 4xx
        error responses.
      enum:
        - AccessCodeInvalid
        - BalanceSheetDoesNotBalance
        - BalanceSheetMissingAccount
        - BankStatementAccountDetectionError
        - BankStatementParsingError
        - BankStatementParserError
        - BankStatementValidationError
        - BillStateError
        - BulkCategorizeFailure
        - BulkMatchFailure
        - BusinessTaskAlreadyCompleted
        - BusinessTaskDeleted
        - CalendlyOAuthError
        - CallBookingError
        - CantUpdateTransactionInCustomerPayout
        - CantUpdateTransactionInVendorPayout
        - CheckPayrollConfigNotFound
        - CheckPayrollServiceNotFound
        - ClerkUserAlreadyExists
        - ConflictingQueryParams
        - CustomAccountAlreadyExists
        - CustomTransactionCsvParsingError
        - CustomTransactionUploadFailure
        - CustomerPayoutInputFormatError
        - DoesNotMatchExistingEntity
        - EmptyBatchRequest
        - ExpenseParserError
        - ExternalAccountBalanceReconciliationError
        - ExternalIdConflict
        - InvalidCategory
        - InvalidEffectiveDate
        - InvalidLedgerOperation
        - InvalidMonthlyAverageRange
        - InvalidMultiPartRequest
        - InvalidPaginationCursor
        - InvalidPayload
        - InvoiceDeleted
        - InvoiceNotFound
        - InvoiceReferenceMismatch
        - InvoiceStateError
        - ManualRateLimit
        - MultipleTagKeyFiltersUnsupported
        - NoCognitoUserFound
        - NoOpeningBalanceFound
        - NotYetReconciled
        - OnePasswordApiError
        - OnePasswordItemNotFound
        - OnePasswordVaultNotFound
        - OpenAICategorizationError
        - PaymentLinkInvalid
        - PayrollStateError
        - PeriodIsClosed
        - PeriodNotClosed
        - PhoneNumberAlreadyRegistered
        - PlaidApiError
        - PlaidConnectionBroken
        - PlaidCreateLinkTokenError
        - PlaidCredentialsNotConfigured
        - PlaidExchangePublicTokenError
        - PlaidGetInstitutionByIdError
        - PlaidGetItemError
        - PlaidInvalidEnvironment
        - PlaidItemAlreadyExists
        - PlaidItemNotFound
        - PlaidProcessorApiError
        - PlaidStatementsAccessNotEnabled
        - PlaidStatementsNotEnabled
        - PlaidStatementsNotSupported
        - PlaidUnlinkItemError
        - QueryParamFormat
        - QueryParamMissing
        - QuickbooksBrokenConnection
        - QuickbooksConnectionAlreadyExists
        - QuickbooksConnectionAlreadySyncing
        - QuickbooksConnectionMissing
        - QuickbooksConnectionNotActivated
        - QuickbooksInvalidRequest
        - QuickbooksInvalidState
        - QuickbooksNoMatchingAccount
        - QuickbooksNonPostingAccountType
        - QuickbooksNotConfigured
        - QuickbooksOAuthCallbackInvalid
        - QuickbooksOAuthError
        - QuickbooksTokenExpired
        - ReadOnlyBusiness
        - ResourceArchived
        - ScheduleCNotConfigured
        - SmsNotEnabled
        - SpecifiedBadRequest
        - SpecifiedIdNotFound
        - SplitTransactionError
        - StepEvaluationBadRequest
        - StripeConnectAccountIdNotFound
        - StripeCredentialsNotConfigured
        - StripeGetBalanceForConnectAccountFailure
        - StripeRedirectOrRefreshUrlNotConfigured
        - TagFilterNotFound
        - UnexpectedQueryParam
        - UnitAccountsInUse
        - WrongAnswerType
      example: InvalidPayload
    AccountIdentifier:
      oneOf:
        - $ref: '#/components/schemas/AccountId'
          description: ID of the account.
          title: Account ID
        - $ref: '#/components/schemas/AccountStableName'
          description: Stable name associated with the account.
          title: Account Stable Name
    BankTransactionDirection:
      type: string
      enum:
        - CREDIT
        - DEBIT
      example: DEBIT
    AccountId:
      type: object
      required:
        - type
        - id
      properties:
        type:
          type: string
          enum:
            - AccountId
          description: Resource type. Value will be `AccountId`.
          example: AccountId
        id:
          type: string
          format: uuid
          description: ID of the account.
    AccountStableName:
      type: object
      required:
        - type
        - stable_name
      properties:
        type:
          type: string
          enum:
            - StableName
          description: Resource type. Value will be `StableName`.
          example: StableName
        stable_name:
          type: string
          example: CURRENT_ASSETS
          description: Stable name of the account.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT

````

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