Journal Entries
Access Requirements
Access | Requires Authorization |
Scopes | user:journal_entries:read user:journal_entries:write |
What are Journal Entries?
Journal entries are the building blocks of financial accounting and record all transactions in your business. In FreshBooks, all your activities – sending invoices, accepting payments, and creating credits and expenses – are compiled into journal entries.
Request Details
Like most requests, you’ll need the <accountId> for the FreshBooks account that you’ll be querying. To find out what accounts the user using your app has access to, it’s good to make a query related to the identity model
Before creating a journal entry you will need to query the Get Accounts endpoint. This will return an array of accounts. The account_uuid
will be used when adding a journal entry. New entries must include the account_uuid
, and the debit or credit amounts.
Create Adjustment Journal Entry
Headers
Name | Field | Description |
---|---|---|
x-api-version | string | Required header. Must be set to 2023-09-25 |
Field Descriptions
Field | Type | Description |
---|---|---|
name |
| Name of the journal entry |
journalEntryNumber |
| Identifier assigned to journal entry |
description | string | Description of journal entry |
userEnteredDate | object | Subfields: year , month , day |
details |
| List of journal entry line items. |
↳ accountId | uuid | UUID of the Account associated with the line item |
↳ amount | object | Amount object of the journal entry line item |
┆→ amount | float | Amount of the journal entry line item |
┆→ code | string | Currency code of the amount |
↳ type | enum | Type of the journal entry line item. Possible values: TYPE_CREDIT , TYPE_DEBIT |
Get Adjustment Journal Entries
Headers
Name | Field | Description |
---|---|---|
x-api-version | string | Required header. Must be set to 2023-09-25 |
Available Filters
Filter Type | Name | Type | Description |
---|---|---|---|
Equals | page_number | int | The starting page number |
Equals | page_size | int | The size of each page |
Field Descriptions
Field | Type | Description |
---|---|---|
manualJournalEntries | array[object] | List of journal entries retrieved |
↳ id | uuid | UUID of the account |
↳ userEnteredDate | object | Subfields: year , month , day |
↳ name |
| Name of the account |
↳ journalEntryNumber |
| Journal entry number |
↳ description | string | Description of the journal entry |
↳ details | array[object] | List of the journal entry line items |
┆→ accountId | uuid | UUID of the Account associated with the line item |
┆→ amount | object | Amount details of line item containing amount and currency |
┆┆→ amount | float | Amount of the journal entry line item |
┆┆→ code | string | Currency code of the amount |
┆→ type | string | Type of the journal entry line item. Possible values: TYPE_CREDIT , TYPE_DEBIT |
┆→ manualJournalEntryId | uuid | Id of the journal entry. Links the line item to the adjustment journal entry. |
Get Journal Entries by Account
Available Filters
Filter Type | Name | Type | Description |
---|---|---|---|
Equals | page | int | The starting page number |
Equals | per_page | int | The size of each page |
Between | start_date | date | Created during or after the given date |
Between | end_date | date | Created during or before the given date |
Equals | include_children | boolean | Include journal entries in child accounts |
Equals | currency_code | string | Journal entries using the given currency as primary currency |
Equals | use_ledger_entries | boolean | Required field. Must be set to true |
Field Descriptions
Field | Type | Description |
---|---|---|
page | int | Current page number returned |
pages | int | Number of pages returned |
per_page | int | Number of journal entries returned per page |
total | int | Total journal entries returned |
account_entry_details |
| List of journal entry details |
↳ id | int | Identifier of the journal entry |
↳ detail_type | enum | Possible values: received |
↳ name | string | References the original entity |
↳ description | string | Description from the original entity |
↳ entry |
| Entry details |
┆→ id | int | Identifier of the journal entry line item |
┆→ entryid | int | Identifier of the journal entry line item |
┆→ clientid | int | Client ID if the journal entry is associated with a client. null if not. |
┆→ expenseid | int | Expense ID if the journal entry is associated with an expense. null if not. |
┆→ invoiceid | int | Invoice ID if the journal entry is associated with an invoice. null if not. |
┆→ paymentid | int | Payment ID if the journal entry is associated with a payment. null if not. |
┆→ incomeid | int | Income ID if the journal entry is associated with income. null if not. |
┆→ creditid | int | Credit ID if the journal entry is associated with a credit. null if not. |
┆→ accounting_systemid | string | System ID |
↳ account | object | Amount details of line item containing amount and currency |
┆→ uuid | uuid | UUID of the Account |
┆→ name | string | Name of the Account |
┆→ type | string | The type of account. Possible values: asset , liability , equity , income , expense |
┆→ number | string | Account number |
┆→ parent_account_uuid | uuid | UUID of the parent account |
↳ debit | object | Details about the debit. null if credit. |
┆→ amount | string | Debit amount |
┆→ code | string | Currency code of the debit |
↳ credit |
| Details about the credit. null if debit. |
┆→ amount | string | Credit amount |
┆→ code | string | Currency code of the credit |
↳ balance | object | Account balance details |
┆→ amount | string | Account balance after debit/credit |
┆→
| string | Currency code of the amount |
↳ accounting_systemid | string | System ID |
Create Adjustment Journal Entry
#REQUEST
curl --location --request POST 'https://api.freshbooks.com/accounting/businesses/<business_uuid>/journal_entries' \
--header 'Authorization: Bearer <SET BEARER TOKEN>' \
--header 'x-api-version: 2023-09-25' \
--data-raw '{
"manualJournalEntry": {
"userEnteredDate": {
"year": "2024",
"month": "10",
"day": "31"
},
"name": "halloween test",
"journalEntryNumber": "JE131",
"description": null,
"details": [
{
"accountId": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"amount": {
"amount": "123.45",
"code": "USD"
},
"type": "TYPE_CREDIT"
},
{
"accountId": "ccbf7404-a0f4-4580-ac71-8b77a9644fe2",
"amount": {
"amount": "123.45",
"code": "USD"
},
"type": "TYPE_DEBIT"
}
]
}
}'
Get Adjustment Journal Entries
#REQUEST
curl --location --request GET 'https://api.freshbooks.com/accounting/businesses/<business_uuid>/journal_entries?page_number=1&page_size=30' \
--header 'Authorization: Bearer <SET BEARER TOKEN>' \
--header 'x-api-version: 2023-09-25'
#RESPONSE
{
"manualJournalEntries": [
{
"id": "005f5c22-8166-47e9-926d-098fe523f929",
"userEnteredDate": {
"year": 2023,
"month": 11,
"day": 3
},
"name": "do something",
"journalEntryNumber": "JE1",
"description": "test test",
"details": [
{
"id": "a560a0b8-a9b5-4df1-a58e-98e33b88d682",
"accountId": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"amount": {
"amount": "100.000",
"code": "USD"
},
"type": "TYPE_DEBIT",
"manualJournalEntryId": "005f5c22-8166-47e9-926d-098fe523f929"
},
{
"id": "406d5579-5a09-4f1a-b79b-ebf7c4529cc5",
"accountId": "0f321fa9-78db-41ce-8c5f-11605718e5fb",
"amount": {
"amount": "100.000",
"code": "USD"
},
"type": "TYPE_CREDIT",
"manualJournalEntryId": "005f5c22-8166-47e9-926d-098fe523f929"
}
]
},
{
"id": "6ebd82b8-b9cd-4570-9c55-c5b430edd53e",
"userEnteredDate": {
"year": 2023,
"month": 11,
"day": 2
},
"name": "hey hey",
"journalEntryNumber": "JE12",
"description": "1",
"details": [
{
"id": "d9da0006-0438-49b5-9d7c-c887ea3cce0f",
"accountId": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"amount": {
"amount": "1233.000",
"code": "CAD"
},
"type": "TYPE_DEBIT",
"manualJournalEntryId": "6ebd82b8-b9cd-4570-9c55-c5b430edd53e"
},
{
"id": "0476c354-8720-450e-bf69-fc665255a35e",
"accountId": "48c444f7-17cf-4977-a0b3-bc04c8bd0f53",
"amount": {
"amount": "1233.000",
"code": "CAD"
},
"type": "TYPE_CREDIT",
"manualJournalEntryId": "6ebd82b8-b9cd-4570-9c55-c5b430edd53e"
}
]
},
...
],
"page": {
"number": 1,
"size": 30,
"pages": 2,
"total": 36
}
}
Get Journal Entries by Account
#REQUEST
curl --location --request GET 'https://api.freshbooks.com/accounting/businesses/<business_uuid>/reports/account_entry_details/<account_uuid>?currency_code=USD&end_date=2024-12-31&include_children=true&start_date=2024-01-01&use_ledger_entries=true'
#RESPONSE
{
"response": {
"result": {
"page": 1,
"pages": 1,
"per_page": 15,
"total": 3,
"account_entry_details": [
{
"id": 16405907,
"entry": {
"id": 51472165,
"entryid": 51472165,
"clientid": null,
"expenseid": null,
"invoiceid": 842847,
"paymentid": 700199,
"incomeid": null,
"creditid": null,
"accounting_systemid": "LJx5l5"
},
"account": {
"uuid": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"name": "Petty Cash",
"type": "asset",
"number": "1000-1",
"parent_account_uuid": "bbb2fd89-f70d-4738-85ce-80c47c0ceed2"
},
"user_entered_date": "2024-10-29",
"detail_type": "received",
"name": "Invoice 2022-00146",
"description": "",
"debit": {
"amount": "135.60",
"code": "USD"
},
"credit": null,
"balance": {
"amount": "135.60",
"code": "USD"
},
"accounting_systemid": "LJx5l5"
},
{
"id": 16405949,
"entry": {
"id": 51472179,
"entryid": 51472179,
"clientid": null,
"expenseid": null,
"invoiceid": 842847,
"paymentid": 700199,
"incomeid": null,
"creditid": null,
"accounting_systemid": "LJx5l5"
},
"account": {
"uuid": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"name": "Petty Cash",
"type": "asset",
"number": "1000-1",
"parent_account_uuid": "bbb2fd89-f70d-4738-85ce-80c47c0ceed2"
},
"user_entered_date": "2024-10-29",
"detail_type": "received",
"name": "Invoice 2022-00146",
"description": "",
"debit": null,
"credit": {
"amount": "135.60",
"code": "USD"
},
"balance": {
"amount": "-135.60",
"code": "USD"
},
"accounting_systemid": "LJx5l5"
},
{
"id": 16158083,
"entry": {
"id": 51378409,
"entryid": 51378409,
"clientid": null,
"expenseid": 86283915,
"invoiceid": null,
"paymentid": null,
"incomeid": null,
"creditid": null,
"accounting_systemid": "LJx5l5"
},
"account": {
"uuid": "184ba7f5-ce2a-4435-ab67-824cbc082c47",
"name": "Petty Cash",
"type": "asset",
"number": "1000-1",
"parent_account_uuid": "bbb2fd89-f70d-4738-85ce-80c47c0ceed2"
},
"user_entered_date": "2024-09-14",
"detail_type": "expense",
"name": "Expense",
"description": "100 Expense Test",
"debit": null,
"credit": {
"amount": "10.00",
"code": "USD"
},
"balance": {
"amount": "-10.00",
"code": "USD"
},
"accounting_systemid": "LJx5l5"
}
]
}
}
}