List expenses with the FreshBooks API
Lists the expenses of a business, with id, amount, date, vendor, categoryid, clientid, notes and status. The response has result.expenses, page, pages and total: raise page until it reaches pages.
- Identifier
- freshbooks_list_expenses
The request
POST https://connect.reportei.com/api/tools/freshbooks_list_expenses/execute
Authorization: Bearer <merchant token>
x-customer-token: <customer token>
Content-Type: application/json
Accept: application/json
{
"customer_toolkit": "<connection UUID>",
"arguments": {
"account_id": "<account_id>"
}
}Your system sends your customer's connection id and the tool arguments. The headers are the same as the rest of the Connect API: your product's token and your customer's token.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| account_id | string | Yes | account_id of a business, from Get current user. |
| page | integer | No | Page to read, from 1. |
| per_page | integer | No | Expenses per page, up to 100. |
Supported connections
Your customer connects their FreshBooks account once, with one of the modes below. The same connection serves every tool of the toolkit.
OAuth with your product's app
You register your product's OAuth app once, with POST /api/merchants/credentials/freshbooks, and your customer authorizes the account on a consent screen. Connect renews the token when it is about to expire.
The response
On success, Connect preserves the app's response status and body. HTTP errors returned by the app use the {error, api_error} envelope; authentication or validation can fail before execution. The X-Toolkit-Execution-Id header identifies the recorded execution, available at GET /api/tools/executions/{uuid}.
Ready for AI agents
This tool's input is a JSON Schema, available at GET /api/tools/freshbooks_list_expenses. It becomes your agent's tool definition with no conversion.
Other FreshBooks tools
- Get current userGETReturns the connected user. Each item of business_memberships has the role of the user and a business with its name and account_id, the account_id every other tool asks for. A business without account_id has no accounting, and the other tools do not work on it.
- List clientsGETLists the active and archived clients of a business, with id, names, organization, email, phones, address and currency. The response has result.clients, page, pages and total: raise page until it reaches pages.
- Create clientPOSTCreates a client and returns it in result.client, with the id that invoices use as customerid and expenses as clientid. The fields go inside client.
- Update clientPUTChanges the fields sent on a client; the others stay as they are. The fields go inside client.
- List invoicesGETLists the active and archived invoices of a business, without their lines: id, invoice_number, customerid, organization, create_date, due_date, amount, outstanding, paid, v3_status and payment_status. The response has result.invoices, page, pages and total: raise page until it reaches pages.
- Get invoiceGETReturns one invoice in result.invoice, without its lines: number, client, dates, amount, outstanding, paid, discount, notes, terms, v3_status and payment_status.
- Create invoicePOSTCreates a draft invoice and returns it in result.invoice. The fields go inside invoice, which needs customerid and create_date; the lines set the amount. A draft does not count in the reports and the client cannot open it: Send invoice emails it or marks it as sent.
- Update invoicePUTChanges the fields sent on an invoice, like dates, number, notes, terms or discount; the others stay as they are. The fields go inside invoice. Lines are not changed here: a PUT with lines replaces all of them, and no tool reads the current lines.
Toolkits in the same category
See all 100 toolkitsSee Connect applied to your product.
Try it for 15 days with no card, or walk our team through your use case.

Conta Azul