BETA

Note:
There exists a highly simplified method for adding accounting entries, createSimplifiedAccountingEntry, which handles the majority of use cases for adding such entries.
It is recommended to explore the capabilities of createSimplifiedAccountingEntry before attempting to add entries with createAccountingEntry.
The utilization of createAccountingEntry for adding entries may be unnecessary given the effectiveness of the simplified method.

Operation Type Object Dto
Mutation createAccountingEntry AccountingEntryCreateGLDtoInput
Mutation deleteAccountingEntry AccountingEntryDeleteGLDtoInput
Query accountingEntryById AccountingEntryGLDto
Query accountingEntries AccountingEntryGLDto

Description

Accounting entries management

Given the model of the accounting entries and the mandatory object types in the context of purchase or sale journal entries, we absolutely recommend that you start with an example from the postman collection and adapt it rather than starting from scratch.
To see examples of mutations that include the adding of accounting entries :
download the Postman collection: Quick start / 5. Test your first query in Postman

Would you like to see an example of how to add an entry?

This example concerns a sales invoice, to transform it into a purchase invoice, just :

  • replace origin CUSTOMER by SUPPLIER
  • replace registerType ISSUED by RECEIVED
  • Assign a third party Supplier instead of a Customer
{
    "values":{
      "description": "Facture FA0022",
      "date": "2023-03-01",
      "entryType": "GENERAL",
      "journalTypeId": "{journalId}",
      "accountingEntryLines": [
        {
          "description": "Facture FA0022",
          "creditAmount": 0,
          "debitAmount": 1824.67,
          "subAccountId": "{customerAccountId}",
          "accountingEntryThirdParty": {
            "socialName":"{customerSocialName}",
            "origin":"CUSTOMER",
            "thirdPartyId":"{customerId}",
            "identificationTypeId":"{documentTypeId}",
            "documentId":"{customerDocumentId}"
          },
          "registerType":"ISSUED",
          "accountingEntryInvoice":{
              "amount":1824.67,
              "documentDate":"2023-03-01",
              "expeditionDate":"2023-03-01",
              "operationDate":"2023-03-01",
              "settlementDate":"2023-03-01",
              "externalInvoiceNumber":"FA0022",
              "registerType":"ISSUED"
          }
        },
        {
          "description": "Facture FA0022",
          "creditAmount": 1520.56,
          "debitAmount": 0,
          "subAccountId": "{AccountId}",
          "registerType":"UNDEFINED"
        },
        {
          "description": "Facture FA0022",
          "creditAmount": 304.11,
          "debitAmount": 0,
          "subAccountId": "{taxAccountId}",
          "registerType":"UNDEFINED"
        }
      ]
    }
}
Key Value
Authorization Bearer Current access Token
X-TenantId Current tenant id obtained from userProfile
X-OrganizationId Current organization Id
x-api-key Primary or secondary subscription key of your app

accountingEntries

Fields Type Description Length  
id UUID Id    
date datetime Date    
journalTypeId UUID Journal Id    
number decimal Number    
entryType
  • GENERAL
Always fill in GENERAL    
description string Description 200  
closeDate datetime closing date of entry    
isClosed boolean True if closed    
accountingEntryLines[] Array List of all lines of entry    
Info
  • number : operational Number Counter Id
  • 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.


accountingEntries/accountingEntryLines

Fields Type Description Length
id UUID Id  
subAccountId UUID Id of accountingAccount  
description string Description 200
debitAmount decimal Amount debit  
creditAmount decimal Amount credit  
registerType
  • UNDEFINED
  • ISSUED
  • RECEIVED
  • BOTH
Type of tax register 6
accountingEntryThirdParty ObjectType ThirdParty  
accountingEntryPayment ObjectType Matching  
accountingEntryInvoice ObjectType Invoice  
Info
  • creditAmount, debitAmount : 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.
  • registerType : used for tax registers, mandatory value.
    • For journal types equal to GENERAL or FINANCIAL or CARRY_FORWARD, always assign UNDEFINED for each line.
    • For journals types equal to PURCHASE_INVOICE or SALES_INVOICE :
      • For lines without a third party CUSTOMER or SUPPLIER, always assign UNDEFINED
      • For lines with a third party CUSTOMER, assign ISSUED
      • For lines with a third party SUPPLIER, assign RECEIVED
  • accountingEntryThirdParty : mandatory for lines with a third party CUSTOMER, SUPPLIER, EMPLOYEE.
  • accountingEntryInvoice : mandatory for lines with a third party CUSTOMER, SUPPLIER for journal types PURCHASE_INVOICE or SALES_INVOICE. Must not be defined for other journals.

It is not possible to group several invoices in one accounting entry for the journals PURCHASE_INVOICE or SALES_INVOICE.
So only one accountingEntryThirdParty and one accountingEntryInvoice per accountingEntry for these journals.


accountingEntries/accountingEntryLines/accountingEntryThirdParty
Fields Type Description Length
id UUID Id  
thirdPartyId UUID Third Id  
socialName string Third Name 70
code string Code 17
origin
  • UNDEFINED
  • CUSTOMER
  • SUPPLIER
  • EMPLOYEE
Type of third  
identificationTypeId UUID DocumentType Id  
documentId string Document Id 25
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, must be filled in.
  • code : Found in the third party as code, must be filled in.
  • identificationTypeId : Found in the third party as documentTypeId, must be filled in.
  • documentId : Found in the third party as documentId, must be filled in.


accountingEntries/accountingEntryLines/accountingEntryPayment
Fields Type Description Length
id UUID Id  
matching
  • MATCHING
  • UN_MATCHING
Status matching  
matchingLetter string Letter matching 5
Info

Information available only in reading mode concerning the lettering of the line.

  • matching : Indicates whether the line is lettered
  • matchingLetter : letter A,B,C … for a complete lettering, letter a,b,c … for a partial lettering.


accountingEntries/accountingEntryLines/accountingEntryInvoice
Fields Type Description Length
id UUID Id  
documentDate datetime Document date  
expeditionDate datetime Expedition date  
operationDate datetime Operation date  
settlementDate datetime Settlement date  
externalInvoiceNumber string Invoice number 50
amount decimal Amount  
registerType
  • UNDEFINED
  • ISSUED
  • RECEIVED
  • BOTH
Type of tax register 6
accountingEntryTaxes[] Array Tax registers  
Info
  • expeditionDate : mandatory, assign it by default with documentDate.
  • operationDate : mandatory, assign it by default with documentDate.
  • settlementDate : mandatory, assign it by default with documentDate.
  • amount : Amount of the invoice, must be equal to the amount of the entry line where the third party is present (accountingEntryThirdParty)
  • registerType : used for tax registers, mandatory value.
    • For customer invoice, assign ISSUED
    • For supplier invoice, assign RECEIVED


accountingEntries/accountingEntryLines/accountingEntryInvoice/accountingEntryTaxes
Fields Type Description
id UUID Id
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
Tax Type of the tax treatment
taxId UUID Id Tax found by groupId=taxGroupId
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