Skip to main content

FreshBooks Data Source

The FreshBooks connector enables you to ingest accounting and financial data—including clients, invoices, expenses, taxes, ledger accounts, and detailed reports—from your FreshBooks account into Nexla data flows. Follow the instructions below to create a new data flow that ingests data from a FreshBooks source in Nexla.
fresh_books_api.png

FreshBooks

Create a New Data Flow

  1. To create a new data flow, navigate to the Integrate section, and click the New Data Flow button. Then, select the desired flow type from the list, and click the Create button.

  2. Select the FreshBooks connector tile from the list of available connectors. Then, select the credential that will be used to connect to the FreshBooks account, and click Next; or, create a new FreshBooks credential for use in this flow.

  3. In Nexla, FreshBooks data sources can be created using pre-built endpoint templates, which expedite source setup for common FreshBooks API endpoints. Each template is designed specifically for the corresponding FreshBooks endpoint, making source configuration easy and efficient.
    • To configure this source using a template, follow the instructions in Configure Using a Template.

    FreshBooks sources can also be configured manually, allowing you to ingest data from FreshBooks endpoints not included in the pre-built templates or apply further customizations to exactly suit your needs.
    • To configure this source manually, follow the instructions in Configure Manually.

Configure Using a Template

Nexla provides pre-built templates that can be used to rapidly configure data sources to ingest data from common FreshBooks endpoints. Each template is designed specifically for the corresponding FreshBooks API endpoint, making data source setup easy and efficient.

Endpoint Settings

  • Select the endpoint from which this source will fetch data from the Endpoint pulldown menu. Available endpoint templates are listed in the expandable boxes below. Click on an endpoint to see more information about it and how to configure your data source for that endpoint.

List Clients

This endpoint retrieves a paginated list of all clients in a FreshBooks account. Use this endpoint when you need to sync client contact information, billing details, or client lists to another system for reporting or CRM purposes.

  • Enter your FreshBooks Account ID in the Account ID field. The Account ID is a short alphanumeric string (e.g., MJx3p) that identifies the FreshBooks account from which clients will be retrieved. You can find your Account ID by calling the GET https://api.freshbooks.com/auth/api/v1/users/me endpoint after authenticating and looking for the account_id field within the business_memberships array in the response.

  • This endpoint returns up to 100 clients per page and automatically paginates through all available pages to retrieve the complete client list.

The List Clients endpoint returns detailed client information including organization name, contact details, billing address, currency, and account status. For additional details on the fields returned, refer to the FreshBooks Clients API documentation.

List Invoices

This endpoint retrieves a paginated list of all invoices in a FreshBooks account. Use this endpoint to sync invoice data for financial reporting, accounts receivable analysis, or integration with other accounting or ERP systems.

  • Enter your FreshBooks Account ID in the Account ID field. The Account ID identifies the FreshBooks account from which invoices will be retrieved. You can find your Account ID by calling the GET https://api.freshbooks.com/auth/api/v1/users/me endpoint after authenticating and looking for the account_id field within the business_memberships array.

  • This endpoint returns up to 100 invoices per page and automatically paginates to retrieve all available invoices.

Invoice records include fields such as invoice number, client ID, status (draft, sent, viewed, paid, auto-paid, overdue, etc.), amount due, currency, line items, and creation/due dates. For more information, see the FreshBooks Invoices API documentation.

List Expenses

This endpoint retrieves a paginated list of all expense records in a FreshBooks account. Use this endpoint when you need to export expense data for financial analysis, tax preparation, or integration with expense management tools.

  • Enter your FreshBooks Account ID in the Account ID field. The Account ID identifies the FreshBooks account from which expenses will be retrieved. You can locate your Account ID via the GET https://api.freshbooks.com/auth/api/v1/users/me endpoint, in the account_id field of the business_memberships array.

  • This endpoint returns up to 100 expenses per page and automatically paginates to retrieve the full expense list.

Expense records include fields such as expense category, vendor, amount, currency, date, notes, billable status, and client association. For additional field details, refer to the FreshBooks Expenses API documentation.

List Expense Summaries

This endpoint retrieves summarized expense data for a FreshBooks account. Use this endpoint when you need aggregated expense totals broken down by category or time period rather than individual expense records.

  • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account for which expense summaries will be retrieved.

  • This endpoint returns a static response (non-paginated) containing summarized expense data for the account.

Expense summaries are useful for high-level financial reporting and budgeting analysis. For individual expense records with full detail, use the List Expenses endpoint instead.

List Expense Categories

This endpoint retrieves all expense categories configured in a FreshBooks account. Use this endpoint to obtain the list of available expense categories, which can be used to enrich or validate expense data in downstream workflows.

  • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account from which expense categories will be retrieved.

  • This endpoint returns a static (non-paginated) list of all expense categories associated with the account.

Get Invoice Details Report

This endpoint retrieves a detailed invoice report for a FreshBooks account, including invoice-level metrics and breakdowns. Use this endpoint for comprehensive invoice analytics and financial reporting purposes.

  • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account for which the invoice details report will be generated.

  • This endpoint returns a static (non-paginated) report containing detailed invoice data for the account.

The Invoice Details Report is part of the FreshBooks Accounting Reports API. For related report types and additional documentation, refer to the FreshBooks Reports API documentation.

Get Expense Details Report

This endpoint retrieves a detailed expense report for a FreshBooks account, including expense metrics and category breakdowns. Use this endpoint for in-depth expense analytics and financial reporting.

  • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account for which the expense details report will be generated.

  • This endpoint returns a static (non-paginated) report containing detailed expense data for the account.

The Expense Details Report is part of the FreshBooks Accounting Reports API. For related report types, refer to the FreshBooks Reports API documentation.

List Ledger Accounts

This endpoint retrieves all ledger accounts (chart of accounts) configured for a FreshBooks business. Use this endpoint to export your chart of accounts for accounting reconciliation, financial system integration, or audit purposes.

  • Enter your FreshBooks Business ID in the Business ID field. Note that this endpoint uses a Business ID rather than an Account ID. You can retrieve your Business ID by calling the GET https://api.freshbooks.com/auth/api/v1/users/me endpoint and locating the business_id field within the business_memberships array.

  • This endpoint returns a static (non-paginated) list of all ledger accounts associated with the specified business.

Ledger accounts are used in FreshBooks to categorize financial transactions in your chart of accounts. For more information, refer to the FreshBooks Chart of Accounts API documentation.

List Taxes

This endpoint retrieves all tax configurations defined in a FreshBooks account. Use this endpoint to export tax rate definitions for compliance reporting, tax reconciliation, or integration with tax management systems.

  • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account from which tax configurations will be retrieved.

  • This endpoint returns a static (non-paginated) list of all taxes configured in the account.

Tax records include the tax name, rate percentage, and associated tax number (e.g., VAT or GST registration number). For more information, refer to the FreshBooks Taxes API documentation.

Endpoint Testing

Once the selected endpoint template has been configured, Nexla can retrieve a sample of the data that will be fetched according to the current settings. This allows you to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched and displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Configure Manually

FreshBooks data sources can be manually configured to ingest data from any valid FreshBooks API endpoint. Manual configuration provides maximum flexibility for accessing endpoints not covered by pre-built templates or when you need custom API configurations.

With manual configuration, you can also create more complex FreshBooks sources, such as sources that use chained API calls to fetch data from multiple endpoints or sources that require custom request parameters.

API Method

  1. To manually configure this source, select the Advanced tab at the top of the configuration screen.

  2. Select the API method that will be used for calls to the FreshBooks API from the Method pulldown menu. The most common methods are:

    • GET: For retrieving data from the API
    • POST: For sending data to the API or triggering actions

API Endpoint URL

  1. Enter the URL of the FreshBooks API endpoint from which this source will fetch data in the Set API URL field. This should be the complete URL including the protocol (https://) and any required path parameters.

    FreshBooks accounting endpoints follow this general pattern: https://api.freshbooks.com/accounting/account/{accountId}/{resource}/{resource}

    For example, to retrieve invoices: https://api.freshbooks.com/accounting/account/MJx3p/invoices/invoices

Ensure the API endpoint URL is correct and accessible with your current credentials. You can test the endpoint using the Test button after configuring the URL. For the full list of available FreshBooks API endpoints, refer to the FreshBooks API documentation.

Date/Time Macros (API URL)

Optional

Optionally, the API URL can be customized using macros—all macros added to the API URL will be converted into values when Nexla executes the API call. Macros are dynamic placeholders that allow you to create flexible API endpoints that adapt to different time periods or data requirements.

Date/time macros are useful with FreshBooks APIs that accept date filter parameters (e.g., filtering invoices by creation date or updated date range).

  1. To add a macro, type { at the appropriate position in the API URL (within the Set API URL field), and select the desired macro from the dropdown list.

    • {now} – The current datetime
    • {now-1} – The datetime one time unit before the current datetime
    • {now+1} – The datetime one time unit after the current datetime
    • custom – Datetime macros can reference any number of time units before or after the current datetime—for example, enter (now-4) to indicate the datetime four time units before the current datetime
  2. Select the format that will be applied to datetime macros from the Date Format for Date/Time Macro pulldown menu.

  3. Select the datetime unit that will be used to perform mathematical operations in the included macro(s) from the Time Unit for Operations pulldown menu.

Lookup-Based Macros (API URL)

Optional

Column values from existing lookups can also be included as macros in the API URL. Lookup-based macros allow you to reference data from previously configured data sources or lookups, enabling dynamic API endpoints that adapt based on existing data.

Lookup-based macros are useful when you need to build FreshBooks API endpoints that reference specific IDs or values sourced from other Nexla data sources—for example, dynamically constructing per-account URLs using account IDs fetched from another source.

  1. To include a lookup column value macro, select the relevant lookup from the Add Lookups to Supported Macros pulldown menu.

  2. Type { at the appropriate position in the API URL, and select the lookup column-based macro from the dropdown list.

Path to Data

Optional

If only a subset of the data returned by the FreshBooks API endpoint is needed, you can designate which part of the response should be included in the Nexsets produced from this source. FreshBooks API responses typically nest the relevant records inside a response.result object.

For example, when retrieving invoices, the API returns an object like $.response.result.invoices[*] where the actual invoice records are nested within the response wrapper.

Specifying the correct Path to Data is important when working with FreshBooks API responses, as all results are nested inside a response.result wrapper object. Without specifying the correct path, Nexla may not parse your data into usable records.

  • To specify which data should be treated as relevant in responses from this source, enter the path to the relevant data in the Set Path to Data in Response field.

    • For responses in JSON format, enter the JSON path that points to the object or array that should be treated as relevant data. For example, to extract the invoices array from a FreshBooks invoices response, enter $.response.result.invoices[*].
    Path to Data Example:

    For the FreshBooks List Invoices endpoint, the response wraps invoice records as follows: response > result > invoices[]. Enter $.response.result.invoices[*] as the Path to Data to extract individual invoice records.

Autogenerate Path Suggestions

Nexla can also autogenerate data path suggestions based on the response from the API endpoint. These suggested paths can be used as-is or modified to exactly suit your needs.

  • To use this feature, click the Test button next to the Set API URL field to fetch a sample response from the API endpoint. Suggested data paths generated based on the content and format of the response will be displayed in the Suggestions box below the Set Path to Data in Response field.

  • Click on a suggestion to automatically populate the Set Path to Data in Response field with the corresponding path. The populated path can be modified directly within the field if further customization is needed.

    PathSuggestions.png

Metadata

If metadata is included in the FreshBooks API response but is located outside of the defined path to relevant data, you can configure Nexla to include this data as common metadata in each record. FreshBooks API responses typically include pagination metadata (such as total record count and page information) alongside the actual data.

Metadata paths are useful for preserving FreshBooks API response context like total record counts, pagination details, or request timestamps that apply to all records in the response.

  • To specify the location of metadata that should be included with each record, enter the path to the relevant metadata in the Path to Metadata in Response field. For JSON format responses, enter the JSON path to the metadata object.

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this source, enter the headers and corresponding values as comma-separated pairs in the Request Headers field (e.g., header1:value1,header2:value2).

    You do not need to include the Authorization header or any headers already present in the FreshBooks credential. Authentication headers are automatically handled by Nexla based on your credential configuration.

Endpoint Testing

After configuring all settings for the selected endpoint, Nexla can retrieve a sample of the data that will be fetched according to the current configuration. This allows you to verify that the source is configured correctly before saving.

  • To test the current endpoint configuration, click the Test button to the right of the endpoint selection menu. Sample data will be fetched and displayed in the Endpoint Test Result panel on the right.

  • If the sample data is not as expected, review the selected endpoint and associated settings, and make any necessary adjustments. Then, click the Test button again, and check the sample data to ensure that the correct information is displayed.

Save & Activate the Source

  1. Once all of the relevant steps in the above sections have been completed, click the Create button in the upper right corner of the screen to save and create the new FreshBooks data source. Nexla will now begin ingesting data from the configured endpoint and will organize any data that it finds into one or more Nexsets.