Accounting: Journal entry
> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/lending-api#/schemas/Journal) data type ## Overview A journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/lending-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance. A journal entry line item is a single transaction line on the journal entry. For example: - When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. - When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue. In Codat a journal entry contains details of: - The date on which the entry was created and posted. - Itemised lines, including amounts and currency. - A reference to the associated accounts. - A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. > **Pushing journal entries** > Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency.
Unified_API
{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "#/components/schemas/AccountingJournalEntry",
"title": "Accounting: Journal entry",
"description": "> **Language tip:** For the top-level record of a company's financial transactions, refer to the [Journals](https://docs.codat.io/lending-api#/schemas/Journal) data type\n\n## Overview\n\nA journal entry report shows the entries made in a company's general ledger, or [accounts](https://docs.codat.io/lending-api#/schemas/Account), when transactions are approved. The journal line items for each journal entry should balance.\n\nA journal entry line item is a single transaction line on the journal entry. For example: \n\n- When a journal entry is recording a receipt of cash, the credit to accounts receivable and the debit to cash are separate line items. \n- When a company needs to recognise revenue from an annual contract on a monthly basis, on receipt of cash for month one, they make a debit to deferred income and a credit to revenue.\n\nIn Codat a journal entry contains details of:\n\n- The date on which the entry was created and posted.\n- Itemised lines, including amounts and currency.\n- A reference to the associated accounts.\n- A reference to the underlying record. For example, the invoice, bill, or other data type that triggered the posting of the journal entry to the general ledger. \n\n> **Pushing journal entries** \n> Codat only supports journal entries in the base currency of the company that are pushed into accounts denominated in the same base currency.",
"type": "object",
"allOf": [
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "Unique identifier of the journal entry for the company in the accounting software."
},
"description": {
"type": "string",
"nullable": true,
"description": "Optional description of the journal entry."
},
"postedOn": {
"$ref": "#/components/schemas/DateTime",
"description": "Date on which the journal entry was posted to the accounting software, and had an impact on the general ledger. This may be different from the creation date.\n\nFor example, a user creates a journal entry on Monday and saves it as draft, which has no impact on the general ledger. On Thursday, they return to the entry and post it.\n\nThe **createdOn** date shows as Monday.\nThe **postedOn** date shows as Thursday.\nJournal entries can also be backdated, so the **postedOn** date may be earlier than the **createdOn** date."
},
"createdOn": {
"$ref": "#/components/schemas/DateTime",
"description": "Date on which the journal was created in the accounting software."
},
"updatedOn": {
"$ref": "#/components/schemas/DateTime",
"description": "Date on which the journal was last updated in the accounting software."
},
"journalRef": {
"$ref": "#/components/schemas/AccountingJournal/definitions/journalRef"
},
"journalLines": {
"type": "array",
"nullable": true,
"description": "An array of journal lines.",
"items": {
"$ref": "#/components/schemas/AccountingJournalEntry/definitions/journalLine"
}
},
"recordRef": {
"$ref": "#/components/schemas/AccountingJournalEntry/definitions/journalEntryRecordRef"
},
"metadata": {
"$ref": "#/components/schemas/Metadata"
},
"supplementalData": {
"$ref": "#/components/schemas/SupplementalData"
}
}
},
{
"$ref": "#/components/schemas/CommerceOrder/allOf/3"
}
],
"definitions": {
"journalLine": {
"type": "object",
"properties": {
"description": {
"type": "string",
"nullable": true,
"description": "Description of the journal line item."
},
"netAmount": {
"type": "number",
"format": "decimal",
"description": "Amount for the journal line. Debit entries are considered positive, and credit entries are considered negative."
},
"transactionAmount": {
"type": "number",
"format": "decimal",
"description": "The amount in the original transaction currency."
},
"currency": {
"type": "string",
"nullable": true,
"description": "Currency for the journal line item."
},
"transactionCurrency": {
"type": "string",
"nullable": true,
"description": "Currency of the original transaction."
},
"accountRef": {
"$ref": "#/components/schemas/AccountingAccount/definitions/accountRef"
},
"tracking": {
"description": "List of record refs associated with the tracking information for the line (eg to a Tracking Category, or customer etc.)",
"title": "Tracking",
"type": "object",
"properties": {
"recordRefs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/AccountingJournalEntry/definitions/journalLine/properties/tracking/definitions/trackingRecordRef"
},
"nullable": true
}
},
"definitions": {
"trackingRecordRef": {
"type": "object",
"title": "Record reference",
"description": "Links to the customer or tracking category.",
"properties": {
"id": {
"type": "string",
"description": "'id' of the underlying record or data type."
},
"dataType": {
"type": "string",
"description": "Name of underlying data type.",
"enum": [
"customers",
"suppliers",
"trackingCategories"
],
"example": "trackingCategories"
}
}
}
}
},
"contactRef": {
"title": "Contact reference",
"type": "object",
"properties": {
"id": {
"minLength": 1,
"type": "string",
"description": "Unique identifier for a customer or supplier."
},
"dataType": {
"type": "string",
"nullable": true,
"description": "Allowed name of the 'dataType'.",
"enum": [
"customers",
"suppliers"
]
}
},
"required": [
"id"
]
}
},
"required": [
"netAmount"
]
},
"journalEntryRecordRef": {
"type": "object",
"title": "Record reference",
"description": "Links a journal entry to the underlying record that created it.",
"properties": {
"id": {
"type": "string",
"description": "'id' of the underlying record or data type."
},
"dataType": {
"type": "string",
"description": "Name of underlying data type.",
"enum": [
"bankTransactions",
"billCreditNotes",
"billPayments",
"bills",
"creditNotes",
"directCosts",
"directIncomes",
"invoices",
"journalEntries",
"payments",
"transfers"
],
"example": "transfers"
}
}
}
}
}