v1
latestOpenAPI 3.1.02026-08-04103211436.0 KBAccountingEntries
Create accounting entry
Creates a single accounting entry (one line of a general ledger journal). If customId is omitted, Embat auto-generates one; if the customId already exists, the entry is updated instead of duplicated (upsert). An entry always carries both an outflow side (assetAmount, stored with its sign inverted so negative means money out) and an inflow side (liabilityAmount, stored as sent); if you only send one, the other defaults to 0. If description is omitted, Embat generates one from the entry's identifier. Entries dated before the ledger account's configured start date are excluded from reconciliation matching.
post/accountingentries/{companyId}
Path parameters
companyIdstring required
Request body
Example request
{
"accountingCode": "4300001",
"counterpartAccountingCode": "5720001",
"accountingName": "Trade debtors",
"assetAmount": 1250.5,
"accountingAssetAmount": 1250.5,
"contactCustomId": "contact-001",
"exchangeRate": 1,
"description": "Invoice #2024-001 posting",
"date": "2024-01-15T00:00:00Z",
"attributes": [
{
"customId": "cost-center",
"value": "Marketing",
"valueCustomId": "marketing"
}
],
"customId": "erp-entry-2024-001",
"accountingEntryCode": "invoice-2024-001"
}Response
Successful Response