> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# FreshBooks API reference

> API reference for the FreshBooks plugin in Corsair: every `freshbooks.api.*` operation with its input and output types, taken from the plugin's Zod schemas.

> [!NOTE]
>
> **New to Corsair?** See [API access](https://docs.corsair.dev/concepts/api.md), [authentication](https://docs.corsair.dev/concepts/auth.md), and [error handling](https://docs.corsair.dev/concepts/error-handling).

## Abilities

### list

`abilities.list`

Read what the signed-in identity may do in the business's projects.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.abilities.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `abilities` | `object[] \| null` | No | — |

> [accordion] abilities full type
>
> ```ts theme={null}
> {
>   name?: any | null,
>   value?: any | null
> }[] | null
> ```

***

## Account Gateways

### delete

`accountGateways.delete`

Disconnect a payment gateway from the account.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.accountGateways.delete({ gatewayId: '12' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `gatewayId` | `string \| number` | Yes | The gateway id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### list

`accountGateways.list`

List the payment gateways connected to the accounting account.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.accountGateways.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |

**Output:** *empty object*

***

## Adjustment Journal Entries

### create

`adjustmentJournalEntries.create`

Create an adjustment journal entry: a description, a date and balanced debit and credit lines against ledger accounts.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.adjustmentJournalEntries.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |

**Output:** *empty object*

***

### list

`adjustmentJournalEntries.list`

List adjustment journal entries of the business (ledger API, version 2023-09-25).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.adjustmentJournalEntries.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `page_number` | `number` | No | Page number. |
| `page_size` | `number` | No | Results per page. |
| `start_date` | `string` | No | Entries on or after, YYYY-MM-DD. |
| `end_date` | `string` | No | Entries on or before, YYYY-MM-DD. |

**Output:** *empty object*

***

### update

`adjustmentJournalEntries.update`

Change an adjustment journal entry. (PUT /accounting/businesses/\{businessUuid}/journal\_entries/\{journalEntryUuid})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.adjustmentJournalEntries.update({ journalEntryUuid: '0b6f9d3e-1c2a-4e5b-9d8c-7a6b5c4d3e2f' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `journalEntryUuid` | `string \| number` | Yes | The journal entry uuid. |

**Output:** *empty object*

***

## Applications

### create

`applications.create`

Create an OAuth app (name, redirect URIs, scopes).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.applications.create({
	application: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `application` | `object` | Yes | The application fields (FreshBooks wraps every body in its resource name). |
| `name` | `any` | No | — |
| `redirect_uri` | `any` | No | — |
| `description` | `any` | No | — |
| `website_url` | `any` | No | — |
| `settings_url` | `any` | No | — |
| `logo_public_id` | `any` | No | — |

> [accordion] application full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

### list

`applications.list`

List the OAuth apps the signed-in developer owns.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.applications.list({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `any \| null` | No | — |
| `profile` | `object \| null` | No | — |
| `first_name` | `any \| null` | No | — |
| `last_name` | `any \| null` | No | — |
| `email` | `any \| null` | No | — |
| `language` | `any \| null` | No | — |
| `confirmed_at` | `any \| null` | No | — |
| `created_at` | `any \| null` | No | — |
| `unconfirmed_email` | `any \| null` | No | — |
| `setup_complete` | `any \| null` | No | — |
| `phone_numbers` | `object[] \| null` | No | — |
| `addresses` | `any[] \| null` | No | — |
| `profession` | `object \| null` | No | — |
| `links` | `object \| null` | No | — |
| `permissions` | `object \| null` | No | — |
| `groups` | `object[] \| null` | No | — |
| `subscription_statuses` | `object \| null` | No | — |
| `integrations` | `object \| null` | No | — |
| `business_memberships` | `object[] \| null` | No | — |
| `identity_origin` | `any \| null` | No | — |
| `roles` | `object[] \| null` | No | — |

> [accordion] profile full type
>
> ```ts theme={null}
> {
>   setup_complete?: any | null,
>   first_name?: any | null,
>   last_name?: any | null,
>   phone_number?: any | null,
>   address?: any | null,
>   professions?: {
>     id?: any | null,
>     business_id?: any | null,
>     title?: any | null,
>     company?: any | null,
>     designation?: any | null
>   }[] | null
> } | null
> ```

> [accordion] phone\_numbers full type
>
> ```ts theme={null}
> {
>   title?: any | null,
>   phone_number?: any | null
> }[] | null
> ```

> [accordion] profession full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   title?: any | null,
>   company?: any | null,
>   designation?: any | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   me?: any | null,
>   roles?: any | null
> } | null
> ```

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   rAlTo?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     onboarding_checklist.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null
>   } | null,
>   E86QZ?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     quickbooks_integration.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     attachments.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     retainers.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   RmpKp?: {
>     client.limit?: any | null,
>     staff.limit?: any | null,
>     attachments.access?: any | null,
>     advanced_accounting.access?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   J9hAK?: {
>     advanced_accounting.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     business_accountant.limit?: any | null,
>     onboarding_checklist.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   gr1ndR?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   apwodA?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     quickbooks_integration.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null
>   } | null,
>   XgGiT?: {
>     client.limit?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null
>   } | null,
>   7lwxR?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null
>   } | null,
>   4WMVg?: {
>     client.limit?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   x34yX?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null
>   } | null,
>   e1rYq?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null
>   } | null,
>   3ErwB?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null
>   } | null,
>   8NppA?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   j1412?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null
>   } | null,
>   BRAVo?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   M1oaR?: {
>     client.limit?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   E4MaY?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   M1GeK?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   7Po26?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   ZaZdo?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null
>   } | null,
>   pPLMZ?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   EeCnZ?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   pe4MW?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   oN6yL?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   dowO0g?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   yA0R2P?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null
>   } | null,
>   LJZ1p3?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   wkMd2g?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   3x42x2?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   lWn0vG?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null
> } | null
> ```

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   group_id?: any | null,
>   role?: any | null,
>   identity_id?: any | null,
>   business_id?: any | null,
>   active?: any | null
> }[] | null
> ```

> [accordion] subscription\_statuses full type
>
> ```ts theme={null}
> {
>   rALYo?: any | null,
>   E86Qp?: any | null,
>   RnPKp?: any | null,
>   J7nAK?: any | null,
>   gjndR?: any | null,
>   apw1A?: any | null,
>   0XaOw?: any | null,
>   7lwxr?: any | null,
>   4VMVg?: any | null,
>   x33xX?: any | null,
>   e1yRq?: any | null,
>   3eRwB?: any | null,
>   8nPPA?: any | null,
>   j1322?: any | null,
>   B3AVo?: any | null,
>   M1OaR?: any | null,
>   E3MAY?: any | null,
>   M1GeK?: any | null,
>   7PO26?: any | null,
>   ZAZdo?: any | null,
>   0PJMZ?: any | null,
>   Ee0nZ?: any | null,
>   pe6MW?: any | null,
>   oM6yL?: any | null,
>   dowQ0g?: any | null,
>   yA0R2P?: any | null,
>   LJZ1p4?: any | null,
>   wkMd2g?: any | null,
>   3x62x2?: any | null,
>   lwy0vG?: any | null
> } | null
> ```

> [accordion] integrations full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] business\_memberships full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   role?: any | null,
>   unacknowledged_change?: any | null,
>   fasttrack_token?: any | null,
>   business?: {
>     id?: any | null,
>     name?: any | null,
>     account_id?: any | null,
>     date_format?: any | null,
>     address?: {
>       id?: any | null,
>       street?: any | null,
>       city?: any | null,
>       province?: any | null,
>       country?: any | null,
>       postal_code?: any | null
>     } | null,
>     phone_number?: {
>       id?: any | null,
>       phone_number?: any | null
>     } | null,
>     business_clients?: {
>       id?: any | null,
>       business_id?: any | null,
>       account_id?: any | null,
>       userid?: any | null,
>       client_business?: {
>         business_id?: any | null
>       } | null,
>       account_business?: {
>         account_business_id?: any | null,
>         account_id?: any | null
>       } | null
>     }[] | null
>   } | null
> }[] | null
> ```

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   role?: any | null,
>   systemid?: any | null,
>   userid?: any | null,
>   created_at?: any | null,
>   links?: {
>     destroy?: any | null
>   } | null,
>   accountid?: any | null
> }[] | null
> ```

***

### update

`applications.update`

Change an OAuth app by its client id. (PUT /auth/api/v1/partners/applications/\{clientId})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.applications.update({
	clientId: 'app-client-id',
	application: { name: 'My app' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `clientId` | `string \| number` | Yes | The client id. |
| `application` | `object` | Yes | The application fields (FreshBooks wraps every body in its resource name). |
| `name` | `any` | No | — |
| `client_secret` | `any` | No | — |
| `redirect_uri` | `any` | No | — |
| `description` | `any` | No | — |
| `website_url` | `any` | No | — |
| `settings_url` | `any` | No | — |
| `logo_public_id` | `any` | No | — |

> [accordion] application full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

## Bill Payments

### create

`billPayments.create`

Create a payment made on a bill. Fields go in `bill_payment`.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.billPayments.create({
	bill_payment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `bill_payment` | `object` | Yes | The bill payment fields (FreshBooks wraps every body in its resource name). |

> [accordion] bill\_payment full type
>
> ```ts theme={null}
> {
>   billid?: any,
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   payment_type?: any,
>   paid_date?: any,
>   note?: any,
>   bill?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_payment` | `object \| null` | No | — |

> [accordion] bill\_payment full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   billid?: any | null,
>   id?: any | null,
>   matched_with_expense?: any | null,
>   note?: any | null,
>   paid_date?: any | null,
>   payment_type?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`billPayments.delete`

Delete a payment made on a bill (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.billPayments.delete({ billPaymentId: '7766' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billPaymentId` | `string \| number` | Yes | The bill payment id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bill_payment?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     billid?: any | null,
>     id?: any | null,
>     matched_with_expense?: any | null,
>     note?: any | null,
>     paid_date?: any | null,
>     payment_type?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`billPayments.get`

Read one payment made on a bill. (GET /accounting/account/\{accountId}/bill\_payments/bill\_payments/\{billPaymentId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.billPayments.get({ billPaymentId: '7766' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billPaymentId` | `string \| number` | Yes | The bill payment id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_payment` | `object \| null` | No | — |

> [accordion] bill\_payment full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   billid?: any | null,
>   id?: any | null,
>   matched_with_expense?: any | null,
>   note?: any | null,
>   paid_date?: any | null,
>   payment_type?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`billPayments.list`

List payments made on bills, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.billPayments.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_payments` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] bill\_payments full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   billid?: any | null,
>   id?: any | null,
>   matched_with_expense?: any | null,
>   note?: any | null,
>   paid_date?: any | null,
>   payment_type?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`billPayments.update`

Change fields of a payment made on a bill. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.billPayments.update({
	billPaymentId: '7766',
	bill_payment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billPaymentId` | `string \| number` | Yes | The bill payment id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `bill_payment` | `object` | Yes | The bill payment fields (FreshBooks wraps every body in its resource name). |

> [accordion] bill\_payment full type
>
> ```ts theme={null}
> {
>   billid?: any,
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   payment_type?: any,
>   paid_date?: any,
>   note?: any,
>   bill?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_payment` | `object \| null` | No | — |

> [accordion] bill\_payment full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   billid?: any | null,
>   id?: any | null,
>   matched_with_expense?: any | null,
>   note?: any | null,
>   paid_date?: any | null,
>   payment_type?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Bills

### archive

`bills.archive`

Archive a bill (sets vis\_state to 2): hidden from lists, still counted.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.bills.archive({ billId: '6677' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billId` | `string \| number` | Yes | The bill id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill` | `object \| null` | No | — |

> [accordion] bill full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   attachment?: any | null,
>   bill_number?: any | null,
>   bill_payments?: any[] | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   id?: any | null,
>   issue_date?: any | null,
>   language?: any | null,
>   lines?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     category?: {
>       category?: any | null,
>       categoryid?: any | null,
>       created_at?: any | null,
>       id?: any | null,
>       is_cogs?: any | null,
>       is_editable?: any | null,
>       parentid?: any | null,
>       updated_at?: any | null,
>       vis_state?: any | null
>     } | null,
>     description?: any | null,
>     id?: any | null,
>     list_index?: any | null,
>     quantity?: any | null,
>     tax_amount1?: any | null,
>     tax_amount2?: any | null,
>     tax_authorityid1?: any | null,
>     tax_authorityid2?: any | null,
>     tax_name1?: any | null,
>     tax_name2?: any | null,
>     tax_percent1?: any | null,
>     tax_percent2?: any | null,
>     total_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     unit_cost?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   overall_category?: any | null,
>   overall_description?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   status?: any | null,
>   tax_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### create

`bills.create`

Create a bill from a vendor. Fields go in `bill`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.bills.create({
	bill: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `vendor[]` | No | Extra data to include: vendor (include vendor details in response) |
| `bill` | `object` | Yes | The bill fields (FreshBooks wraps every body in its resource name). |

> [accordion] bill full type
>
> ```ts theme={null}
> {
>   vendorid?: any,
>   previous_vendor_id?: any,
>   bill_number?: any,
>   issue_date?: any,
>   due_offset_days?: any,
>   currency_code?: any,
>   language?: any,
>   lines?: {
>     tax_percent1?: any,
>     tax_percent2?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     },
>     description?: any,
>     tax_name1?: any,
>     quantity?: any,
>     tax_name2?: any,
>     compounded_tax?: any,
>     categoryid?: any
>   }[],
>   attachment?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill` | `object \| null` | No | — |

> [accordion] bill full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   attachment?: any | null,
>   bill_number?: any | null,
>   bill_payments?: any[] | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   id?: any | null,
>   issue_date?: any | null,
>   language?: any | null,
>   lines?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     category?: {
>       category?: any | null,
>       categoryid?: any | null,
>       created_at?: any | null,
>       id?: any | null,
>       is_cogs?: any | null,
>       is_editable?: any | null,
>       parentid?: any | null,
>       updated_at?: any | null,
>       vis_state?: any | null
>     } | null,
>     description?: any | null,
>     id?: any | null,
>     list_index?: any | null,
>     quantity?: any | null,
>     tax_amount1?: any | null,
>     tax_amount2?: any | null,
>     tax_authorityid1?: any | null,
>     tax_authorityid2?: any | null,
>     tax_name1?: any | null,
>     tax_name2?: any | null,
>     tax_percent1?: any | null,
>     tax_percent2?: any | null,
>     total_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     unit_cost?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   overall_category?: any | null,
>   overall_description?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   status?: any | null,
>   tax_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`bills.delete`

Delete a bill from a vendor (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.bills.delete({ billId: '6677' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billId` | `string \| number` | Yes | The bill id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bill?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     attachment?: any | null,
>     bill_number?: any | null,
>     bill_payments?: any[] | null,
>     created_at?: any | null,
>     currency_code?: any | null,
>     due_date?: any | null,
>     due_offset_days?: any | null,
>     id?: any | null,
>     issue_date?: any | null,
>     language?: any | null,
>     lines?: {
>       amount?: {
>         amount?: any | null,
>         code?: any | null
>       } | null,
>       category?: {
>         category?: any | null,
>         categoryid?: any | null,
>         created_at?: any | null,
>         id?: any | null,
>         is_cogs?: any | null,
>         is_editable?: any | null,
>         parentid?: any | null,
>         updated_at?: any | null,
>         vis_state?: any | null
>       } | null,
>       description?: any | null,
>       id?: any | null,
>       list_index?: any | null,
>       quantity?: any | null,
>       tax_amount1?: any | null,
>       tax_amount2?: any | null,
>       tax_authorityid1?: any | null,
>       tax_authorityid2?: any | null,
>       tax_name1?: any | null,
>       tax_name2?: any | null,
>       tax_percent1?: any | null,
>       tax_percent2?: any | null,
>       total_amount?: {
>         amount?: any | null,
>         code?: any | null
>       } | null,
>       unit_cost?: {
>         amount?: any | null,
>         code?: any | null
>       } | null
>     }[] | null,
>     outstanding?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     overall_category?: any | null,
>     overall_description?: any | null,
>     paid?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     status?: any | null,
>     tax_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     total_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     updated_at?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`bills.get`

Read one bill from a vendor. (GET /accounting/account/\{accountId}/bills/bills/\{billId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.bills.get({ billId: '6677' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billId` | `string \| number` | Yes | The bill id. |
| `include` | `vendor[]` | No | Extra data to include: vendor (include vendor details in response) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill` | `object \| null` | No | — |

> [accordion] bill full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   attachment?: any | null,
>   bill_number?: any | null,
>   bill_payments?: any[] | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   id?: any | null,
>   issue_date?: any | null,
>   language?: any | null,
>   lines?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     category?: {
>       category?: any | null,
>       categoryid?: any | null,
>       created_at?: any | null,
>       id?: any | null,
>       is_cogs?: any | null,
>       is_editable?: any | null,
>       parentid?: any | null,
>       updated_at?: any | null,
>       vis_state?: any | null
>     } | null,
>     description?: any | null,
>     id?: any | null,
>     list_index?: any | null,
>     quantity?: any | null,
>     tax_amount1?: any | null,
>     tax_amount2?: any | null,
>     tax_authorityid1?: any | null,
>     tax_authorityid2?: any | null,
>     tax_name1?: any | null,
>     tax_name2?: any | null,
>     tax_percent1?: any | null,
>     tax_percent2?: any | null,
>     total_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     unit_cost?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   overall_category?: any | null,
>   overall_description?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   status?: any | null,
>   tax_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`bills.list`

List bills from vendors, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.bills.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>: vendorid, statuses, currency\_code, ids |
| `include` | `vendor[]` | No | Extra data to include: vendor (include vendor details in response) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
>   vendorid?: any,
>   statuses?: any,
>   currency_code?: any,
>   ids?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_vendors` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] bill\_vendors full type
>
> ```ts theme={null}
> {
>   account_number?: any | null,
>   city?: any | null,
>   country?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   is_1099?: any | null,
>   language?: any | null,
>   outstanding_balance?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   overdue_balance?: any[] | null,
>   phone?: any | null,
>   postal_code?: any | null,
>   primary_contact_email?: any | null,
>   primary_contact_first_name?: any | null,
>   primary_contact_last_name?: any | null,
>   province?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   tax_defaults?: {
>     amount?: any | null,
>     created_at?: any | null,
>     enabled?: any | null,
>     name?: any | null,
>     system_taxid?: any | null,
>     tax_authorityid?: any | null,
>     taxid?: any | null,
>     updated_at?: any | null,
>     vendorid?: any | null
>   }[] | null,
>   updated_at?: any | null,
>   vendor_name?: any | null,
>   vendorid?: any | null,
>   vis_state?: any | null,
>   website?: any | null
> }[] | null
> ```

***

### update

`bills.update`

Change fields of a bill from a vendor. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.bills.update({
	billId: '6677',
	bill: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `billId` | `string \| number` | Yes | The bill id. |
| `include` | `vendor[]` | No | Extra data to include: vendor (include vendor details in response) |
| `bill` | `object` | Yes | The bill fields (FreshBooks wraps every body in its resource name). |

> [accordion] bill full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill` | `object \| null` | No | — |

> [accordion] bill full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   attachment?: any | null,
>   bill_number?: any | null,
>   bill_payments?: any[] | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   id?: any | null,
>   issue_date?: any | null,
>   language?: any | null,
>   lines?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     category?: {
>       category?: any | null,
>       categoryid?: any | null,
>       created_at?: any | null,
>       id?: any | null,
>       is_cogs?: any | null,
>       is_editable?: any | null,
>       parentid?: any | null,
>       updated_at?: any | null,
>       vis_state?: any | null
>     } | null,
>     description?: any | null,
>     id?: any | null,
>     list_index?: any | null,
>     quantity?: any | null,
>     tax_amount1?: any | null,
>     tax_amount2?: any | null,
>     tax_authorityid1?: any | null,
>     tax_authorityid2?: any | null,
>     tax_name1?: any | null,
>     tax_name2?: any | null,
>     tax_percent1?: any | null,
>     tax_percent2?: any | null,
>     total_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     unit_cost?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   overall_category?: any | null,
>   overall_description?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   status?: any | null,
>   tax_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Bill Vendors

### create

`billVendors.create`

Create a bill vendor. Fields go in `bill_vendor`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.billVendors.create({
	bill_vendor: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `bill_vendor` | `object` | Yes | The bill vendor fields (FreshBooks wraps every body in its resource name). |

> [accordion] bill\_vendor full type
>
> ```ts theme={null}
> {
>   vendor_name?: any,
>   primary_contact_first_name?: any,
>   primary_contact_last_name?: any,
>   primary_contact_email?: any,
>   primary_contact?: any,
>   street?: any,
>   street2?: any,
>   city?: any,
>   province?: any,
>   postal_code?: any,
>   country?: any,
>   account_number?: any,
>   phone?: any,
>   website?: any,
>   currency_code?: any,
>   language?: any,
>   is_1099?: any,
>   tax_defaults?: any[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_vendor` | `object \| null` | No | — |

> [accordion] bill\_vendor full type
>
> ```ts theme={null}
> {
>   account_number?: any | null,
>   city?: any | null,
>   country?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   is_1099?: any | null,
>   language?: any | null,
>   outstanding_balance?: any[] | null,
>   overdue_balance?: any[] | null,
>   phone?: any | null,
>   postal_code?: any | null,
>   primary_contact_email?: any | null,
>   primary_contact_first_name?: any | null,
>   primary_contact_last_name?: any | null,
>   province?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   tax_defaults?: any[] | null,
>   updated_at?: any | null,
>   vendor_name?: any | null,
>   vendorid?: any | null,
>   vis_state?: any | null,
>   website?: any | null
> } | null
> ```

***

### delete

`billVendors.delete`

Delete a bill vendor (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.billVendors.delete({ vendorId: '5566' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `vendorId` | `string \| number` | Yes | The vendor id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   bill_vendor?: {
>     account_number?: any | null,
>     city?: any | null,
>     country?: any | null,
>     created_at?: any | null,
>     currency_code?: any | null,
>     is_1099?: any | null,
>     language?: any | null,
>     outstanding_balance?: any[] | null,
>     overdue_balance?: any[] | null,
>     phone?: any | null,
>     postal_code?: any | null,
>     primary_contact_email?: any | null,
>     primary_contact_first_name?: any | null,
>     primary_contact_last_name?: any | null,
>     province?: any | null,
>     street?: any | null,
>     street2?: any | null,
>     tax_defaults?: any[] | null,
>     updated_at?: any | null,
>     vendor_name?: any | null,
>     vendorid?: any | null,
>     vis_state?: any | null,
>     website?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`billVendors.get`

Read one bill vendor. (GET /accounting/account/\{accountId}/bill\_vendors/bill\_vendors/\{vendorId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.billVendors.get({ vendorId: '5566' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `vendorId` | `string \| number` | Yes | The vendor id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_vendor` | `object \| null` | No | — |

> [accordion] bill\_vendor full type
>
> ```ts theme={null}
> {
>   account_number?: any | null,
>   city?: any | null,
>   country?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   is_1099?: any | null,
>   language?: any | null,
>   outstanding_balance?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   overdue_balance?: any[] | null,
>   phone?: any | null,
>   postal_code?: any | null,
>   primary_contact_email?: any | null,
>   primary_contact_first_name?: any | null,
>   primary_contact_last_name?: any | null,
>   province?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   tax_defaults?: any[] | null,
>   updated_at?: any | null,
>   vendor_name?: any | null,
>   vendorid?: any | null,
>   vis_state?: any | null,
>   website?: any | null
> } | null
> ```

***

### list

`billVendors.list`

List bill vendors, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.billVendors.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_vendors` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] bill\_vendors full type
>
> ```ts theme={null}
> {
>   account_number?: any | null,
>   city?: any | null,
>   country?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   is_1099?: any | null,
>   language?: any | null,
>   outstanding_balance?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   overdue_balance?: any[] | null,
>   phone?: any | null,
>   postal_code?: any | null,
>   primary_contact_email?: any | null,
>   primary_contact_first_name?: any | null,
>   primary_contact_last_name?: any | null,
>   province?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   tax_defaults?: any[] | null,
>   updated_at?: any | null,
>   vendor_name?: any | null,
>   vendorid?: any | null,
>   vis_state?: any | null,
>   website?: any | null
> }[] | null
> ```

***

### update

`billVendors.update`

Change fields of a bill vendor. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.billVendors.update({
	vendorId: '5566',
	bill_vendor: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `vendorId` | `string \| number` | Yes | The vendor id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `bill_vendor` | `object` | Yes | The bill vendor fields (FreshBooks wraps every body in its resource name). |

> [accordion] bill\_vendor full type
>
> ```ts theme={null}
> {
>   vendor_name?: any,
>   primary_contact_first_name?: any,
>   primary_contact_last_name?: any,
>   primary_contact_email?: any,
>   primary_contact?: any,
>   street?: any,
>   street2?: any,
>   city?: any,
>   province?: any,
>   postal_code?: any,
>   country?: any,
>   account_number?: any,
>   phone?: any,
>   website?: any,
>   currency_code?: any,
>   language?: any,
>   is_1099?: any,
>   tax_defaults?: any[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `bill_vendor` | `object \| null` | No | — |

> [accordion] bill\_vendor full type
>
> ```ts theme={null}
> {
>   account_number?: any | null,
>   city?: any | null,
>   country?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   is_1099?: any | null,
>   language?: any | null,
>   outstanding_balance?: {
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   overdue_balance?: any[] | null,
>   phone?: any | null,
>   postal_code?: any | null,
>   primary_contact_email?: any | null,
>   primary_contact_first_name?: any | null,
>   primary_contact_last_name?: any | null,
>   province?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   tax_defaults?: any[] | null,
>   updated_at?: any | null,
>   vendor_name?: any | null,
>   vendorid?: any | null,
>   vis_state?: any | null,
>   website?: any | null
> } | null
> ```

***

## Businesses

### create

`businesses.create`

Add a business to the signed-in identity. Fields go in `business` (name, address...).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.businesses.create({
	business: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `business` | `object` | Yes | The business fields (FreshBooks wraps every body in its resource name). |
| `name` | `any` | No | — |
| `date_format` | `any` | No | — |
| `address_attributes` | `object` | No | — |
| `phone_number_attributes` | `any` | No | — |

> [accordion] business full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] address\_attributes full type
>
> ```ts theme={null}
> {
>   country?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `any \| null` | No | — |
| `name` | `any \| null` | No | — |
| `account_id` | `any \| null` | No | — |
| `business_group` | `object \| null` | No | — |
| `date_format` | `any \| null` | No | — |
| `address` | `object \| null` | No | — |
| `phone_number` | `any \| null` | No | — |
| `business_clients` | `any[] \| null` | No | — |

> [accordion] business\_group full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   category?: any | null,
>   members?: {
>     id?: any | null,
>     group_id?: any | null,
>     role?: any | null,
>     identity_id?: any | null,
>     first_name?: any | null,
>     last_name?: any | null,
>     email?: any | null,
>     company?: any | null,
>     business_id?: any | null,
>     unacknowledged_change?: any | null,
>     active?: any | null
>   }[] | null
> } | null
> ```

> [accordion] address full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   street?: any | null,
>   city?: any | null,
>   province?: any | null,
>   country?: any | null,
>   postal_code?: any | null
> } | null
> ```

***

### delete

`businesses.delete`

Delete a business from the signed-in identity, with its data. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.businesses.delete({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### listUsers

`businesses.listUsers`

List the identities (owner, team members, clients) that belong to a business.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.businesses.listUsers({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `any \| null` | No | — |
| `name` | `any \| null` | No | — |
| `account_id` | `any \| null` | No | — |
| `business_group` | `object \| null` | No | — |
| `date_format` | `any \| null` | No | — |
| `address` | `object \| null` | No | — |
| `phone_number` | `any \| null` | No | — |
| `business_clients` | `any[] \| null` | No | — |

> [accordion] business\_group full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   category?: any | null,
>   members?: {
>     id?: any | null,
>     group_id?: any | null,
>     role?: any | null,
>     identity_id?: any | null,
>     first_name?: any | null,
>     last_name?: any | null,
>     email?: any | null,
>     company?: any | null,
>     business_id?: any | null,
>     unacknowledged_change?: any | null,
>     active?: any | null
>   }[] | null
> } | null
> ```

> [accordion] address full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   street?: any | null,
>   city?: any | null,
>   province?: any | null,
>   country?: any | null,
>   postal_code?: any | null
> } | null
> ```

***

## Callbacks

### create

`callbacks.create`

Register a webhook: `callback.event` (invoice.create, or a noun like invoice for all its events) and `callback.uri`. FreshBooks then POSTs a verification code to the URI; send it back with callbacks.verify.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.callbacks.create({
	callback: { event: 'invoice.create', uri: 'https://example.com/hooks/freshbooks' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `callback` | `object` | Yes | The callback fields (FreshBooks wraps every body in its resource name). |

> [accordion] callback full type
>
> ```ts theme={null}
> {
>   event?: any,
>   uri?: any
> }
> ```

**Output:** *empty object*

***

### delete

`callbacks.delete`

Delete a webhook callback. (DELETE /events/account/\{accountId}/events/callbacks/\{callbackId})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.callbacks.delete({ callbackId: '2001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `callbackId` | `string \| number` | Yes | The callback id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`callbacks.get`

Read one webhook callback. (GET /events/account/\{accountId}/events/callbacks/\{callbackId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.callbacks.get({ callbackId: '2001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `callbackId` | `string \| number` | Yes | The callback id. |

**Output:** *empty object*

***

### list

`callbacks.list`

List the webhook callbacks registered on the account.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.callbacks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>: event |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
>   event?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `callbacks` | `any[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

***

### resendVerification

`callbacks.resendVerification`

Ask FreshBooks to post the verification code to the webhook URI again (also re-enables a webhook it disabled).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.callbacks.resendVerification({ callbackId: '2001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `callbackId` | `string \| number` | Yes | The callback id. |

**Output:** *empty object*

***

### verify

`callbacks.verify`

Activate a webhook with the verifier FreshBooks posted to its URI (`callback.verifier`). The verifier is also the secret that signs every delivery.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.callbacks.verify({
	callbackId: '2001',
	callback: { verifier: 'scADVVi5QuKuj5qTjVkbJNYQe7V7USpGd' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `callbackId` | `string \| number` | Yes | The callback id. |
| `callback` | `object` | Yes | The callback fields (FreshBooks wraps every body in its resource name). |

> [accordion] callback full type
>
> ```ts theme={null}
> {
>   callback_id?: any,
>   verifier?: any
> }
> ```

**Output:** *empty object*

***

## Checkout Links

### create

`checkoutLinks.create`

Create a checkout link that takes card or bank payments for an amount.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.checkoutLinks.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `item_id` | `any` | No | — |
| `amount` | `any` | No | — |
| `currency` | `any` | No | — |
| `note` | `any` | No | — |
| `is_active` | `any` | No | — |
| `send_admin_receipt` | `any` | No | — |
| `created_at` | `any` | No | — |
| `taxes` | `object[]` | No | — |
| `item_name` | `any` | No | — |

> [accordion] taxes full type
>
> ```ts theme={null}
> {
>   name?: any,
>   amount?: any
> }[]
> ```

**Output:** *empty object*

***

### delete

`checkoutLinks.delete`

Delete a checkout link: it stops taking payments.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.checkoutLinks.delete({ checkoutLinkId: '8899' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `checkoutLinkId` | `string \| number` | Yes | The checkout link id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### setPaymentOptions

`checkoutLinks.setPaymentOptions`

Choose the payment gateway options of a checkout link.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.checkoutLinks.setPaymentOptions({ checkoutLinkId: '8899' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `checkoutLinkId` | `string \| number` | Yes | The checkout link id. |
| `has_credit_card` | `any` | No | — |
| `gateway_name` | `any` | No | — |
| `entity_type` | `any` | No | — |
| `entity_id` | `any` | No | — |

**Output:** *empty object*

***

### update

`checkoutLinks.update`

Change a checkout link. (PUT /payments/account/\{accountId}/checkout-links/\{checkoutLinkId})

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.checkoutLinks.update({ checkoutLinkId: '8899' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `checkoutLinkId` | `string \| number` | Yes | The checkout link id. |
| `item_id` | `any` | No | — |
| `amount` | `any` | No | — |
| `currency` | `any` | No | — |
| `note` | `any` | No | — |
| `is_active` | `any` | No | — |
| `send_admin_receipt` | `any` | No | — |
| `taxes` | `object[]` | No | — |
| `item_name` | `any` | No | — |

> [accordion] taxes full type
>
> ```ts theme={null}
> {
>   name?: any,
>   amount?: any
> }[]
> ```

**Output:** *empty object*

***

## Clients

### create

`clients.create`

Create a client. Fields go in `client`. (POST /accounting/account/\{accountId}/users/clients)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.clients.create({
	client: {
		fname: 'Ada',
		lname: 'Lovelace',
		email: 'ada@example.com',
		organization: 'Analytical Engines',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `(outstanding_balance \| credit_balance \| draft_balance \| overdue_balance \| grand_total_balance \| last_activity \| late_reminders \| late_fee)[]` | No | Extra data to include: outstanding\_balance (include client's outstanding balance); credit\_balance (include client's current balance of credit); draft\_balance (include balance of draft invoices for client); overdue\_balance (include overdue balance for the Client); grand\_total\_balance (include grand total for client); last\_activity (include last activity); late\_reminders (include information about late reminders); late\_fee (include information about late fees) |
| `client` | `object` | Yes | The client fields (FreshBooks wraps every body in its resource name). |

> [accordion] client full type
>
> ```ts theme={null}
> {
>   fname?: any,
>   lname?: any,
>   email?: any,
>   organization?: any,
>   vat_name?: any,
>   vat_number?: any,
>   status?: any,
>   note?: any,
>   home_phone?: any,
>   userid?: any,
>   source?: any,
>   highlight_string?: any,
>   p_street?: any,
>   p_street2?: any,
>   p_city?: any,
>   p_country?: any,
>   p_province?: any,
>   p_code?: any,
>   currency_code?: any,
>   language?: any,
>   last_activity?: any,
>   face?: any,
>   late_fee?: any,
>   late_reminders?: any[],
>   contacts?: {
>     email?: any,
>     fname?: any,
>     lname?: any,
>     phone1?: any,
>     userid?: any,
>     face?: any
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `client` | `object \| null` | No | — |

> [accordion] client full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   allow_late_fees?: any | null,
>   allow_late_notifications?: any | null,
>   bus_phone?: any | null,
>   company_industry?: any | null,
>   company_size?: any | null,
>   currency_code?: any | null,
>   direct_link_token?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   fname?: any | null,
>   has_retainer?: any | null,
>   home_phone?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_activity?: any | null,
>   last_login?: any | null,
>   level?: any | null,
>   lname?: any | null,
>   mob_phone?: any | null,
>   note?: any | null,
>   notified?: any | null,
>   num_logins?: any | null,
>   organization?: any | null,
>   p_city?: any | null,
>   p_code?: any | null,
>   p_country?: any | null,
>   p_province?: any | null,
>   p_street?: any | null,
>   p_street2?: any | null,
>   pref_email?: any | null,
>   pref_gmail?: any | null,
>   retainer_id?: any | null,
>   role?: any | null,
>   s_city?: any | null,
>   s_code?: any | null,
>   s_country?: any | null,
>   s_province?: any | null,
>   s_street?: any | null,
>   s_street2?: any | null,
>   signup_date?: any | null,
>   statement_token?: any | null,
>   subdomain?: any | null,
>   updated?: any | null,
>   userid?: any | null,
>   username?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`clients.delete`

Delete a client (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.clients.delete({ clientId: '31006' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `clientId` | `string \| number` | Yes | The client id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   client?: {
>     accounting_systemid?: any | null,
>     allow_late_fees?: any | null,
>     allow_late_notifications?: any | null,
>     bus_phone?: any | null,
>     company_industry?: any | null,
>     company_size?: any | null,
>     currency_code?: any | null,
>     direct_link_token?: any | null,
>     email?: any | null,
>     fax?: any | null,
>     fname?: any | null,
>     has_retainer?: any | null,
>     home_phone?: any | null,
>     id?: any | null,
>     language?: any | null,
>     last_activity?: any | null,
>     last_login?: any | null,
>     level?: any | null,
>     lname?: any | null,
>     mob_phone?: any | null,
>     note?: any | null,
>     notified?: any | null,
>     num_logins?: any | null,
>     organization?: any | null,
>     p_city?: any | null,
>     p_code?: any | null,
>     p_country?: any | null,
>     p_province?: any | null,
>     p_street?: any | null,
>     p_street2?: any | null,
>     pref_email?: any | null,
>     pref_gmail?: any | null,
>     retainer_id?: any | null,
>     role?: any | null,
>     s_city?: any | null,
>     s_code?: any | null,
>     s_country?: any | null,
>     s_province?: any | null,
>     s_street?: any | null,
>     s_street2?: any | null,
>     signup_date?: any | null,
>     statement_token?: any | null,
>     subdomain?: any | null,
>     updated?: any | null,
>     userid?: any | null,
>     username?: any | null,
>     vat_name?: any | null,
>     vat_number?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`clients.get`

Read one client. (GET /accounting/account/\{accountId}/users/clients/\{clientId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.clients.get({ clientId: '31006' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `clientId` | `string \| number` | Yes | The client id. |
| `include` | `(outstanding_balance \| credit_balance \| draft_balance \| overdue_balance \| grand_total_balance \| last_activity \| late_reminders \| late_fee)[]` | No | Extra data to include: outstanding\_balance (include client's outstanding balance); credit\_balance (include client's current balance of credit); draft\_balance (include balance of draft invoices for client); overdue\_balance (include overdue balance for the Client); grand\_total\_balance (include grand total for client); last\_activity (include last activity); late\_reminders (include information about late reminders); late\_fee (include information about late fees) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `client` | `object \| null` | No | — |

> [accordion] client full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   allow_late_fees?: any | null,
>   allow_late_notifications?: any | null,
>   bus_phone?: any | null,
>   company_industry?: any | null,
>   company_size?: any | null,
>   currency_code?: any | null,
>   direct_link_token?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   fname?: any | null,
>   has_retainer?: any | null,
>   home_phone?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_activity?: any | null,
>   last_login?: any | null,
>   level?: any | null,
>   lname?: any | null,
>   mob_phone?: any | null,
>   note?: any | null,
>   notified?: any | null,
>   num_logins?: any | null,
>   organization?: any | null,
>   p_city?: any | null,
>   p_code?: any | null,
>   p_country?: any | null,
>   p_province?: any | null,
>   p_street?: any | null,
>   p_street2?: any | null,
>   pref_email?: any | null,
>   pref_gmail?: any | null,
>   retainer_id?: any | null,
>   role?: any | null,
>   s_city?: any | null,
>   s_code?: any | null,
>   s_country?: any | null,
>   s_province?: any | null,
>   s_street?: any | null,
>   s_street2?: any | null,
>   signup_date?: any | null,
>   statement_token?: any | null,
>   subdomain?: any | null,
>   updated?: any | null,
>   userid?: any | null,
>   username?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`clients.list`

List clients, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.clients.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>: address\_like, email, has\_credit, has\_draft, has\_outstanding, has\_overdue, fname\_like, lname\_like, note\_like, organization\_like, phone\_like, updated\_min, updated\_max, user\_like, userid, userids, username, vis\_state, email\_like |
| `include` | `(outstanding_balance \| credit_balance \| draft_balance \| overdue_balance \| grand_total_balance \| last_activity \| late_reminders \| late_fee)[]` | No | Extra data to include: outstanding\_balance (include client's outstanding balance); credit\_balance (include client's current balance of credit); draft\_balance (include balance of draft invoices for client); overdue\_balance (include overdue balance for the Client); grand\_total\_balance (include grand total for client); last\_activity (include last activity); late\_reminders (include information about late reminders); late\_fee (include information about late fees) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc` (fields: client\_id, organization\_name, email, bus\_phone, updated, fullname, primarycontact, outstanding, overdue, credit). |

> [accordion] search full type
>
> ```ts theme={null}
> {
>   address_like?: any,
>   email?: any,
>   has_credit?: any,
>   has_draft?: any,
>   has_outstanding?: any,
>   has_overdue?: any,
>   fname_like?: any,
>   lname_like?: any,
>   note_like?: any,
>   organization_like?: any,
>   phone_like?: any,
>   updated_min?: any,
>   updated_max?: any,
>   user_like?: any,
>   userid?: any,
>   userids?: any,
>   username?: any,
>   vis_state?: any,
>   email_like?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `clients` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] clients full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   allow_late_fees?: any | null,
>   allow_late_notifications?: any | null,
>   bus_phone?: any | null,
>   company_industry?: any | null,
>   company_size?: any | null,
>   currency_code?: any | null,
>   direct_link_token?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   fname?: any | null,
>   has_retainer?: any | null,
>   home_phone?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_activity?: any | null,
>   last_login?: any | null,
>   level?: any | null,
>   lname?: any | null,
>   mob_phone?: any | null,
>   note?: any | null,
>   notified?: any | null,
>   num_logins?: any | null,
>   organization?: any | null,
>   p_city?: any | null,
>   p_code?: any | null,
>   p_country?: any | null,
>   p_province?: any | null,
>   p_street?: any | null,
>   p_street2?: any | null,
>   pref_email?: any | null,
>   pref_gmail?: any | null,
>   retainer_id?: any | null,
>   role?: any | null,
>   s_city?: any | null,
>   s_code?: any | null,
>   s_country?: any | null,
>   s_province?: any | null,
>   s_street?: any | null,
>   s_street2?: any | null,
>   signup_date?: any | null,
>   statement_token?: any | null,
>   subdomain?: any | null,
>   updated?: any | null,
>   userid?: any | null,
>   username?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`clients.update`

Change fields of a client. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.clients.update({
	clientId: '31006',
	client: { organization: 'Analytical Engines Ltd' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `clientId` | `string \| number` | Yes | The client id. |
| `include` | `(outstanding_balance \| credit_balance \| draft_balance \| overdue_balance \| grand_total_balance \| last_activity \| late_reminders \| late_fee)[]` | No | Extra data to include: outstanding\_balance (include client's outstanding balance); credit\_balance (include client's current balance of credit); draft\_balance (include balance of draft invoices for client); overdue\_balance (include overdue balance for the Client); grand\_total\_balance (include grand total for client); last\_activity (include last activity); late\_reminders (include information about late reminders); late\_fee (include information about late fees) |
| `client` | `object` | Yes | The client fields (FreshBooks wraps every body in its resource name). |

> [accordion] client full type
>
> ```ts theme={null}
> {
>   fname?: any,
>   contacts?: any[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `client` | `object \| null` | No | — |

> [accordion] client full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   allow_late_fees?: any | null,
>   allow_late_notifications?: any | null,
>   bus_phone?: any | null,
>   company_industry?: any | null,
>   company_size?: any | null,
>   currency_code?: any | null,
>   direct_link_token?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   fname?: any | null,
>   has_retainer?: any | null,
>   home_phone?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_activity?: any | null,
>   last_login?: any | null,
>   level?: any | null,
>   lname?: any | null,
>   mob_phone?: any | null,
>   note?: any | null,
>   notified?: any | null,
>   num_logins?: any | null,
>   organization?: any | null,
>   p_city?: any | null,
>   p_code?: any | null,
>   p_country?: any | null,
>   p_province?: any | null,
>   p_street?: any | null,
>   p_street2?: any | null,
>   pref_email?: any | null,
>   pref_gmail?: any | null,
>   retainer_id?: any | null,
>   role?: any | null,
>   s_city?: any | null,
>   s_code?: any | null,
>   s_country?: any | null,
>   s_province?: any | null,
>   s_street?: any | null,
>   s_street2?: any | null,
>   signup_date?: any | null,
>   statement_token?: any | null,
>   subdomain?: any | null,
>   updated?: any | null,
>   userid?: any | null,
>   username?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Contacts

### delete

`contacts.delete`

Delete a client's secondary contact. (DELETE /accounting/account/\{accountId}/users/contacts/\{contactId})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.contacts.delete({ contactId: '4501' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `contactId` | `string \| number` | Yes | The contact id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### update

`contacts.update`

Change a client's secondary contact (email, name, phone).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.contacts.update({
	contactId: '4501',
	contact: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `contactId` | `string \| number` | Yes | The contact id. |
| `contact` | `object` | Yes | The contact fields (FreshBooks wraps every body in its resource name). |

> [accordion] contact full type
>
> ```ts theme={null}
> {
>   email?: any,
>   fname?: any,
>   lname?: any,
>   phone1?: any
> }
> ```

**Output:** *empty object*

***

## Credit Notes

### create

`creditNotes.create`

Create a credit note (goodwill, prepayment or refund credit). Fields go in `credit_note`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.creditNotes.create({
	credit_note: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `credit_note` | `object` | Yes | The credit note fields (FreshBooks wraps every body in its resource name). |

> [accordion] credit\_note full type
>
> ```ts theme={null}
> {
>   credit_number?: any,
>   currency_code?: any,
>   create_date?: any,
>   notes?: any,
>   credit_type?: any,
>   terms?: any,
>   language?: any,
>   lines?: {
>     name?: any,
>     description?: any,
>     taxName1?: any,
>     taxAmount1?: any,
>     taxName2?: any,
>     taxAmount2?: any,
>     compounded_tax?: any,
>     qty?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     },
>     credit_note?: any
>   }[],
>   clientid?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `credit_note` | `object \| null` | No | — |

> [accordion] credit\_note full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   clientid?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   credit_number?: any | null,
>   credit_type?: any | null,
>   creditid?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   description?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   payment_status?: any | null,
>   province?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`creditNotes.delete`

Delete a credit note (goodwill, prepayment or refund credit) (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.creditNotes.delete({ creditId: '30947' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `creditId` | `string \| number` | Yes | The credit id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   credit_note?: {
>     accounting_systemid?: any | null,
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     city?: any | null,
>     clientid?: any | null,
>     code?: any | null,
>     country?: any | null,
>     create_date?: any | null,
>     credit_number?: any | null,
>     credit_type?: any | null,
>     creditid?: any | null,
>     currency_code?: any | null,
>     current_organization?: any | null,
>     description?: any | null,
>     display_status?: any | null,
>     dispute_status?: any | null,
>     ext_archive?: any | null,
>     fname?: any | null,
>     id?: any | null,
>     language?: any | null,
>     last_order_status?: any | null,
>     lname?: any | null,
>     notes?: any | null,
>     organization?: any | null,
>     paid?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     payment_status?: any | null,
>     province?: any | null,
>     sentid?: any | null,
>     status?: any | null,
>     street?: any | null,
>     street2?: any | null,
>     template?: any | null,
>     terms?: any | null,
>     vat_name?: any | null,
>     vat_number?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`creditNotes.get`

Read one credit note (goodwill, prepayment or refund credit).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.creditNotes.get({ creditId: '30947' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `creditId` | `string \| number` | Yes | The credit id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `credit_note` | `object \| null` | No | — |

> [accordion] credit\_note full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   clientid?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   credit_number?: any | null,
>   credit_type?: any | null,
>   creditid?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   description?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   payment_status?: any | null,
>   province?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`creditNotes.list`

List credit notes, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.creditNotes.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `credit_notes` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] credit\_notes full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   clientid?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   credit_number?: any | null,
>   credit_type?: any | null,
>   creditid?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   description?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   payment_status?: any | null,
>   province?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`creditNotes.update`

Change fields of a credit note (goodwill, prepayment or refund credit). FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.creditNotes.update({
	creditId: '30947',
	credit_note: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `creditId` | `string \| number` | Yes | The credit id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `credit_note` | `object` | Yes | The credit note fields (FreshBooks wraps every body in its resource name). |

> [accordion] credit\_note full type
>
> ```ts theme={null}
> {
>   credit_number?: any,
>   currency_code?: any,
>   create_date?: any,
>   notes?: any,
>   credit_type?: any,
>   terms?: any,
>   language?: any,
>   lines?: {
>     id?: any,
>     name?: any,
>     description?: any,
>     taxName1?: any,
>     taxAmount1?: any,
>     taxName2?: any,
>     taxAmount2?: any,
>     compounded_tax?: any,
>     qty?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     }
>   }[],
>   clientid?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `credit_note` | `object \| null` | No | — |

> [accordion] credit\_note full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   clientid?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   credit_number?: any | null,
>   credit_type?: any | null,
>   creditid?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   description?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   payment_status?: any | null,
>   province?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Estimates

### accept

`estimates.accept`

Mark an estimate as accepted on the client's behalf.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.estimates.accept({ estimateId: '11223' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `estimateId` | `string \| number` | Yes | The estimate id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimate` | `object \| null` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### create

`estimates.create`

Create a estimate. Fields go in `estimate`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.estimates.create({
	estimate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `(audit_logs \| comments \| contacts \| lines \| owner \| presentation \| project \| invoices \| system)[]` | No | Extra data to include: audit\_logs (Show estimate view/send history); comments (Comments made on estimate); contacts (List of client contacts); lines (Estimate lines); owner (Owner info); presentation (Presentation type); project (Projects); invoices (Invoices); system (Estimate-owner's system) |
| `estimate` | `object` | Yes | The estimate fields (FreshBooks wraps every body in its resource name). |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   customerid?: any,
>   create_date?: any,
>   presentation?: {
>     theme_primary_color?: any,
>     image_logo_src?: any,
>     theme_font_name?: any,
>     theme_layout?: any,
>     date_format?: any,
>     image_banner_position_y?: any
>   },
>   lines?: {
>     type?: any,
>     description?: any,
>     taxName1?: any,
>     taxAmount1?: any,
>     name?: any,
>     qty?: any,
>     taxName2?: any,
>     taxAmount2?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     },
>     expenseid?: any,
>     compounded_tax?: any,
>     taskno?: any,
>     amount?: {
>       amount?: any,
>       code?: any
>     },
>     estimateid?: any
>   }[],
>   rich_proposal?: any,
>   require_client_signature?: any,
>   currency_code?: any,
>   discount_value?: any,
>   estimate_number?: any,
>   template?: any,
>   terms?: any,
>   payment_details?: any,
>   vat_name?: any,
>   vat_number?: any,
>   attachments?: any[],
>   sections?: {
>     body?: any,
>     group_name?: any,
>     title?: any,
>     type?: any
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimate` | `object \| null` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`estimates.delete`

Delete a estimate (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.estimates.delete({ estimateId: '11223' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `estimateId` | `string \| number` | Yes | The estimate id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   estimate?: {
>     accepted?: any | null,
>     accounting_systemid?: any | null,
>     address?: any | null,
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     city?: any | null,
>     code?: any | null,
>     country?: any | null,
>     create_date?: any | null,
>     created_at?: any | null,
>     currency_code?: any | null,
>     current_organization?: any | null,
>     customerid?: any | null,
>     description?: any | null,
>     discount_total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     discount_value?: any | null,
>     display_status?: any | null,
>     estimate_number?: any | null,
>     estimateid?: any | null,
>     ext_archive?: any | null,
>     fname?: any | null,
>     id?: any | null,
>     invoiced?: any | null,
>     language?: any | null,
>     lname?: any | null,
>     notes?: any | null,
>     organization?: any | null,
>     ownerid?: any | null,
>     po_number?: any | null,
>     province?: any | null,
>     reply_status?: any | null,
>     require_client_signature?: any | null,
>     rich_proposal?: any | null,
>     sentid?: any | null,
>     status?: any | null,
>     street?: any | null,
>     street2?: any | null,
>     template?: any | null,
>     terms?: any | null,
>     ui_status?: any | null,
>     updated?: any | null,
>     vat_name?: any | null,
>     vat_number?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`estimates.get`

Read one estimate. (GET /accounting/account/\{accountId}/estimates/estimates/\{estimateId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.estimates.get({ estimateId: '11223' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `estimateId` | `string \| number` | Yes | The estimate id. |
| `include` | `(audit_logs \| comments \| contacts \| lines \| owner \| presentation \| project \| invoices \| system)[]` | No | Extra data to include: audit\_logs (Show estimate view/send history); comments (Comments made on estimate); contacts (List of client contacts); lines (Estimate lines); owner (Owner info); presentation (Presentation type); project (Projects); invoices (Invoices); system (Estimate-owner's system) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimate` | `object \| null` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`estimates.list`

List estimates, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.estimates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `(audit_logs \| comments \| contacts \| lines \| owner \| presentation \| project \| invoices \| system)[]` | No | Extra data to include: audit\_logs (Show estimate view/send history); comments (Comments made on estimate); contacts (List of client contacts); lines (Estimate lines); owner (Owner info); presentation (Presentation type); project (Projects); invoices (Invoices); system (Estimate-owner's system) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimates` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] estimates full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### markSent

`estimates.markSent`

Mark an estimate as sent without emailing anyone.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.estimates.markSent({ estimateId: '11223' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `estimateId` | `string \| number` | Yes | The estimate id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimate` | `object \| null` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### sendEmail

`estimates.sendEmail`

Email the estimate now, to `estimate.email_recipients` with an optional customized subject and body. Cannot be unsent.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.estimates.sendEmail({
	estimateId: '11223',
	estimate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `estimateId` | `string \| number` | Yes | The estimate id. |
| `estimate` | `object` | Yes | The estimate fields (FreshBooks wraps every body in its resource name). action\_email true is added for you. |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   email_recipients?: any[],
>   estimate_customized_email?: {
>     subject?: any,
>     body?: any
>   },
>   action_email?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimate` | `object \| null` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### update

`estimates.update`

Change fields of a estimate. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.estimates.update({
	estimateId: '11223',
	estimate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `estimateId` | `string \| number` | Yes | The estimate id. |
| `include` | `(audit_logs \| comments \| contacts \| lines \| owner \| presentation \| project \| invoices \| system)[]` | No | Extra data to include: audit\_logs (Show estimate view/send history); comments (Comments made on estimate); contacts (List of client contacts); lines (Estimate lines); owner (Owner info); presentation (Presentation type); project (Projects); invoices (Invoices); system (Estimate-owner's system) |
| `estimate` | `object` | Yes | The estimate fields (FreshBooks wraps every body in its resource name). |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   customerid?: any,
>   create_date?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `estimate` | `object \| null` | No | — |

> [accordion] estimate full type
>
> ```ts theme={null}
> {
>   accepted?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   estimate_number?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   id?: any | null,
>   invoiced?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   reply_status?: any | null,
>   require_client_signature?: any | null,
>   rich_proposal?: any | null,
>   sentid?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   ui_status?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Expense Categories

### create

`expenseCategories.create`

Create a custom expense category under a parent category.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.expenseCategories.create({
	category: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `category` | `object` | Yes | The category fields (FreshBooks wraps every body in its resource name). |

> [accordion] category full type
>
> ```ts theme={null}
> {
>   category?: any,
>   is_cogs?: any,
>   is_editable?: any,
>   parentid?: any,
>   subcategories?: any[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `category` | `object \| null` | No | — |

> [accordion] category full type
>
> ```ts theme={null}
> {
>   category?: any | null,
>   categoryid?: any | null,
>   created_at?: any | null,
>   id?: any | null,
>   is_cogs?: any | null,
>   is_editable?: any | null,
>   parentid?: any | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### get

`expenseCategories.get`

Read one expense category. (GET /accounting/account/\{accountId}/expenses/categories/\{categoryId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.expenseCategories.get({ categoryId: '4455' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `categoryId` | `string \| number` | Yes | The category id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `category` | `object \| null` | No | — |

> [accordion] category full type
>
> ```ts theme={null}
> {
>   category?: any | null,
>   categoryid?: any | null,
>   created_at?: any | null,
>   id?: any | null,
>   is_cogs?: any | null,
>   is_editable?: any | null,
>   parentid?: any | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`expenseCategories.list`

List expense categories (the chart of accounts entries expenses use).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.expenseCategories.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `(expense_usage_all_time \| expense_usage_this_year)[]` | No | Extra data to include: expense\_usage\_all\_time (include expense usage across all time in category); expense\_usage\_this\_year (include expense usage across this year in category) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `categories` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] categories full type
>
> ```ts theme={null}
> {
>   category?: any | null,
>   categoryid?: any | null,
>   created_at?: any | null,
>   id?: any | null,
>   is_cogs?: any | null,
>   is_editable?: any | null,
>   parentid?: any | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

## Expense Profiles

### create

`expenseProfiles.create`

Create a recurring expense (an expense profile with a frequency).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.expenseProfiles.create({
	expense_profile: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `expense_profile` | `object` | Yes | The expense profile fields (FreshBooks wraps every body in its resource name). |

> [accordion] expense\_profile full type
>
> ```ts theme={null}
> {
>   frequency?: any,
>   profileid?: any,
>   start_date?: any,
>   end_date?: any,
>   next_issue_date?: any,
>   is_cogs?: any,
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   notes?: any,
>   vendor?: any,
>   staffid?: any,
>   author_name?: any,
>   taxName1?: any,
>   taxName2?: any,
>   taxAmount1?: {
>     amount?: any,
>     code?: any
>   },
>   taxPercent1?: any,
>   taxPercent2?: any,
>   markup_percent?: any,
>   from_bulk_import?: any,
>   categoryid?: any,
>   clientid?: any
> }
> ```

**Output:** *empty object*

***

## Expenses

### create

`expenses.create`

Create a expense. Fields go in `expense`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.expenses.create({
	expense: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `(attachment \| category \| expense_profile \| project \| account)[]` | No | Extra data to include: attachment (Includes attachment details assocatied with expense receipts); category (Include expense category in expense); expense\_profile (Include expense profile info in expense); project (Include related projects in expense); account (Include account info in expense) |
| `expense` | `object` | Yes | The expense fields (FreshBooks wraps every body in its resource name). |

> [accordion] expense full type
>
> ```ts theme={null}
> {
>   transactionid?: any,
>   status?: any,
>   has_receipt?: any,
>   always_remember?: any,
>   is_cogs?: any,
>   account_name?: any,
>   include_receipt?: any,
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   notes?: any,
>   vendor?: any,
>   date?: any,
>   staffid?: any,
>   author_name?: any,
>   taxName1?: any,
>   taxName2?: any,
>   taxAmount1?: {
>     amount?: any,
>     code?: any
>   },
>   taxPercent1?: any,
>   taxPercent2?: any,
>   markup_percent?: any,
>   invoiceid?: any,
>   attachment?: {
>     jwt?: any,
>     media_type?: any,
>     expenseid?: any
>   },
>   categoryid?: any,
>   category_name?: any,
>   clientid?: any,
>   converse_projectid?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expense` | `object \| null` | No | — |

> [accordion] expense full type
>
> ```ts theme={null}
> {
>   account_name?: any | null,
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   attachment?: {
>     attachmentid?: any | null,
>     id?: any | null,
>     jwt?: any | null,
>     media_type?: any | null
>   } | null,
>   background_jobid?: any | null,
>   bank_name?: any | null,
>   categoryid?: any | null,
>   clientid?: any | null,
>   compounded_tax?: any | null,
>   date?: any | null,
>   expenseid?: any | null,
>   ext_invoiceid?: any | null,
>   ext_systemid?: any | null,
>   from_bulk_import?: any | null,
>   has_receipt?: any | null,
>   id?: any | null,
>   include_receipt?: any | null,
>   invoiceid?: any | null,
>   is_cogs?: any | null,
>   isduplicate?: any | null,
>   markup_percent?: any | null,
>   notes?: any | null,
>   profileid?: any | null,
>   projectid?: any | null,
>   staffid?: any | null,
>   status?: any | null,
>   taxAmount1?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taxAmount2?: any | null,
>   taxName1?: any | null,
>   taxName2?: any | null,
>   taxPercent1?: any | null,
>   taxPercent2?: any | null,
>   transactionid?: any | null,
>   updated?: any | null,
>   vendor?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`expenses.delete`

Delete a expense (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.expenses.delete({ expenseId: '99881' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `expenseId` | `string \| number` | Yes | The expense id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   expense?: {
>     account_name?: any | null,
>     accountid?: any | null,
>     accounting_systemid?: any | null,
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     background_jobid?: any | null,
>     bank_name?: any | null,
>     categoryid?: any | null,
>     clientid?: any | null,
>     compounded_tax?: any | null,
>     date?: any | null,
>     expenseid?: any | null,
>     ext_invoiceid?: any | null,
>     ext_systemid?: any | null,
>     from_bulk_import?: any | null,
>     has_receipt?: any | null,
>     id?: any | null,
>     include_receipt?: any | null,
>     invoiceid?: any | null,
>     is_cogs?: any | null,
>     isduplicate?: any | null,
>     markup_percent?: any | null,
>     notes?: any | null,
>     profileid?: any | null,
>     projectid?: any | null,
>     staffid?: any | null,
>     status?: any | null,
>     taxAmount1?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     taxAmount2?: any | null,
>     taxName1?: any | null,
>     taxName2?: any | null,
>     taxPercent1?: any | null,
>     taxPercent2?: any | null,
>     transactionid?: any | null,
>     updated?: any | null,
>     vendor?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`expenses.get`

Read one expense. (GET /accounting/account/\{accountId}/expenses/expenses/\{expenseId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.expenses.get({ expenseId: '99881' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `expenseId` | `string \| number` | Yes | The expense id. |
| `include` | `(attachment \| category \| expense_profile \| project \| account)[]` | No | Extra data to include: attachment (Includes attachment details assocatied with expense receipts); category (Include expense category in expense); expense\_profile (Include expense profile info in expense); project (Include related projects in expense); account (Include account info in expense) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expense` | `object \| null` | No | — |

> [accordion] expense full type
>
> ```ts theme={null}
> {
>   account_name?: any | null,
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   background_jobid?: any | null,
>   bank_name?: any | null,
>   categoryid?: any | null,
>   clientid?: any | null,
>   compounded_tax?: any | null,
>   date?: any | null,
>   expenseid?: any | null,
>   ext_invoiceid?: any | null,
>   ext_systemid?: any | null,
>   from_bulk_import?: any | null,
>   has_receipt?: any | null,
>   id?: any | null,
>   include_receipt?: any | null,
>   invoiceid?: any | null,
>   is_cogs?: any | null,
>   isduplicate?: any | null,
>   markup_percent?: any | null,
>   notes?: any | null,
>   profileid?: any | null,
>   projectid?: any | null,
>   staffid?: any | null,
>   status?: any | null,
>   taxAmount1?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taxAmount2?: any | null,
>   taxName1?: any | null,
>   taxName2?: any | null,
>   taxPercent1?: any | null,
>   taxPercent2?: any | null,
>   transactionid?: any | null,
>   updated?: any | null,
>   vendor?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`expenses.list`

List expenses, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.expenses.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `(attachment \| category \| expense_profile \| project \| account)[]` | No | Extra data to include: attachment (Includes attachment details assocatied with expense receipts); category (Include expense category in expense); expense\_profile (Include expense profile info in expense); project (Include related projects in expense); account (Include account info in expense) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expenses` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] expenses full type
>
> ```ts theme={null}
> {
>   account_name?: any | null,
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   attachment?: {
>     attachmentid?: any | null,
>     id?: any | null,
>     jwt?: any | null,
>     media_type?: any | null
>   } | null,
>   background_jobid?: any | null,
>   bank_name?: any | null,
>   category?: {
>     category?: any | null,
>     categoryid?: any | null,
>     created_at?: any | null,
>     id?: any | null,
>     is_cogs?: any | null,
>     is_editable?: any | null,
>     parentid?: any | null,
>     updated_at?: any | null,
>     vis_state?: any | null
>   } | null,
>   categoryid?: any | null,
>   clientid?: any | null,
>   compounded_tax?: any | null,
>   date?: any | null,
>   expense_profile?: any | null,
>   expenseid?: any | null,
>   ext_invoiceid?: any | null,
>   ext_systemid?: any | null,
>   from_bulk_import?: any | null,
>   has_receipt?: any | null,
>   id?: any | null,
>   include_receipt?: any | null,
>   invoiceid?: any | null,
>   is_cogs?: any | null,
>   isduplicate?: any | null,
>   markup_percent?: any | null,
>   notes?: any | null,
>   profileid?: any | null,
>   project?: any | null,
>   projectid?: any | null,
>   staffid?: any | null,
>   status?: any | null,
>   taxAmount1?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taxAmount2?: any | null,
>   taxName1?: any | null,
>   taxName2?: any | null,
>   taxPercent1?: any | null,
>   taxPercent2?: any | null,
>   transactionid?: any | null,
>   updated?: any | null,
>   vendor?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### listVendors

`expenses.listVendors`

List the vendor names used on expenses. (GET /accounting/account/\{accountId}/expenses/vendors)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.expenses.listVendors({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expense` | `object \| null` | No | — |

> [accordion] expense full type
>
> ```ts theme={null}
> {
>   account_name?: any | null,
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   background_jobid?: any | null,
>   bank_name?: any | null,
>   categoryid?: any | null,
>   clientid?: any | null,
>   compounded_tax?: any | null,
>   date?: any | null,
>   expenseid?: any | null,
>   ext_invoiceid?: any | null,
>   ext_systemid?: any | null,
>   from_bulk_import?: any | null,
>   has_receipt?: any | null,
>   id?: any | null,
>   include_receipt?: any | null,
>   invoiceid?: any | null,
>   is_cogs?: any | null,
>   isduplicate?: any | null,
>   markup_percent?: any | null,
>   notes?: any | null,
>   profileid?: any | null,
>   projectid?: any | null,
>   staffid?: any | null,
>   status?: any | null,
>   taxAmount1?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taxAmount2?: any | null,
>   taxName1?: any | null,
>   taxName2?: any | null,
>   taxPercent1?: any | null,
>   taxPercent2?: any | null,
>   transactionid?: any | null,
>   updated?: any | null,
>   vendor?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### summaries

`expenses.summaries`

Read expense totals grouped by category and period.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.expenses.summaries({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `summaries` | `object[] \| null` | No | — |

> [accordion] summaries full type
>
> ```ts theme={null}
> {
>   amounts?: {
>     amount?: any | null,
>     code?: any | null,
>     count?: any | null
>   }[] | null,
>   counts?: any | null,
>   id?: any | null
> }[] | null
> ```

***

### update

`expenses.update`

Change fields of a expense. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.expenses.update({
	expenseId: '99881',
	expense: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `expenseId` | `string \| number` | Yes | The expense id. |
| `include` | `(attachment \| category \| expense_profile \| project \| account)[]` | No | Extra data to include: attachment (Includes attachment details assocatied with expense receipts); category (Include expense category in expense); expense\_profile (Include expense profile info in expense); project (Include related projects in expense); account (Include account info in expense) |
| `expense` | `object` | Yes | The expense fields (FreshBooks wraps every body in its resource name). |

> [accordion] expense full type
>
> ```ts theme={null}
> {
>   vendor?: any,
>   transactionid?: any,
>   status?: any,
>   has_receipt?: any,
>   always_remember?: any,
>   is_cogs?: any,
>   account_name?: any,
>   include_receipt?: any,
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   notes?: any,
>   date?: any,
>   staffid?: any,
>   author_name?: any,
>   taxName1?: any,
>   taxName2?: any,
>   taxAmount1?: {
>     amount?: any,
>     code?: any
>   },
>   taxPercent1?: any,
>   taxPercent2?: any,
>   markup_percent?: any,
>   invoiceid?: any,
>   attachment?: {
>     jwt?: any,
>     media_type?: any,
>     expenseid?: any
>   },
>   categoryid?: any,
>   clientid?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `expense` | `object \| null` | No | — |

> [accordion] expense full type
>
> ```ts theme={null}
> {
>   account_name?: any | null,
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   background_jobid?: any | null,
>   bank_name?: any | null,
>   categoryid?: any | null,
>   clientid?: any | null,
>   compounded_tax?: any | null,
>   date?: any | null,
>   expenseid?: any | null,
>   ext_invoiceid?: any | null,
>   ext_systemid?: any | null,
>   from_bulk_import?: any | null,
>   has_receipt?: any | null,
>   id?: any | null,
>   include_receipt?: any | null,
>   invoiceid?: any | null,
>   is_cogs?: any | null,
>   isduplicate?: any | null,
>   markup_percent?: any | null,
>   notes?: any | null,
>   profileid?: any | null,
>   projectid?: any | null,
>   staffid?: any | null,
>   status?: any | null,
>   taxAmount1?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taxAmount2?: any | null,
>   taxName1?: any | null,
>   taxName2?: any | null,
>   taxPercent1?: any | null,
>   taxPercent2?: any | null,
>   transactionid?: any | null,
>   updated?: any | null,
>   vendor?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Gateways

### get

`gateways.get`

Read the account's online payment gateways (Stripe, FreshBooks Payments, PayPal) and their status.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.gateways.get({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `gateway_connections` | `object[] \| null` | No | — |

> [accordion] gateway\_connections full type
>
> ```ts theme={null}
> {
>   stripe?: {
>     currencies?: any[] | null,
>     country?: any | null,
>     gateway_user_id?: any | null,
>     id?: any | null,
>     user_state?: any | null,
>     email?: any | null
>   } | null,
>   fbpay?: {
>     currencies?: any[] | null,
>     account_id?: any | null,
>     action_reasons?: any[] | null,
>     country?: any | null,
>     tos_accepted?: any | null,
>     email?: any | null,
>     manage_account_url?: any | null,
>     state?: any | null,
>     bank_info?: {
>       bank_name?: any | null,
>       withdrawal_period?: any | null,
>       last_payment_date?: any | null,
>       withdrawal_schedule?: any[] | null,
>       next_payout_date?: any | null,
>       incoming_pending_amount?: any | null,
>       last_payment_amount?: any | null,
>       withdrawal_type?: any | null,
>       outgoing_withdrawal_schedule?: any[] | null,
>       total_payout?: any | null
>     } | null,
>     pricing?: {
>       ach_tier_3?: any | null,
>       percent_amex?: any | null,
>       percent_non_amex_with_card?: any | null,
>       percent_non_amex?: any | null,
>       percent_virtual_terminal?: any | null,
>       percent_amex_with_card?: any | null,
>       ach_tier_1?: any | null,
>       ach_tier_2?: any | null,
>       tier_id?: any | null,
>       per_transaction_fee?: any | null
>     } | null,
>     visa_debit_accepted?: any | null,
>     id?: any | null,
>     bank_transfer_enabled?: any | null
>   } | null
> }[] | null
> ```

***

### provisionFreshBooksPayments

`gateways.provisionFreshBooksPayments`

Start FreshBooks Payments for the account (the money-moving gateway).

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.gateways.provisionFreshBooksPayments({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `fname` | `any` | No | — |
| `lname` | `any` | No | — |
| `email` | `any` | No | — |
| `orgname` | `any` | No | — |
| `redirect_base_uri` | `any` | No | — |
| `country` | `any` | No | — |
| `allow_multiple_provision` | `any` | No | — |

**Output:** *empty object*

***

## Invitation Rates

### list

`invitationRates.list`

List the rates set on pending team invitations.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invitationRates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invitation_rates` | `any[] \| null` | No | — |

***

## Invitations

### create

`invitations.create`

Invite a person to the business (and optionally to projects). FreshBooks emails them the invitation.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.invitations.create({
	invitation: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `invitation` | `object` | Yes | The invitation fields (FreshBooks wraps every body in its resource name). |
| `capacity` | `any` | No | — |
| `to_email` | `any` | No | — |
| `invitable_id` | `any` | No | — |
| `invitable_type` | `any` | No | — |
| `groups` | `object[]` | No | — |

> [accordion] invitation full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   group_id?: any,
>   capacity?: any
> }[]
> ```

**Output:** *empty object*

***

## Invoice Payment Options

### create

`invoicePaymentOptions.create`

Turn on online payment options (gateway\_name, has\_credit\_card, has\_ach...) for an invoice.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.invoicePaymentOptions.create({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |
| `has_credit_card` | `any` | No | — |
| `has_ach_transfer` | `any` | No | — |
| `allow_partial_payments` | `any` | No | — |
| `gateway_name` | `any` | No | — |

**Output:** *empty object*

***

### get

`invoicePaymentOptions.get`

Read which online payment gateways an invoice accepts.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoicePaymentOptions.get({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |

**Output:** *empty object*

***

## Invoice Profile Payment Options

### create

`invoiceProfilePaymentOptions.create`

Turn on online payment options for a recurring invoice profile.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.invoiceProfilePaymentOptions.create({ invoiceProfileId: '4321' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceProfileId` | `string \| number` | Yes | The invoice profile id. |
| `has_credit_card` | `any` | No | — |
| `has_ach_transfer` | `any` | No | — |
| `gateway_name` | `any` | No | — |

**Output:** *empty object*

***

## Invoice Profiles

### create

`invoiceProfiles.create`

Create a recurring invoice profile. Fields go in `invoice_profile`.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.invoiceProfiles.create({
	invoice_profile: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `(allowed_gateways \| audit_logs \| contacts \| late_fee \| lines \| presentation \| system \| tracking \| next_issue_date \| project_format)[]` | No | Extra data to include: allowed\_gateways (list of allowed gateways); audit\_logs (a summarization of the invoice for audit purposes); contacts (contains contact objects populated with the client's data); late\_fee (late fee info); lines (invoice lines); presentation (data representing the stylings of the invoice. i.e. (Modern vs Classic)); system (invoice-owner's system); tracking (information regarding previous invoices); next\_issue\_date (the date that the next invoice will be issued); project\_format (includes information about how the associated project is formated) |
| `invoice_profile` | `object` | Yes | The invoice profile fields (FreshBooks wraps every body in its resource name). |

> [accordion] invoice\_profile full type
>
> ```ts theme={null}
> {
>   customerid?: any,
>   create_date?: any,
>   frequency?: any,
>   numberRecurring?: any,
>   lines?: {
>     name?: any,
>     qty?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     },
>     amount?: {
>       amount?: any,
>       code?: any
>     },
>     description?: any,
>     expenseid?: any,
>     taxName1?: any,
>     taxAmount1?: any,
>     taxName2?: any,
>     taxAmount2?: any,
>     type?: any,
>     profileid?: any
>   }[],
>   profileid?: any,
>   disable?: any,
>   due_offset_days?: any,
>   send_email?: any,
>   include_unbilled_time?: any,
>   project_format?: {
>     group_by?: any,
>     method?: any,
>     show_tname?: any,
>     show_pname?: any,
>     show_staff?: any,
>     show_date?: any,
>     show_notes?: any,
>     show_total_hours?: any
>   },
>   skip_generation?: any,
>   retainer_id?: any,
>   require_auto_bill?: any,
>   currency_code?: any,
>   discount_value?: any,
>   template?: any,
>   terms?: any,
>   allowed_gatewayids?: any[],
>   late_fee?: {
>     compounded_taxes?: any,
>     days?: any,
>     enabled?: any,
>     first_tax_name?: any,
>     first_tax_percent?: any,
>     repeat?: any,
>     second_tax_name?: any,
>     second_tax_percent?: any,
>     type?: any,
>     value?: any
>   },
>   late_reminders?: any[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice_profile` | `object \| null` | No | — |

> [accordion] invoice\_profile full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   bill_gateway?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   currency_code?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   disable?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   due_offset_days?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   frequency?: any | null,
>   id?: any | null,
>   include_unbilled_time?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   numberRecurring?: any | null,
>   occurrences_to_date?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   payment_details?: any | null,
>   po_number?: any | null,
>   profileid?: any | null,
>   province?: any | null,
>   require_auto_bill?: any | null,
>   retainer_id?: any | null,
>   send_email?: any | null,
>   send_gmail?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   terms?: any | null,
>   total_accrued_revenue?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`invoiceProfiles.delete`

Delete a recurring invoice profile (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.invoiceProfiles.delete({ invoiceProfileId: '4321' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceProfileId` | `string \| number` | Yes | The invoice profile id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   invoice_profile?: {
>     accounting_systemid?: any | null,
>     address?: any | null,
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     auto_bill?: any | null,
>     bill_gateway?: any | null,
>     city?: any | null,
>     code?: any | null,
>     country?: any | null,
>     create_date?: any | null,
>     currency_code?: any | null,
>     customerid?: any | null,
>     description?: any | null,
>     disable?: any | null,
>     discount_total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     discount_value?: any | null,
>     due_offset_days?: any | null,
>     ext_archive?: any | null,
>     fname?: any | null,
>     frequency?: any | null,
>     id?: any | null,
>     include_unbilled_time?: any | null,
>     language?: any | null,
>     lname?: any | null,
>     notes?: any | null,
>     numberRecurring?: any | null,
>     occurrences_to_date?: any | null,
>     organization?: any | null,
>     ownerid?: any | null,
>     payment_details?: any | null,
>     po_number?: any | null,
>     profileid?: any | null,
>     province?: any | null,
>     require_auto_bill?: any | null,
>     retainer_id?: any | null,
>     send_email?: any | null,
>     send_gmail?: any | null,
>     street?: any | null,
>     street2?: any | null,
>     terms?: any | null,
>     total_accrued_revenue?: any | null,
>     updated?: any | null,
>     vat_name?: any | null,
>     vat_number?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`invoiceProfiles.get`

Read one recurring invoice profile. (GET /accounting/account/\{accountId}/invoice\_profiles/invoice\_profiles/\{invoiceProfileId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoiceProfiles.get({ invoiceProfileId: '4321' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceProfileId` | `string \| number` | Yes | The invoice profile id. |
| `include` | `(allowed_gateways \| audit_logs \| contacts \| late_fee \| lines \| presentation \| system \| tracking \| next_issue_date \| project_format)[]` | No | Extra data to include: allowed\_gateways (list of allowed gateways); audit\_logs (a summarization of the invoice for audit purposes); contacts (contains contact objects populated with the client's data); late\_fee (late fee info); lines (invoice lines); presentation (data representing the stylings of the invoice. i.e. (Modern vs Classic)); system (invoice-owner's system); tracking (information regarding previous invoices); next\_issue\_date (the date that the next invoice will be issued); project\_format (includes information about how the associated project is formated) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice_profile` | `object \| null` | No | — |

> [accordion] invoice\_profile full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   bill_gateway?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   currency_code?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   disable?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   due_offset_days?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   frequency?: any | null,
>   id?: any | null,
>   include_unbilled_time?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   numberRecurring?: any | null,
>   occurrences_to_date?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   payment_details?: any | null,
>   po_number?: any | null,
>   profileid?: any | null,
>   province?: any | null,
>   require_auto_bill?: any | null,
>   retainer_id?: any | null,
>   send_email?: any | null,
>   send_gmail?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   terms?: any | null,
>   total_accrued_revenue?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`invoiceProfiles.list`

List recurring invoice profiles, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoiceProfiles.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `(allowed_gateways \| audit_logs \| contacts \| late_fee \| lines \| presentation \| system \| tracking \| next_issue_date \| project_format)[]` | No | Extra data to include: allowed\_gateways (list of allowed gateways); audit\_logs (a summarization of the invoice for audit purposes); contacts (contains contact objects populated with the client's data); late\_fee (late fee info); lines (invoice lines); presentation (data representing the stylings of the invoice. i.e. (Modern vs Classic)); system (invoice-owner's system); tracking (information regarding previous invoices); next\_issue\_date (the date that the next invoice will be issued); project\_format (includes information about how the associated project is formated) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice_profiles` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] invoice\_profiles full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   bill_gateway?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   currency_code?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   disable?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   due_offset_days?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   frequency?: any | null,
>   id?: any | null,
>   include_unbilled_time?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   numberRecurring?: any | null,
>   occurrences_to_date?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   payment_details?: any | null,
>   po_number?: any | null,
>   profileid?: any | null,
>   province?: any | null,
>   require_auto_bill?: any | null,
>   retainer_id?: any | null,
>   send_email?: any | null,
>   send_gmail?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   terms?: any | null,
>   total_accrued_revenue?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`invoiceProfiles.update`

Change fields of a recurring invoice profile. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.invoiceProfiles.update({
	invoiceProfileId: '4321',
	invoice_profile: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceProfileId` | `string \| number` | Yes | The invoice profile id. |
| `include` | `(allowed_gateways \| audit_logs \| contacts \| late_fee \| lines \| presentation \| system \| tracking \| next_issue_date \| project_format)[]` | No | Extra data to include: allowed\_gateways (list of allowed gateways); audit\_logs (a summarization of the invoice for audit purposes); contacts (contains contact objects populated with the client's data); late\_fee (late fee info); lines (invoice lines); presentation (data representing the stylings of the invoice. i.e. (Modern vs Classic)); system (invoice-owner's system); tracking (information regarding previous invoices); next\_issue\_date (the date that the next invoice will be issued); project\_format (includes information about how the associated project is formated) |
| `invoice_profile` | `object` | Yes | The invoice profile fields (FreshBooks wraps every body in its resource name). |

> [accordion] invoice\_profile full type
>
> ```ts theme={null}
> {
>   frequency?: any,
>   numberRecurring?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice_profile` | `object \| null` | No | — |

> [accordion] invoice\_profile full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   bill_gateway?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   currency_code?: any | null,
>   customerid?: any | null,
>   description?: any | null,
>   disable?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   due_offset_days?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   frequency?: any | null,
>   id?: any | null,
>   include_unbilled_time?: any | null,
>   language?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   numberRecurring?: any | null,
>   occurrences_to_date?: any | null,
>   organization?: any | null,
>   ownerid?: any | null,
>   payment_details?: any | null,
>   po_number?: any | null,
>   profileid?: any | null,
>   province?: any | null,
>   require_auto_bill?: any | null,
>   retainer_id?: any | null,
>   send_email?: any | null,
>   send_gmail?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   terms?: any | null,
>   total_accrued_revenue?: any | null,
>   updated?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Invoices

### create

`invoices.create`

Create a invoice. Fields go in `invoice`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.invoices.create({
	invoice: {
		customerid: 31006,
		create_date: '2026-11-28',
		lines: [{
			type: 0,
			name: 'Consulting',
			qty: 2,
			unit_cost: { amount: '150.00', code: 'USD' },
		}],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `(audit_logs \| client_audits \| comments \| contacts \| lines \| owner \| latest_journal_entry \| allowed_gateways \| late_fee \| presentation \| project_total_amounts \| late_reminders \| system)[]` | No | Extra data to include: audit\_logs (Show invoice view/send/payment history); client\_audits (Show the client-visible invoice history); comments (Comments made on invoice); contacts (List of client contacts); lines (Invoice lines); owner (Owner info); latest\_journal\_entry (Journal entry info); allowed\_gateways (List of allowed gateways); late\_fee (Late fee info); presentation (Presentation type); project\_total\_amounts (Total amounts billed from projects); late\_reminders (Late reminders); system (Invoice-owner's system) |
| `invoice` | `object` | Yes | The invoice fields (FreshBooks wraps every body in its resource name). |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   customerid?: any,
>   create_date?: any,
>   lines?: {
>     type?: any,
>     description?: any,
>     taxName1?: any,
>     taxAmount1?: any,
>     name?: any,
>     qty?: any,
>     taxName2?: any,
>     taxAmount2?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     },
>     expenseid?: any
>   }[],
>   presentation?: {
>     image_logo_src?: any,
>     theme_primary_color?: any,
>     theme_layout?: any,
>     theme_font_name?: any
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice` | `object \| null` | No | — |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   autobill_status?: any | null,
>   basecampid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   date_paid?: any | null,
>   deposit_amount?: any | null,
>   deposit_percentage?: any | null,
>   deposit_status?: any | null,
>   description?: any | null,
>   discount_description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   fulfillment_date?: any | null,
>   generation_date?: any | null,
>   gmail?: any | null,
>   id?: any | null,
>   invoice_number?: any | null,
>   invoiceid?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   ownerid?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   parent?: any | null,
>   payment_details?: any | null,
>   payment_status?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   return_uri?: any | null,
>   sentid?: any | null,
>   show_attachments?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   updated?: any | null,
>   v3_status?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`invoices.delete`

Delete a invoice (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.invoices.delete({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   invoice?: {
>     accountid?: any | null,
>     accounting_systemid?: any | null,
>     address?: any | null,
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     auto_bill?: any | null,
>     autobill_status?: any | null,
>     basecampid?: any | null,
>     city?: any | null,
>     code?: any | null,
>     country?: any | null,
>     create_date?: any | null,
>     created_at?: any | null,
>     currency_code?: any | null,
>     current_organization?: any | null,
>     customerid?: any | null,
>     date_paid?: any | null,
>     deposit_amount?: any | null,
>     deposit_percentage?: any | null,
>     deposit_status?: any | null,
>     description?: any | null,
>     discount_description?: any | null,
>     discount_total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     discount_value?: any | null,
>     display_status?: any | null,
>     dispute_status?: any | null,
>     due_date?: any | null,
>     due_offset_days?: any | null,
>     estimateid?: any | null,
>     ext_archive?: any | null,
>     fname?: any | null,
>     fulfillment_date?: any | null,
>     generation_date?: any | null,
>     gmail?: any | null,
>     id?: any | null,
>     invoice_number?: any | null,
>     invoiceid?: any | null,
>     language?: any | null,
>     last_order_status?: any | null,
>     lname?: any | null,
>     notes?: any | null,
>     organization?: any | null,
>     outstanding?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     ownerid?: any | null,
>     paid?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     parent?: any | null,
>     payment_details?: any | null,
>     payment_status?: any | null,
>     po_number?: any | null,
>     province?: any | null,
>     return_uri?: any | null,
>     sentid?: any | null,
>     show_attachments?: any | null,
>     status?: any | null,
>     street?: any | null,
>     street2?: any | null,
>     template?: any | null,
>     terms?: any | null,
>     updated?: any | null,
>     v3_status?: any | null,
>     vat_name?: any | null,
>     vat_number?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### downloadPdf

`invoices.downloadPdf`

Download the invoice as a PDF. (GET /accounting/account/\{accountId}/invoices/invoices/\{invoiceId}/pdf)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoices.downloadPdf({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### get

`invoices.get`

Read one invoice. (GET /accounting/account/\{accountId}/invoices/invoices/\{invoiceId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoices.get({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |
| `include` | `(audit_logs \| client_audits \| comments \| contacts \| lines \| owner \| latest_journal_entry \| allowed_gateways \| late_fee \| presentation \| project_total_amounts \| late_reminders \| system)[]` | No | Extra data to include: audit\_logs (Show invoice view/send/payment history); client\_audits (Show the client-visible invoice history); comments (Comments made on invoice); contacts (List of client contacts); lines (Invoice lines); owner (Owner info); latest\_journal\_entry (Journal entry info); allowed\_gateways (List of allowed gateways); late\_fee (Late fee info); presentation (Presentation type); project\_total\_amounts (Total amounts billed from projects); late\_reminders (Late reminders); system (Invoice-owner's system) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice` | `object \| null` | No | — |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   autobill_status?: any | null,
>   basecampid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   date_paid?: any | null,
>   deposit_amount?: any | null,
>   deposit_percentage?: any | null,
>   deposit_status?: any | null,
>   description?: any | null,
>   discount_description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   fulfillment_date?: any | null,
>   generation_date?: any | null,
>   gmail?: any | null,
>   id?: any | null,
>   invoice_number?: any | null,
>   invoiceid?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   ownerid?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   parent?: any | null,
>   payment_details?: any | null,
>   payment_status?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   return_uri?: any | null,
>   sentid?: any | null,
>   show_attachments?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   updated?: any | null,
>   v3_status?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null,
>   presentation?: {
>     date_format?: any | null,
>     description_heading?: any | null,
>     hours_heading?: any | null,
>     image_banner_position_y?: any | null,
>     image_banner_src?: any | null,
>     image_logo_src?: any | null,
>     invoiceid?: any | null,
>     item_heading?: any | null,
>     label?: any | null,
>     quantity_heading?: any | null,
>     rate_heading?: any | null,
>     task_heading?: any | null,
>     theme_font_name?: any | null,
>     theme_layout?: any | null,
>     theme_primary_color?: any | null,
>     time_entry_notes_heading?: any | null,
>     unit_cost_heading?: any | null
>   } | null
> } | null
> ```

***

### getShareLink

`invoices.getShareLink`

Get a client-facing link to view and pay the invoice.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoices.getShareLink({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |
| `share_method` | `string` | No | How the link is shared: share\_link (the default in the docs examples). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `share_link` | `object \| null` | No | — |

> [accordion] share\_link full type
>
> ```ts theme={null}
> {
>   clientid?: any | null,
>   resource_type?: any | null,
>   resourceid?: any | null,
>   share_link?: any | null,
>   share_method?: any | null
> } | null
> ```

***

### list

`invoices.list`

List invoices, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoices.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `(audit_logs \| client_audits \| comments \| contacts \| lines \| owner \| latest_journal_entry \| allowed_gateways \| late_fee \| presentation \| project_total_amounts \| late_reminders \| system)[]` | No | Extra data to include: audit\_logs (Show invoice view/send/payment history); client\_audits (Show the client-visible invoice history); comments (Comments made on invoice); contacts (List of client contacts); lines (Invoice lines); owner (Owner info); latest\_journal\_entry (Journal entry info); allowed\_gateways (List of allowed gateways); late\_fee (Late fee info); presentation (Presentation type); project\_total\_amounts (Total amounts billed from projects); late\_reminders (Late reminders); system (Invoice-owner's system) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoices` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] invoices full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   autobill_status?: any | null,
>   basecampid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   date_paid?: any | null,
>   deposit_amount?: any | null,
>   deposit_percentage?: any | null,
>   deposit_status?: any | null,
>   description?: any | null,
>   discount_description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   fulfillment_date?: any | null,
>   generation_date?: any | null,
>   gmail?: any | null,
>   id?: any | null,
>   invoice_number?: any | null,
>   invoiceid?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   ownerid?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   parent?: any | null,
>   payment_details?: any | null,
>   payment_status?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   return_uri?: any | null,
>   sentid?: any | null,
>   show_attachments?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   updated?: any | null,
>   v3_status?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### listPresentations

`invoices.listPresentations`

Read the default invoice presentation styles (theme, fonts, logo, banner).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.invoices.listPresentations({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `presentation` | `object \| null` | No | — |

> [accordion] presentation full type
>
> ```ts theme={null}
> {
>   date_format?: any | null,
>   description_heading?: any | null,
>   hours_heading?: any | null,
>   image_banner_position_y?: any | null,
>   image_banner_src?: any | null,
>   image_logo_src?: any | null,
>   invoiceid?: any | null,
>   item_heading?: any | null,
>   label?: any | null,
>   quantity_heading?: any | null,
>   rate_heading?: any | null,
>   task_heading?: any | null,
>   theme_font_name?: any | null,
>   theme_layout?: any | null,
>   theme_primary_color?: any | null,
>   time_entry_notes_heading?: any | null,
>   unit_cost_heading?: any | null
> } | null
> ```

***

### markSent

`invoices.markSent`

Mark a draft invoice as sent without emailing anyone.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.invoices.markSent({ invoiceId: '987654' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice` | `object \| null` | No | — |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   autobill_status?: any | null,
>   basecampid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   date_paid?: any | null,
>   deposit_amount?: any | null,
>   deposit_percentage?: any | null,
>   deposit_status?: any | null,
>   description?: any | null,
>   discount_description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   fulfillment_date?: any | null,
>   generation_date?: any | null,
>   gmail?: any | null,
>   id?: any | null,
>   invoice_number?: any | null,
>   invoiceid?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   ownerid?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   parent?: any | null,
>   payment_details?: any | null,
>   payment_status?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   return_uri?: any | null,
>   sentid?: any | null,
>   show_attachments?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   updated?: any | null,
>   v3_status?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null,
>   presentation?: {
>     date_format?: any | null,
>     description_heading?: any | null,
>     hours_heading?: any | null,
>     image_banner_position_y?: any | null,
>     image_banner_src?: any | null,
>     image_logo_src?: any | null,
>     invoiceid?: any | null,
>     item_heading?: any | null,
>     label?: any | null,
>     quantity_heading?: any | null,
>     rate_heading?: any | null,
>     task_heading?: any | null,
>     theme_font_name?: any | null,
>     theme_layout?: any | null,
>     theme_primary_color?: any | null,
>     time_entry_notes_heading?: any | null,
>     unit_cost_heading?: any | null
>   } | null
> } | null
> ```

***

### sendEmail

`invoices.sendEmail`

Email the invoice now, to `invoice.email_recipients` (or the client) with an optional `invoice_customized_email` subject and body. Cannot be unsent.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.invoices.sendEmail({
	invoiceId: '987654',
	invoice: {
		email_recipients: ['billing@example.com'],
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |
| `invoice` | `object` | Yes | The invoice fields (FreshBooks wraps every body in its resource name). action\_email true is added for you. |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   email_recipients?: any[],
>   invoice_customized_email?: {
>     subject?: any,
>     body?: any
>   },
>   action_email?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice` | `object \| null` | No | — |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   autobill_status?: any | null,
>   basecampid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   date_paid?: any | null,
>   deposit_amount?: any | null,
>   deposit_percentage?: any | null,
>   deposit_status?: any | null,
>   description?: any | null,
>   discount_description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   fulfillment_date?: any | null,
>   generation_date?: any | null,
>   gmail?: any | null,
>   id?: any | null,
>   invoice_number?: any | null,
>   invoiceid?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   ownerid?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   parent?: any | null,
>   payment_details?: any | null,
>   payment_status?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   return_uri?: any | null,
>   sentid?: any | null,
>   show_attachments?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   updated?: any | null,
>   v3_status?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null,
>   presentation?: {
>     date_format?: any | null,
>     description_heading?: any | null,
>     hours_heading?: any | null,
>     image_banner_position_y?: any | null,
>     image_banner_src?: any | null,
>     image_logo_src?: any | null,
>     invoiceid?: any | null,
>     item_heading?: any | null,
>     label?: any | null,
>     quantity_heading?: any | null,
>     rate_heading?: any | null,
>     task_heading?: any | null,
>     theme_font_name?: any | null,
>     theme_layout?: any | null,
>     theme_primary_color?: any | null,
>     time_entry_notes_heading?: any | null,
>     unit_cost_heading?: any | null
>   } | null
> } | null
> ```

***

### update

`invoices.update`

Change fields of a invoice. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.invoices.update({
	invoiceId: '987654',
	invoice: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `invoiceId` | `string \| number` | Yes | The invoice id. |
| `include` | `(audit_logs \| client_audits \| comments \| contacts \| lines \| owner \| latest_journal_entry \| allowed_gateways \| late_fee \| presentation \| project_total_amounts \| late_reminders \| system)[]` | No | Extra data to include: audit\_logs (Show invoice view/send/payment history); client\_audits (Show the client-visible invoice history); comments (Comments made on invoice); contacts (List of client contacts); lines (Invoice lines); owner (Owner info); latest\_journal\_entry (Journal entry info); allowed\_gateways (List of allowed gateways); late\_fee (Late fee info); presentation (Presentation type); project\_total\_amounts (Total amounts billed from projects); late\_reminders (Late reminders); system (Invoice-owner's system) |
| `invoice` | `object` | Yes | The invoice fields (FreshBooks wraps every body in its resource name). |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   status?: any,
>   lines?: {
>     type?: any,
>     description?: any,
>     expenseid?: any,
>     taxName1?: any,
>     taxAmount1?: any,
>     name?: any,
>     qty?: any,
>     taxName2?: any,
>     taxAmount2?: any,
>     unit_cost?: {
>       amount?: any,
>       code?: any
>     }
>   }[],
>   allowed_gatewayids?: any[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice` | `object \| null` | No | — |

> [accordion] invoice full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   accounting_systemid?: any | null,
>   address?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   auto_bill?: any | null,
>   autobill_status?: any | null,
>   basecampid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   create_date?: any | null,
>   created_at?: any | null,
>   currency_code?: any | null,
>   current_organization?: any | null,
>   customerid?: any | null,
>   date_paid?: any | null,
>   deposit_amount?: any | null,
>   deposit_percentage?: any | null,
>   deposit_status?: any | null,
>   description?: any | null,
>   discount_description?: any | null,
>   discount_total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   discount_value?: any | null,
>   display_status?: any | null,
>   dispute_status?: any | null,
>   due_date?: any | null,
>   due_offset_days?: any | null,
>   estimateid?: any | null,
>   ext_archive?: any | null,
>   fname?: any | null,
>   fulfillment_date?: any | null,
>   generation_date?: any | null,
>   gmail?: any | null,
>   id?: any | null,
>   invoice_number?: any | null,
>   invoiceid?: any | null,
>   language?: any | null,
>   last_order_status?: any | null,
>   lname?: any | null,
>   notes?: any | null,
>   organization?: any | null,
>   outstanding?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   ownerid?: any | null,
>   paid?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   parent?: any | null,
>   payment_details?: any | null,
>   payment_status?: any | null,
>   po_number?: any | null,
>   province?: any | null,
>   return_uri?: any | null,
>   sentid?: any | null,
>   show_attachments?: any | null,
>   status?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   template?: any | null,
>   terms?: any | null,
>   updated?: any | null,
>   v3_status?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null,
>   vis_state?: any | null,
>   allowed_gateways?: {
>     allowedid?: any | null,
>     connectionid?: any | null,
>     gateway_name?: any | null,
>     gatewayid?: any | null,
>     id?: any | null
>   }[] | null
> } | null
> ```

***

## Items

### create

`items.create`

Create a item. Fields go in `item`. (POST /accounting/account/\{accountId}/items/items)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.items.create({
	item: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `item` | `object` | Yes | The item fields (FreshBooks wraps every body in its resource name). |

> [accordion] item full type
>
> ```ts theme={null}
> {
>   name?: any,
>   qty?: any,
>   inventory?: any,
>   unit_cost?: {
>     amount?: any,
>     code?: any
>   },
>   vis_state?: any,
>   description?: any,
>   sku?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `item` | `object \| null` | No | — |

> [accordion] item full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   description?: any | null,
>   id?: any | null,
>   inventory?: any | null,
>   itemid?: any | null,
>   name?: any | null,
>   qty?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   unit_cost?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`items.delete`

Delete a item (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.items.delete({ itemId: '3344' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `itemId` | `string \| number` | Yes | The item id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   item?: {
>     accounting_systemid?: any | null,
>     description?: any | null,
>     id?: any | null,
>     inventory?: any | null,
>     itemid?: any | null,
>     name?: any | null,
>     qty?: any | null,
>     tax1?: any | null,
>     tax2?: any | null,
>     unit_cost?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     updated?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`items.get`

Read one item. (GET /accounting/account/\{accountId}/items/items/\{itemId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.items.get({ itemId: '3344' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `itemId` | `string \| number` | Yes | The item id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `item` | `object \| null` | No | — |

> [accordion] item full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   description?: any | null,
>   id?: any | null,
>   inventory?: any | null,
>   itemid?: any | null,
>   name?: any | null,
>   qty?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   unit_cost?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`items.list`

List items, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.items.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `item` | `object \| null` | No | — |

> [accordion] item full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   description?: any | null,
>   id?: any | null,
>   inventory?: any | null,
>   itemid?: any | null,
>   name?: any | null,
>   qty?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   unit_cost?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### update

`items.update`

Change fields of a item. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.items.update({
	itemId: '3344',
	item: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `itemId` | `string \| number` | Yes | The item id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `item` | `object` | Yes | The item fields (FreshBooks wraps every body in its resource name). |

> [accordion] item full type
>
> ```ts theme={null}
> {
>   name?: any,
>   description?: any,
>   inventory?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `item` | `object \| null` | No | — |

> [accordion] item full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   description?: any | null,
>   id?: any | null,
>   inventory?: any | null,
>   itemid?: any | null,
>   name?: any | null,
>   qty?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   unit_cost?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Journal Entries

### create

`journalEntries.create`

Add a journal entry with its debit and credit lines.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.journalEntries.create({
	journal_entry: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `journal_entry` | `object` | Yes | The journal entry fields (FreshBooks wraps every body in its resource name). |

> [accordion] journal\_entry full type
>
> ```ts theme={null}
> {
>   details?: {
>     sub_accountid?: any,
>     debit?: any,
>     credit?: any
>   }[],
>   currency_code?: any,
>   description?: any,
>   name?: any,
>   user_entered_date?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `journal_entry` | `object \| null` | No | — |

> [accordion] journal\_entry full type
>
> ```ts theme={null}
> {
>   currency_code?: any | null,
>   description?: any | null,
>   details?: {
>     credit?: any | null,
>     currency_code?: any | null,
>     debit?: any | null,
>     description?: any | null,
>     detailid?: any | null,
>     id?: any | null,
>     name?: any | null,
>     sub_accountid?: any | null,
>     user_entered_date?: any | null
>   }[] | null,
>   entryid?: any | null,
>   id?: any | null,
>   name?: any | null,
>   user_entered_date?: any | null
> } | null
> ```

***

## Journal Entry Accounts

### list

`journalEntryAccounts.list`

List the accounts journal entries can post to.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.journalEntryAccounts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

## Journal Entry Details

### list

`journalEntryDetails.list`

List journal entry detail lines (the general ledger lines).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.journalEntryDetails.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `journal_entry_details` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] journal\_entry\_details full type
>
> ```ts theme={null}
> {
>   account?: {
>     account_name?: any | null,
>     account_number?: any | null,
>     account_type?: any | null,
>     accountid?: any | null,
>     accounting_systemid?: any | null,
>     id?: any | null
>   } | null,
>   accounting_systemid?: any | null,
>   balance?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   credit?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   debit?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   description?: any | null,
>   detail_type?: any | null,
>   detailid?: any | null,
>   entry?: {
>     accounting_systemid?: any | null,
>     clientid?: any | null,
>     creditid?: any | null,
>     entryid?: any | null,
>     expenseid?: any | null,
>     id?: any | null,
>     incomeid?: any | null,
>     invoiceid?: any | null,
>     paymentid?: any | null
>   } | null,
>   id?: any | null,
>   name?: any | null,
>   sub_account?: {
>     account_sub_name?: any | null,
>     account_sub_number?: any | null,
>     accounting_systemid?: any | null,
>     id?: any | null,
>     parentid?: any | null,
>     sub_accountid?: any | null
>   } | null,
>   user_entered_date?: any | null
> }[] | null
> ```

***

## Ledger Accounts

### create

`ledgerAccounts.create`

Create a ledger account (name, number, sub type, parent).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccounts.create({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `name` | `any` | No | — |
| `number` | `any` | No | — |
| `description` | `any` | No | — |
| `sub_type` | `any` | No | — |
| `parent_account` | `any` | No | — |
| `system_account_name` | `any` | No | — |
| `auto_created` | `any` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uuid?: any | null,
>   name?: any | null,
>   number?: any | null,
>   description?: any | null,
>   type?: any | null,
>   sub_type?: any | null,
>   parent_account?: any | null,
>   sub_accounts?: any[] | null,
>   auto_created?: any | null,
>   state?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

### get

`ledgerAccounts.get`

Read one ledger account. (GET /accounting/businesses/\{businessUuid}/ledger\_accounts/accounts/\{accountUuid})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccounts.get({ accountUuid: '1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `accountUuid` | `string \| number` | Yes | The account uuid. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uuid?: any | null,
>   name?: any | null,
>   number?: any | null,
>   description?: any | null,
>   type?: any | null,
>   sub_type?: any | null,
>   system_account_name?: any | null,
>   parent_account?: any | null,
>   sub_accounts?: any[] | null,
>   auto_created?: any | null,
>   state?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

### list

`ledgerAccounts.list`

List the chart of accounts of the business (ledger accounts and sub-accounts).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccounts.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object[] \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uuid?: any | null,
>   name?: any | null,
>   number?: any | null,
>   description?: any | null,
>   type?: any | null,
>   sub_type?: any | null,
>   system_account_name?: any | null,
>   parent_account?: any | null,
>   sub_accounts?: any[] | null,
>   auto_created?: any | null,
>   state?: any | null,
>   updated_at?: any | null
> }[] | null
> ```

***

### update

`ledgerAccounts.update`

Change a ledger account. (PUT /accounting/businesses/\{businessUuid}/ledger\_accounts/accounts/\{accountUuid})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccounts.update({ accountUuid: '1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `accountUuid` | `string \| number` | Yes | The account uuid. |
| `uuid` | `any` | No | — |
| `name` | `any` | No | — |
| `number` | `any` | No | — |
| `description` | `any` | No | — |
| `type` | `any` | No | — |
| `sub_type` | `any` | No | — |
| `parent_account` | `any` | No | — |
| `sub_accounts` | `any[]` | No | — |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `data` | `object \| null` | No | — |

> [accordion] data full type
>
> ```ts theme={null}
> {
>   uuid?: any | null,
>   name?: any | null,
>   number?: any | null,
>   description?: any | null,
>   type?: any | null,
>   sub_type?: any | null,
>   parent_account?: any | null,
>   sub_accounts?: any[] | null,
>   auto_created?: any | null,
>   state?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

## Ledger Account Sub Types

### get

`ledgerAccountSubTypes.get`

Read one ledger account sub type. (GET /accounting/ledger\_accounts/sub\_types/\{subTypeId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccountSubTypes.get({ subTypeId: '1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `subTypeId` | `string \| number` | Yes | The sub type id. |

**Output:** *empty object*

***

### list

`ledgerAccountSubTypes.list`

List the ledger account sub types. (GET /accounting/ledger\_accounts/sub\_types)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccountSubTypes.list({});
```

**Input:** *empty object*

**Output:** *empty object*

***

## Ledger Account Types

### list

`ledgerAccountTypes.list`

List the ledger account types (asset, liability, equity, income, expense).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerAccountTypes.list({});
```

**Input:** *empty object*

**Output:** *empty object*

***

## Ledger Reports

### accountEntryDetails

`ledgerReports.accountEntryDetails`

List the journal entries that posted to one ledger account.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.accountEntryDetails({ accountUuid: '1c2d3e4f-5a6b-4c7d-8e9f-0a1b2c3d4e5f' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `accountUuid` | `string \| number` | Yes | The account uuid. |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |
| `include_children` | `boolean` | No | Include entries of sub-accounts. |

**Output:** *empty object*

***

### balanceSheet

`ledgerReports.balanceSheet`

Run the balance sheet report from the ledger.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.balanceSheet({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `date1` | `string` | No | Report date, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code. |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries. |

**Output:** *empty object*

***

### cashFlow

`ledgerReports.cashFlow`

Run the cash flow report. (GET /accounting/businesses/\{businessUuid}/reports/cash\_flow)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.cashFlow({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |

**Output:** *empty object*

***

### chartOfAccounts

`ledgerReports.chartOfAccounts`

Run the chart of accounts report with balances.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.chartOfAccounts({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |
| `sort` | `string` | No | Sort, for example account\_number\_asc. |
| `state` | `string` | No | active or archived accounts. |

**Output:** *empty object*

***

### expenseDetails

`ledgerReports.expenseDetails`

Run the expense details report from the ledger.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.expenseDetails({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |

**Output:** *empty object*

***

### generalLedger

`ledgerReports.generalLedger`

Run the general ledger report. (GET /accounting/businesses/\{businessUuid}/reports/general\_ledger)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.generalLedger({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |

**Output:** *empty object*

***

### manualJournalEntries

`ledgerReports.manualJournalEntries`

Run the manual journal entry report. (GET /accounting/businesses/\{businessUuid}/reports/manual\_journal\_entry\_report)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.manualJournalEntries({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |

**Output:** *empty object*

***

### profitAndLoss

`ledgerReports.profitAndLoss`

Run the profit and loss report from the ledger.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.profitAndLoss({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |

**Output:** *empty object*

***

### trialBalance

`ledgerReports.trialBalance`

Run the trial balance from the ledger. (GET /accounting/businesses/\{businessUuid}/reports/trial\_balance)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.ledgerReports.trialBalance({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessUuid` | `string \| number` | No | The business uuid. Left out, the plugin reads it from users.me (or the businessUuid option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `use_ledger_entries` | `boolean` | No | Read from ledger entries (the docs examples set true). |

**Output:** *empty object*

***

## Other Incomes

### create

`otherIncomes.create`

Create a other income entry (sales outside invoices). Fields go in `other_income`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.otherIncomes.create({
	other_income: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `other_income` | `object` | Yes | The other income fields (FreshBooks wraps every body in its resource name). |

> [accordion] other\_income full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   category_name?: any,
>   date?: any,
>   note?: any,
>   payment_type?: any,
>   source?: any,
>   taxes?: {
>     amount?: any,
>     name?: any
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `other_income` | `object \| null` | No | — |

> [accordion] other\_income full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   category_name?: any | null,
>   created_at?: any | null,
>   date?: any | null,
>   incomeid?: any | null,
>   note?: any | null,
>   payment_type?: any | null,
>   source?: any | null,
>   taxes?: {
>     amount?: any | null,
>     name?: any | null
>   }[] | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`otherIncomes.delete`

Delete a other income entry (sales outside invoices).

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.otherIncomes.delete({ incomeId: '7788' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `incomeId` | `string \| number` | Yes | The income id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`otherIncomes.get`

Read one other income entry (sales outside invoices).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.otherIncomes.get({ incomeId: '7788' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `incomeId` | `string \| number` | Yes | The income id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `other_income` | `object \| null` | No | — |

> [accordion] other\_income full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   category_name?: any | null,
>   created_at?: any | null,
>   date?: any | null,
>   incomeid?: any | null,
>   note?: any | null,
>   payment_type?: any | null,
>   source?: any | null,
>   taxes?: any[] | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`otherIncomes.list`

List other income entries, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.otherIncomes.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `other_income` | `object[] \| null` | No | — |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] other\_income full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   category_name?: any | null,
>   created_at?: any | null,
>   date?: any | null,
>   incomeid?: any | null,
>   note?: any | null,
>   payment_type?: any | null,
>   source?: any | null,
>   taxes?: {
>     amount?: any | null,
>     name?: any | null
>   }[] | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`otherIncomes.update`

Change fields of a other income entry (sales outside invoices). FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.otherIncomes.update({
	incomeId: '7788',
	other_income: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `incomeId` | `string \| number` | Yes | The income id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `other_income` | `object` | Yes | The other income fields (FreshBooks wraps every body in its resource name). |

> [accordion] other\_income full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   date?: any,
>   source?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `other_income` | `object \| null` | No | — |

> [accordion] other\_income full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   category_name?: any | null,
>   created_at?: any | null,
>   date?: any | null,
>   incomeid?: any | null,
>   note?: any | null,
>   payment_type?: any | null,
>   source?: any | null,
>   taxes?: any[] | null,
>   updated_at?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Payment Options

### getDefault

`paymentOptions.getDefault`

Read the account's default online payment options.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.paymentOptions.getDefault({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `entity_type` | `string` | No | The entity the defaults are for: invoice. |

**Output:** *empty object*

***

## Payments

### create

`payments.create`

Create a payment record. Fields go in `payment`.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.payments.create({
	payment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `(client \| invoice \| credit_note \| order \| gateway)[]` | No | Extra data to include: client (include client info in payment); invoice (include related invoice info in payment); credit\_note (include credit note info in payment); order (include gateway order in payment); gateway (include gateway info in payment) |
| `payment` | `object` | Yes | The payment fields (FreshBooks wraps every body in its resource name). |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   invoiceid?: any,
>   amount?: {
>     amount?: any
>   },
>   date?: any,
>   type?: any,
>   note?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `payment` | `object \| null` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   clientid?: any | null,
>   creditid?: any | null,
>   date?: any | null,
>   from_credit?: any | null,
>   gateway?: any | null,
>   id?: any | null,
>   invoiceid?: any | null,
>   logid?: any | null,
>   note?: any | null,
>   orderid?: any | null,
>   overpaymentid?: any | null,
>   transactionid?: any | null,
>   type?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`payments.delete`

Delete a payment record (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.payments.delete({ paymentId: '55667' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `paymentId` | `string \| number` | Yes | The payment id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   payment?: {
>     accounting_systemid?: any | null,
>     amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     clientid?: any | null,
>     creditid?: any | null,
>     date?: any | null,
>     from_credit?: any | null,
>     gateway?: any | null,
>     id?: any | null,
>     invoiceid?: any | null,
>     logid?: any | null,
>     note?: any | null,
>     orderid?: any | null,
>     overpaymentid?: any | null,
>     transactionid?: any | null,
>     type?: any | null,
>     updated?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`payments.get`

Read one payment record. (GET /accounting/account/\{accountId}/payments/payments/\{paymentId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.payments.get({ paymentId: '55667' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `paymentId` | `string \| number` | Yes | The payment id. |
| `include` | `(client \| invoice \| credit_note \| order \| gateway)[]` | No | Extra data to include: client (include client info in payment); invoice (include related invoice info in payment); credit\_note (include credit note info in payment); order (include gateway order in payment); gateway (include gateway info in payment) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `payment` | `object \| null` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   clientid?: any | null,
>   creditid?: any | null,
>   date?: any | null,
>   from_credit?: any | null,
>   gateway?: any | null,
>   id?: any | null,
>   invoiceid?: any | null,
>   logid?: any | null,
>   note?: any | null,
>   orderid?: any | null,
>   overpaymentid?: any | null,
>   transactionid?: any | null,
>   type?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`payments.list`

List payments recorded against invoices, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.payments.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `(client \| invoice \| credit_note \| order \| gateway)[]` | No | Extra data to include: client (include client info in payment); invoice (include related invoice info in payment); credit\_note (include credit note info in payment); order (include gateway order in payment); gateway (include gateway info in payment) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `payments` | `object[] \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] payments full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   clientid?: any | null,
>   creditid?: any | null,
>   date?: any | null,
>   from_credit?: any | null,
>   gateway?: any | null,
>   id?: any | null,
>   invoiceid?: any | null,
>   logid?: any | null,
>   note?: any | null,
>   orderid?: any | null,
>   overpaymentid?: any | null,
>   transactionid?: any | null,
>   type?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`payments.update`

Change fields of a payment record. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.payments.update({
	paymentId: '55667',
	payment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `paymentId` | `string \| number` | Yes | The payment id. |
| `include` | `(client \| invoice \| credit_note \| order \| gateway)[]` | No | Extra data to include: client (include client info in payment); invoice (include related invoice info in payment); credit\_note (include credit note info in payment); order (include gateway order in payment); gateway (include gateway info in payment) |
| `payment` | `object` | Yes | The payment fields (FreshBooks wraps every body in its resource name). |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   amount?: {
>     amount?: any,
>     code?: any
>   },
>   note?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `payment` | `object \| null` | No | — |

> [accordion] payment full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   clientid?: any | null,
>   creditid?: any | null,
>   date?: any | null,
>   from_credit?: any | null,
>   gateway?: any | null,
>   id?: any | null,
>   invoiceid?: any | null,
>   logid?: any | null,
>   note?: any | null,
>   orderid?: any | null,
>   overpaymentid?: any | null,
>   transactionid?: any | null,
>   type?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Projects

### create

`projects.create`

Create a project (title, client, billing method, fixed price or hourly rate). Fields go in `project`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.projects.create({
	project: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `project` | `object` | Yes | The project fields (FreshBooks wraps every body in its resource name). |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   title?: any,
>   client_id?: any,
>   project_type?: any,
>   fixed_price?: any,
>   due_date?: any,
>   services?: {
>     id?: any,
>     billable?: any,
>     vis_state?: any
>   }[]
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `object \| null` | No | — |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   title?: any | null,
>   description?: any | null,
>   due_date?: any | null,
>   client_id?: any | null,
>   internal?: any | null,
>   budget?: any | null,
>   fixed_price?: any | null,
>   rate?: any | null,
>   billing_method?: any | null,
>   project_type?: any | null,
>   active?: any | null,
>   complete?: any | null,
>   sample?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null,
>   logged_duration?: any | null,
>   services?: any[] | null,
>   billed_amount?: any | null,
>   billed_status?: any | null,
>   retainer_id?: any | null,
>   group?: {
>     id?: any | null,
>     members?: {
>       id?: any | null,
>       identity_id?: any | null,
>       role?: any | null,
>       first_name?: any | null,
>       last_name?: any | null,
>       email?: any | null,
>       company?: any | null,
>       active?: any | null
>     }[] | null,
>     pending_invitations?: any | null
>   } | null
> } | null
> ```

***

### delete

`projects.delete`

Delete a project and its data. Cannot be undone.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.projects.delete({ projectId: '12345' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `projectId` | `string \| number` | Yes | The project id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`projects.get`

Read one project with its services and group.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.projects.get({ projectId: '12345' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `projectId` | `string \| number` | Yes | The project id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `object \| null` | No | — |
| `abilities` | `object[] \| null` | No | — |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   title?: any | null,
>   description?: any | null,
>   due_date?: any | null,
>   client_id?: any | null,
>   internal?: any | null,
>   budget?: any | null,
>   fixed_price?: any | null,
>   rate?: any | null,
>   billing_method?: any | null,
>   project_type?: any | null,
>   active?: any | null,
>   complete?: any | null,
>   sample?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null,
>   logged_duration?: any | null,
>   services?: {
>     business_id?: any | null,
>     id?: any | null,
>     name?: any | null,
>     billable?: any | null,
>     vis_state?: any | null
>   }[] | null,
>   billed_amount?: any | null,
>   billed_status?: any | null,
>   retainer_id?: any | null,
>   group?: {
>     id?: any | null,
>     members?: {
>       id?: any | null,
>       identity_id?: any | null,
>       role?: any | null,
>       first_name?: any | null,
>       last_name?: any | null,
>       email?: any | null,
>       company?: any | null,
>       active?: any | null
>     }[] | null,
>     pending_invitations?: any[] | null
>   } | null
> } | null
> ```

> [accordion] abilities full type
>
> ```ts theme={null}
> {
>   name?: any | null,
>   value?: any | null
> }[] | null
> ```

***

### list

`projects.list`

List projects with filters and paging. (GET /projects/business/\{businessId}/projects)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.projects.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `active` | `boolean` | No | True marks that the project is still an active project. |
| `complete` | `boolean` | No | True marks that the project has been completed. |
| `include_logged_duration` | `boolean` | No | True returns the time logged for a project (in seconds). |
| `updated_since` | `string` | No | Matches projects that have been updated at or after the specified utc date/time (ISO 8601, UTC). |
| `skip_group` | `boolean` | No | True returns projects without the group field. |
| `sort` | `string` | No | Sort field (created\_at, due\_date, title); prefix with - for descending. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `meta` | `object \| null` | No | — |
| `projects` | `object[] \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   sort?: any[] | null,
>   total?: any | null,
>   per_page?: any | null,
>   page?: any | null,
>   pages?: any | null
> } | null
> ```

> [accordion] projects full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   title?: any | null,
>   description?: any | null,
>   due_date?: any | null,
>   client_id?: any | null,
>   internal?: any | null,
>   budget?: any | null,
>   fixed_price?: any | null,
>   rate?: any | null,
>   billing_method?: any | null,
>   project_type?: any | null,
>   active?: any | null,
>   complete?: any | null,
>   sample?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null,
>   logged_duration?: any | null,
>   services?: {
>     business_id?: any | null,
>     id?: any | null,
>     name?: any | null,
>     billable?: any | null,
>     vis_state?: any | null
>   }[] | null,
>   billed_amount?: any | null,
>   billed_status?: any | null,
>   group_id?: any | null
> }[] | null
> ```

***

### update

`projects.update`

Change a project. (PUT /projects/business/\{businessId}/project/\{projectId})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.projects.update({
	projectId: '12345',
	project: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `projectId` | `string \| number` | Yes | The project id. |
| `project` | `object` | Yes | The project fields (FreshBooks wraps every body in its resource name). |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   title?: any,
>   due_date?: any,
>   client_id?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `project` | `object \| null` | No | — |
| `abilities` | `object[] \| null` | No | — |

> [accordion] project full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   title?: any | null,
>   description?: any | null,
>   due_date?: any | null,
>   client_id?: any | null,
>   internal?: any | null,
>   budget?: any | null,
>   fixed_price?: any | null,
>   rate?: any | null,
>   billing_method?: any | null,
>   project_type?: any | null,
>   active?: any | null,
>   complete?: any | null,
>   sample?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null,
>   logged_duration?: any | null,
>   services?: any[] | null,
>   billed_amount?: any | null,
>   billed_status?: any | null,
>   retainer_id?: any | null,
>   group?: {
>     id?: any | null,
>     members?: {
>       id?: any | null,
>       identity_id?: any | null,
>       role?: any | null,
>       first_name?: any | null,
>       last_name?: any | null,
>       email?: any | null,
>       company?: any | null,
>       active?: any | null
>     }[] | null,
>     pending_invitations?: any[] | null
>   } | null
> } | null
> ```

> [accordion] abilities full type
>
> ```ts theme={null}
> {
>   name?: any | null,
>   value?: any | null
> }[] | null
> ```

***

### updateServiceRate

`projects.updateServiceRate`

Set a service's rate on one project. (PUT /comments/business/\{businessId}/project/\{projectId}/service/\{serviceId}/rate)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.projects.updateServiceRate({
	projectId: '12345',
	serviceId: '6011',
	service_rate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `projectId` | `string \| number` | Yes | The project id. |
| `serviceId` | `string \| number` | Yes | The service id. |
| `service_rate` | `object` | Yes | The service rate fields (FreshBooks wraps every body in its resource name). |
| `project_service_rate` | `object` | No | — |

> [accordion] service\_rate full type
>
> ```ts theme={null}
> {
> }
> ```

> [accordion] project\_service\_rate full type
>
> ```ts theme={null}
> {
>   rate?: any,
>   service_id?: any,
>   project_id?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `project_service_rate` | `object \| null` | No | — |

> [accordion] project\_service\_rate full type
>
> ```ts theme={null}
> {
>   rate?: any | null,
>   service_id?: any | null,
>   business_id?: any | null,
>   project_id?: any | null
> } | null
> ```

***

## Project Threads

### create

`projectThreads.create`

Post a new message to a project's discussion. Project members are notified.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.projectThreads.create({
	projectId: '12345',
	thread: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `projectId` | `string \| number` | Yes | The project id. |
| `thread` | `object` | Yes | The thread fields (FreshBooks wraps every body in its resource name). |

> [accordion] thread full type
>
> ```ts theme={null}
> {
>   message?: any
> }
> ```

**Output:** *empty object*

***

### list

`projectThreads.list`

List the messages in a project's discussion.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.projectThreads.list({ projectId: '12345' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `projectId` | `string \| number` | Yes | The project id. |

**Output:** *empty object*

***

## Reports

### accountsAging

`reports.accountsAging`

Run the accounts aging report (what clients owe, by age).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.accountsAging({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `accounts_aging` | `object \| null` | No | — |

> [accordion] accounts\_aging full type
>
> ```ts theme={null}
> {
>   accounts?: {
>     0-30?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     31-60?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     61-90?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     91+?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     email?: any | null,
>     fname?: any | null,
>     lname?: any | null,
>     organization?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     userid?: any | null
>   }[] | null,
>   company_name?: any | null,
>   currency_code?: any | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   totals?: {
>     0-30?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     31-60?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     61-90?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     91+?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   } | null
> } | null
> ```

***

### accountStatement

`reports.accountStatement`

Run a client's account statement for a period.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.accountStatement({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `clientid` | `string` | No | The client id. |

**Output:** *empty object*

***

### balanceSheet

`reports.balanceSheet`

Run the balance sheet (account version).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.balanceSheet({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `dates` | `string[]` | No | Report dates, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `balance_sheet` | `object \| null` | No | — |

> [accordion] balance\_sheet full type
>
> ```ts theme={null}
> {
>   assets_total?: {
>     balance?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     date?: any | null
>   }[] | null,
>   company_name?: any | null,
>   currency_code?: any | null,
>   data?: {
>     account_type?: any | null,
>     accounts?: {
>       account_name?: any | null,
>       account_number?: any | null,
>       balances?: {
>         balance?: {
>           amount?: any | null,
>           code?: any | null
>         } | null,
>         date?: any | null
>       }[] | null,
>       sub_accounts?: {
>         balances?: {
>           balance?: {
>             amount?: any | null,
>             code?: any | null
>           } | null,
>           date?: any | null
>         }[] | null,
>         sub_account_name?: any | null,
>         sub_account_number?: any | null
>       }[] | null
>     }[] | null,
>     balances?: {
>       balance?: {
>         amount?: any | null,
>         code?: any | null
>       } | null,
>       date?: any | null
>     }[] | null,
>     category?: any | null
>   }[] | null,
>   dates?: any[] | null,
>   download_token?: any | null,
>   liabilities_and_equity_total?: {
>     balance?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     date?: any | null
>   }[] | null
> } | null
> ```

***

### bankReconciliationSummary

`reports.bankReconciliationSummary`

Run the bank reconciliation summary for a bank account.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.bankReconciliationSummary({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `currency_code` | `string` | No | Three-letter currency code. |
| `date` | `string` | No | Reconciliation date, YYYY-MM-DD. |
| `bank_accountid` | `string` | No | The bank account id. |

**Output:** *empty object*

***

### download

`reports.download`

Download a report as CSV with the download token a report call returned (fileName like invoice\_details.csv).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.download({ downloadToken: 'd0wnl0adt0ken', fileName: 'invoice_details.csv' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `downloadToken` | `string \| number` | Yes | The download token. |
| `fileName` | `string \| number` | Yes | The file name. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `contentBase64` | `string` | No | The file, base64-encoded. Missing when the file came back as text or contentOmitted is set. |
| `text` | `string` | No | The file as text, in place of contentBase64, when it is a text file (CSV, JSON, Markdown, XML and the like) in UTF-8. |
| `contentType` | `string` | Yes | Media type of the file, for example application/pdf. |
| `byteLength` | `number` | Yes | Size of the file in bytes. |
| `filename` | `string` | No | The file name, when known. |
| `contentOmitted` | `not_requested \| over_limit` | No | Set when the content was left out: the caller did not ask for it, or the file was over the limit. |
| `fileId` | `string` | No | Where the host saved the file. Over the limit it comes in place of the content; a host that keeps every file sets it beside the content too. On Corsair it is a Files id (fil\_…): pass it to another app wherever that app takes a file URL, or read a text file or PDF with files.read\_text. |

***

### expenseDetails

`reports.expenseDetails`

Run the expense details report for a period (account version).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.expenseDetails({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |

**Output:** *empty object*

***

### invoiceDetails

`reports.invoiceDetails`

Run the invoice details report for a period.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.invoiceDetails({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `clientids` | `string[]` | No | Only these client ids. |
| `download_token` | `string` | No | Ask for a CSV download token instead of JSON (see reports.download). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `invoice_details` | `object \| null` | No | — |

> [accordion] invoice\_details full type
>
> ```ts theme={null}
> {
>   clientids?: any[] | null,
>   clients?: any[] | null,
>   company_name?: any | null,
>   currency_code?: any | null,
>   date_type?: any | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   start_date?: any | null,
>   statusids?: any[] | null,
>   summary?: {
>     outstanding?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     paid?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   } | null,
>   summary_only?: any | null
> } | null
> ```

***

### itemSales

`reports.itemSales`

Run the item sales report. (GET /accounting/account/\{accountId}/reports/accounting/item\_sales)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.itemSales({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `clientids` | `string` | No | Only this client id. |
| `item_names` | `string` | No | Only this item name. |
| `statusids` | `string` | No | Invoice status (paid, unpaid...). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `item_sales` | `object \| null` | No | — |

> [accordion] item\_sales full type
>
> ```ts theme={null}
> {
>   clientids?: any[] | null,
>   company_name?: any | null,
>   currency_code?: any | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   item_names?: any[] | null,
>   items?: {
>     invoices?: {
>       amount?: {
>         amount?: any | null,
>         code?: any | null
>       } | null,
>       create_date?: any | null,
>       discount?: {
>         amount?: any | null,
>         code?: any | null
>       } | null,
>       fname?: any | null,
>       invoice_number?: any | null,
>       invoiceid?: any | null,
>       lname?: any | null,
>       organization?: any | null,
>       qty?: any | null,
>       unit_cost?: {
>         amount?: any | null,
>         code?: any | null
>       } | null,
>       v3_status?: any | null
>     }[] | null,
>     name?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     total_discount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     total_qty?: any | null
>   }[] | null,
>   start_date?: any | null,
>   statusids?: any[] | null,
>   total?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_discount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_qty?: any | null
> } | null
> ```

***

### paymentsCollected

`reports.paymentsCollected`

Run the payments collected report. (GET /accounting/account/\{accountId}/reports/accounting/payments\_collected)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.paymentsCollected({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `clientids` | `string[]` | No | Only these client ids. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `payments_collected` | `object \| null` | No | — |

> [accordion] payments\_collected full type
>
> ```ts theme={null}
> {
>   clientids?: any[] | null,
>   currency_codes?: any[] | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   payment_methods?: any[] | null,
>   payments?: any[] | null,
>   start_date?: any | null,
>   totals?: any[] | null
> } | null
> ```

***

### profitLossEntity

`reports.profitLossEntity`

Run the profit and loss report (account version).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.profitLossEntity({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `resolution` | `string` | No | Column period: m (month), q (quarter) or y (year). |
| `cash_based` | `boolean` | No | Cash basis instead of accrual. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `profitloss` | `object \| null` | No | — |

> [accordion] profitloss full type
>
> ```ts theme={null}
> {
>   cash_based?: any | null,
>   company_name?: any | null,
>   currency_code?: any | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   expenses?: {
>     children?: {
>       children?: any[] | null,
>       data?: any[] | null,
>       description?: any | null,
>       entry_type?: any | null,
>       total?: {
>         amount?: any | null,
>         code?: any | null
>       } | null
>     }[] | null,
>     data?: any[] | null,
>     description?: any | null,
>     entry_type?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   income?: {
>     children?: any[] | null,
>     data?: any[] | null,
>     description?: any | null,
>     entry_type?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   labels?: any[] | null,
>   net_profit?: {
>     children?: any[] | null,
>     data?: any[] | null,
>     description?: any | null,
>     entry_type?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   } | null,
>   resolution?: any | null,
>   start_date?: any | null,
>   total_expenses?: {
>     children?: any[] | null,
>     data?: any[] | null,
>     description?: any | null,
>     entry_type?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   } | null,
>   total_income?: {
>     children?: any[] | null,
>     data?: any[] | null,
>     description?: any | null,
>     entry_type?: any | null,
>     total?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   } | null
> } | null
> ```

***

### revenueByClient

`reports.revenueByClient`

Run the revenue by client report. (GET /accounting/account/\{accountId}/reports/accounting/revenue\_by\_client)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.revenueByClient({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `sales_type` | `string` | No | collected or invoiced. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `revenue_by_client` | `object \| null` | No | — |

> [accordion] revenue\_by\_client full type
>
> ```ts theme={null}
> {
>   clientids?: any[] | null,
>   clients?: any[] | null,
>   currency_code?: any | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   labels?: any[] | null,
>   sales_type?: any | null,
>   start_date?: any | null,
>   total_sales?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   total_sales_data?: {
>     amount?: any | null,
>     code?: any | null
>   }[] | null
> } | null
> ```

***

### taxSummary

`reports.taxSummary`

Run the sales tax summary report. (GET /accounting/account/\{accountId}/reports/accounting/taxsummary)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.taxSummary({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |
| `cash_based` | `boolean` | No | Cash basis instead of accrual. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `taxsummary` | `object \| null` | No | — |

> [accordion] taxsummary full type
>
> ```ts theme={null}
> {
>   cash_based?: any | null,
>   currency_code?: any | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   start_date?: any | null,
>   taxes?: {
>     net_tax?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     net_taxable_amount?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     tax_collected?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     tax_name?: any | null,
>     tax_paid?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     taxable_amount_collected?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     taxable_amount_paid?: {
>       amount?: any | null,
>       code?: any | null
>     } | null
>   }[] | null,
>   total_invoiced?: {
>     amount?: any | null,
>     code?: any | null
>   } | null
> } | null
> ```

***

### trialBalance

`reports.trialBalance`

Run the trial balance (account version).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.reports.trialBalance({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `start_date` | `string` | No | Start of the period, YYYY-MM-DD. |
| `end_date` | `string` | No | End of the period, YYYY-MM-DD. |
| `currency_code` | `string` | No | Three-letter currency code (for example USD). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `trial_balance` | `object \| null` | No | — |

> [accordion] trial\_balance full type
>
> ```ts theme={null}
> {
>   company_name?: any | null,
>   currency_code?: any | null,
>   data?: {
>     account_name?: any | null,
>     account_number?: any | null,
>     account_sub_name?: any | null,
>     account_sub_number?: any | null,
>     credit?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     debit?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     sub_accountid?: any | null
>   }[] | null,
>   download_token?: any | null,
>   end_date?: any | null,
>   start_date?: any | null
> } | null
> ```

***

## Retainers

### create

`retainers.create`

Create a retainer for a client. (POST /comments/business/\{businessId}/retainers)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.retainers.create({
	retainer: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `retainer` | `object` | Yes | The retainer fields (FreshBooks wraps every body in its resource name). |

> [accordion] retainer full type
>
> ```ts theme={null}
> {
>   client_user_id?: any,
>   start_date?: any,
>   next_period_start_date?: any,
>   fee?: any,
>   excess_rate?: any,
>   budgeted_time?: any,
>   active?: any,
>   frequency?: any,
>   number_recurring?: any,
>   is_infinitely_recurring?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `retainer` | `object \| null` | No | — |

> [accordion] retainer full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   system_id?: any | null,
>   invoice_profile_id?: any | null,
>   client_user_id?: any | null,
>   start_date?: any | null,
>   next_period_start_date?: any | null,
>   fee?: any | null,
>   excess_rate?: any | null,
>   budgeted_time?: any | null,
>   active?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

### delete

`retainers.delete`

Delete a retainer (sets vis\_state to 1; retainers.undelete restores it).

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.retainers.delete({ retainerId: '501' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `retainerId` | `string \| number` | Yes | The retainer id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   retainer?: {
>     id?: any | null,
>     business_id?: any | null,
>     system_id?: any | null,
>     invoice_profile_id?: any | null,
>     client_user_id?: any | null,
>     start_date?: any | null,
>     next_period_start_date?: any | null,
>     fee?: any | null,
>     excess_rate?: any | null,
>     budgeted_time?: any | null,
>     active?: any | null,
>     created_at?: any | null,
>     updated_at?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`retainers.get`

Read one retainer. (GET /comments/business/\{businessId}/retainer/\{retainerId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.retainers.get({ retainerId: '501' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `retainerId` | `string \| number` | Yes | The retainer id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `retainer` | `object \| null` | No | — |

> [accordion] retainer full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   system_id?: any | null,
>   invoice_profile_id?: any | null,
>   client_user_id?: any | null,
>   start_date?: any | null,
>   next_period_start_date?: any | null,
>   fee?: any | null,
>   excess_rate?: any | null,
>   budgeted_time?: any | null,
>   active?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

### list

`retainers.list`

List retainers (recurring prepaid client agreements).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.retainers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `retainers` | `object[] \| null` | No | — |

> [accordion] retainers full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   system_id?: any | null,
>   invoice_profile_id?: any | null,
>   client_user_id?: any | null,
>   start_date?: any | null,
>   next_period_start_date?: any | null,
>   fee?: any | null,
>   excess_rate?: any | null,
>   budgeted_time?: any | null,
>   active?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null
> }[] | null
> ```

***

### undelete

`retainers.undelete`

Restore a deleted retainer (sets vis\_state to 0).

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.retainers.undelete({ retainerId: '501' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `retainerId` | `string \| number` | Yes | The retainer id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `retainer` | `object \| null` | No | — |

> [accordion] retainer full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   system_id?: any | null,
>   invoice_profile_id?: any | null,
>   client_user_id?: any | null,
>   start_date?: any | null,
>   next_period_start_date?: any | null,
>   fee?: any | null,
>   excess_rate?: any | null,
>   budgeted_time?: any | null,
>   active?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

### update

`retainers.update`

Change a retainer. (PUT /comments/business/\{businessId}/retainer/\{retainerId})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.retainers.update({
	retainerId: '501',
	retainer: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `retainerId` | `string \| number` | Yes | The retainer id. |
| `retainer` | `object` | Yes | The retainer fields (FreshBooks wraps every body in its resource name). |

> [accordion] retainer full type
>
> ```ts theme={null}
> {
>   client_user_id?: any,
>   start_date?: any,
>   next_period_start_date?: any,
>   fee?: any,
>   excess_rate?: any,
>   budgeted_time?: any,
>   active?: any,
>   frequency?: any,
>   number_recurring?: any,
>   is_infinitely_recurring?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `retainer` | `object \| null` | No | — |

> [accordion] retainer full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   system_id?: any | null,
>   invoice_profile_id?: any | null,
>   client_user_id?: any | null,
>   start_date?: any | null,
>   next_period_start_date?: any | null,
>   fee?: any | null,
>   excess_rate?: any | null,
>   budgeted_time?: any | null,
>   active?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null
> } | null
> ```

***

## Service Rates

### list

`serviceRates.list`

List the hourly rates of all services. (GET /comments/business/\{businessId}/service\_rates)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.serviceRates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `service_rates` | `object[] \| null` | No | — |

> [accordion] service\_rates full type
>
> ```ts theme={null}
> {
>   rate?: any | null,
>   service_id?: any | null,
>   business_id?: any | null
> }[] | null
> ```

***

## Services

### create

`services.create`

Create a service (name, billable). (POST /comments/business/\{businessId}/service)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.services.create({
	service: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `service` | `object` | Yes | The service fields (FreshBooks wraps every body in its resource name). |

> [accordion] service full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

### createRate

`services.createRate`

Set the hourly rate of a service. (POST /comments/business/\{businessId}/service/\{serviceId}/rate)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.services.createRate({
	serviceId: '6011',
	service_rate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `serviceId` | `string \| number` | Yes | The service id. |
| `service_rate` | `object` | Yes | The service rate fields (FreshBooks wraps every body in its resource name). |

> [accordion] service\_rate full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

### get

`services.get`

Read one service. (GET /comments/business/\{businessId}/service/\{serviceId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.services.get({ serviceId: '6011' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `serviceId` | `string \| number` | Yes | The service id. |

**Output:** *empty object*

***

### getRate

`services.getRate`

Read a service's hourly rate. (GET /comments/business/\{businessId}/service/\{serviceId}/rate)

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.services.getRate({ serviceId: '6011' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `serviceId` | `string \| number` | Yes | The service id. |

**Output:** *empty object*

***

### list

`services.list`

List services (the billable work types on projects).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.services.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `include_task_id` | `boolean` | No | Include the accounting task\_id of each service. |

**Output:** *empty object*

***

### updateRate

`services.updateRate`

Change a service's hourly rate. (PUT /comments/business/\{businessId}/service/\{serviceId}/rate)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.services.updateRate({
	serviceId: '6011',
	service_rate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `serviceId` | `string \| number` | Yes | The service id. |
| `service_rate` | `object` | Yes | The service rate fields (FreshBooks wraps every body in its resource name). |

> [accordion] service\_rate full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

## Staff

### delete

`staff.delete`

Delete a staff record (sets vis\_state to 1).

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.staff.delete({ staffId: '1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `staffId` | `string \| number` | Yes | The staff id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   staff?: {
>     accounting_systemid?: any | null,
>     api_token?: any | null,
>     bus_phone?: any | null,
>     currency_code?: any | null,
>     display_name?: any | null,
>     email?: any | null,
>     fax?: any | null,
>     fname?: any | null,
>     home_phone?: any | null,
>     id?: any | null,
>     language?: any | null,
>     last_login?: any | null,
>     level?: any | null,
>     lname?: any | null,
>     mob_phone?: any | null,
>     note?: any | null,
>     num_logins?: any | null,
>     organization?: any | null,
>     p_city?: any | null,
>     p_code?: any | null,
>     p_country?: any | null,
>     p_province?: any | null,
>     p_street?: any | null,
>     p_street2?: any | null,
>     rate?: any | null,
>     role?: any | null,
>     signup_date?: any | null,
>     updated?: any | null,
>     userid?: any | null,
>     username?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`staff.get`

Read one staff record. (GET /accounting/account/\{accountId}/users/staffs/\{staffId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.staff.get({ staffId: '1' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `staffId` | `string \| number` | Yes | The staff id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `staff` | `object \| null` | No | — |

> [accordion] staff full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   api_token?: any | null,
>   bus_phone?: any | null,
>   currency_code?: any | null,
>   display_name?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   fname?: any | null,
>   home_phone?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_login?: any | null,
>   level?: any | null,
>   lname?: any | null,
>   mob_phone?: any | null,
>   note?: any | null,
>   num_logins?: any | null,
>   organization?: any | null,
>   p_city?: any | null,
>   p_code?: any | null,
>   p_country?: any | null,
>   p_province?: any | null,
>   p_street?: any | null,
>   p_street2?: any | null,
>   rate?: any | null,
>   role?: any | null,
>   signup_date?: any | null,
>   updated?: any | null,
>   userid?: any | null,
>   username?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`staff.list`

List staff of the account (the legacy accounting staff records).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.staff.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output:** *empty object*

***

### update

`staff.update`

Change a staff record. (PUT /accounting/account/\{accountId}/users/staffs/\{staffId})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.staff.update({
	staffId: '1',
	staff: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `staffId` | `string \| number` | Yes | The staff id. |
| `staff` | `object` | Yes | The staff fields (FreshBooks wraps every body in its resource name). |

> [accordion] staff full type
>
> ```ts theme={null}
> {
>   fname?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `staff` | `object \| null` | No | — |

> [accordion] staff full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   api_token?: any | null,
>   bus_phone?: any | null,
>   currency_code?: any | null,
>   display_name?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   fname?: any | null,
>   home_phone?: any | null,
>   id?: any | null,
>   language?: any | null,
>   last_login?: any | null,
>   level?: any | null,
>   lname?: any | null,
>   mob_phone?: any | null,
>   note?: any | null,
>   num_logins?: any | null,
>   organization?: any | null,
>   p_city?: any | null,
>   p_code?: any | null,
>   p_country?: any | null,
>   p_province?: any | null,
>   p_street?: any | null,
>   p_street2?: any | null,
>   rate?: any | null,
>   role?: any | null,
>   signup_date?: any | null,
>   updated?: any | null,
>   userid?: any | null,
>   username?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Systems

### get

`systems.get`

Read the account's system settings (company name, address, currency, date format...). The system id is the business id.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.systems.get({ systemId: '77001' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `systemId` | `string \| number` | Yes | The system id. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `system` | `object \| null` | No | — |

> [accordion] system full type
>
> ```ts theme={null}
> {
>   accountid?: any | null,
>   active?: any | null,
>   auto_bill?: any | null,
>   billing_status?: any | null,
>   bus_phone?: any | null,
>   business_type?: any | null,
>   business_uuid?: any | null,
>   city?: any | null,
>   code?: any | null,
>   country?: any | null,
>   currency_code?: any | null,
>   date?: any | null,
>   discountid?: any | null,
>   dst?: any | null,
>   duration?: any | null,
>   email?: any | null,
>   fax?: any | null,
>   gst_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   heard_about_us_via?: any | null,
>   id?: any | null,
>   info_email?: any | null,
>   ip?: any | null,
>   landing_url?: any | null,
>   masterlock_billing?: any | null,
>   migrated_to_smux_at?: any | null,
>   mob_phone?: any | null,
>   modern_system?: any | null,
>   name?: any | null,
>   num_clients?: any | null,
>   num_staff?: any | null,
>   payment_amount?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   payment_frequency?: any | null,
>   province?: any | null,
>   referralid?: any | null,
>   referring_url?: any | null,
>   salutation?: any | null,
>   size_limit?: any | null,
>   split_token?: any | null,
>   street?: any | null,
>   street2?: any | null,
>   systemid?: any | null,
>   test_system?: any | null,
>   timezone?: any | null,
>   timezoneid?: any | null,
>   vat_name?: any | null,
>   vat_number?: any | null
> } | null
> ```

***

## Tasks

### create

`tasks.create`

Create a billable task. Fields go in `task`.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.tasks.create({
	task: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `projects[]` | No | Extra data to include: projects (List of Projects that contain the task) |
| `task` | `object` | Yes | The task fields (FreshBooks wraps every body in its resource name). |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   name?: any,
>   description?: any,
>   rate?: {
>     amount?: any,
>     code?: any
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   billable?: any | null,
>   description?: any | null,
>   id?: any | null,
>   name?: any | null,
>   rate?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taskid?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   tdesc?: any | null,
>   tname?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### delete

`tasks.delete`

Delete a billable task (sets vis\_state to 1). FreshBooks keeps it: an update with vis\_state 0 restores it.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.tasks.delete({ taskId: '2233' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `taskId` | `string \| number` | Yes | The task id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
>   task?: {
>     billable?: any | null,
>     description?: any | null,
>     id?: any | null,
>     name?: any | null,
>     rate?: {
>       amount?: any | null,
>       code?: any | null
>     } | null,
>     taskid?: any | null,
>     tax1?: any | null,
>     tax2?: any | null,
>     tdesc?: any | null,
>     tname?: any | null,
>     updated?: any | null,
>     vis_state?: any | null
>   } | null
> } | {
>   success: true
> }
> ```

***

### get

`tasks.get`

Read one billable task. (GET /accounting/account/\{accountId}/projects/tasks/\{taskId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.tasks.get({ taskId: '2233' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `taskId` | `string \| number` | Yes | The task id. |
| `include` | `projects[]` | No | Extra data to include: projects (List of Projects that contain the task) |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   billable?: any | null,
>   description?: any | null,
>   id?: any | null,
>   name?: any | null,
>   rate?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taskid?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   tdesc?: any | null,
>   tname?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

### list

`tasks.list`

List billable tasks, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.tasks.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `include` | `projects[]` | No | Extra data to include: projects (List of Projects that contain the task) |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `tasks` | `object[] \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] tasks full type
>
> ```ts theme={null}
> {
>   billable?: any | null,
>   description?: any | null,
>   id?: any | null,
>   name?: any | null,
>   rate?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taskid?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   tdesc?: any | null,
>   tname?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> }[] | null
> ```

***

### update

`tasks.update`

Change fields of a billable task. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.tasks.update({
	taskId: '2233',
	task: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `taskId` | `string \| number` | Yes | The task id. |
| `include` | `projects[]` | No | Extra data to include: projects (List of Projects that contain the task) |
| `task` | `object` | Yes | The task fields (FreshBooks wraps every body in its resource name). |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   name?: any,
>   rate?: {
>     amount?: any,
>     code?: any
>   }
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `task` | `object \| null` | No | — |

> [accordion] task full type
>
> ```ts theme={null}
> {
>   billable?: any | null,
>   description?: any | null,
>   id?: any | null,
>   name?: any | null,
>   rate?: {
>     amount?: any | null,
>     code?: any | null
>   } | null,
>   taskid?: any | null,
>   tax1?: any | null,
>   tax2?: any | null,
>   tdesc?: any | null,
>   tname?: any | null,
>   updated?: any | null,
>   vis_state?: any | null
> } | null
> ```

***

## Taxes

### create

`taxes.create`

Create a tax. Fields go in `tax`. (POST /accounting/account/\{accountId}/taxes/taxes)

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.taxes.create({
	tax: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `tax` | `object` | Yes | The tax fields (FreshBooks wraps every body in its resource name). |

> [accordion] tax full type
>
> ```ts theme={null}
> {
>   name?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tax` | `object \| null` | No | — |

> [accordion] tax full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: any | null,
>   compound?: any | null,
>   id?: any | null,
>   name?: any | null,
>   number?: any | null,
>   taxid?: any | null,
>   updated?: any | null
> } | null
> ```

***

### delete

`taxes.delete`

Delete a tax. (DELETE /accounting/account/\{accountId}/taxes/taxes/\{taxId})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.taxes.delete({ taxId: '2211' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `taxId` | `string \| number` | Yes | The tax id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`taxes.get`

Read one tax. (GET /accounting/account/\{accountId}/taxes/taxes/\{taxId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.taxes.get({ taxId: '2211' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `taxId` | `string \| number` | Yes | The tax id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tax` | `object \| null` | No | — |

> [accordion] tax full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: any | null,
>   compound?: any | null,
>   id?: any | null,
>   name?: any | null,
>   number?: any | null,
>   taxid?: any | null,
>   updated?: any | null
> } | null
> ```

***

### list

`taxes.list`

List taxes, newest first, with search filters, includes and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.taxes.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `search` | `object` | No | Search filters, sent as search\[\<name>]=\<value>. |
| `sort` | `string` | No | Sort field, `<field>_asc` or `<field>_desc`. |

> [accordion] search full type
>
> ```ts theme={null}
> {
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `page` | `any \| null` | No | — |
| `pages` | `any \| null` | No | — |
| `per_page` | `any \| null` | No | — |
| `taxes` | `object[] \| null` | No | — |
| `total` | `any \| null` | No | — |

> [accordion] taxes full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: any | null,
>   compound?: any | null,
>   id?: any | null,
>   name?: any | null,
>   number?: any | null,
>   taxid?: any | null,
>   updated?: any | null
> }[] | null
> ```

***

### update

`taxes.update`

Change fields of a tax. FreshBooks updates one phase of fields per call: send vis\_state on its own.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.taxes.update({
	taxId: '2211',
	tax: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `taxId` | `string \| number` | Yes | The tax id. |
| `include` | `string[]` | No | Extra data to include (see the list operation). |
| `tax` | `object` | Yes | The tax fields (FreshBooks wraps every body in its resource name). |

> [accordion] tax full type
>
> ```ts theme={null}
> {
>   name?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `tax` | `object \| null` | No | — |

> [accordion] tax full type
>
> ```ts theme={null}
> {
>   accounting_systemid?: any | null,
>   amount?: any | null,
>   compound?: any | null,
>   id?: any | null,
>   name?: any | null,
>   number?: any | null,
>   taxid?: any | null,
>   updated?: any | null
> } | null
> ```

***

## Team Member Rates

### list

`teamMemberRates.list`

List the billable and cost rates of team members.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.teamMemberRates.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `team_member_rates` | `object[] \| null` | No | — |

> [accordion] team\_member\_rates full type
>
> ```ts theme={null}
> {
>   rate?: any | null,
>   identity_id?: any | null,
>   business_id?: any | null
> }[] | null
> ```

***

### update

`teamMemberRates.update`

Change a team member's billable or cost rate.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.teamMemberRates.update({
	identityId: '43210',
	team_member_rate: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `identityId` | `string \| number` | Yes | The identity id. |
| `team_member_rate` | `object` | Yes | The team member rate fields (FreshBooks wraps every body in its resource name). |

> [accordion] team\_member\_rate full type
>
> ```ts theme={null}
> {
>   identity_id?: any,
>   rate?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `team_member_rate` | `object \| null` | No | — |

> [accordion] team\_member\_rate full type
>
> ```ts theme={null}
> {
>   rate?: any | null,
>   identity_id?: any | null,
>   business_id?: any | null
> } | null
> ```

***

## Team Members

### get

`teamMembers.get`

Read one team member by uuid. (GET /auth/api/v1/businesses/\{businessId}/team\_members/\{teamMemberUuid})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.teamMembers.get({ teamMemberUuid: '7f3e2d1c-0b9a-4876-a543-210fedcba987' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `teamMemberUuid` | `string \| number` | Yes | The team member uuid. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `uuid` | `any \| null` | No | — |
| `first_name` | `any \| null` | No | — |
| `middle_name` | `any \| null` | No | — |
| `last_name` | `any \| null` | No | — |
| `email` | `any \| null` | No | — |
| `job_title` | `any \| null` | No | — |
| `street_1` | `any \| null` | No | — |
| `street_2` | `any \| null` | No | — |
| `city` | `any \| null` | No | — |
| `province` | `any \| null` | No | — |
| `country` | `any \| null` | No | — |
| `postal_code` | `any \| null` | No | — |
| `phone_number` | `any \| null` | No | — |
| `business_id` | `any \| null` | No | — |
| `business_role_name` | `any \| null` | No | — |
| `active` | `any \| null` | No | — |
| `identity_id` | `any \| null` | No | — |
| `invitation_date_accepted` | `any \| null` | No | — |
| `created_at` | `any \| null` | No | — |
| `updated_at` | `any \| null` | No | — |

***

### list

`teamMembers.list`

List the team members of a business with their roles.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.teamMembers.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `active` | `boolean` | No | Only active (true) or inactive (false) team members. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `response` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |

> [accordion] response full type
>
> ```ts theme={null}
> {
>   uuid?: any | null,
>   first_name?: any | null,
>   middle_name?: any | null,
>   last_name?: any | null,
>   email?: any | null,
>   job_title?: any | null,
>   street_1?: any | null,
>   street_2?: any | null,
>   city?: any | null,
>   province?: any | null,
>   country?: any | null,
>   postal_code?: any | null,
>   phone_number?: any | null,
>   business_id?: any | null,
>   business_role_name?: any | null,
>   active?: any | null,
>   identity_id?: any | null,
>   invitation_date_accepted?: any | null,
>   created_at?: any | null,
>   updated_at?: any | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   page?: any | null,
>   per_page?: any | null,
>   total?: any | null
> } | null
> ```

***

## Thread Comments

### create

`threadComments.create`

Reply to a project discussion message. Project members are notified.

**Risk:** `destructive`

```ts theme={null}
await corsair.freshbooks.api.threadComments.create({
	threadId: '901',
	comment: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `threadId` | `string \| number` | Yes | The thread id. |
| `comment` | `object` | Yes | The comment fields (FreshBooks wraps every body in its resource name). |

> [accordion] comment full type
>
> ```ts theme={null}
> {
>   content?: any
> }
> ```

**Output:** *empty object*

***

## Time Entries

### create

`timeEntries.create`

Log a time entry (duration in seconds, started\_at, project, service, client), or start a timer with is\_logged false.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.timeEntries.create({
	time_entry: {
		is_logged: true,
		duration: 3600,
		started_at: '2026-11-28T09:00:00.000Z',
		note: 'Planning',
	},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `time_entry` | `object` | Yes | The time entry fields (FreshBooks wraps every body in its resource name). |

> [accordion] time\_entry full type
>
> ```ts theme={null}
> {
>   is_logged?: any,
>   duration?: any,
>   note?: any,
>   started_at?: any,
>   client_id?: any,
>   project_id?: any,
>   service_id?: any,
>   identity_id?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `time_entry` | `object \| null` | No | — |

> [accordion] time\_entry full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   identity_id?: any | null,
>   timer?: any | null,
>   is_logged?: any | null,
>   started_at?: any | null,
>   created_at?: any | null,
>   duration?: any | null,
>   client_id?: any | null,
>   project_id?: any | null,
>   pending_client?: any | null,
>   pending_project?: any | null,
>   pending_task?: any | null,
>   task_id?: any | null,
>   service_id?: any | null,
>   note?: any | null,
>   active?: any | null,
>   billable?: any | null,
>   billed?: any | null,
>   internal?: any | null,
>   retainer_id?: any | null
> } | null
> ```

***

### delete

`timeEntries.delete`

Delete a time entry. Cannot be undone. (DELETE /timetracking/business/\{businessId}/time\_entries/\{timeEntryId})

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.timeEntries.delete({ timeEntryId: '5095' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `timeEntryId` | `string \| number` | Yes | The time entry id. |

**Output:** `object`

> [accordion] Output full type
>
> ```ts theme={null}
> {
> } | {
>   success: true
> }
> ```

***

### get

`timeEntries.get`

Read one time entry. (GET /timetracking/business/\{businessId}/time\_entries/\{timeEntryId})

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.timeEntries.get({ timeEntryId: '5095' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `timeEntryId` | `string \| number` | Yes | The time entry id. |

**Output:** *empty object*

***

### list

`timeEntries.list`

List time entries with filters (billed, client, teammate, date range) and paging.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.timeEntries.list({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `page` | `number` | No | Page number. |
| `per_page` | `number` | No | Results per page (default 15; FreshBooks caps every page at 100). |
| `billable` | `boolean` | No | True returns entries that can be automatically added to an invoice. |
| `billed` | `boolean` | No | True returns entries that have already been added to an invoice. |
| `client_id` | `string` | No | Matches exact client id. |
| `include_deleted` | `boolean` | No | True returns deleted time entries. |
| `team` | `boolean` | No | True returns entries logged by all members of the business. |
| `include_unlogged` | `boolean` | No | True returns entries currently in progress for a running timer. |
| `started_from` | `string` | No | Matches entries that take place at or after the specified UTC date/time (ISO 8601, UTC). |
| `started_to` | `string` | No | Matches entries that take place before or at the specified UTC date/time (ISO 8601, UTC). |
| `updated_since` | `string` | No | Matches entries that have been updated at or after the specified UTC date/time (ISO 8601, UTC). |
| `identity_id` | `string` | No | Matches entries logged against a specific teammate or user. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `meta` | `object \| null` | No | — |
| `time_entries` | `object[] \| null` | No | — |

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   total_logged?: any | null,
>   total_unbilled?: any | null,
>   total?: any | null,
>   per_page?: any | null,
>   page?: any | null,
>   pages?: any | null
> } | null
> ```

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   identity_id?: any | null,
>   timer?: any | null,
>   is_logged?: any | null,
>   started_at?: any | null,
>   created_at?: any | null,
>   duration?: any | null,
>   client_id?: any | null,
>   project_id?: any | null,
>   pending_client?: any | null,
>   pending_project?: any | null,
>   pending_task?: any | null,
>   task_id?: any | null,
>   service_id?: any | null,
>   note?: any | null,
>   active?: any | null,
>   billable?: any | null,
>   billed?: any | null,
>   internal?: any | null,
>   retainer_id?: any | null
> }[] | null
> ```

***

### search

`timeEntries.search`

Search time entries across the business (the time entry details report).

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.timeEntries.search({});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `q` | `string` | No | Text to match (a person, client or project name). |
| `sort` | `string` | No | Sort, for example -started\_at. |
| `started_from` | `string` | No | Entries at or after this UTC date/time. |
| `started_to` | `string` | No | Entries at or before this UTC date/time. |

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `time_entries` | `object[] \| null` | No | — |
| `meta` | `object \| null` | No | — |
| `aggregations` | `any \| null` | No | — |
| `download_token` | `any \| null` | No | — |
| `abilities` | `object[] \| null` | No | — |

> [accordion] time\_entries full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   identity_id?: any | null,
>   timer?: any | null,
>   is_logged?: any | null,
>   started_at?: any | null,
>   created_at?: any | null,
>   duration?: any | null,
>   client_id?: any | null,
>   project_id?: any | null,
>   pending_client?: any | null,
>   pending_project?: any | null,
>   pending_task?: any | null,
>   task_id?: any | null,
>   service_id?: any | null,
>   note?: any | null,
>   active?: any | null,
>   billable?: any | null,
>   billed?: any | null,
>   internal?: any | null,
>   retainer_id?: any | null,
>   highlight?: any | null
> }[] | null
> ```

> [accordion] meta full type
>
> ```ts theme={null}
> {
>   total?: any | null,
>   per_page?: any | null,
>   page?: any | null,
>   pages?: any | null,
>   total_logged?: any | null,
>   total_unbilled?: any | null
> } | null
> ```

> [accordion] abilities full type
>
> ```ts theme={null}
> {
>   time_entry_id?: any | null,
>   abilities?: {
>     name?: any | null,
>     value?: any | null
>   }[] | null
> }[] | null
> ```

***

### update

`timeEntries.update`

Change a time entry. (PUT /timetracking/business/\{businessId}/time\_entries/\{timeEntryId})

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.timeEntries.update({
	timeEntryId: '5095',
	time_entry: {},
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `businessId` | `string \| number` | No | The numeric business id. Left out, the plugin reads it from users.me (or the businessId option). |
| `timeEntryId` | `string \| number` | Yes | The time entry id. |
| `time_entry` | `object` | Yes | The time entry fields (FreshBooks wraps every body in its resource name). |

> [accordion] time\_entry full type
>
> ```ts theme={null}
> {
>   is_logged?: any,
>   duration?: any,
>   note?: any,
>   started_at?: any,
>   timer?: {
>     id?: any
>   },
>   client_id?: any,
>   project_id?: any
> }
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `time_entry` | `object \| null` | No | — |

> [accordion] time\_entry full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   identity_id?: any | null,
>   timer?: any | null,
>   is_logged?: any | null,
>   started_at?: any | null,
>   created_at?: any | null,
>   duration?: any | null,
>   client_id?: any | null,
>   project_id?: any | null,
>   pending_client?: any | null,
>   pending_project?: any | null,
>   pending_task?: any | null,
>   task_id?: any | null,
>   service_id?: any | null,
>   note?: any | null,
>   active?: any | null,
>   billable?: any | null,
>   billed?: any | null,
>   internal?: any | null,
>   retainer_id?: any | null
> } | null
> ```

***

## Tokens

### revoke

`tokens.revoke`

Revoke an OAuth refresh or access token. The connection stops working until it is authorized again.

**Risk:** `destructive` · **Irreversible**

```ts theme={null}
await corsair.freshbooks.api.tokens.revoke({ client_id: 'app-client-id', client_secret: 'app-client-secret', token: 'refresh-token-to-revoke' });
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `client_id` | `string` | Yes | The OAuth app's client id. |
| `client_secret` | `string` | Yes | The OAuth app's client secret. |
| `token` | `string` | Yes | The refresh token (or access token) to revoke. |

**Output:** *empty object*

***

## Uploads

### attachment

`uploads.attachment`

Upload an attachment (an expense receipt, an invoice attachment). Returns the jwt to reference it on the expense or invoice.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.uploads.attachment({
	content: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `content` | `string \| object \| custom` | Yes | The file to upload (form field `content`). |

> [accordion] content full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** *empty object*

***

### image

`uploads.image`

Upload an image (an invoice logo or banner, a proposal image). Returns the jwt to reference it and a link.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.uploads.image({
	content: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `accountId` | `string \| number` | No | The accounting account id (like LJArJ4). Left out, the plugin reads it from users.me (or the accountId option). |
| `content` | `string \| object \| custom` | Yes | The file to upload (form field `content`). |

> [accordion] content full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `image` | `object \| null` | No | — |
| `link` | `any \| null` | No | — |

> [accordion] image full type
>
> ```ts theme={null}
> {
>   jwt?: any | null,
>   public_id?: any | null,
>   filename?: any | null
> } | null
> ```

***

### publicImage

`uploads.publicImage`

Upload an image that belongs to no account (an app listing logo). Returns its jwt and link.

**Risk:** `write`

```ts theme={null}
await corsair.freshbooks.api.uploads.publicImage({
	content: { base64: 'SGVsbG8gZnJvbSBDb3JzYWly', filename: 'notes.txt', contentType: 'text/plain' },
});
```

**Input**

| Name | Type | Required | Description |
| - | - | - | - |
| `content` | `string \| object \| custom` | Yes | The file to upload (form field `content`). |

> [accordion] content full type
>
> ```ts theme={null}
> string | {
>   url: string,
>   filename?: string,
>   contentType?: string
> } | {
>   base64: string,
>   filename?: string,
>   contentType?: string
> } | custom
> ```

**Output:** *empty object*

***

## Users

### me

`users.me`

Read the signed-in identity: name, email, and business\_memberships with each business id, business\_uuid and accounting account\_id the other operations need.

**Risk:** `read`

```ts theme={null}
await corsair.freshbooks.api.users.me({});
```

**Input:** *empty object*

**Output**

| Name | Type | Required | Description |
| - | - | - | - |
| `id` | `any \| null` | No | — |
| `profile` | `object \| null` | No | — |
| `first_name` | `any \| null` | No | — |
| `last_name` | `any \| null` | No | — |
| `email` | `any \| null` | No | — |
| `language` | `any \| null` | No | — |
| `confirmed_at` | `any \| null` | No | — |
| `created_at` | `any \| null` | No | — |
| `unconfirmed_email` | `any \| null` | No | — |
| `setup_complete` | `any \| null` | No | — |
| `phone_numbers` | `object[] \| null` | No | — |
| `addresses` | `any[] \| null` | No | — |
| `profession` | `object \| null` | No | — |
| `links` | `object \| null` | No | — |
| `permissions` | `object \| null` | No | — |
| `groups` | `object[] \| null` | No | — |
| `subscription_statuses` | `object \| null` | No | — |
| `integrations` | `object \| null` | No | — |
| `business_memberships` | `object[] \| null` | No | — |
| `identity_origin` | `any \| null` | No | — |
| `roles` | `object[] \| null` | No | — |

> [accordion] profile full type
>
> ```ts theme={null}
> {
>   setup_complete?: any | null,
>   first_name?: any | null,
>   last_name?: any | null,
>   phone_number?: any | null,
>   address?: any | null,
>   professions?: {
>     id?: any | null,
>     business_id?: any | null,
>     title?: any | null,
>     company?: any | null,
>     designation?: any | null
>   }[] | null
> } | null
> ```

> [accordion] phone\_numbers full type
>
> ```ts theme={null}
> {
>   title?: any | null,
>   phone_number?: any | null
> }[] | null
> ```

> [accordion] profession full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   business_id?: any | null,
>   title?: any | null,
>   company?: any | null,
>   designation?: any | null
> } | null
> ```

> [accordion] links full type
>
> ```ts theme={null}
> {
>   me?: any | null,
>   roles?: any | null
> } | null
> ```

> [accordion] permissions full type
>
> ```ts theme={null}
> {
>   rAlTo?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     onboarding_checklist.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null
>   } | null,
>   E86QZ?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     quickbooks_integration.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     attachments.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     retainers.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   RmpKp?: {
>     client.limit?: any | null,
>     staff.limit?: any | null,
>     attachments.access?: any | null,
>     advanced_accounting.access?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   J9hAK?: {
>     advanced_accounting.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     business_accountant.limit?: any | null,
>     onboarding_checklist.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   gr1ndR?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   apwodA?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     quickbooks_integration.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null
>   } | null,
>   XgGiT?: {
>     client.limit?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null
>   } | null,
>   7lwxR?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null
>   } | null,
>   4WMVg?: {
>     client.limit?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   x34yX?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null
>   } | null,
>   e1rYq?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null
>   } | null,
>   3ErwB?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null
>   } | null,
>   8NppA?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   j1412?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null
>   } | null,
>   BRAVo?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   M1oaR?: {
>     client.limit?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   E4MaY?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   M1GeK?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   7Po26?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null
>   } | null,
>   ZaZdo?: {
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     advanced_accounting.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null
>   } | null,
>   pPLMZ?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   EeCnZ?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   pe4MW?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     client.limit?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     esignatures.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null
>   } | null,
>   oN6yL?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     business_accountant.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     rich_proposals.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   dowO0g?: {
>     advanced_accounting.access?: any | null,
>     advanced_payments.access?: any | null,
>     auto_bank_import.access?: any | null,
>     autobill.limit?: any | null,
>     bank_import.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     document.limit?: any | null,
>     edit_subject_line.access?: any | null,
>     late_fee.access?: any | null,
>     late_reminder.access?: any | null,
>     payments_fees_report.access?: any | null,
>     recurring_revenue_report.access?: any | null,
>     remove_branding.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     proposals_candidate.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   yA0R2P?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null
>   } | null,
>   LJZ1p3?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   wkMd2g?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   3x42x2?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     inline_expense_edit.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null,
>   lWn0vG?: {
>     advanced_accounting.access?: any | null,
>     attachments.access?: any | null,
>     business_accountant.limit?: any | null,
>     client.limit?: any | null,
>     proposals_candidate.access?: any | null,
>     rich_proposals.access?: any | null,
>     staff.limit?: any | null,
>     BetaHeliosAsyncExpenses.access?: any | null,
>     beta_mobile_create_expense_subcategory.access?: any | null,
>     ios_beta_zendesk_widget.access?: any | null,
>     mobile_receipt_rebilling.access?: any | null,
>     helios_pushnotifications.beta.access?: any | null,
>     ios_beta_payment_schedules.access?: any | null,
>     helios_rebill_time.access?: any | null,
>     esignatures.access?: any | null,
>     helios_dashboard.access?: any | null,
>     helios_late_fee_reminder.beta.access?: any | null,
>     helios_bulk_actions_invoices.beta.access?: any | null,
>     auto_bank_import.access?: any | null,
>     helios_virtual_terminal.beta.access?: any | null,
>     helios_expense_rebilling.beta.access?: any | null,
>     helios_company_taxes.beta.access?: any | null,
>     helios_invoice_archive.beta.access?: any | null,
>     accountant_invite.access?: any | null,
>     helios_sync_throttle.beta.access?: any | null,
>     BankReconciliation.access?: any | null,
>     helios_push_resource_to_use_execute.beta.access?: any | null,
>     new_time_tracking.access?: any | null,
>     bank_rec_smart_match.access?: any | null,
>     balance_sheet.access?: any | null,
>     invoice_v2_search.access?: any | null,
>     import_items_csv.access?: any | null,
>     export_clients_csv.access?: any | null,
>     helios_virtual_terminal_tutorial.beta.access?: any | null,
>     helios_virtual_terminal_advertising.beta.access?: any | null
>   } | null
> } | null
> ```

> [accordion] groups full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   group_id?: any | null,
>   role?: any | null,
>   identity_id?: any | null,
>   business_id?: any | null,
>   active?: any | null
> }[] | null
> ```

> [accordion] subscription\_statuses full type
>
> ```ts theme={null}
> {
>   rALYo?: any | null,
>   E86Qp?: any | null,
>   RnPKp?: any | null,
>   J7nAK?: any | null,
>   gjndR?: any | null,
>   apw1A?: any | null,
>   0XaOw?: any | null,
>   7lwxr?: any | null,
>   4VMVg?: any | null,
>   x33xX?: any | null,
>   e1yRq?: any | null,
>   3eRwB?: any | null,
>   8nPPA?: any | null,
>   j1322?: any | null,
>   B3AVo?: any | null,
>   M1OaR?: any | null,
>   E3MAY?: any | null,
>   M1GeK?: any | null,
>   7PO26?: any | null,
>   ZAZdo?: any | null,
>   0PJMZ?: any | null,
>   Ee0nZ?: any | null,
>   pe6MW?: any | null,
>   oM6yL?: any | null,
>   dowQ0g?: any | null,
>   yA0R2P?: any | null,
>   LJZ1p4?: any | null,
>   wkMd2g?: any | null,
>   3x62x2?: any | null,
>   lwy0vG?: any | null
> } | null
> ```

> [accordion] integrations full type
>
> ```ts theme={null}
> {
> } | null
> ```

> [accordion] business\_memberships full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   role?: any | null,
>   unacknowledged_change?: any | null,
>   fasttrack_token?: any | null,
>   business?: {
>     id?: any | null,
>     name?: any | null,
>     account_id?: any | null,
>     date_format?: any | null,
>     address?: {
>       id?: any | null,
>       street?: any | null,
>       city?: any | null,
>       province?: any | null,
>       country?: any | null,
>       postal_code?: any | null
>     } | null,
>     phone_number?: {
>       id?: any | null,
>       phone_number?: any | null
>     } | null,
>     business_clients?: {
>       id?: any | null,
>       business_id?: any | null,
>       account_id?: any | null,
>       userid?: any | null,
>       client_business?: {
>         business_id?: any | null
>       } | null,
>       account_business?: {
>         account_business_id?: any | null,
>         account_id?: any | null
>       } | null
>     }[] | null
>   } | null
> }[] | null
> ```

> [accordion] roles full type
>
> ```ts theme={null}
> {
>   id?: any | null,
>   role?: any | null,
>   systemid?: any | null,
>   userid?: any | null,
>   created_at?: any | null,
>   links?: {
>     destroy?: any | null
>   } | null,
>   accountid?: any | null
> }[] | null
> ```

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.