Light APIv1.0.0

API / Reference / Journal Entries

Create journal entry

POST https://api.light.inc/v1/journal-entries

Creates a new journal entry

Authorization

Send one of these on every request. See Authentication for how to get credentials.

  • API key

    Basic authentication header of the form Basic <api_key>, where <api_key> is your api key.

  • Bearer token

Headers

  • X-Idempotency-Key string

Request body

application/json;charset=UTF-8

  • companyEntityId string · uuid

  • ledgerName string

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of PRIMARY ELIMINATION

  • documentNumber string

  • description string

  • currency string

  • postingDate string · date

  • valuationDate string · date

  • localCurrencyFxRateOverride number

    Custom foreign exchange rate for the ledger's local currency. If not provided, Light uses official ECB rates

  • groupCurrencyFxRateOverride number

    Custom foreign exchange rate for the ledger's group currency. If not provided, Light uses official ECB rates

  • documentDate string · date

  • areLinesWithTax boolean

  • lines array of object

    • netTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • grossTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • taxAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • description string

    • targetCompanyEntityId string · uuid

    • ledgerTaxId string · uuid

    • ledgerAccountId string · uuid

    • costCenterId string · uuid

    • amortizationTemplateId string · uuid

    • amortizationStartDate string · date

    • amortizationEndDate string · date

    • customProperties array of object

      • groupId string · uuid

        ID of the custom property group.

      • valueIds array of string · uuid

        IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.

      • inlineValues array of string

        Inline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.

  • businessPartnerName string

  • businessPartnerId string · uuid

  • shouldPost boolean

  • customProperties array of object

    • groupId string · uuid

      ID of the custom property group.

    • valueIds array of string · uuid

      IDs of the selected custom property values. It behaves as a PUT operation, so if empty the existing ones will be effectively deleted.

    • inlineValues array of string

      Inline custom property values (used for TEXT/NUMERIC/DATE/etc. groups). It behaves as a PUT operation, so if empty or null the existing ones will be effectively deleted.

Response

  • id string · uuid

  • companyId string · uuid

  • documentNumber string

  • companyEntityId string · uuid

  • ledgerName string

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of PRIMARY ELIMINATION

  • createdBy string · uuid

  • updatedBy string · uuid

  • documentSequenceId string

  • status string

    ⚠️ This enum is not exhaustive; new values may be added in the future.

    One of DRAFT APPROVAL_PENDING APPROVED POSTED PARTIALLY_CLEARED CLEARED ARCHIVED

  • description string

  • currency string

  • postingDate string · date

  • documentDate string · date

  • valuationDate string · date

  • localCurrencyFxRate number

    Custom foreign exchange rate for the ledger's local currency. If not provided, Light uses official ECB rates

  • groupCurrencyFxRate number

    Custom foreign exchange rate for the ledger's group currency. If not provided, Light uses official ECB rates

  • areLinesWithTax boolean

  • failureContext object

    Failure context when vendor onboarding fails.

    • name string

      The error name

    • type string

      The error type

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of BAD_REQUEST UNAUTHORIZED FORBIDDEN NOT_FOUND CONFLICT UNPROCESSABLE_CONTENT

    • errors array of object

      List of errors providing details about what went wrong

      • type string

        A string code identifying the error type

      • message string

        A human-readable message providing more details about the error

      • path array of string

        Optional path of the error when the error is for a specific field. Used mostly on BAD_REQUEST errors, that path will match the field name on the request object

      • context object

        Optional context providing additional information about the error. This can include any relevant data that might help in understanding or resolving the error

  • lines array of object

    • id string · uuid

    • journalEntryId string · uuid

    • netTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • grossTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • taxTransactionAmount object

      • amount integer · int64

      • dcSign string

        ⚠️ This enum is not exhaustive; new values may be added in the future.

        One of D C

    • description string

    • targetCompanyEntityId string · uuid

    • ledgerTaxId string · uuid

    • ledgerAccountId string · uuid

    • costCenterId string · uuid

    • customProperties array of object

      • groupId string · uuid

        ID of the custom property group

      • groupInternalName string

        Internal name of the custom property group

      • values array of object

        List of values. Note that this will be a single value unless the group input type supports multiple values

        • id string · uuid

          Unique identifier for the object

        • groupId string · uuid

          ID of the custom property group

        • groupInternalName string

          Internal name of the custom property group

        • companyId string · uuid

          ID of the company

        • internalName string

          Internal name of the custom property value

        • label string

          Label of the custom property value

        • context string

          Context/description of the custom property value

        • createdAt string · date-time

          Timestamp when the custom property value was created

        • updatedAt string · date-time

          Timestamp when the custom property value was last updated

    • createdAt string · date-time

    • updatedAt string · date-time

    • amortizationTemplateId string · uuid

    • amortizationStartDate string · date

    • amortizationEndDate string · date

  • customProperties array of object

    • groupId string · uuid

      ID of the custom property group

    • groupInternalName string

      Internal name of the custom property group

    • values array of object

      List of values. Note that this will be a single value unless the group input type supports multiple values

      • id string · uuid

        Unique identifier for the object

      • groupId string · uuid

        ID of the custom property group

      • groupInternalName string

        Internal name of the custom property group

      • companyId string · uuid

        ID of the company

      • internalName string

        Internal name of the custom property value

      • label string

        Label of the custom property value

      • context string

        Context/description of the custom property value

      • createdAt string · date-time

        Timestamp when the custom property value was created

      • updatedAt string · date-time

        Timestamp when the custom property value was last updated

  • businessPartnerName string

  • businessPartnerId string · uuid

  • createdAt string · date-time

  • updatedAt string · date-time

  • totalNetTransactionAmount object

    • amount integer · int64

    • dcSign string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of D C

  • totalTaxTransactionAmount object

    • amount integer · int64

    • dcSign string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of D C

  • totalGrossTransactionAmount object

    • amount integer · int64

    • dcSign string

      ⚠️ This enum is not exhaustive; new values may be added in the future.

      One of D C

  • multiJournalEntryId string · uuid