Note

There are several methods available for creating accounting entries.

This page provides information about the general structure of an accounting entry as returned in a query.
For the creation process, please refer to How to create?

HTTP Operation Type Object DTO Why-DTOs?
Mutation Why 200? How to create?  
Mutation Why 200? deleteAccountingEntry AccountingEntryDeleteGLDtoInput
Query accountingEntries filtered by id Why?  
Query accountingEntries  
Query accountingEntryLines  

Description

Accounting entries, known as AccountingEntry in the API context and Journal entries in the product interface, in the context of financial management and record-keeping, refer to the detailed transactions that accurately record the movement of funds, assets, liabilities, and equity within an organization.

  • These entries serve as crucial components of a company’s financial records, capturing various financial activities such as revenue generation, expense allocation, and asset acquisitions.
  • Accounting entries are categorized and organized into journals based on their specific characteristics, and these characteristics are determined by the associated journal.
  • It’s important to note that an accounting entry must be balanced, ensuring that debits equal credits.
  • This means that accounting entries are complete accounting documents rather than individual lines of entries

img

Key Value
Authorization Bearer Current access Token How to find?
X-TenantId Current tenant id How to find?
X-OrganizationId Current organization Id How to find?
x-api-key Primary or secondary subscription key of your app How to find?
Quick Tips

It is possible to query either accountingEntry, accountingEntryLines, accountingEntryPayment, or directly from accountingEntryDimensionTags.

  • Querying accountingEntries allows you to retrieve entire entries with all their associated line items.
    This is useful when you need the complete context of an entry, including all details of the related lines.
  • Querying accountingEntryLines directly is beneficial when you want to filter or aggregate specific line item data across multiple entries.
  • Querying accountingEntryPayment directly gives you access to payment reconciliation information.
    In this case, the accountingEntryLine dataloader can be used to retrieve details of the corresponding entry line.
  • Querying accountingEntryDimensionTags gives you access to analytic allocations applied to each entry line. You can use the accountingEntryLine dataloader to retrieve the related line for each analytic tag.

accountingEntries

Fields Type Description Length
id UUID Id  
creationDate DateTime Creation Date  
modificationDate DateTime Modification Date  
sourceType
  • SALES
  • ACCOUNTING
  • BANKING
  • IMPORT_FILES
  • YEAR_END_PROCESS
  • PUBLIC_API
  • AP_AUTOMATION
  • YEAR_END_PROCESS_PREVIEW
  • SCHEDULER_SERVICE
  • SAGE_FR_PAYROLL_CLOUD
  • SAGE_DE_PAYROLL_CLOUD
indicates the origin of the accounting entry  
       
date Datetime Date  
documentDate Datetime Document Date  
accountingExercise AccountingExercise Fields of AccountingExercise  
accountingExerciseId UUID Id of AccountingExercise  
accountingPeriod AccountingPeriod Fields of AccountingPeriod  
accountingPeriodId UUID Id of AccountingPeriod  
journalType JournalType Fields of JournalType  
journalTypeId UUID JournalType Id  
session Session Fields of Session  
sessionId UUID Session id  
currency Currency Fields of Currency  
currencyId UUID Currency ID  
       
entryType
  • UNDEFINED
  • OPENING
  • GENERAL
  • CLOSURE_ACCOUNTING
  • CLOSURE_WORTH
  • CLOSURE_EXERCISE
  • TEMPORARY_CARRY_FORWARD
Type of entry  
number Int Number  
documentNumber String Document number or reference of the entry 50
tanNumber Int Counter that automatically increases by 1 (DE Only)  
description String Description 200
closeDate Datetime closing date of entry  
isClosed Boolean True if closed  
accountingEntryLines[] Array List of all lines of entry  
       
salesInvoice salesInvoice Sales Invoice Header Fields  
sourceEntityId UUID If provided, see sourceType to identify the entity  
Info
  • sourceType : Indicates the origin of the accounting entry, detailing how it was generated.
    Each source type corresponds to a specific method or area within the business operations that has contributed to the accounting record.
  • number : operational Number Counter Id
  • documentNumber : The reference number of the document. Mandatory in legislation DE. For purchases or sales, it can be filled with the invoice number.
  • description : optional value, used as template for lines from the interface to assign default value to lines.
  • accountingEntryLines : List of lines in the accounting entry, the accounting entry must be balanced, the total of the lines with a debit must be equal to the total of the lines with a credit. Adding an unbalanced entry will return an error.
  • sourceEntityId : ID of a sales invoice, purchase invoice, collected payment, or issued payment, this value can be null.
    If this value is provided, refer to the sourceType to determine the associated entity.
    Note that salesInvoiceId holds the same value as sourceEntityId when sourceType=SALES
  • salesInvoice: Only invoice header fields are available. To obtain other information (such as lines, addresses, etc.), use the salesInvoice operation directly.

    This dataloader salesInvoice is only relevant when the accounting entry was generated from a posted invoice created in the Sales module.
    If the accounting entry was recorded directly in Accounting, this dataloader will not contain any information.

  • sessionId and session:
    A session adds identifiable information to journal entries.

    Unused (For Germany only).

    Unused (For Germany only).

    • sessionId: the session identifier, this value is mandatory.
    • session allows retrieving:
      • id: the session identifier, which can be retrieved here or via sessionId.
      • name: the session name (e.g., Automatisch erstellt)
      • stamp: the session name and timestamp (e.g., Automatisch erstellt 12.06.2024 10:20:04)
      • deactivated: the session status. When true, the session cannot be used for a new accounting entry.

    img


accountingEntries/accountingEntryLines accountingEntryLines

If the query targets accountingEntries, then use accountingEntries/accountingEntrylines to get the details of the lines.
If the query targets accountingEntryLines, access the following fields directly, including the option to retrieve information on the parent accountingEntries.

Fields Type Description Length
id UUID Id  
creationDate DateTime Creation Date  
modificationDate Date Modification Date  
       
accountingEntries Parent Information      
accountingEntry accountingEntry Fields of the parent accountingEntries 36
accountingEntryId UUID accountingEntry ID  
       
subAccount AccountingAccount Fields of AccountingAccount  
subAccountId UUID Id of accountingAccount  
order Int Classification of lines from 0 to n  
documentNumber String Document number or reference of the entry 50
contraAccount String Contra Account 113
description String Description 200
debitAmount Decimal Amount debit  
creditAmount Decimal Amount credit  
accountingEntryThirdParty ObjectType ThirdParty  
accountingEntryPayment ObjectType Matching  
accountingEntryDimensionTags[] Array Analytics allocation of dimensions and tags  
accountingEntryInvoice ObjectType Invoice  
Info
  • accountingEntryThirdParty :Lines with a third party CUSTOMER, SUPPLIER, EMPLOYEE.
  • accountingEntryInvoice : Lines with a third party CUSTOMER, SUPPLIER for journal types PURCHASE_INVOICE or SALES_INVOICE.
  • contraAccount : Lines with a general offset account.

    Unused (For Germany only).

    Unused (For Germany only).

    Used only for Germany.


accountingEntries/accountingEntryLines/accountingEntryThirdParty

Fields Type Description Length
id UUID Id  
creationDate DateTime Creation Date  
modificationDate DateTime Modification Date  
       
thirdPartyId UUID Third Id  
socialName String Third Name 70
code String Code 17
origin
  • CUSTOMER
  • SUPPLIER
  • EMPLOYEE
Type of third  
identificationTypeId UUID DocumentType Id  
documentId String Document Id 25
vatNumber String vat Number 25
countryAcronym String Country Acronym 2
viesCode String VIES value prefix of the European Community VAT numbers  
Info
  • thirdPartyId : Third party id :
    • If journal type equal to PURCHASE_INVOICE the third party is a Supplier.
    • If journal type equal to SALES_INVOICE the third party is a Customer.
    • In the other cases, the third party can be a Supplier, Customer or Employee.
  • socialName : Found in the third party as socialName for customer & supplier and name for employee.
  • code : Found in the third party as code.
  • identificationTypeId : Found in the third party as documentTypeId.
  • documentId : Found in the third party as documentId.
  • vatNumber : Found in the third party as vatNumber.


accountingEntries/accountingEntryLines/accountingEntryPayment
accountingEntryPayment

Fields Type Description
id UUID Id
creationDate DateTime Creation Date
modificationDate DateTime Modification Date
     
accountingEntry Line Parent Information    
accountingEntryLine AccountingEntryLine Fields of AccountingEntryLine
accountingEntryLineId UUID Id of the accounting entry line
     
matching
  • PARTIAL_MATCH
  • FULL_MATCH
Status matching
matchingLetter String Letter matching
matchId UUID Id of the match
Info
  • matching: Indicates how the entry line has been matched.
    PARTIAL_MATCH means the entry is partially reconciled, while FULL_MATCH indicates a complete reconciliation.
  • matchingLetter: Used to group matched entries under a common letter.
    Lowercase letters are used for partial matches (a, b, c …), uppercase letters for full matches (A, B, C …)
  • matchId: Technical grouping key.
    All lines that are matched together share the same matchId, regardless of the matching letter used. This avoids ambiguity when letters are reused.


accountingEntries/accountingEntryLines/accountingEntryDimensionTags accountingEntryDimensionTags

An analytic dimension represents a customizable axis used to categorize accounting entry lines for analytical purposes.

  • Typical examples include dimensions such as Warehouse, Department, or Project.

  • Each dimension is configured with a list of tags, which define the allowed values for that dimension.
    For example, the Warehouse dimension may include tags such as Lyon, Toulouse, and Rouen, each representing a specific location used in allocation.

  • When creating accounting entries, you can allocate each line across one or more analytic dimensions by assigning a specific tag from the list defined for each dimension.

  • You can also configure accounts in the chart of accounts to assign default dimension tags, which will be automatically applied to entry lines using those accounts. See API resources overview / Accounting Accounts

img

Example: Analytic Allocation on Accounting Entry Lines

The list of available dimensions and their tags is defined in your setup:

  • Configured Dimensions
    • Dimension 1: Warehouse
      • Available Tags: Toulouse, Lyon, Rouen
    • Dimension 2: Department
      • Available Tags: Sales, Logistics, R&D

Suppose you allocate an entry line to:

  • WarehouseToulouse
  • DepartmentSales

  • The full amount of the accounting entry line is allocated to both tags.
Fields Type Description
id UUID Id
creationDate DateTime Creation Date
modificationDate DateTime Modification Date
     
accountingEntry Line Parent Information    
accountingEntryLine AccountingEntryLine Fields of AccountingEntryLine
accountingEntryLineId UUID Id of the accounting entry line
     
Dimension and Tag Information    
dimensionId UUID Id of the dimension (e.g. Warehouse)
dimensionTagId UUID Id of the selected tag
     
amount Decimal Allocated amount on this dimension
Warning
  • Analytic dimension and tag information is currently read-only.
    You cannot assign or modify these values through the API at this stage.

  • Dataloaders are not currently available for analytic dimensions and dimensionTags.
    This means that if you need to retrieve additional details (e.g., dimension name for a given dimensionId), you must manually correlate the values using the identifiers (id fields) returned by the API.

Info
  • dimensionId: Refers to the analytic category (e.g. Warehouse, Department, Project).
  • dimensionTagId: Refers to a tag that belongs to the selected dimension.
  • amount: Specifies how much of the accounting entry amount is allocated to this tag.

accountingEntries/accountingEntryLines/accountingEntryInvoice

Fields Type Description Length
id UUID Id  
creationDate DateTime Creation Date  
modificationDate DateTime Modification Date  
       
documentDate Datetime Date of the invoice  
externalInvoiceNumber String Invoice number 50
isCashVat Boolean True if Cash VAT (FR and DE only)  
amount Decimal Amount of the invoice  
openItems[] Array open Items  
accountingEntryTaxes[] Array Tax registers  


Corrective invoices (Only for Spanish legislation)

These fields are only available in Sage Active ES within the context of corrective invoices.

Corrective invoices align with the Spanish VAT regulation (Reglamento de Facturación - Real Decreto 1619/2012), which distinguishes between two types of corrective invoices (facturas rectificativas) based on whether they adjust the original invoice or fully replace it.

img

Fields Type Description
creditNoteType
  • UNDEFINED
  • SUBSTITUTIVE
  • BY_DIFFERENCES
Specifies the category of the corrective invoice according to Spanish VAT regulations.
creditNoteReason
  • UNDEFINED
  • R1
  • R2
  • R3
  • R4
  • R5
Specifies the reason for issuing the corrective invoice.
originalEntryInvoice
TaxesBaseSum
Decimal Total taxable base amount of the original invoice being corrected.
originalEntryInvoice
TaxesSurchargeAmountSum
Decimal Total surcharge amount applied to the original invoice.
originalEntryInvoice
TaxesTaxAmountSum
Decimal Total tax amount of the original invoice being corrected.
     
originalAccountingEntry
Invoice
AccountingEntryInvoice Provides access to the accountingEntryInvoice of the original invoice, notably to retrieve its externalInvoiceNumber and documentDate.
Info
  • creditNoteType
    • ByDifferences“Rectificativa por diferencias”
      • Used when the corrective invoice partially adjusts the original invoice (e.g., correcting price differences or quantity errors).
      • The original invoice remains valid, but its amounts are adjusted.
      • Common cases include VAT miscalculations, incorrect unit prices, or missing line items.
    • Substitutive“Rectificativa sustitutiva”
      • Used when the original invoice is entirely replaced by the corrective invoice.
      • The original invoice is considered null and void, and the new invoice takes its place.
      • Often used when an invoice was issued incorrectly (e.g., wrong client details, incorrect tax rates, or errors affecting the entire invoice).
    • Undefined → No specific classification; used as a fallback when the corrective invoice type is unknown or not applicable.
  • creditNoteReason
    • R1: Return of packaging
      • Used when goods include packaging that is later returned, requiring an invoice adjustment.
    • R2: Bankruptcy proceedings
      • Issued in cases where the debtor enters bankruptcy and VAT correction is needed.
    • R3: Bad debt
      • Used when the original invoice cannot be collected due to non-payment, allowing VAT recovery.
    • R4: Other corrective invoices
      • Covers general corrections not included in other predefined categories.
    • R5: Simplified invoice correction
      • Used when correcting simplified invoices (i.e., receipts instead of full invoices).


accountingEntries/accountingEntryLines/accountingEntryInvoice/openItems

An Open Item is a financial transaction that allows you to know if it has been fully settled or paid.
Each open item includes detailed information such as the total amount, accumulated amount paid, and the payment due date.

For a single invoice, there can be as many open items as there are different payment installments, which is why openItems is structured as an array to accommodate multiple entries per invoice.

The payment status provides insight into the progress of settling each item.
Additionally, the identifier of the payment method used is provided to track the settlement method.

img

Fields Type Description
id UUID Id
creationDate DateTime Creation Date
modificationDate DateTime Modification Date
     
amount Decimal Total amount of the item
paidAmountAccumulated Decimal Accumulated amount that has been paid
dueDate DateTime Due date for the payment
status
  • NOT_SPECIFIED
  • COLLECTED
  • PAID
  • PARTIAL
Status of the payment
paymentMean PaymentMean Fields of PaymentMean
paymentMeanId UUID Identifier of the payment method used
Info
  • amount : Total amount due for the open item.
  • creationDate : Indicates when the item was initially created.
  • modificationDate : Timestamp of the last update to the item, null if no updates have been made.
  • paidAmountAccumulated : Total amount that has been paid towards the item up to the current date.
  • dueDate : Date by which the payment for the item is due.
  • status: Represents the current status of the payment, indicating the extent to which the item has been settled. The possible values are:
    • NOT_SPECIFIED: No specific payment status has been detailed.
    • COLLECTED: Payment has been fully collected from customers.
    • PAID: Payment has been fully made to suppliers.
    • PARTIAL: Payment for the item has been made partially.


accountingEntries/accountingEntryLines/accountingEntryInvoice/accountingEntryTaxes

Fields Type Description
id UUID Id
creationDate DateTime Creation Date
modificationDate DateTime Modification Date
     
taxTreatmentId UUID Id of the tax Treatment
taxGroupId UUID Id of the Taxe Group of tax treatment
taxType
  • NOT_SPECIFIED
  • IVA
  • IGIC
  • IPSI
  • FOREIGN
  • TVA
  • DOM
  • UST
  • IRPF
Tax Type of the tax treatment
taxId UUID Id of the tax
taxPercentage Decimal Percentage of the tax found by groupId=taxGroupId
taxBase Decimal Base of tax calculation
taxAmount Decimal Tax amount
deductible Boolean true for a deductible tax, false for a collected tax
regimeType
  • GENERAL
Always fill in GENERAL
Info