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?
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
Primary or secondary subscription key of your app How to find?
Quick Tips
It is possible to query either accountingEntry or directly from accountingEntryLines.
Querying accountingEntry 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.
accountingEntries
Fields
Type
Description
Length
id
UUID
Id
creationDateSSystem field that cannot be assigned
DateTime
Creation Date
modificationDateSSystem field that cannot be assigned
DateTime
Modification Date
sourceType SSystem field that cannot be assigned
SALES
ACCOUNTING
BANKING
IMPORT_FILES
YEAR_END_PROCESS
PUBLIC_API
AP_AUTOMATION
YEAR_END_PROCESS_PREVIEW
SCHEDULER_SERVICE
indicates the origin of the accounting entrySee InfoAdditional information is available in the Info block below
date
Datetime DateThe GraphQL field type is DateTime, but only the date value is considered, the time value is ignored if provided.
Date
documentDate
Datetime DateThe GraphQL field type is DateTime, but only the date value is considered, the time value is ignored if provided.
Document Date
accountingExerciseDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
sessionDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
Session
Fields of Session See InfoAdditional information is available in the Info block below
sessionIdDIn creation, this field can have a default value automatically calculated
UUID
Session id See InfoAdditional information is available in the Info block below
currenciesDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.NEWNew Feature Recently Added. (Introduced in the last version as well as in the previous version)
Currency
Fields of Currency
currencyIdDIn creation, this field can have a default value automatically calculatedNEWNew Feature Recently Added. (Introduced in the last version as well as in the previous version)
UUID
Currency ID
entryType
UNDEFINED
OPENING
GENERAL
CLOSURE_ACCOUNTING
CLOSURE_WORTH
CLOSURE_EXERCISE
TEMPORARY_CARRY_FORWARD
Type of entry
number
Decimal
Number See InfoAdditional information is available in the Info block below
documentNumber
String
Document number or reference of the entrySee InfoAdditional information is available in the Info block below
50
tanNumber NEWNew Feature Recently Added. (Introduced in the last version as well as in the previous version)
Decimal
Counter that automatically increases by 1 (DE Only)
description
String
Description See InfoAdditional information is available in the Info block below
200
closeDate InvThis field is not visible in the product interface
Datetime DateThe GraphQL field type is DateTime, but only the date value is considered, the time value is ignored if provided.
closing date of entry
isClosed
Boolean
True if closed
isCashVat NEWNew Feature Recently Added. (Introduced in the last version as well as in the previous version)
List of all lines of entry See InfoAdditional information is available in the Info block below
salesInvoiceDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
salesInvoice
Sales Invoice Header Fields See InfoAdditional information is available in the Info block below
sourceEntityId
UUID
If provided, see sourceType to identify the entity See InfoAdditional information is available in the Info block below
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.
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.
accountingEntries/accountingEntryLines or 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
idSSystem field that cannot be assigned
UUID
Id
creationDateSSystem field that cannot be assigned
DateTime
Creation Date
modificationDateSSystem field that cannot be assigned
Date
Modification Date
accountingEntries Parent Information
accountingEntries DATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
accountingEntry
Fields of the parent accountingEntries
36
accountingEntryId
UUID
accountingEntry ID
subAccountDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
creationDate SSystem field that cannot be assigned
DateTime
Creation Date
modificationDate SSystem field that cannot be assigned
DateTime
Modification Date
matching
PARTIAL_MATCH
FULL_MATCH
Status matching See InfoAdditional information is available in the Info block below
matchingLetter
String
Letter matching See InfoAdditional information is available in the Info block below
5
Info
Information available only in reading mode concerning the lettering of the line.
matching: Indicates if the line corresponds to a complete or partial lettering. Can take the values FULL_MATCH for a complete lettering, PARTIAL_MATCH for a partial lettering.
matchingLetter: letter A, B, C … for a complete lettering, letter a, b, c … for a partial lettering.
Corrective invoices (Only for Spanish legislation) COMING SOON This feature is currently in development and will be available in the next version. It’s already documented to keep you informed about its upcoming availability
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.
Fields
Type
Description
creditNoteType
UNDEFINED
SUBSTITUTIVE
BY_DIFFERENCES
Specifies the category of the corrective invoice according to Spanish VAT regulations. See InfoAdditional information is available in the Info block below
creditNoteReason
UNDEFINED
R1
R2
R3
R4
R5
Specifies the reason for issuing the corrective invoice. See InfoAdditional information is available in the Info block below
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 DATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.
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).
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.
Fields
Type
Description
idSSystem field that cannot be assigned
UUID
Id
creationDate SSystem field that cannot be assigned
DateTime
Creation Date
modificationDate SSystem field that cannot be assigned
DateTime
Modification Date
amount
Decimal
Total amount of the item See InfoAdditional information is available in the Info block below
paidAmountAccumulated
Decimal
Accumulated amount that has been paid See InfoAdditional information is available in the Info block below
dueDate
DateTime
Due date for the payment See InfoAdditional information is available in the Info block below
status
NOT_SPECIFIED
COLLECTED
PAID
PARTIAL
Status of the payment See InfoAdditional information is available in the Info block below
paymentMeanDATALOADERUtilize the DATALOADER feature to enrich your query by adding additional resource fields directly in the query.