Skip to main content

FreshBooks Destination

Nexla's bi-directional connectors allow data to flow both to and from any location, making it simple to create a FlexFlow data flow that sends data to a FreshBooks location.
fresh_books_api.png

FreshBooks

Create a FreshBooks Destination

  1. Click the + icon on the Nexset that will be sent to the FreshBooks destination, and select the Send to Destination option from the menu.

  2. Select the FreshBooks connector from the list of available destination 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 destinations can be created using pre-built endpoint templates, which expedite destination setup for common FreshBooks API write operations. Each template is designed specifically for the corresponding FreshBooks endpoint, making destination configuration easy and efficient.
    • To configure this destination using a template, follow the instructions in Configure Using a Template.

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

Configure Using a Template

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

  • To configure this destination using a template, select the endpoint to which data will be sent from the Endpoint pulldown menu. Then, click on the template in the list below to expand it, and follow the instructions to configure additional endpoint settings.

    Create Invoice

    This endpoint creates a new invoice in the specified FreshBooks account. Use this template to automate invoice generation—for example, triggering invoice creation when a service is delivered, a subscription renews, or a sales order is fulfilled in another system.

    • Enter your FreshBooks Account ID in the Account Id field. The Account ID identifies the FreshBooks account in which the invoice will be created. You can retrieve your Account ID by calling the GET https://api.freshbooks.com/auth/api/v1/users/me endpoint after authenticating and locating the account_id field in the business_memberships array.

    • The Nexset data will be sent as the JSON body of a POST request to the FreshBooks invoices endpoint. Ensure the Nexset fields match the FreshBooks invoice object schema, including required fields such as customerid (the client ID) and line item details.

    Invoices can optionally include custom logo and theme styling. For a full list of fields accepted by the FreshBooks Create Invoice endpoint, refer to the FreshBooks Invoices API documentation.

    Delete (void) an Invoice

    This endpoint deletes (voids) an existing invoice in a FreshBooks account. Use this template to automate invoice cancellation workflows, such as voiding invoices when orders are cancelled in an upstream system.

    • Enter your FreshBooks Account ID in the Account Id field. This identifies the FreshBooks account that contains the invoice to be deleted.

    • Enter the ID of the invoice to be deleted in the Invoice Id field. The Invoice ID is a numeric identifier assigned by FreshBooks when the invoice was created. You can retrieve invoice IDs using the List Invoices source endpoint.

    :::warning Important Deleting (voiding) an invoice in FreshBooks is a permanent action. Voided invoices cannot be recovered. Ensure the correct Invoice ID is provided before activating this destination. :::

    Create Credit Note

    This endpoint creates a new credit note for a specified client in a FreshBooks account. Use this template to automate the issuance of credit notes for refunds, adjustments, or returns.

    • Optionally, enter your FreshBooks Account ID in the Account ID field to specify which account the credit note will be created in.

    • Optionally, enter the Client ID in the Clientid field to associate the credit note with a specific client.

    • The Nexset data will be sent as the JSON body of a POST request. Ensure the Nexset fields align with the FreshBooks credit note object schema.

    Create a New Estimate / Quote

    This endpoint creates a new estimate (quote) in a FreshBooks account. Use this template to automate quote generation—for example, creating estimates in FreshBooks when proposals are approved in a CRM or project management system.

    • Enter your FreshBooks Account ID in the Account Id field. This identifies the FreshBooks account in which the estimate will be created.

    • The Nexset data will be sent as the JSON body of a POST request. Include required estimate fields such as client ID and line items. For the full list of accepted fields, refer to the FreshBooks Estimates API documentation.

    Create Client

    This endpoint creates a new client record in a FreshBooks account. Use this template to sync client data from a CRM, e-commerce platform, or other system into FreshBooks, ensuring your client list remains current.

    • Enter your FreshBooks Account ID in the Account Id field. This identifies the FreshBooks account in which the new client will be created.

    • The Nexset data will be sent as the JSON body of a POST request. Include required fields such as the client's first name, last name, and email address. For the full list of accepted fields, refer to the FreshBooks Clients API documentation.

    Update an Existing Client in FreshBooks

    This endpoint updates an existing client record in a FreshBooks account. Use this template to keep client contact information, billing details, or account settings current when changes occur in an upstream system.

    • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account that contains the client record to be updated.

    • Enter the ID of the client to be updated in the Client ID field. You can retrieve client IDs using the List Clients source endpoint.

    • The Nexset data will be sent as the JSON body of a PUT request. Include only the fields you wish to update. For the full list of updatable fields, refer to the FreshBooks Clients API documentation.

    Create Item

    This endpoint creates a new item or service in a FreshBooks account. Use this template to sync your product or service catalog into FreshBooks so that items are available for use on invoices and estimates.

    • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account in which the new item will be created.

    • The Nexset data will be sent as the JSON body of a POST request. Include required fields such as the item name and unit cost. For additional accepted fields, refer to the FreshBooks API documentation.

    Create a New Expense Record in FreshBooks

    This endpoint creates a new expense record in a FreshBooks account. Use this template to automatically log expenses in FreshBooks from external sources such as expense reporting tools, corporate card feeds, or receipt capture systems.

    • Enter your FreshBooks Account ID in the Account Id field. This identifies the FreshBooks account in which the expense will be created.

    • The Nexset data will be sent as the JSON body of a POST request. Include required fields such as amount, category ID, and date. For the full list of accepted fields, refer to the FreshBooks Expenses API documentation.

    Update an Existing Expense Record

    This endpoint updates an existing expense record in a FreshBooks account. Use this template to keep expense records current when changes occur in an upstream expense management or ERP system.

    • Enter your FreshBooks Account ID in the Account Id field. This identifies the FreshBooks account that contains the expense record to be updated.

    • Enter the ID of the expense to be updated in the Expense Id field. You can retrieve expense IDs using the List Expenses source endpoint.

    • The Nexset data will be sent as the JSON body of a PUT request. For the full list of updatable fields, refer to the FreshBooks Expenses API documentation.

    Create Payment

    This endpoint records a new payment against an invoice in a FreshBooks account. Use this template to automatically log payments received in external payment platforms (such as Stripe or PayPal) against the corresponding FreshBooks invoices.

    • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account in which the payment will be recorded.

    • The Nexset data will be sent as the JSON body of a POST request. Include required fields such as invoice ID (invoiceid), amount, and payment date. For the full list of accepted fields, refer to the FreshBooks Payments API documentation.

    Create Checkout Link

    This endpoint creates a new checkout link for payment collection in a FreshBooks account. Use this template to programmatically generate payment links that can be shared with clients to collect payments outside of the standard FreshBooks invoicing workflow.

    • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account for which the checkout link will be created.

    • The Nexset data will be sent as the JSON body of a POST request. For the required fields and checkout link options, refer to the FreshBooks Payments API documentation.

    Enable Payment Options on Invoice Profile

    This endpoint enables payment gateway options for a specific invoice profile in a FreshBooks account. Use this template to configure which payment methods are available to clients when they receive invoices generated from a given invoice profile.

    • Enter your FreshBooks Account ID in the Account Id field. This identifies the FreshBooks account containing the invoice profile to be updated.

    • Enter the ID of the invoice profile in the Id field. This is the unique identifier for the invoice profile for which payment options will be enabled.

    • The Nexset data will be sent as the JSON body of a POST request containing the payment option configuration. For details on the accepted payment gateway options, refer to the FreshBooks Payments API documentation.

    Create a Tax Rate in FreshBooks

    This endpoint creates a new tax rate in a FreshBooks account. Use this template to programmatically add tax configurations to FreshBooks, for example when onboarding new business entities or updating tax rates across multiple accounts.

    • Enter your FreshBooks Account ID in the Account ID field. This identifies the FreshBooks account in which the tax rate will be created.

    • The Nexset data will be sent as the JSON body of a POST request. Include required fields such as tax name, tax number, and rate percentage. For the full list of accepted fields, refer to the FreshBooks Taxes API documentation.

    Create a Time Entry in FreshBooks

    This endpoint creates a new time tracking entry in a FreshBooks business. Use this template to sync time entries from external time tracking tools (such as Toggl, Harvest, or Jira) into FreshBooks for billing and project management purposes.

    • Enter your FreshBooks Business ID in the Business ID field. Note that time tracking endpoints use 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.

    • The Nexset data will be sent as the JSON body of a POST request. Include required fields such as duration, started time, and client or project association. For the full list of accepted fields, refer to the FreshBooks Time Entries API documentation.

    Time tracking endpoints in FreshBooks use a Business ID, whereas most accounting endpoints (invoices, clients, expenses) use an Account ID. Ensure you are using the correct identifier type for this endpoint.

    Create Retainer

    This endpoint creates a new retainer agreement within a FreshBooks business. Use this template to automate the setup of recurring retainer engagements in FreshBooks, for example when a client signs a retainer contract in an external CRM or contract management system.

    • Enter your FreshBooks Business ID in the Business ID field. The Business ID identifies the FreshBooks business under which the retainer will be created. You can retrieve this value from the GET https://api.freshbooks.com/auth/api/v1/users/me endpoint, in the business_id field of the business_memberships array.

    • The Nexset data will be sent as the JSON body of a POST request containing the retainer configuration. For more information, refer to the FreshBooks API documentation.

Configure Manually

FreshBooks destinations can be manually configured to send data to any valid FreshBooks API endpoint.

Using manual configuration, you can also configure Nexla to automatically send the response received from the FreshBooks API after each call to a new Nexla webhook data source.

API Method

  1. To manually configure this destination, 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. Common methods for FreshBooks write operations include:

    • POST: For creating new records (invoices, clients, expenses, payments, etc.)
    • PUT: For fully updating existing records
    • DELETE: For removing records (e.g., voiding invoices)

Data Format

  1. Select the format in which the Nexset data will be sent to the FreshBooks API from the Content Format pulldown menu. FreshBooks requires data to be sent in JSON format for all write operations. Nexla will automatically convert the data to the selected format for each API call.

API Endpoint URL

  1. Enter the URL of the FreshBooks API endpoint to which you want to send the Nexset data in the URL field. For update or delete operations, append the ID of the object to be updated or deleted at the end of the URL.

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

    For example, to create a new invoice: https://api.freshbooks.com/accounting/account/MJx3p/invoices/invoices

    For time tracking endpoints: https://api.freshbooks.com/timetracking/business/{businessId}/time_entries

Request Headers

Optional
  • If Nexla should include any additional request headers in API calls to this destination, 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 other headers already present in the FreshBooks credential. Authentication headers are automatically handled by Nexla based on your credential configuration.

Exclude Attributes from the Call

Optional
  • If any record attributes in the Nexset should be omitted when sending data to this FreshBooks destination, select the attributes from the Exclude Attributes pulldown menu.

  • Any number of attributes can be selected for exclusion, and all excluded attributes will be shown in the field. To remove an attribute from the list, click the X icon next to the attribute name.

Record Batching

Optional
  1. If records should be sent to this destination in batched API calls, check the box next to Would you like to batch your records together? to enable record batching.

  2. Enter the maximum number of records that should be batched together in a single API call in the Batch Size field. By default, this value is set to 100.

  3. Select the algorithm that will be used to group records into batches from the Grouping Algorithm pulldown menu. The sample request shown in the panel on the right will be updated to reflect the current batching settings.

Most FreshBooks API write endpoints accept a single record per request. Verify that the target FreshBooks endpoint supports batch requests before enabling record batching, as sending multiple records in a single call may result in API errors.

Response Webhook

Optional

Nexla can automatically send the response received from the FreshBooks API after each call to a new Nexla webhook data source. This option allows you to track the status of each API call and capture any additional information returned, such as newly created record IDs or error details.

  • To enable this option, check the box next to Would you like to process the API response as a Nexla Webhook source?.

Sample Request Payload

Sample request payloads containing a portion of the Nexset data that will be sent to the FreshBooks API endpoint based on the current settings are shown in the Sample Payload panel on the right. These samples can be referenced to ensure that the destination and request settings are correctly configured.

  • Click on a sample request payload to expand it and view the complete payload content.
  • Sample payloads are automatically updated with each setting change, making it easy to verify that changes achieve the desired effect.

Endpoint Testing (Manual Configuration)

After all endpoint settings have been configured, Nexla can send a test payload to the FreshBooks API to ensure that the destination is configured correctly.

  1. To send a test payload, select the Test button at the top of the Sample Payload panel, and click on a listed sample payload to expand it.

  2. If any modifications to the sample payload are needed, make the necessary changes directly within the sample window.

  3. Click the Send Test Data button at the top of a sample payload to send the test payload to the FreshBooks API using the current settings.

Save & Activate the Destination

  • Once all endpoint settings have been configured, click the Done button in the upper right corner of the screen to save and create the destination. To begin sending data to the configured FreshBooks endpoint, open the destination resource menu, and select Activate.

    The Nexset data will not be sent to FreshBooks until the destination is activated. Destinations can be activated immediately or at a later time, providing full control over data movement.