Expense Details Report
The Expenses Report shows all the information involving your Expenses
Available Filters
Filter Type | Name | Field | Description |
---|---|---|---|
between | start_date | date | created during or after the given date |
between | end_date | date | created during or before the given date |
Equals | currency_code | string | reports using the given currency as primary currency |
Equals | group_by | string | Data returned is organized by the given argument. (parent_category, clients, vendor, author) |
Equals | exclude_personal | boolean | true returns data without personal expenses included |
Equals | include_project | boolean | Include expenses assigned to Projects |
Equals | client_id | integer | Filter by specific Client |
Equals | locale | string | Language to show on report |
Field Descriptions
Field | Type | Description |
---|---|---|
exclude_personal | boolean | true doesn’t return personal expenses |
end_date | date | Will only return invoices that were created before the given date |
clients | object | subfields: clientid (s) |
clientid (s) | object | subfields: language, userid, email, lname, fname, organization, id |
language | string | 2 letter string representing the primary language of the client |
userid | int | duplicate value of the client’s id |
email | string | the email of the client |
lname | string | last name of the client |
fname | string | first name of the client |
organization | string | name of the organization the client is a part of |
id | int | unique id for the client |
download_token | string | the download token allows you to download the report into a csv file |
vendors | object | subfields: vendorid |
vendorid (s) | string | the name of the vendor |
group_by | string | The category that you would like to group your data by |
currency_code | string | three-letter currency code for invoice |
authors | object | subfields: userid(s) |
userid (s) | object | subfields: lname , fname , email , organization , userid |
data | array | holds majority of the numerical data that is returned |
groupid | string | unique id for the group |
total | object | subfields: amount, code |
amount | string | the amount of money that is owed or been paid |
code | string | the currency that the amount is in |
children | array | holds data about a sub expense |
expenses | array | stores Expense objects |
vendorid | string | the unique id for the vendor |
vendor | string | The name of the vendor |
notes | string | custom notes about the expense |
clientid | int | unique id for the client |
taxPercent1 | string | the percentage you are being taxed on |
authorid | string | id for the author |
taxName1 | string | the name of the first tax |
taxName2 | string | the name of the second tax |
date | date | the date the expense took place |
taxAmount2 | object | subfields: amount, code |
taxAmount1 | object | subfields: amount, code |
expenseid | int | uniqueid for the expense |
taxPercent2 | string | the percentage you are being taxed on |
categoryid | string | unique id for the category of the expense |
start_date | date | the starting date for the expense report query |
categories | object | subfields: categoryid (s) |
categoryid (s) | object | subfields: category , subcategory_name , categoryid |
category | string | name of the category |
subcategory_name | string | name of the subcategory |
categoryid | int | unique id for the category |
company_name | string | name of the company that the expenses are charged too |
Get Expense Details
#Request
curl --location --request GET 'https://api.freshbooks.com/accounting/businesses/{business_uuid}/reports/expense_details' \
--header 'Authorization: Bearer <SET BEARER TOKEN>'
#Response
{
"response": {
"result": {
"expense_details": {
"company_name": "<company name>",
"download_token": "<download token>",
"start_date": "2023-01-01",
"end_date": "2023-12-31",
"currency_code": "USD",
"data": [
{
"expenses": [
{
"account_name": "",
"amount": {
"amount": "115.00",
"code": "USD"
},
"authorid": "1",
"categoryid": "2640410",
"clientid": "81553",
"date": "2023-03-08",
"expenseid": 644429,
"imported_from_csv": false,
"is_cogs": false,
"modern_projectid": null,
"notes": "expense w/ tax and client",
"taxAmount1": {
"amount": "15.00",
"code": "USD"
},
"taxAmount2": {
"amount": "0.00",
"code": "USD"
},
"taxName1": "HST",
"taxName2": null,
"taxPercent1": "15",
"taxPercent2": null,
"vendor": "withClient",
"vendorid": "b3aa10f59a43d062e6ec5f8353f8f075"
}
],
"children": [],
"groupid": "2640410",
"total": {
"amount": "115.00",
"code": "USD"
}
},
{
"expenses": [
{
"account_name": "",
"amount": {
"amount": "115.00",
"code": "USD"
},
"authorid": "1",
"categoryid": "2640418",
"clientid": "0",
"date": "2023-03-08",
"expenseid": 644424,
"imported_from_csv": false,
"is_cogs": false,
"modern_projectid": null,
"notes": "expense w/ tax, no client",
"taxAmount1": {
"amount": "15.00",
"code": "USD"
},
"taxAmount2": {
"amount": "0.00",
"code": "USD"
},
"taxName1": "HST",
"taxName2": null,
"taxPercent1": "15",
"taxPercent2": null,
"vendor": "NoClient",
"vendorid": "d352980c03e945aa5e9eb990c67a3b98"
}
],
"children": [],
"groupid": "2640418",
"total": {
"amount": "115.00",
"code": "USD"
}
}
],
"authors": {
"1": {
"email": "<company email>",
"fname": "<company fname>",
"lname": "<company lname>",
"organization": "",
"userid": 1
}
},
"categories": {
"2640410": {
"category": "Education and Training",
"categoryid": 2640410,
"is_cogs": false,
"subcategory_name": "Education and Training (general)"
},
"2640418": {
"category": "Meals & Entertainment",
"categoryid": 2640418,
"is_cogs": false,
"subcategory_name": "Meals & Entertainment (general)"
}
},
"clients": {
"0": {
"email": "",
"fname": "",
"lname": "",
"organization": "",
"id": null,
"language": null,
"level": null,
"role": null,
"userid": null
},
"81553": {
"email": "<client email>",
"fname": "<client fname>",
"lname": "<client lname>",
"organization": "<client organization>",
"id": 81553,
"language": null,
"level": null,
"role": null,
"userid": 81553
}
},
"modern_projects": {},
"expense_refunds": [],
"vendors": {
"b3aa10f59a43d062e6ec5f8353f8f075": "withClient",
"d352980c03e945aa5e9eb990c67a3b98": "NoClient"
},
"summary": {
"total_amount": {
"amount": "230.00",
"code": "USD"
},
"total_expense_refund_amount": {
"amount": "0.00",
"code": "USD"
}
},
"summary_only": false,
"exclude_personal": false,
"group_by": "category"
}
}
}
}
Example Searches with Expense Details
#Get Expense Details Between a Specific Range
curl --location --request GET 'https://api.freshbooks.com/accounting/account/<accountid>/reports/accounting/expense_details?start_date=2016-04-19&end_date=2017-07-25'
#Get Expense Details including expenses assigned to projects
curl --location --request GET 'https://api.freshbooks.com/accounting/businesses/{business_uuid}/reports/expense_details?start_date=2023-01-01&end_date=2023-12-31&group_by=parent_category&exclude_personal=false¤cy_code=CAD&include_project=true' \
--header 'Authorization: Bearer <SET BEARER TOKEN>'
#Get Expense Details Excluding Personal Expenses
curl --location --request GET 'https://api.freshbooks.com/accounting/account/<accountid>/reports/accounting/expense_details?start_date=2016-04-19&exclude_personal=true&end_date=2017-09-17