Bank, financial & miscellaneous operations

Post bank statements, financial operations and miscellaneous operations (OD).

Besides invoices, the API lets you post three kinds of operations as book entries:

OperationDaybook typeCreateUpdate
Bank operationBank (500)book-entries.banks.newbook-entries.banks.update
Financial operationFinancial (590)book-entries.financials.newbook-entries.financials.update
Miscellaneous operation (OD)Misc. operation (600)book-entries.miscellaneous-operations.newbook-entries.miscellaneous-operations.update, .lines.update

All three return the generated book entry's Id, can carry an attached document (multipart/form-data, see Documents & attachments) and are unconfirmed by default.

Line types

Lines reference an account by search key and a line type:

TypeMeaningCompanyId
1CustomerRequired
2SupplierRequired
3General accountNot used

Bank operations

Each line is a movement with an Amount. For general lines (Type 3), an optional Tax object holds the VAT breakdown. The tax amount must be included in the line amount.

{
  "FolderId": "83f26e75-f474-4b09-a1d3-aa698e18fbf0",
  "DaybookId": "87f48c7e-54d1-48d2-aed7-447e6003bc67",
  "Number": 202211001,
  "Date": "2022-11-04T00:00:00+00:00",
  "Lines": [
    {
      "Type": 1,
      "Account": "400000",
      "CompanyId": "32ebe925-23cc-4a3e-8b36-8b2b33780fc1",
      "Amount": 1210,
      "Comment": "Payment invoice 2022-10-015",
      "Date": "2022-11-04T00:00:00+00:00"
    }
  ]
}

A bank operation can be attached to its source file, such as a CODA statement ("FileName": "my-coda.cod").

Financial operations

Financial operations work like bank operations, in a daybook of type Financial (e.g. credit card statements).

Miscellaneous operations (OD)

Miscellaneous operations use debit/credit lines, and the sum of debits and credits must be balanced:

{
  "FolderId": "83f26e75-f474-4b09-a1d3-aa698e18fbf0",
  "DaybookId": "c2a1f3e4-7b8d-4e5f-a6b7-c8d9e0f1a2b3",
  "Number": 201909001,
  "Date": "2019-09-04T00:00:00+00:00",
  "Lines": [
    { "Type": 3, "Account": "499000", "Debit": 1000, "Credit": 0, "Comment": "Reclassification" },
    { "Type": 3, "Account": "604000", "Debit": 0, "Credit": 1000, "Comment": "Reclassification" }
  ]
}

Lines can also carry a MatchNo, a VehicleId and analytics (CostLines or CostDistributionKey).

Updating and deleting

NeedEndpointNotes
Replace the whole operationbook-entries.miscellaneous-operations.updateReturns a new book entry Id. The original attachment is deleted.
Change some lines onlybook-entries.miscellaneous-operations.lines.updateDebit and credit amounts cannot be changed. Partial update rule applies.
Deletebook-entries.miscellaneous-operations.delete (DELETE)Only for unconfirmed entries created through the API.

Numbering

Number is the operation number associated with the book entry; it can be 0 while the entry is not confirmed. If you set Confirmed: true, you can let Horus generate the number with AutoGenerateNumber: true (leave Number at 0).

📘

Bank and financial updates

As with invoices and miscellaneous operations, book-entries.banks.update and book-entries.financials.update return the newly generated book entry's Id and delete the original attachment.


Did this page help you?