v1

latestOpenAPI 3.0.32026-07-268955212.1 KB
journal-entries

Create a journal entry

Creates a journal entry for the company.

Handling validation errors:

If this operations returns a 400 status code, inspect the response body's api error object for more information. There will be additional information in the innerCode if the code=validation-error.

Scope: journal-entries:write

post/companies/{companyId}/journal-entries

Request body

idstring uuid
titlestring
journalEntryNumberstring
datestring date
reversingJournalEntryIdstring uuid nullable
reversedByJournalEntryIdstring uuid nullable

Example request

{
  "id": "a419cf69-db6f-4de9-992c-b1a60942a443",
  "title": "invoice 1234",
  "journalEntryNumber": "V342",
  "date": "2024-10-10",
  "items": [
    {
      "id": 1,
      "debit": 200,
      "credit": 0,
      "account": 1930,
      "tags": []
    },
    {
      "id": 2,
      "debit": 0,
      "credit": 40,
      "account": 3011,
      "tags": []
    },
    {
      "id": 3,
      "debit": 0,
      "credit": 160,
      "account": 2611,
      "tags": []
    }
  ],
  "tags": []
}

Response

Journal entry created

idstring uuid
titlestring
journalEntryNumberstring
datestring date
reversingJournalEntryIdstring uuid nullable
reversedByJournalEntryIdstring uuid nullable

Example response

{
  "id": "a419cf69-db6f-4de9-992c-b1a60942a443",
  "title": "invoice 1234",
  "journalEntryNumber": "V342",
  "date": "2024-10-10",
  "items": [
    {
      "id": 1,
      "debit": 200,
      "credit": 0,
      "account": 1930,
      "tags": []
    },
    {
      "id": 2,
      "debit": 0,
      "credit": 40,
      "account": 3011,
      "tags": []
    },
    {
      "id": 3,
      "debit": 0,
      "credit": 160,
      "account": 2611,
      "tags": []
    }
  ],
  "tags": []
}